Answer the question
In order to leave comments, you need to log in
How can I send xml data and get response using SOAP+PHP?
Hello. Didn't work with SOAP. Help make a request.
I need to send xml Send request
<S:Envelope>
<SOAP-ENV:Header/>
<S:Body>
<ns2:updateDataResponse>
<token>6cc1447c386b4a65b3b980eaf07f7f37f680ec4496b04f1ca2c51</token>
<tabcode>12345</tabcode>
<tabname> text</tabname>
</ns2:updateDataResponse>
</S:Body>
</S:Envelope>
<S:Envelope>
<SOAP-ENV:Header/>
<S:Body>
<ns2:updateDataResponse>
<return
><resultCode>0</resultCode>
<resultMessage>OK</resultMessage>
<serviceId>185</serviceId>
<timeStamp>1458118724461</timeStamp>
<vername>2.2</vername>
</return>
</ns2:updateDataResponse>
</S:Body>
</S:Envelope>
<?php
/*сам xml который исправно отправляется с помощью того-же SOAPUI */
$query="<code lang="xml">
<S:Envelope>
<SOAP-ENV:Header/>
<S:Body>
<ns2:updateDataResponse>
<token>6cc1447c386b4a65b3b980eaf07f7f37f680ec4496b04f1ca2c51</token>
<tabcode>kod</tabcode>
<tabname>text</tabname>
</ns2:updateDataResponse>
</S:Body>
</S:Envelope>
</code>";
/*создаю клиента*/
$client = new SoapClient ("адрес soap?wsdl", array('soap_version' => SOAP_1_2));
/*Пытаюсь отправить запрос*/
$result = $client->getTicket($query);
var_dump($result);
?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question