Hei,
I added a parameter to a requestEnvelopeHeader by using:

<snip>
      Service service = new Service();
      Call call = (Call) service.createCall();
      call.setTargetEndpointAddress(new java.net.URL(endPointURL));
      call.addParameter("county", XMLType.XSD_STRING, ParameterMode.IN);
               :
-->  call.addParameterAsHeader(new QName("requestID"), XMLType.XSD_STRING, 
java.lang.Class.forName("java.lang.String"),
                                                    ParameterMode.INOUT, 
ParameterMode.INOUT);
               :
       Object[] params = new Object[] {county, street, houseNumber, requestID};
       responseObj = call.invoke(params);
</snip>

In the Javadoc it is stated that: "headerMode (last argument)- - Mode of the header. 
Even if this is an INOUT parameter, it need not be in the header in both directions."
The SOAP request message look like this then:

<snip>
      <?xml version="1.0" encoding="UTF-8"?>
      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
                                                            
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
         <soapenv:Header>
            <requestID xsi:type="xsd:string">ST1</requestID>
         </soapenv:Header>
         <soapenv:Body>
            <ns1:getStreetIndexObjectId 
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; 
xmlns:ns1="http://www.incatel.com/soap-api";>
               <county xsi:type="xsd:string">OSLO</county>
</snip>

The header is not present in the SOAP response message. So the question is: How do I 
make the same header return back to the client?


Regards Tore Larsen

Norway


Reply via email to