php - How can i write a Nusoap client script for asmx web service? -


P>

This is a request (using a soap UI):

& lt; Soaps: envelope xmlns: soap = "http: /www.w3.org/2003/05/soap-envelope" xmlns: res = "namepaceurl" & gt; & Lt; Soap: Header & gt; & Lt; Race: AuthHeader & gt; & Lt; - Optional: - & gt; & Lt; Race: username & gt; MyUser & lt; / Race: username & gt; & Lt; - Optional: - & gt; & Lt; Race: Password & gt; Mypass & lt; / Race: Password & gt; & Lt; / Race: AuthHeader & gt; & Lt; / Soap: Header & gt; & Lt; Soaps: Body & gt; & Lt; Race: LoanStatus & gt; & Lt; Race: iAccountNbr & gt; & Lt; / Race: iAccountNbr & gt; & Lt; Race: iResortNbr> & Lt; / Race: iResortNbr & gt; & Lt; - Optional: - & gt; & Lt; Race: strXRef & gt; & Lt; / Race: strXRef & gt; & Lt; / Race: LoanStatus & gt; & Lt; / Soap: body & gt; & Lt; / Soap: Envelope & gt;

Here is the response (SAPUI): & lt; Soaps: envelope xmlns: soap = "http://www.w3.org/2003 / 05 / soap-envelope" xmlns: res = "namepaceurl" & gt; & Lt; Soap: Header & gt; & Lt; Race: AuthHeader & gt; & Lt; - Optional: - & gt; & Lt; Race: username & gt; MyUser & lt; / Race: username & gt; & Lt; - Optional: - & gt; & Lt; Race: Password & gt; Mypass & lt; / Race: Password & gt; & Lt; / Race: AuthHeader & gt; & Lt; / Soap: Header & gt; & Lt; Soaps: Body & gt; & Lt; Race: LoanStatus & gt; & Lt; Race: iAccountNbr & gt; & Lt; / Race: iAccountNbr & gt; & Lt; Race: iResortNbr> & Lt; / Race: iResortNbr & gt; & Lt; - Optional: - & gt; & Lt; Race: strXRef & gt; & Lt; / Race: strXRef & gt; & Lt; / Race: LoanStatus & gt; & Lt; / Soap: body & gt; & Lt; / Soap: Envelope & gt;

If you need to use actually NuSoap (I recommend using the PHP-native soap extension!), See customer's samples in the following:

  & lt ;? Drag the need_once into Php // NuSOAP code ('nusoap.php'); // Client Example $ client = Create new vinyl ('http: //localhost/phphack/helloworld.php'); // call SOAP method $ result = $ client- & gt; Call ('hello', array ('name' => gt; 'Scott')); // Display results print_r ($ result); ? & Gt;  

From there it should be straightforward.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -