I am new to SOAP and tryign to call webservice which is hosted on somewhereelse.
I am trying to call "IsUniqueUser" webservice which check whether the user is unique or not.
Following is schema for service..
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:ser="some service" xmlns:xsd="some xsd" xmlns:xsd1="">
<soap:Header/>
<soap:Body>
<ser:isUniqueUser>
<!--Optional:-->
<ser:request>
<xsd:userName>SomeValidUserName</xsd:userName>
</ser:request>
</ser:isUniqueUser>
</soap:Body>
</soap:Envelope>
And i am trying to invoke this xervice in php using following code
$client = new SoapClient('Some.wsdl');
And after http authentication i am trying to call the isUniqueUser Method and passed "userName" as parameter.
$unique = $client->__soapCall('isUniqueUser', array('userName' =>'vish123'));
But nothing work out and i am getting following error
stdClass Object
(
[return] => stdClass Object
(
[errorCode] => 11ARPMWS1004
[errorMessage] => null. null
[status] => Failure
[uniqueUser] =>
)
)
I ahve tried to pass parameter in many ways like
$params = array('UserName' =>$_POST['userName']);
$unique = $client->__soapCall("isUniqueUser", $params);
OR
$unique = $client->isUniqueUser($params);
OR
$unique = $client->_soapCall('isUniqueUser', array('paramaters'=>$params));
OR
$unique = $client->_soapCall('isUniqueUser', array('request'=>$params));
And still i am getting the same error. I have contacted with provider for this issue and they said there is something wrong with code while passing the parameter.
Can anyone please let me know how to fix this issue?
Thanks