我是 SOAP 新手。我正在尝试将我的应用程序集成到 SmartTurn webservice API(它是一家库存管理公司)。它们是用于 API 操作的 SOAP 和 wsdl。我是肥皂新手,所以我不知道如何在 php 中做到这一点。这是我想使用的 xml。
<?xml version="1.0" encoding="UTF-8" ?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body><saveSalesOrder
xmlns="http://www.smartturn.com/services/OccamService/sales-order">
<inCredential>
<ns1:UserId
xmlns:ns1="http://www.smartturn.com/services/occamtypes">webservice@fithoop.com.au</ns1:UserId>
<ns2:Password
xmlns:ns2="http://www.smartturn.com/services/occamtypes">secret</ns2:Password>
</inCredential>
<inSalesOrders>
<ns3:externalNumber xmlns:ns3="http://www.smartturn.com/services/sales-order-types">Ext-id-00502</ns3:externalNumber>
<ns4:type xmlns:ns4="http://www.smartturn.com/services/sales-order-types">EXTERNAL</ns4:type>
<ns5:date xmlns:ns5="http://www.smartturn.com/services/sales-order-types">2012-10-20T00:04:34.479Z</ns5:date>
<ns6:dateDue xmlns:ns6="http://www.smartturn.com/services/sales-order-types">2012-10-20T00:04:34.479Z</ns6:dateDue>
<ns7:customerName xmlns:ns7="http://www.smartturn.com/services/sales-order-types">customer name</ns7:customerName>
<ns8:customerContact
xmlns:ns8="http://www.smartturn.com/services/sales-order-types">customer contact</ns8:customerContact>
<ns9:customerContactPhone
xmlns:ns9="http://www.smartturn.com/services/sales-order-types">customer phone</ns9:customerContactPhone>
<ns10:customerAddress
xmlns:ns10="http://www.smartturn.com/services/sales-order-types">
<ns11:addressLine1
xmlns:ns11="http://www.smartturn.com/services/occamtypes">the main street</ns11:addressLine1>
<ns12:addressLine2
xmlns:ns12="http://www.smartturn.com/services/occamtypes">broadway</ns12:addressLine2>
<ns13:city
xmlns:ns13="http://www.smartturn.com/services/occamtypes">Oakland</ns13:city>
<ns14:state
xmlns:ns14="http://www.smartturn.com/services/occamtypes">California</ns14:state>
<ns15:country
xmlns:ns15="http://www.smartturn.com/services/occamtypes">USA</ns15:country>
<ns16:postalCode
xmlns:ns16="http://www.smartturn.com/services/occamtypes">94607</ns16:postalCode>
</ns10:customerAddress>
<ns17:salesRep xmlns:ns17="http://www.smartturn.com/services/sales-order-types">sales rep</ns17:salesRep>
<ns18:useShipToAsBillAddress
xmlns:ns18="http://www.smartturn.com/services/sales-order-types">false</ns18:useShipToAsBillAddress>
<ns19:shipToName xmlns:ns19="http://www.smartturn.com/services/sales-order-types">ship to name</ns19:shipToName>
<ns20:shipToContact
xmlns:ns20="http://www.smartturn.com/services/sales-order-types">ship to contact</ns20:shipToContact>
<ns21:shipToContactPhone
xmlns:ns21="http://www.smartturn.com/services/sales-order-types">ship to contact phone</ns21:shipToContactPhone>
<ns22:status xmlns:ns22="http://www.smartturn.com/services/sales-order-types">NEW</ns22:status>
<ns23:item xmlns:ns23="http://www.smartturn.com/services/sales-order-types">
<ns23:itemMasterId>BB-10</ns23:itemMasterId>
<ns23:description>this is a desc</ns23:description>
<ns23:details>these are details</ns23:details>
<ns23:orderedQuantity>
<ns26:value
xmlns:ns26="http://www.smartturn.com/services/occamtypes">10.0</ns26:value>
<ns27:unitAbbreviation
xmlns:ns27="http://www.smartturn.com/services/occamtypes">ea</ns27:unitAbbreviation>
</ns23:orderedQuantity>
<ns23:customerRequestDate>2007-03-
20T00:04:34.479Z</ns23:customerRequestDate>
<ns23:price>
<ns28:value
xmlns:ns28="http://www.smartturn.com/services/occamtypes">100.0</ns28:value>
<ns29:type
xmlns:ns29="http://www.smartturn.com/services/occamtypes">$10</ns29:type>
</ns23:price>
<ns23:vendorItemId>vendor item id</ns23:vendorItemId>
<ns23:manufacturerItemId>manf item id</ns23:manufacturerItemId>
<ns23:upcCode>UPC Code</ns23:upcCode>
<ns23:manufacturerId>manf id</ns23:manufacturerId>
</ns23:item>
<ns30:comments xmlns:ns30="http://www.smartturn.com/services/sales-order-types">This is a comment</ns30:comments>
</inSalesOrders>
</saveSalesOrder>
</soapenv:Body>
</soapenv:Envelope>
`
并且 url
$url = "https://services.smartturn.com/occam/services/OccamService?wsdl";
和我想要执行的操作是'saveSalesOrder' 我怎么能在 php 中做到这一点。
提前致谢 。