I’m new to soap in general and am stuck on a problem. I’m hoping someone with more experience can help.
I have built a simple php client that is consuming a .NET server. Upon call of the function, I receive a “Unsupported HTTP response status 400 Bad Request” error.
Here is my code for the client:
$mysoapmsg = ‘<?xml version="1.0"?>Some stuff in here’;
$wsdl = ‘https://api.thisdomain.com/someservice.svc?wsdl’;
$username= ‘xusername’;
$password = ‘xpassword’;
$soapHeaderParameters = Array(‘login’ => $username, ‘password’ => $password);
$soapFunction = ‘XFunction’;
$client = new soapclient($wsdl, true);
$client->setHeaders($soapHeaderParameters);
$msg = $client->serializeEnvelope("$mysoapmsg");
$result = $client->call($soapFunction, $msg);
I know the $mysoapmsg is valid because it was given to me by the developer of the server. For what it’s worth, I am using the latest version of nusoap. Forgive my ignorance, but any thoughts of why I’m receiving a 400 error? Thank you in advance!