0

我正在使用 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

你能指导我解决这个问题吗?

4

1 回答 1

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 响应,以便我们可以帮助您解决问题。

于 2012-05-10T11:42:43.927 回答