5
我是soapclient的新手,我试着在网上做一些研究,也尝试过在肥皂上编码,但看起来这仍然不适用于我,只是在这里徘徊任何人都可以指出,也许给我一些例子,我怎样才能真正使用soapclint从下面的Web服务器获得反馈?如何在php上使用SoapClient
POST /webservices/tempconvert.asmx HTTP/1.1
Host: www.w3schools.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri.org/CelsiusToFahrenheit"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<CelsiusToFahrenheit xmlns="http://tempuri.org/">
<Celsius>string</Celsius>
</CelsiusToFahrenheit>
</soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<CelsiusToFahrenheitResponse xmlns="http://tempuri.org/">
<CelsiusToFahrenheitResult>string</CelsiusToFahrenheitResult>
</CelsiusToFahrenheitResponse>
</soap:Body>
</soap:Envelope>
<?php
$url = "http://www.w3schools.com/webservices/tempconvert.asmx?WSDL";
$client = new SoapClient($url);
?>
我应该怎样做下一步,以便我能得到回应?
@Pascal MARTIN你是超人......感谢这个例子......现在我更了解soapclient的工作方式。谢谢:) – 2010-04-08 22:57:59
不客气:-)玩得开心! – 2010-04-09 04:24:35
我再次面对saop的一些问题..不知道你是否知道我的代码出了什么问题?请clikc在这个问题的链接http://stackoverflow.com/questions/2619519/soap-client-not-working-in-php谢谢 – 2010-04-12 02:22:12