aspose file tools
The moose likes Web Services and the fly likes Defining Header type in WSDL Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "Defining Header type in WSDL" Watch "Defining Header type in WSDL" New topic
Author

Defining Header type in WSDL

Russell Ray
Ranch Hand

Joined: Apr 25, 2005
Posts: 116
I have a web service requiring a UserNameToken within the Header part of the SOAP message. It has a structure looks like this



My task at hand is define the header within the type section of the WSDL, make the security header element part of messages, and add it as required input for methods.

Can someone point me in the right direction or provide a good link on how to define a soap header within the WSDL file?

Thanks in advance for anyy comments or suggestions.

Russ
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 32767
This article might be a starting point.


Android appsImageJ pluginsJava web charts
Russell Ray
Ranch Hand

Joined: Apr 25, 2005
Posts: 116
Thank you....... I used this article as my starting point........

What I as hoping was if someone could explain this definition:



While I am definately not the expert on building a Header within the WSDL file, I was hoping others with the experience could guide me through the waters of build one correctly. The above XML is my first attempt.

Thanks for any comments in advance.

Russ
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 32767
It's an XML Schema definition, so a passing knowledge of that would help. Essentially it tells you that a "security" element can occur exactly once in a SOAP message, that it consists of exactly one "usernametoken" element, and that that consists of one or more username/password element pairs.

Not really an answer, but why are you trying to add the header yourself, instead of using a framework like WSS4J, which does this for you?
[ October 28, 2005: Message edited by: Ulf Dittmer ]
Russell Ray
Ranch Hand

Joined: Apr 25, 2005
Posts: 116
I am using out-of-the-box components with WebLogic and WAS. Both implement J2EE web servies similar, but are not using the same components in doing so; therefore, I trying to fit what exist within both application servers and make it J2EE compliant.

Makes sense?
Russell Ray
Ranch Hand

Joined: Apr 25, 2005
Posts: 116
whoops....misspoke there....... The are J2EE compliant. What I mean was make the applicatiosn work with the application I have.
 
IntelliJ Java IDE
 
subject: Defining Header type in WSDL
 
Threads others viewed
sending pdf or any attachment from a java webservice to java client using JAX-WS and SAAJ
Troubles with wss4j
Not supported element: {http://schemas.xmlsoap.org/wsdl/soap/}Header
Axis Fault
wsse wss4j with axis client
developer file tools