【问题标题】:SOAP + WSDL + PHPSOAP + WSDL + PHP
【发布时间】:2012-05-20 11:21:46
【问题描述】:

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

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 中做到这一点?

谢谢!

【问题讨论】:

  • 我也想知道这个,SOAP是我用过的最烦人的东西,我想知道怎么做这样的事情。

标签: php xml soap wsdl


【解决方案1】:

NuSoap

它简化了 WebServices 和客户端的构建。

【讨论】:

  • 感谢您的提示。但我不明白我是如何连接到网址并发送数据的。我需要一个如何发送数据的简单示例。
【解决方案2】:

由于关于如何将 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 对于许多目的来说显然是一种过度杀伤力。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-01-17
    • 1970-01-01
    • 2018-04-19
    • 2016-03-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多