A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
how to implement ws-security in soap request header
Joined: May 13, 2009
Jul 13, 2009 01:01:48
i am new to web services.
i have to implement soap request using SAAJ API.
i am facing problem in creating soap header. i am not knowing how to implement ws-security for header part.
below is my soap header part .
please help me sort out this.
<wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken-11707096" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
Joined: Mar 22, 2005
Jul 13, 2009 01:11:57
WS-Security is generally configured using config files that are external to the code, but the specifics are particular to the SOAP stack being used; which one are you using?
(If it's Axis1 or Axis2, then you might find a couple articles I wrote on the subject helpful:
Joined: Jul 09, 2001
Jul 13, 2009 13:51:31
When looking at the
<xsd:complexType name="UsernameTokenType"> <xsd:annotation> <xsd:documentation>This type represents a username token per Section 4.1</xsd:documentation> </xsd:annotation> <xsd:sequence> <xsd:element name="Username" type="wsse:AttributedString" /> <xsd:any processContents="lax" minOccurs="0" maxOccurs="unbounded" /> </xsd:sequence> <xsd:attribute ref="wsu:Id" /> <xsd:anyAttribute namespace="##other" processContents="lax" /> </xsd:complexType>
I see xsd:any after the Username. So I guess wsse:Password is allowed after the Username.
William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
I agree. Here's the link:
subject: how to implement ws-security in soap request header
Web Servives security
HeaderElements must be namespace qualified when create soap client
wsse wss4j with axis client
Basic authentication soap header values?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015