Answer the question
In order to leave comments, you need to log in
How to login to SOAP service?
There is a request structure:
POST https://Ñ…Ñ…Ñ…Ñ…Ñ…Ñ…&WSSOAP=1 HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "document/http://Ñ…Ñ…Ñ…Ñ…Ñ…:testStatus"
Content-Length: 572
Host: xxxxxx
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="nameSpace">
<soapenv:Header>
<Token xmlns="http://xxxxxx">Login</UsernameToken>
<Password xmlns="http://xxxxxx">Password</PasswordText>
<Session xmlns="http://xxxxxx">Session</SessionType>
</soapenv:Header>
<soapenv:Body>
<ws:testStatus_Input>
<ws:statId>xxxxxx</ws:statId>
</ws:testStatus_Input>
</soapenv:Body>
</soapenv:Envelope>
$client = new SoapClient("wsdl.wsdl", Array("exceptions"=>0,"trace" => 1));
$headerbody = array('Token' => 'Login',
'Password' => 'Password');
$header = new SOAPHeader('nameSpace', 'RequestorCredentials', $headerbody);
$client->__setSoapHeaders($header);
$result = $client->testStatus(array("statId"=>"xxxxxx"));
echo $result;
Answer the question
In order to leave comments, you need to log in
Yes, I'm sorry, I ruled something, I wanted it shorter. In fact, this is exactly what it looks like:
<UsernameToken xmlns="http://xxxxxx">Login</UsernameToken>
<PasswordText xmlns="http://xxxxxx">Password</PasswordText>
<SessionType xmlns="http://xxxxxx">Session</SessionType>
Friends, the topic is relevant and of the same type.
$headerbody = array(
'UsernameToken' => Token',
'PasswordText' => 'Text',
'SessionType' => 'Type');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question