使用Web连接器将数据同步到Quickbooks时出现ReceiveResponseXML错误

时间:2012-05-10 08:35:26

标签: quickbooks qbwc

我正在使用webconnector将我的数据同步到快速书桌面。我收到以下错误。

> QBWC1042: ReceiveResponseXML failed Error message:
> System.Web.Services.Protocols.SoapException: Server was unable to
> process request. ---> System.NullReferenceException: Object reference
> not set to an instance of an object.    at
> QuickBooksItemOps.extractItemQueryResponses(String response, Session
> sess) in
> c:\inetpub\wwwroot\QWCInvoiceSample\service\App_Code\QuickBooksItemOps.cs:line
> 39    at SampleController.processLastAction(Session sess, String
> response) in
> c:\inetpub\wwwroot\QWCInvoiceSample\service\App_Code\SampleController.cs:line
> 188    at QWCInvoiceSample.receiveResponseXML(String ticket, String
> response, String hresult, String message) in
> c:\inetpub\wwwroot\QWCInvoiceSample\service\App_Code\QWCInvoiceSample.cs:line
> 290    --- End of inner exception stack trace --- More info:
> StackTrace =    at
> System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
> message, WebResponse response, Stream responseStream, Boolean
> asyncCall)    at
> System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
> methodName, Object[] parameters)    at
> QBWebConnector.localhost.WCWebServiceDoc.receiveResponseXML(String
> ticket, String response, String hresult, String message)    at
> QBWebConnector.localhost.WCWebService.receiveResponseXML(String
> ticket, String response, String hresult, String message)    at
> QBWebConnector.SOAPWebService.receiveResponseXML(String wcTicket,
> String response, String hresult, String message)    at
> QBWebConnector.WebService.do_receiveResponseXML(String wcTicket,
> String response, String hresult, String message, Boolean& success,
> Boolean& timeout) Source = System.Web.Services
你可以指导我解决这个问题。

1 个答案:

答案 0 :(得分:1)

您的C#代码引发了错误。修复你的代码。

> System.Web.Services.Protocols.SoapException: Server was unable to
> process request. ---> System.NullReferenceException: Object reference
> not set to an instance of an object.    at
> QuickBooksItemOps.extractItemQueryResponses(String response, Session
> sess) in
> c:\inetpub\wwwroot\QWCInvoiceSample\service\App_Code\QuickBooksItemOps.cs:line
> 39    at SampleController.processLastAction(Session sess, String
> response) in
> c:\inetpub\wwwroot\QWCInvoiceSample\service\App_Code\SampleController.cs:line
> 188  

或至少发布您的代码,以及您正在解析的qbXML响应,以便我们可以帮助您排除故障。