[英]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.