Ce qui suit est un exemple de requête SOAP 1.1 et la réponseMettre en œuvre SOAP 1.1 en php
POST /DEMOWebServices2.8/service.asmx HTTP/1.1
Host: api.efxnow.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "https://api.efxnow.com/webservices2.3/DealRequestAtBest"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<Authenticator xmlns="https://api.efxnow.com/webservices2.3">
<ApplicationName>string</ApplicationName>
<IPAddress>string</IPAddress>
<UserID>string</UserID>
<MachineName>string</MachineName>
</Authenticator>
</soap:Header>
<soap:Body>
<DealRequestAtBest xmlns="https://api.efxnow.com/webservices2.3">
<UserID>string</UserID>
<PWD>string</PWD>
<Pair>string</Pair>
</DealRequestAtBest>
</soap:Body>
</soap:Envelope>
Réponse -
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<DealRequestAtBestResponse xmlns="https://api.efxnow.com/webservices2.3">
<DealRequestAtBestResult>
<Success>boolean</Success>
<ErrorDescription>string</ErrorDescription>
<ErrorNumber>int</ErrorNumber>
<Confirmation>string</Confirmation>
<ConfirmationNumber>string</ConfirmationNumber>
<Rate>double</Rate>
</DealRequestAtBestResult>
</DealRequestAtBestResponse>
</soap:Body>
</soap:Envelope>
je veux savoir comment faire la demande et comment gérer la réponse si cette a dû être fait en PHP. je lis this mais je ne peux pas comprendre comment serait __setSoapHeaders()
et __call()
être mis en œuvre dans mon cas. Merci d'avance.
Regardez les tutoriels http://devzone.zend.com/article/689 –