This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Defining Header type in WSDL  RSS feed

 
Russell Ray
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This article might be a starting point.
 
Russell Ray
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
whoops....misspoke there....... The are J2EE compliant. What I mean was make the applicatiosn work with the application I have.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!