Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to include Authrozitaion information in a WSDL file

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am depending on Authorization feature of SOAP for my webservice.

Means that i want to have something like this in my WSDL file :

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/
envelope/">
<soap:Header>
<AuthHeader xmlns="http://tempuri.org/">
<UserName>jeff</UserName>
<Password>imbatman</Password>
</AuthHeader>
</soap:Header>
</soap:Envelope>

How can i associate this with my Webservice now ??

Please help .

Thank you .
 
Hany Shafik
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can declare using WSDL that your webservice require the bellow header as part of it's soap message.

For example you can edit your WSDL to include the following or you can configure your tool to generate a WSDL that is similar to the following

 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
Have you considered WS-Policy?
Using the Metro libraries on the client side, the client will automatically interpret any WS-Policy elements in the WSDL.
Best wishes!
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you i am not about bothered about the WSDL file as it will be automatically generated by the server

I am implementing security to my webmethod by using @RolesAlowed


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic