Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Anyone used RAD wssecurity yet?  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I started using the WS-Security capability provided by IBM's RAD 6. I created a Web Service that uses WS-Security and XML-Signatures, this feature is provided automatically through the tool.

When I tested this web service using the web client generated by RAD it works fine. All the appropriate WS-Security headers are generated. However, when I use a stand alone class that invokes the proxy client generated by RAD, the call fails and I get an error that implies that the header does not contain a the XML-Signatures.

I was wondering if anyone ran into this before? and/or if you know of a useful tutorial for WS-Security using RAD.

Below is the stacktrace.

Thanks for your answers.

com.ibm.wsspi.wssecurity.SoapSecurityException: WSEC5720E: A required message part [body] is not signed.
at com.ibm.ws.webservices.engine.WebServicesFault.makeUserFault(WebServicesFault.java:211)
at com.ibm.ws.webservices.engine.xmlsoap.builders.WebServicesFaultProcessor.createFault(WebServicesFaultProcessor.java:396)
at com.ibm.ws.webservices.engine.xmlsoap.SOAPFault.getFault(SOAPFault.java:484)
at com.ibm.ws.webservices.engine.SOAPPart.getFault(SOAPPart.java:1463)
at com.ibm.ws.webservices.engine.SOAPPart.getFault(SOAPPart.java:1423)
at com.ibm.ws.webservices.engine.Message.getFault(Message.java:822)
at com.ibm.ws.webservices.engine.Message.ifFaultThrowSelf(Message.java:802)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:267)
at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngine.java:274)
at com.ibm.ws.webservices.engine.client.Connection.invokeEngine(Connection.java:727)
at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:648)
at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:609)
at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:446)
at com.ibm.ws.webservices.engine.client.Stub$Invoke.invoke(Stub.java:732)
at com.ami.ws.TokenServiceSoapBindingStub.getToken(TokenServiceSoapBindingStub.java:92)
at com.ami.ws.TokenServiceProxy.getToken(TokenServiceProxy.java:64)
at com.ami.ws.test.Test.main(Test.java:21)
 
Ranch Hand
Posts: 2098
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The way you build the stand-alone saaj client may be different from the way you build a jaxrpc client(in relation to xws security). Have you looked at this point of view(that there could be a difference)?
 
Jesus Angeles
Ranch Hand
Posts: 2098
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
j gomez, have you solved your problem? Can you share it here?
 
Jesus Angeles
Ranch Hand
Posts: 2098
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is nowhere mentioned in the redbook 'sg246461 - WebSphere Version 6 Web Services Handbook Development and Deployment', that RAD nor the version 6 server, support stand-alone client for ws.

Where did you get the proxy/stubs? ....those generated for web component?
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've had the same problem, you have to modify an xmi file in the clients EAR:
make sure the ibm-webservicesclient-ext.xmi contains something like this:

<serviceRefs serviceRefLink="service/XXXService">
<portQnameBindings portQnameLocalNameLink="XXXService">
<clientServiceConfig>
<securityRequestGeneratorServiceConfig>
<integrity name="int_req1" order="1">
<messageParts Dialect="http://www.ibm.com/websphere/webservices/wssecurity/dialect-was" name="int_req_body" keyword="body"/>
</integrity>
<confidentiality name="conf_gen" order="2">
<messageParts Dialect="http://www.ibm.com/websphere/webservices/wssecurity/dialect-was" name="conf_gen_body" keyword="bodycontent"/>
</confidentiality>
</securityRequestGeneratorServiceConfig>
<securityResponseConsumerServiceConfig>
<requiredIntegrity name="int_con1" usage="Required">
<messageParts Dialect="http://www.ibm.com/websphere/webservices/wssecurity/dialect-was" name="int_con_body" keyword="body"/>
</requiredIntegrity>
<requiredConfidentiality name="conf_con" usage="Required">
<messageParts Dialect="http://www.ibm.com/websphere/webservices/wssecurity/dialect-was" name="conf_con_body" keyword="bodycontent"/>
</requiredConfidentiality>
</securityResponseConsumerServiceConfig>
</clientServiceConfig>
</portQnameBindings>
</serviceRefs>
 
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure what this is telling me. What in here do I need to add to this file?
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!