SOAP how ?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
HJKOCH
Forum Newbie
Posts: 1
Joined: Sun Dec 05, 2010 4:04 am

SOAP how ?

Post by HJKOCH »

I' m having troubles to design my PHP code to run the following SOAP code. This is maybe very easy if you know how to.
Please help me and advise me how to write the maybe simple PHP code to do this.

The following code consist of the query that is wanted - and the response expected is also shown.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:par="http://www.post.dk/webpack2/parcellabel">
<soapenv:Header/>
<soapenv:Body>
<par:getVersion/>
</soapenv:Body>
</soapenv:Envelope>

Response:

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:getVersionResponse …>
<version>1.1.23</version>
</ns2:getVersionResponse>
</S:Body>
</S:Envelope>

I hope somebody will help here :-) Thanks!
User avatar
Darhazer
DevNet Resident
Posts: 1011
Joined: Thu May 14, 2009 3:00 pm
Location: HellCity, Bulgaria

Re: SOAP how ?

Post by Darhazer »

Code: Select all

$client = new SoapClient(<uri-to-wsdl>);
$response = $client->getVersion();
var_dump($response->version);
Post Reply