Click here to Skip to main content
12,295,976 members (53,834 online)
Rate this:
Please Sign up or sign in to vote.
See more: PHP SOAP WebService
Hi All,
i am new to SOAP and i had a requirement of integrating in my application, so i need help in integrating it.

This is the sample request which i has to send
<soapenv:Envelope xmlns:soapenv="" xmlns:ser="" xmlns:web=""> <soapenv:Header/> <soapenv:Body> <ser:GetTransactionData> <ser:transactionQueryRequest> <web:Hash>557b2622a688ea804be037314b724ef2af7b101834ea997d588687a891c4369059744a381ba068c0c571ea7b903716802c4b95f771bfddd0d92597fc98e0dfd2</web:Hash> <web:ProductId>3904</web:ProductId> <web:TransactionReference>0000009</web:TransactionReference> </ser:transactionQueryRequest> </ser:GetTransactionData> </soapenv:Body> </soapenv:Envelope>

And i don't know how to send a request can any one help.

and they provided some reference links also:[^][^]

Thanks in advance.
Posted 19-Sep-12 19:59pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You need to do it with __doRequest

ini_set(‘display_errors’, true);
ini_set(‘display_startup_errors’, true);
$test = ‘xmlns:xsi=”” xmlns:xsd=”” xmlns:soap=””>
Keep your XML here to send request using SOAP. And yo will get response by reading predefine XML tags.
//Change this variables.
$location_URL = ‘http://write_your_location_url.asmx’;
$action_URL = “http://write_your_action_to_perform_url.asmx”;

$client = new SoapClient(null, array(
‘location’ => $location_URL,
‘uri’      => “”,
‘trace’    => 1,
$order_return = $client->__doRequest($test,$location_URL,$action_URL,1);
//Get response from here
}catch (SoapFault $exception){
Loke.mysore 20-Sep-12 4:14am
Thanks for your response-:

I had tried this but i am not getting any response or exceptions.
is there any properties to be enabled to use this service in php server.
Kuthuparakkal 20-Sep-12 4:21am
You should enable SOAP support from php.ini file.
Things to check:
1. in php.ini, you have the line:
2. in php.ini, you have:
extension_dir = ""
3. in the ext directory, you have the file:
Loke.mysore 21-Sep-12 3:27am
Thanks this is working fine and if you know to do the same with wsdl can you please suggest me .
Kuthuparakkal 21-Sep-12 3:53am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.160525.2 | Last Updated 20 Sep 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100