Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Unlike an element who's value is something simple as an int or string, an <code>XmlNode</code> is a more complex structure, it is an XML element.</p> <p>Inside the WSDL of the service you will find the following for the <code>AddLeads</code> element:</p> <pre><code>&lt;s:element name="AddLeads"&gt; &lt;s:complexType&gt; &lt;s:sequence&gt; &lt;s:element minOccurs="0" maxOccurs="1" name="username" type="s:string"/&gt; &lt;s:element minOccurs="0" maxOccurs="1" name="password" type="s:string"/&gt; &lt;s:element minOccurs="0" maxOccurs="1" name="leads"&gt; &lt;s:complexType mixed="true"&gt; &lt;s:sequence&gt; &lt;s:any/&gt; &lt;/s:sequence&gt; &lt;/s:complexType&gt; &lt;/s:element&gt; &lt;/s:sequence&gt; &lt;/s:complexType&gt; &lt;/s:element&gt; </code></pre> <p>This is the schema for the <code>AddLeads</code> element. The schema will be used to validate the markup you provide.</p> <p>Notice that <code>username</code> and <code>password</code> have the type string, while <code>leads</code> is "any" complex type. That will mean a message like this one:</p> <pre><code>&lt;soapenv:Body&gt; &lt;AddLeads&gt; &lt;username&gt;foo&lt;/username&gt; &lt;password&gt;bar&lt;/password&gt; &lt;leads&gt; You may enter ANY elements at this point &lt;/leads&gt; &lt;/AddLeads&gt; &lt;/soapenv:Body&gt; </code></pre> <p>But "any" complex type is a little bit to wide as a definition, so the creators of the web service decided to limit it to something they recognize as useful information. The following schema limits the "any" in the context of the <code>AddLeads</code> operation:</p> <p><a href="http://service.leads360.com/Documentation/Schemas/Client/Leads.Request.xsd" rel="nofollow">http://service.leads360.com/Documentation/Schemas/Client/Leads.Request.xsd</a></p> <p>for which the following is a valid instance:</p> <p><a href="http://service.leads360.com/Documentation/Examples/Client/AddLeads.leads.xml" rel="nofollow">http://service.leads360.com/Documentation/Examples/Client/AddLeads.leads.xml</a></p> <p>I don't know PHP but your code must generate a message that respects the web service WSDL types an the <code>leads</code> type.</p> <p>I suggest you use a tool like <a href="http://www.soapui.org/" rel="nofollow">SoapUI</a> to create requests to call the web service. Once you get a valid message content with a successful response, adapt your PHP code to generate the same format. You will also find (another tool) the <a href="http://ws.apache.org/commons/tcpmon/tcpmontutorial.html" rel="nofollow">TCP Monitor</a> very useful in seeing what messages get exchanged between your client and the web service.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload