views:

288

answers:

0

When I'm trying to connect to a webservice I always get the next fault

SoapFault exception: [s:Sender] An error occurred when verifying security for the message

I also have to use a security header, full soap request is send:

<env:Envelope>
<env:Header>
<ns2:Action env:mustUnderstand="1">
http://ws.agiv.be/crabtools/ICRABTools/GetAddressLocation
</ns2:Action>
<ns2:MessageID>urn:uuid:10000001blsd-ghfs</ns2:MessageID>
<ns2:ReplyTo>
<ns2:Address>
http://www.w3.org/2005/08/addressing/anonymous                      
</ns2:Address>
</ns2:ReplyTo>
<ns2:To>https://grab.beta.agiv.be/Tools/CRABTools.svc&lt;/ns2:To&gt;
<o:Security env:mustUnderstand="1">
<wsu:Timestamp env:mustUnderstand="1">
<wsu:Created>2010-06-09T13:44:19Z</wsu:Created>
<wsu:Expires>2010-06-09T13:49:19Z</wsu:Expires>
</wsu:Timestamp>
<o:UsernameToken>
<o:Username>myUsername</o:Username>
<o:Password>myPassword</o:Password>
</o:UsernameToken>
</o:Security>
</env:Header>
<env:Body>
<ns1:GetAddressLocation>
<ns1:houseNumberId>2306852</ns1:houseNumberId>
</ns1:GetAddressLocation>
</env:Body>
</env:Envelope>

My username and password are correct, I have allready tried to change the expiration date later but that doesn't solve it.

What else could be the reason for this fault?

Maybe I have to configure more things in my php-code.

I created a class that overrides Zend_Soap_Client

public function __soapCall($function_name, $arguments, $options=null, $input_headers=null, $output_headers=null) {
        $inputheaders = array($this->wsactionheader(),$this->unencryptedSecurityHeader());
        $result = parent::__soapCall($this->functionname, $arguments, $options, $inputheaders);
        return $result;
    }