Jump to content

How to send a request using soap WSDL


franklinfs

Recommended Posts

Hai

 

I have the following request... How can i execute this?

 

Sample request
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:xmethods-delayed-quotes"> <soapenv:Header/> <soapenv:Body> <urn:processCheckOut soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <merchantID xsi:type="xsd:string">89734</merchantID> <passkey xsi:type="xsd:string">c6388632255eee11a3d7f91f43b9a443</passkey> <referenceID xsi:type="xsd:string">AG-1278</referenceID> <transactionID xsi:type="xsd:string">8973</transactionID> <amount xsi:type="xsd:string">2500</amount> </urn:processCheckOut> </soapenv:Body> </soapenv:Envelope>
 
 
 
Sample response message
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:xmethods-delayed-quotes" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body>
<ns1:processCheckOutResponse> <response_code xsi:type="xsd:string">00</response_code> <description xsi:type="xsd:string">OK</description> <url xsi:type="xsd:string"> <iframe src="https://172.28.229.157/Apps/iframe/checkout.php?sessionid=4d9b001e638a3f7255c0412da6af88f65759e631ce7820989622b8a6a7246291" style='border:none;width:350px;height:450px' id='iframe1'/> </url> </ns1:processCheckOutResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>

 

Link to comment
Share on other sites

Hi,

 

You need to do Soap calls, with this kind of codes :

 

 $soapClient = new SoapClient($WebserviceUrl);

        try {
                $resultWS = $soapClient->PlaceEBookOrder(array ("EBOrder" => $params));
        }
        catch (SoapFault $fault) {
                $this->log_error("place order $id_order for book :".$Ean.' format '.$EBookFormat.' copy number '.$copy.' returned error Soapclient failed :'.$fault->faultcode." - ".$fault->faultstring,true);
                die($fault->faultcode." - ".$fault->faultstring);
        }

        $result["ErrorCode"] =      (string)$resultWS->PlaceEBookOrderResult->ErrorCode;

 

Regards

Link to comment
Share on other sites

Yes I got it....

 

 

 

error_reporting(E_ALL);

ini_set('display_errors', true);

ini_set('display_startup_errors', true);

 

$data = ' '; // xml code

 

//Change this variables.

$location_URL = "WSDL url";

$action_URL = "action url";

 

$client = new SoapClient(null, array(

'location' => $location_URL,

'uri' => "",

'trace' => 1,

));

 

try{

$order_return = $client->__doRequest($data,$location_URL,$action_URL,1);

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...