Topic
  • No replies
SystemAdmin
SystemAdmin
2262 Posts

Pinned topic Webservice UsernameToken Issues with 6.1 + Webservice FeaturePack

‏2011-01-21T17:02:57Z |
Hey!

maybe it's a simple thing but i need help with it... I'm trying to connect with a JAX-RPC generated WS-Client-Proxy(with .JSP Sample Files) to my also JAX-RPC out of an EJB Bottom-up generated Webservice.
I tested the service with SoapUI and the following HeaderInformation and it works fine!

<soapenv:Header>
<wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2003/06/secext">
<wsse:UsernameToken>
<wsse:Username>user</wsse:Username>
<wsse:Password Type="wsse:PasswordText" xmlns:wsse="http://schemas.xmlsoap.org/ws/2003/06/secext">pwd</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>

SERVER WITH WEBSERVICE:

webservices.xml -> Sec. Extentions -> Request Receiver Service Configuration Deta. -> login Config ->
Add -> BasicAuth

Binding Cfg: Login Mapping -> Add:
  • Auth. Method: BasicAuth
  • ConfigName: WSLogin
--> OK

CLIENT:
So for the generated client i did the following:
1.) open "web.xml -Deploymentdesctiptor"
2.) under -> "Request Generator Conf." -> "Security Token" -> "Add" --> i added:
---
Name: UToken
Token type: Username Token

//and got filled out the:
Local part: http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken

3.) -> OK
4.) Open "WS Binding"Tab -> "Security Request Generator Binding Configuration" -> "Token Generator" -> "Add" i added:

Token Gen. Name: test
TokenGenClass: com.ibm.wsspi.wssecurity.token.UsernameTokenGenerator
Security token: UToken
-
Use value type -> Check!
Value Type: UsernameToken
Local Part: http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken

UserId: user
Passwd: pwd

5.) ->OK

PROBLEM(Part1): Thats what i did... but if i try to do a request over my client i get:
---
com.ibm.wsspi.wssecurity.SoapSecurityException:
The Application Server expected a Security header with the
http://schemas.xmlsoap.org/ws/2003/06/secext or
http://schemas.xmlsoap.org/ws/2002/07/secext or
http://schemas.xmlsoap.org/ws/2002/04/secext
namespace, but it was not found.
---

So i searched the web and got some information:
  • Now I know that "http://schemas.xmlsoap.org/ws/2003/06/secext" is an old UsernameToken Profile.
  • The Error is described by IBM in: http://www-01.ibm.com/support/docview.wss?uid=swg21429925 but the solution is, that i should install webservice feature pack. But my Application Server is running on WS feature pack already! (i also tried a new installation of server with profile.. nothing happened)

PROBLEM(Part2): My Server only accepts old UsernametokenProfile but my client isnt configurable with that...
So how can i help the server to want http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken ???

THANKS IN ADVANCE!!!