title: Integration SmartTurn webservice API with SOAP, XML in PHP
body: <p>i am new to SOAP . I am trying to integrate my application to SmartTurn webservice API(its a inventry management company). They are SOAP and wsdl for their API operations. i am new to soap so i have no idea that how i can do this in php. here is xml  that i want to use.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;&lt;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"&gt; 
    &lt;soapenv:Body&gt;&lt;saveSalesOrder 
  xmlns="http://www.smartturn.com/services/OccamService/sales-order"&gt; 
  &lt;inCredential&gt; 
     &lt;ns1:UserId 
  xmlns:ns1="http://www.smartturn.com/services/occamtypes"&gt;webservice@fithoop.com.au&lt;/ns1:UserId&gt;  
    &lt;ns2:Password 
  xmlns:ns2="http://www.smartturn.com/services/occamtypes"&gt;secret&lt;/ns2:Password&gt;  
  &lt;/inCredential&gt; 
  &lt;inSalesOrders&gt; 
    &lt;ns3:externalNumber xmlns:ns3="http://www.smartturn.com/services/sales-order-types"&gt;Ext-id-00502&lt;/ns3:externalNumber&gt;  
    &lt;ns4:type xmlns:ns4="http://www.smartturn.com/services/sales-order-types"&gt;EXTERNAL&lt;/ns4:type&gt;  
    &lt;ns5:date xmlns:ns5="http://www.smartturn.com/services/sales-order-types"&gt;2012-10-20T00:04:34.479Z&lt;/ns5:date&gt;  
   &lt;ns6:dateDue xmlns:ns6="http://www.smartturn.com/services/sales-order-types"&gt;2012-10-20T00:04:34.479Z&lt;/ns6:dateDue&gt;  
    &lt;ns7:customerName xmlns:ns7="http://www.smartturn.com/services/sales-order-types"&gt;customer name&lt;/ns7:customerName&gt;  
    &lt;ns8:customerContact 
  xmlns:ns8="http://www.smartturn.com/services/sales-order-types"&gt;customer contact&lt;/ns8:customerContact&gt;  
    &lt;ns9:customerContactPhone 
  xmlns:ns9="http://www.smartturn.com/services/sales-order-types"&gt;customer phone&lt;/ns9:customerContactPhone&gt;  
    &lt;ns10:customerAddress 
  xmlns:ns10="http://www.smartturn.com/services/sales-order-types"&gt; 
      &lt;ns11:addressLine1 
  xmlns:ns11="http://www.smartturn.com/services/occamtypes"&gt;the main street&lt;/ns11:addressLine1&gt;  
      &lt;ns12:addressLine2 
  xmlns:ns12="http://www.smartturn.com/services/occamtypes"&gt;broadway&lt;/ns12:addressLine2&gt;  
      &lt;ns13:city 
  xmlns:ns13="http://www.smartturn.com/services/occamtypes"&gt;Oakland&lt;/ns13:city&gt;  
      &lt;ns14:state 
  xmlns:ns14="http://www.smartturn.com/services/occamtypes"&gt;California&lt;/ns14:state&gt;  
      &lt;ns15:country 
  xmlns:ns15="http://www.smartturn.com/services/occamtypes"&gt;USA&lt;/ns15:country&gt;  
      &lt;ns16:postalCode 
  xmlns:ns16="http://www.smartturn.com/services/occamtypes"&gt;94607&lt;/ns16:postalCode&gt;  
    &lt;/ns10:customerAddress&gt; 
    &lt;ns17:salesRep xmlns:ns17="http://www.smartturn.com/services/sales-order-types"&gt;sales rep&lt;/ns17:salesRep&gt;  
    &lt;ns18:useShipToAsBillAddress 
  xmlns:ns18="http://www.smartturn.com/services/sales-order-types"&gt;false&lt;/ns18:useShipToAsBillAddress&gt;  
    &lt;ns19:shipToName xmlns:ns19="http://www.smartturn.com/services/sales-order-types"&gt;ship to name&lt;/ns19:shipToName&gt;  
    &lt;ns20:shipToContact 
  xmlns:ns20="http://www.smartturn.com/services/sales-order-types"&gt;ship to contact&lt;/ns20:shipToContact&gt;  
    &lt;ns21:shipToContactPhone 
  xmlns:ns21="http://www.smartturn.com/services/sales-order-types"&gt;ship to contact phone&lt;/ns21:shipToContactPhone&gt;  
    &lt;ns22:status xmlns:ns22="http://www.smartturn.com/services/sales-order-types"&gt;NEW&lt;/ns22:status&gt;  
    &lt;ns23:item xmlns:ns23="http://www.smartturn.com/services/sales-order-types"&gt; 
      &lt;ns23:itemMasterId&gt;BB-10&lt;/ns23:itemMasterId&gt;  
      &lt;ns23:description&gt;this is a desc&lt;/ns23:description&gt;  
      &lt;ns23:details&gt;these are details&lt;/ns23:details&gt;  
      &lt;ns23:orderedQuantity&gt; 
  &lt;ns26:value 
  xmlns:ns26="http://www.smartturn.com/services/occamtypes"&gt;10.0&lt;/ns26:value&gt;  
  &lt;ns27:unitAbbreviation 
  xmlns:ns27="http://www.smartturn.com/services/occamtypes"&gt;ea&lt;/ns27:unitAbbreviation&gt;  
      &lt;/ns23:orderedQuantity&gt; 
    &lt;ns23:customerRequestDate&gt;2007-03-
  20T00:04:34.479Z&lt;/ns23:customerRequestDate&gt;  
    &lt;ns23:price&gt; 
  &lt;ns28:value 
  xmlns:ns28="http://www.smartturn.com/services/occamtypes"&gt;100.0&lt;/ns28:value&gt;  
  &lt;ns29:type 
  xmlns:ns29="http://www.smartturn.com/services/occamtypes"&gt;$10&lt;/ns29:type&gt;  
    &lt;/ns23:price&gt; 
    &lt;ns23:vendorItemId&gt;vendor item id&lt;/ns23:vendorItemId&gt;  
    &lt;ns23:manufacturerItemId&gt;manf item id&lt;/ns23:manufacturerItemId&gt;  
    &lt;ns23:upcCode&gt;UPC Code&lt;/ns23:upcCode&gt;  
    &lt;ns23:manufacturerId&gt;manf id&lt;/ns23:manufacturerId&gt;  
  &lt;/ns23:item&gt; 
  &lt;ns30:comments xmlns:ns30="http://www.smartturn.com/services/sales-order-types"&gt;This is a comment&lt;/ns30:comments&gt;  
  &lt;/inSalesOrders&gt; 
  &lt;/saveSalesOrder&gt; 
  &lt;/soapenv:Body&gt; 
  &lt;/soapenv:Envelope&gt;
  </code></pre>
  
  <p>`</p>
  
  <p>and the url is 
  <code>$url = "https://services.smartturn.com/occam/services/OccamService?wsdl";</code>
  and the operation that i want to perform is 'saveSalesOrder'
  how can i do that in php.</p>
  
  <p>Thanks in advance .</p>