1

I have this WSDL from a SOAP ASMX webService

  <s:element name="Login">
    <s:complexType>
      <s:sequence>
        <s:element minOccurs="0" maxOccurs="1" name="pr_UserName" type="s:string" />
        <s:element minOccurs="0" maxOccurs="1" name="pr_Password" type="s:string" />
        <s:element minOccurs="1" maxOccurs="1" name="pr_AbortExistingSession" type="s:boolean" />
      </s:sequence>
    </s:complexType>
  </s:element>
  <s:element name="LoginResponse">
    <s:complexType>
      <s:sequence>
        <s:element minOccurs="1" maxOccurs="1" name="LoginResult" type="s:boolean" />
      </s:sequence>
    </s:complexType>
  </s:element>

In php i do :

$client = new SoapClient("http://MyWebService.asmx?WSDL");
$result = $client->Login(array('pr_UserName' => 'MYACCOUNT', 'pr_Password' => 'MYPASSWORD', 'pr_AbortExistingSession' => 'true' ))->LoginResult;        
echo $result;

i get this error :

System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.NullReferenceException: Object reference not set to an instance of an object. at NjoynDataGateway.Login(String pr_UserName, String pr_Password, Boolean pr_AbortExistingSession) --- End of inner exception stack trace --- 

Any idea what i am doing wrong ?

Thanks for the help !!

JP Rioux
  • 19
  • 1
  • 4
  • Read http://stackoverflow.com/questions/11593623/how-to-make-a-php-soap-call-using-the-soapclient-class – Mate Feb 25 '15 at 16:59
  • i tried different methods found on this post and it still give me the same error message. I think my PHP code is correct. It might be the WSDL syntax or web service function ? – JP Rioux Feb 25 '15 at 18:21

0 Answers0