Hi varun.raj.t,
I used ADBClient with Axis2. Instead of ser: I used wsse, nevertheless maybe it
helps.
At the End of xxxServiceStub() after the following code
serviceClient = new org.apache.axis2.client.ServiceClient(
configurationContext, _service);
_serviceClient.getOptions().setTo(
new
org.apache.axis2.addressing.EndpointReference(
targetEndpoint));
_serviceClient.getOptions().setUseSeparateListener(useSeparateListener);
I added code from Erwin Driessen http://www.5341.com/msg/199447.html, which
works fine.
wsseUsername and wssePassword you must add: change UsernameToken to your
ser:ClientID etc
OMFactory fac = OMAbstractFactory.getOMFactory();
OMNamespace omNs = fac.createOMNamespace(
"http://schemas.xmlsoap.org/ws/2003/06/secext",
"wsse");
SOAP11Factory soap11Factory = new SOAP11Factory();
SOAPHeaderBlock soapHeaderBlock = new
SOAP11HeaderBlockImpl("Security",
omNs, soap11Factory);
soapHeaderBlock.setMustUnderstand(true);
OMElement usernameTokenElement =
fac.createOMElement("UsernameToken",
omNs);
OMElement usernameElement = fac.createOMElement("Username",
omNs);
// OMText omTextUsername = fac.createOMText(usernameElement,
// getUserName());
OMText omTextUsername = fac.createOMText(usernameElement,
wsseUsername);
usernameElement.addChild(omTextUsername);
OMElement passwordElement = fac.createOMElement("Password",
omNs);
// OMText omTextPassword = fac.createOMText(passwordElement,
// getPassword());
OMText omTextPassword = fac.createOMText(passwordElement,
wssePassword);
passwordElement.addChild(omTextPassword);
usernameTokenElement.addChild(usernameElement);
usernameTokenElement.addChild(passwordElement);
soapHeaderBlock.addChild(usernameTokenElement);
_serviceClient.addHeader(soapHeaderBlock);
Cheerio, Lutz
-----Ursprüngliche Nachricht-----
Von: Axisboy [mailto:[email protected]]
Gesendet: Donnerstag, 12. Mai 2011 12:56
An: [email protected]
Betreff: Axis Support for SSL and Access authheader
Hi All ,
I have managed to write Axis web service (server side).
Now I would like support SSL to it.
<soapenv:Header>
<ser:AuthHeader>
<ser:ClientID></ser:ClientID>
<ser:Password></ser:Password>
</ser:AuthHeader>
</soapenv:Header>
Any one having idea to access this fields inside the xxx_skeleton.java ?
Any idea to support SSL in Axis ?
--
View this message in context:
http://old.nabble.com/Axis-Support-for-SSL-and-Access-authheader-tp31602015p31602015.html
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]