axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From BOURLON Agnès <agnes_bour...@yahoo.fr>
Subject SOAPHeader and Call
Date Wed, 09 Oct 2002 12:53:03 GMT
Hi,

Is it possible to add headers in a Soap enveloppe using the
call.addHeader(...) in client code?
It seems to have no effect on the envelope ...
Indeed, in the org.apache.axis.client.Call.invoke(), the headers are added
only if client service target is null and "portName" too  .... :

If we look the code :

    // Determine client target service
        if (myService != null)
        {
                msgContext.setService(myService);
        }
       else{
                if (portName != null)
                {
                    // No explicit service.  If we have a target service
name,
                    // try that.
                    msgContext.setTargetService(portName.getLocalPart());
               }
                else {
                        // No direct config, so try the namespace of the
first body.
                        reqMsg = msgContext.getRequestMessage();
                        reqEnv = reqMsg.getSOAPEnvelope();

                        // If we have headers to insert, do so now.
           ->          for (int i = 0 ; myHeaders != null && i <
myHeaders.size() ; i++ )

reqEnv.addHeader((SOAPHeaderElement)myHeaders.get(i));

....

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

Mime
View raw message