axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ness, Raymond" <rn...@filenet.com>
Subject RE: setting HTTP headers in Axis Stub
Date Wed, 20 Jul 2005 21:36:39 GMT
myStub.setHeader(LocHeader("ns0","AUser","bogus"));
			

private static SOAPHeaderElement LocHeader(String PrefixString, String
UserNameString, String PasswordString){
		String errorString = "SOAPHeaderElementError: ";
		SOAPHeaderElement locSOAPHeaderElement =new
SOAPHeaderElement("http://somewhere.com/namespaces/1.0","Localization");
		
		try{	
			
			SOAPElement local =
locSOAPHeaderElement.addChildElement("Locale","");
			local.addTextNode("Eng");
			SOAPElement timezone =
locSOAPHeaderElement.addChildElement("Timezone","");
			timezone.addTextNode("Pacific");
			
		}catch(Exception e){
			System.out.println(errorString  + "\nExecution
failed. Exception: " + e.toString());
		}		
		return locSOAPHeaderElement;
	}
	

-----Original Message-----
From: Robert Dietrick [mailto:robert.dietrick@nokia.com] 
Sent: Tuesday, July 19, 2005 12:25 PM
To: axis-user@ws.apache.org
Subject: setting HTTP headers in Axis Stub

I'm using a ServiceLocator to get an instance of my Stub class capable 
of interacting with my remote service.  That is,

MyServiceIF client = MyServiceServiceLocator.getMyService(serviceUrl);

Then I use the client object (a subclass of org.apache.axis.client.Stub)

to make calls to my service.  I.e.,
client.someRemoteMethod(someArg);

I'd like to be able to pass custom HTTP headers in my calls, but I can't

find any API calls that would grant me access to the transport layer. 
Does anyone know if that's possible?

Thanks.

-rob




Mime
View raw message