Well, I think that the : "Axis 1.0 of October,7" will correct this problem; the Call object manages headers outside the if{}
----- Original Message ----- From: "BOURLON Agnès" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, October 09, 2002 2:53 PM Subject: SOAPHeader and Call > 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 ___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com