Jump to content

send an array of string via soap WSDL


tincboy

Recommended Posts

Hello,

I'm working with a website's soap services to communicate with their servers,

They have sent me a sample code of .Net that works properly for all methods of their web services,

But while I'm trying to use the same web services via php-soap the functions that has array of string as a parameter for a method doesn't work at all, ( the other functions work fine )

Here is the sample code of .Net:

            webServiceType ws = new webServiceType();
            string res = ws.methodX("username", "password", new string[] { "x" ,  "y" });

but this code in PHP doesn't work fine and throw an exception

$client = new SoapClient("http://webserviceURL.com?WSDL",array("features" => SOAP_SINGLE_ELEMENT_ARRAYS));

$response  = $client->methodX("username","password",array ( "x" , "y" ));

Any suggestion on how to pass an array of string to a method via soap- WSDL?

 

 

Link to comment
https://forums.phpfreaks.com/topic/211206-send-an-array-of-string-via-soap-wsdl/
Share on other sites

Hey,

 

I just googled it and apart from php.net there is a page

 

http://www.phpbuilder.com/columns/adam_delves20060606.php3

 

towards the bottom of the page  there is some code that looks like yours, i havent, but if you read the whole tutorial it may be of some help

 

:)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.