0

I was trying to connect to asp.net webservice from PHP, I dont want to use nuSOAP I have created SOAP client using default SoapClient()

$options = array('style'=>SOAP_DOCUMENT,
        'use'=>SOAP_LITERAL,
        'soap_version'=>SOAP_1_1, 
        'exceptions'=>1, 
        'trace'=>1
    );

$clnt = new SoapClient('webserviceURL?wsdl', $options);
$clnt ->__Call('method', array('param'=>'val'));

Now, Webservice server is not recogising my Parameter that I am passing to the webservice method.

Can Anyone help me ?

2 Answers 2

2

If the webservice expects document/literal wrapped calling convention then you should put method parameters inside additional array:

$clnt ->__Call('method', array(array('param'=>'val')));
Sign up to request clarification or add additional context in comments.

Comments

0

Yes, I got the Answer

$params = array('param'=>'val');
$resp = $clnt->method(array('param'=>$params));

'method' is webservice method you want to call

Method mentioned by Furgas will also work

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.