Good day. There is a server that sends me this SOAP request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bus="http://www.xxx.com/xxxserver"> <soapenv:Header/> <soapenv:Body> <bus:GetCustomerInformation> <!--Optional:--> <bus:CardNumber>1234567890</bus:CardNumber> </bus:GetCustomerInformation> </soapenv:Body> </soapenv:Envelope> 

I have to answer it in this format:

  <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <GetCustomerInformationResponse xmlns="http://www.xxx.com/xxxserver"> <GetCustomerInformationResult xmlns:a="http://schemas.datacontract.org/2004/07/ExternalCustomerSoapServer" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <a:CardNumber>1234567890</a:CardNumber> <a:City>Dfcity</a:City> <a:CityExtra i:nil="true"/> <a:Email>vasiapupkin@sobaka.ru</a:Email> <a:EmployeeNumber i:nil="true"/> <a:Fax i:nil="true"/> <a:Gender>M</a:Gender> <a:IsBlocked>false</a:IsBlocked> <a:IsInactive>false</a:IsInactive> <a:LanguageCode i:nil="true"/> <a:Name i:nil="true"/> <a:NationCode i:nil="true"/> <a:Phone>8800000000</a:Phone> <a:PoBox i:nil="true"/> <a:Street>Lenina</a:Street> <a:StreetExtra i:nil="true"/> <a:StreetNumber>1</a:StreetNumber> <a:StreetNumberExtra i:nil="true"/> <a:SurName>PUPKIN</a:SurName> <a:ZipCode>1234567</a:ZipCode> </GetCustomerInformationResult> </GetCustomerInformationResponse> </s:Body> </s:Envelope> 

How to implement the answer on your side are some examples? Read docks on SOAP on php.net very difficult docks for noob. Can I use curl? Or what other way?

  • Purely theoretically, no one bothers to get this text here using PHP. Simple echo. Well, in general, still deal with SOAP, although of course this is still the quest. - rjhdby
  • yaforyou.ru/?q=soap%20php . It was difficult, but I could. In addition to php.net there are no resources on the Internet. Only this site - ArchDemon

0