Hi,

I'm trying to use Axis2's ServiceClient.sendReceive() method, and it seems to be ignoring the Options that I specify. I've looked through the code and figure out what step I'm missing - I've gotten all the way to InOutAxisOperationClient and it seems as though the Options object *is* used (plus, other people are using it successfully, which means it must be me  :)  ).

My code looks like this:


        Options options = new Options();
        options.setExceptionToBeThrownOnSOAPFault(false);
        options.setAction(action.toString());
       
        EndpointReference toEPR = ...
        EndpointReference fromEPR = ...
       
        options.setTo(toEPR);
        options.setFrom(fromEPR);

        OMElement body = ...

        ServiceClient client = new ServiceClient();
        client.setOptions(options);

        OMElement result = client.sendReceive(body);


The resulting SOAP envelope has an empty soapenv:Header element - none of the WS-Addressing headers specified in the Options object are present. I've tried using setOverrideOptions() and addHeader(), but neither of these changes the behavior. Through all of this, the soapenv:Body is correct.


Has anyone else experienced a blank set of SOAP headers when trying to use ServiceClient.sendReceive()?

Dan


Dan Jemiolo
IBM Corporation
Research Triangle Park, NC


+++ I'm an engineer. I make slides that people can't read. Sometimes I eat donuts. +++

Reply via email to