homepage Welcome to WebmasterWorld Guest from 54.166.62.226
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Php Soap
How do I send a soap envelope?
gosman

10+ Year Member



 
Msg#: 4434609 posted 10:44 pm on Mar 28, 2012 (gmt 0)

I need to send a SOAP request. I'm running PHP 5.3 with SOAP Installed.

Can anybody advise me how I would send the following SOAP request?

POST /hAPI.asmx HTTP/1.1
Host: api.example.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<SpecialOffers xmlns="https://api.example.com/hAPI.asmx">
<userName>USERNAME/userName>
<xmlParameters>
<![CDATA[
<productTypeLookup xmlns="http://tempuri.org/DummySchema.xsd">
<authorisation>
<password>PASSWORD</password>
</authorisation>
</productTypeLookup>
]]>
</xmlParameters>
</SpecialOffers>
</soap12:Body>
</soap12:Envelope>

 

enigma1

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4434609 posted 9:06 am on Mar 29, 2012 (gmt 0)

See the SoapClient::__doRequest in php, the first argument should contain the xml part and the 2nd the target url

gosman

10+ Year Member



 
Msg#: 4434609 posted 9:19 am on Mar 29, 2012 (gmt 0)

Thank you enigma1

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved