
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)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.