[英]WSO2 WSF/PHP server with visual foxpro client
我正在使用WSO2 WSF / PHP(沼澤),並且試圖從foxpro客戶端使用樣本Web服務(echo_service.php)。 我嘗試了以下代碼,但沒有成功:
TEXT TO requestPayloadString NOSHOW
<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Header/>
<soapenv:Body>
<ns1:echoString xmlns:ns1="http://wso2.org/wsfphp/samples">
<text>Hello World!</text>
</ns1:echoString>
</soapenv:Body>
</soapenv:Envelope>
ENDTEXT
LOCAL httpRequest
httpRequest = CREATEOBJECT("WinHttp.WinHttpRequest.5.1")
httpRequest.Open("GET", "http://192.168.56.101/samples/echo_service.php", .F.)
httpRequest.SetRequestHeader("Content-Type", "text/xml; charset=utf-8")
httpRequest.SetRequestHeader("SOAPAction", "http://wso2.org/wsfphp/samples/echoString")
httpRequest.Send(requestPayloadString)
? httpRequest.ResponseText
? TRANSFORM( httpRequest.Status )
? TRANSFORM( httpRequest.StatusText )
上面的代碼返回status = 200
且statustext = OK
的服務描述(Deployed Services samples_echo_service.php可用操作echoString)。
使用POST
我得到
Transport identified SOAP version does not match with SOAP message version
status=500 statustext=Internal Server Error
下一個代碼返回一個OLE error
( Error 1429
):
SoapMapper:Restoring data into SoapMapper returnVal failed HRESULT=0x80070057:
The parameter is incorrect.
- Client:Unspecified client error. HRESULT=0x80070057: The parameter is incorrect.
lcWSDL = "http://192.168.56.101/samples/echo_service.php?wsdl"
loSoap = Createobject("mssoap.soapclient30")
loSoap.MSSoapInit(lcWSDL)
loSoap.echoString("hello")
php中的客戶端示例工作正常。 該代碼可與其他Web服務一起使用(嘗試http://webservicex.net/periodictable.asmx )
需要任何幫助來解決此問題。
另外,如果以太復雜的方式使用WSO2 WSF / PHP的Web服務,是否有任何與Visual Foxpro兼容的PHP替代品?
謝謝。
在分析和比較由foxpro和工作的php客戶端發送的標頭之后,唯一的區別是:
httpRequest.SetRequestHeader("Content-Type", "application/soap+xml;charset=UTF-8")
替換內容類型可以解決此問題,但是我仍然無法使用soapclient ...
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.