web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

GP Webservice Invalid Operation Exception

(0) ShareShare
ReportReport
Posted on by 35

I'm trying to call the GetPayablesDocumentList method in the webservice and get back an error "The application encountered an unhandled system exception.  Contact your system administrator for details."

The Exception console shows this error "Invalid command sent to ExecuteXmlReader.  The command must return an Xml result."

Following is the xml recieved:

<?xml version="1.0"?>
<RequestObjects>
  <Context xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/dynamics/2006/01">
    <CultureName />
    <CurrencyType>Transactional</CurrencyType>
    <RoleKey>
      <Id xmlns="http://schemas.microsoft.com/dynamics/security/2006/01">someid</Id>
    </RoleKey>
  </Context>
  <PayablesDocumentCriteria xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <Date>
      <EqualValue xsi:nil="true" />
      <NotEqualValue xsi:nil="true" />
      <Items />
      <From>2000-01-01T00:00:00</From>
      <To>2012-01-01T00:00:00</To>
      <GreaterThan xsi:nil="true" />
      <LessThan xsi:nil="true" />
    </Date>
    <VendorId>
      <EqualValue>12--345678901</EqualValue>
      <Items />
    </VendorId>
    <Type>
      <EqualValue>Invoice</EqualValue>
      <NotEqualValue xsi:nil="true" />
      <Items />
    </Type>
  </PayablesDocumentCriteria>
</RequestObjects>

I'm not sure how to proceed.  The stack trace indicates an internal error of some kind, but i'm not sure how to resolve.


Server stack trace:
   at Microsoft.Dynamics.GP.eConnect.eConnectMethods.eConnect_Requester(String ConnectionString, ConnectionStringType ConnectionType, String sXML)
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)

Exception rethrown at [0]:
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at Microsoft.Dynamics.GP.eConnect.eConnectMethods.eConnect_Requester(String ConnectionString, ConnectionStringType ConnectionType, String sXML)
   at Microsoft.Dynamics.GP.EConnectAdapter.ExecuteRead(eConnectOut ecOut, Context context)
   at Microsoft.Dynamics.GP.EConnectAdapter.GetList[DetailType,SummaryType](Criteria criteria, Context context)
   at Microsoft.Dynamics.GP.GreatPlainsBusinessService.GetListFromSource[DetailType,SummaryType](Criteria criteria, Context context)
   at Microsoft.Dynamics.Common.BusinessService.GetList[DetailType,SummaryType](Criteria criteria, Context context)

I'm using GP Dynamics v10.

Thanks -- Dan'l

 

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Dan Lindberg Profile Picture
    35 on at

    We found the problem, thanks to a helpful MS support call.  I had used a ServiceReference instead of a WebReference in my project.  Once i changed that, it worked as expected.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans