You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Jon Niemi <jo...@gmail.com> on 2007/11/28 22:24:57 UTC

AXIS 1.2.1 Adding custom HTTP header to outgoing requests

 Hi,

I was wondering if there's a way using AXIS 1.2.1 to add a custom HTTP
header to each client request made to our SOAP server.  We're using
wsdl2java to generate our client side code.  I've tried setting properties
on the stub but that doesn't seem to be working.

            ((Stub) _api)._setProperty(Call.SESSION_MAINTAIN_PROPERTY,
true);
           ((Stub) _api)._setProperty("threadName", Thread.currentThread
().getName());

 I need to be able to track the name of the invoking thread through our
system for auditing purposes.  I thought to use a SOAP header and managed to
get that working but I'd much prefer to use a straight HTTP header.  I'd
also prefer not to have to muck with the auto-generated code as we have many
hands working on the SOAP client side and the code-generation process thus
far is automatic.



Thanks!

Jon