2

我需要一点帮助。我有以下两个网址:

WSDL:https ://amsel.dpwn.net/abholportal/gw/lp/schema/1.0/var3ws.wsdl

端点:https ://amsel.dpwn.net/abholportal/gw/lp/SoapConnector

现在我想向服务器发送如下内容:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:var="https://amsel.dpwn.net/abholportal/gw/lp/schema/1.0/var3bl">
<soapenv:Header>
   <wsse:Security soapenv:mustUnderstand="1"
   xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-      secext-1.0.xsd">
      <wsse:UsernameToken>
         <wsse:Username>ws_online_retoure</wsse:Username>
         <wsse:Password
         Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-tokenprofile1.0#
         PasswordText">Anfang1!</wsse:Password>
      </wsse:UsernameToken>
   </wsse:Security>
</soapenv:Header>
<soapenv:Body>
   <var:BookLabelRequest
   portalId="OnlineRetoure"
   deliveryName="Spanien_Var3"
   shipmentReference="ShipRef Nextt"
   customerReference="1.Feld via Webservice"
   labelFormat="PDF"
   senderName1="Willi Webservice"
   senderName2="via Webservice"
   senderCareOfName="careOfName"
   senderContactPhone="0800 123456"
   senderStreet="Webservice Street"
   senderStreetNumber="8080"
   senderBoxNumber="12"
   senderPostalCode="28010"
   senderCity="Madrid"/>
</soapenv:Body>
</soapenv:Envelope>

我怎样才能在 PHP 中做到这一点?

谢谢!

4

2 回答 2

4

由于有关如何将 SOAP 与 PHP 一起使用的示例很少,我也遇到了类似的问题。这里有几个示例可以指导您开发 SOAP 接口。

http://bisqwit.iki.fi/story/howto/phpajaxsoap/#IsSoapTheBestWay

http://geekswithblogs.net/THines01/archive/2010/03/07/callws.aspx

http://jimmyzimmerman.com/2007/02/soap-server-with-php5-part-1.html

在我看来,对于许多目的而言,SOAP 显然是一种过度杀伤力。

于 2012-05-11T22:37:57.600 回答
1

请参阅NuSoap

它简化了 Web 服务和客户端的构建。

于 2012-05-11T21:08:14.160 回答