[英]SOAP + WSDL + PHP
I need a litte bit help. 我需要一点帮助。 I have the following two URLS: 我有以下两个URL:
WSDL: https://amsel.dpwn.net/abholportal/gw/lp/schema/1.0/var3ws.wsdl WSDL: https : //amsel.dpwn.net/abholportal/gw/lp/schema/1.0/var3ws.wsdl
Endpoint: https://amsel.dpwn.net/abholportal/gw/lp/SoapConnector 端点: https : //amsel.dpwn.net/abholportal/gw/lp/SoapConnector
Now I want to send the server something like this: 现在,我想向服务器发送如下内容:
<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>
How can I do this in PHP? 如何在PHP中做到这一点?
Thanks! 谢谢!
I had the similar problem as well due to sparse examples on how to use SOAP with PHP. 由于关于如何在PHP中使用SOAP的稀疏示例,我也遇到了类似的问题。 Here are a couple of examples that may guide you to developing the SOAP interface. 这里有一些示例,可以指导您开发SOAP接口。
http://bisqwit.iki.fi/story/howto/phpajaxsoap/#IsSoapTheBestWay http://bisqwit.iki.fi/story/howto/phpajaxsoap/#IsSoapTheBestWay
http://geekswithblogs.net/THines01/archive/2010/03/07/callws.aspx http://geekswithblogs.net/THines01/archive/2010/03/07/callws.aspx
http://jimmyzimmerman.com/2007/02/soap-server-with-php5-part-1.html http://jimmyzimmerman.com/2007/02/soap-server-with-php5-part-1.html
SOAP is clearly an overkill for many purposes in my opinion. 在我看来,SOAP显然对于许多目的来说是一个过大的杀伤力。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.