Last active
November 10, 2016 21:58
-
-
Save ederrafo/3af77b47fd5d26c407a06bd9317516e1 to your computer and use it in GitHub Desktop.
php webservice SOAP nusoap library
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define("URI_FLIGHTS", "http://10.0.0.1:80/flightsService/flights?wsdl"); | |
$nusoap_client = new nusoap_client(URI_FLIGHTS, true); | |
$nusoap_client->soap_defencoding = 'utf-8'; | |
$nusoap_client->useHTTPPersistentConnection(); | |
if( $nusoap_client->getError() ) { | |
$nusoap_client->getError(); | |
} else { | |
$request = ' | |
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:con="http://Controller.costamarBusinessLayer.com/"> | |
<soapenv:Header/> | |
<soapenv:Body> | |
<con:getInformation> | |
<requestAgency> | |
<configuration> | |
<booking>AAAA</booking> | |
<session>BBBB</session> | |
<tikecting>AAAA</tikecting> | |
</configuration> | |
<provider>113</provider> | |
<locator>QWERTY</locator> | |
</requestAgency> | |
</con:getInformation> | |
</soapenv:Body> | |
</soapenv:Envelope> | |
'; | |
$response = $nusoap_client->send($request); | |
echo "<pre>",__FILE__." on line ".__LINE__,": "; var_dump($response); echo "</pre>"; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment