Hi,
I am trying to develop a soap client in PHP using PHP5 SOAP Extension.
I am trying to connect to the webservices provided by Rollbase
The wsdl url is
http://www.rollbase.com/webapi/wsdl/rollbase.wsdlWhen I connect to the web service in the wsdl mode, I am able to perform all the calls and everything works fine. I do it as follows
$wsdl_url= '
http://www.rollbase.com/webapi/wsdl/rollbase.wsdl';
$client = new SoapClient($wsdl_url, array('trace'=> true));
But if I connect in the non wsdl mode, like
$client = new SoapClient(null, array('location' => '
http://www.rollbase.com/webapi/services/rpcrouter', 'uri' => 'urn:Rollbase','style' => SOAP_RPC, 'use' => SOAP_ENCODED,'trace' => 1));
I am not able to make calls to the webservices because I hit Bad Types Exception when I send the parameters
To be more clear
In wsdl mode when I make a call like
$result = $soap_client->__soapCall('
search', array( 'sessionId' =>$sessionID, 'query' => $query, 'objDefName' => $objname));
I get the resule as
object(stdClass)[2]
public 'arr' =>
object(stdClass)[3]
public 'item' =>
array
0 => int '1995757' (length=7)
1 => int '1995349' (length=7)
2 => int '2097624' (length=7)
You can note that the values are of type int(they are actually Long in Java)
But if I make the same call in non wsdl mode, I get
object(stdClass)[2]
public 'arr' =>
object(stdClass)[3]
public 'item' =>
array
0 => string '1995757' (length=7)
1 => string '1995349' (length=7)
2 => string '2097624' (length=7)
The values are string..
Also when I send parameters for making call, the types of the parameters matches the expected values in wsdl mode but in non wsdl mode i get the exception
SoapFault exception: [soapenv:Server.userExcept
ion] org.xml.sax.SAXException: Bad types (class java.lang.String -> long)
My question is what makes this difference, is there some other extra setting or parameter to set while performing non wsdl calls. what exactly is the difference between these 2 modes
Is there something wrong with the server that is providing this result (the server uses Axis)
Start Free Trial