Jump to content

Archived

This topic is now archived and is closed to further replies.

chrisrikli

PEAR:SOAP Help: Soap Headers

Recommended Posts

I'm trying to use the PEAR::SOAP class to communicate with a SOAP server. I've read every tutorial I can find but none of them address how to deal with headers. I've looked through the PEAR::SOAP source code and I know that there are functions and classes to handle this, but I'm not sure how to implement them.

If anyone has any experience with this it would be wonderful. I've been killing myself for the last 48 hours trying to figure this out.

Here is the way that the formatted SOAP XML will need to look:
[code]
<?xml version="1.0" encoding="UTF-8" ?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:auth="http://www.ups.com/schema/xpci/1.0/auth">
<env:Header>
    <auth:AccessRequest>
        <auth:UserId>theUserId</auth:UserId>
        <auth:Password>thePassword</auth:Password>
        <auth:AccessLicenseNumber>theAccessLicenseNum</auth:AccessLicenseNumber>
    </auth:AccessRequest>
</env:Header>
<env:Body>
</env:Body>
<env:Envelope>
[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.