Win a copy of Pro Spring MVC with WebFlux: Web Development in Spring Framework 5 and Spring Boot 2 this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

Defining Header type in WSDL

 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 43024
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This article might be a starting point.
 
Russell Ray
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43024
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Friends help you move. Good friends help you move bodies. This tiny ad will help:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic