Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat is an XmlNode?
    primarykey
    data
    text
    <p>I am trying to submit data to a web service using PHP and nusoap. The web service operation I'm calling is located here: <a href="http://service.leads360.com/ClientService.asmx?op=AddLeads" rel="nofollow">http://service.leads360.com/ClientService.asmx?op=AddLeads</a> </p> <p>The operation's expected parameters are <code>username</code> as string, <code>password</code> as string, and <code>leads</code> as XmlNode. For this XmlNode they give examples of the schema and xml doc:</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><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>So I copied the xml doc they gave and turned it into an array, put that array inside another array called <code>$params</code> along with <code>username</code> and <code>password</code> and executed </p> <pre><code>$result = $client-&gt;call('AddLeads', $params); </code></pre> <p>Unfortunately it is giving me the following error:</p> <pre><code>[faultcode] =&gt; soap:Server [faultstring] =&gt; System.Web.Services.Protocols.SoapException: Server was unable to process request. ---&gt; System.NullReferenceException: Object reference not set to an instance of an object. at LeadManager.Business.XmlHelper.RemoveNamespace(XmlNode xml, Boolean asElement) in c:\Code\DEV\LeadManager_Business\Utilities\XmlHelper.cs:line 323 at LeadManagerService.ClientService.InsertSerializedLeads(XmlNode descriptors) at LeadManagerService.ClientService.InsertLeads(XmlNode descriptor) at LeadManagerService.Invoker 1.Invoke(ServiceContext context, String methodName, ICredentials credentials, Object parameters, Requestor requestor) at LeadManagerService.ClientService.AddLeads(String username, String password, XmlNode leads) --- End of inner exception stack trace --- </code></pre> <p>I pasted my code at: <a href="http://pastebin.com/7jbPGuqn" rel="nofollow">http://pastebin.com/7jbPGuqn</a>. </p> <p>I am also pasting the array I am passing as the leads parameter below. Please tell me if the array represents the xml doc in the example and if it is a valid <code>XmlNode</code>. </p> <pre><code>Array ( [Leads] =&gt; Array ( [Lead] =&gt; Array ( [0] =&gt; Array ( [Status] =&gt; Array ( ) [Status_attr] =&gt; Array ( [StatusId] =&gt; 2 ) [Campaign] =&gt; Array ( ) [Campaign_attr] =&gt; Array ( [CampaignId] =&gt; 3 ) [Agent] =&gt; Array ( ) [Agent_attr] =&gt; Array ( [AgentId] =&gt; 1 ) [Fields] =&gt; Array ( [Field] =&gt; Array ( [0] =&gt; Array ( ) [1] =&gt; Array ( ) [0_attr] =&gt; Array ( [FieldId] =&gt; 2 [Value] =&gt; F1Name ) [1_attr] =&gt; Array ( [FieldId] =&gt; 3 [Value] =&gt; L1Name ) [2] =&gt; Array ( ) [2_attr] =&gt; Array ( [FieldId] =&gt; 4 [Value] =&gt; a@y.com ) [3] =&gt; Array ( ) [3_attr] =&gt; Array ( [FieldId] =&gt; 5 [Value] =&gt; 111111111 ) [4] =&gt; Array ( ) [4_attr] =&gt; Array ( [FieldId] =&gt; 6 [Value] =&gt; ) ) ) ) [1] =&gt; Array ( [Fields] =&gt; Array ( [Field] =&gt; Array ( [0] =&gt; Array ( ) [1] =&gt; Array ( ) [0_attr] =&gt; Array ( [FieldId] =&gt; 2 [Value] =&gt; F2Name ) [1_attr] =&gt; Array ( [FieldId] =&gt; 3 [Value] =&gt; L2Name ) [2] =&gt; Array ( ) [2_attr] =&gt; Array ( [FieldId] =&gt; 4 [Value] =&gt; b@y.com ) [3] =&gt; Array ( ) [3_attr] =&gt; Array ( [FieldId] =&gt; 5 [Value] =&gt; 222222222 ) ) ) ) [2] =&gt; Array ( [Fields] =&gt; Array ( [Field] =&gt; Array ( [0] =&gt; Array ( ) [1] =&gt; Array ( ) [0_attr] =&gt; Array ( [FieldId] =&gt; 2 [Value] =&gt; F3Name ) [1_attr] =&gt; Array ( [FieldId] =&gt; 3 [Value] =&gt; L3Name ) [2] =&gt; Array ( ) [2_attr] =&gt; Array ( [FieldId] =&gt; 4 [Value] =&gt; c@y.com ) [3] =&gt; Array ( ) [3_attr] =&gt; Array ( [FieldId] =&gt; -9999999 [Value] =&gt; 333333333 ) ) ) ) ) ) ) </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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