2013-01-14 65 views
0

我正在使用支付網關的Web服務。我寫了下面的代碼。它在Windows XP操作系統中工作。將XML發送到Web服務時在Visual Basic 6.0中發生-2147467259錯誤

但是,當我在「Windows Embedded System(操作系統)」中運行此應用程序時,它顯示爲「系統錯誤-2147467259」。

我無法追蹤錯誤。請幫幫我。

下面是代碼: 昏暗的VXML 設置httpReq =的CreateObject(" Microsoft.XMLHTTP ") VXML = BuildXML() VXML = SoapWrapper(VXML)

httpReq.open "POST", webServiceUrl, False 
httpReq.setRequestHeader "Content-Type", "text/xml" 
httpReq.setRequestHeader "Connection", "close" 
httpReq.setRequestHeader "SOAPAction", transactionUrl 
httpReq.send vXML 

我收到錯誤行「httpReq.send vXML」。

感謝

回答

0

試試這個

httpReq.send pvToByteArray(vXML) 
... 

Private Function pvToByteArray(sText As String) As Byte() 
    pvToByteArray = StrConv(sText, vbFromUnicode) 
End Function 

你可能會以某種方式有 「特殊」 的XML字符串中的字符。

相關問題