WSSecurityInfoExtractor problem
michal.domagala Jul 27, 2009 9:32 AMHi All,
I've got a problem implementing a web service using JBoss ESB. I've implemented the service according to the received wsdl specification. I used jboss-ws and a jbr provider/listener. The key elements of the configuration are as follows:
<jbr-provider name="JBR-Http" protocol="http" host="0.0.0.0"> <jbr-bus busid="Http-9001" port="9001" /> </jbr-provider> ... <listeners> <jbr-listener name="Http-Gateway" busidref="Http-9001" is-gateway="true" /> <jms-listener name="JMS-ESBListener" busidref="sproJMSChannel" /> </listeners> ... <action name="processSoap" class="org.jboss.soa.esb.actions.soap.SOAPProcessor"> <property name="jbossws-endpoint" value="MyEndpoint" /> </action>
When I invoke the service JBoss ESB thows something like:
[JBossRemotingGatewayListener] JBoss Remoting Gateway failed to synchronously deliver message to target service [SympacB2B:ComarchBSFacade]. org.milyn.SmooksException: Unable to filter InputStream for target profile [org.milyn.profile.Profile#default_profile]. at org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:290) at org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:238) at org.milyn.Smooks._filter(Smooks.java:341) at org.milyn.Smooks.filter(Smooks.java:319) at org.milyn.Smooks.filter(Smooks.java:292) at org.jboss.soa.esb.services.security.auth.ws.WSSecurityInfoExtractor.extractSecurityInfo(WSSecurityInfoExtractor.java:97) at org.jboss.soa.esb.listeners.gateway.JBossRemotingGatewayListener$JBossRemotingMessageComposer.populateMessage(JBossRemotingGatewayListener.java:534) at org.jboss.soa.esb.listeners.gateway.JBossRemotingGatewayListener$JBossRemotingMessageComposer.populateMessage(JBossRemotingGatewayListener.java:494)
The SOAP message body I use contains a <ns:Username> xml element. When such an element is used in a soap message (regardless of the namespace) JbossESB goes crazy and tries to use it as authentication information.
As far as I can tell, the problem lies in WSSecurityInfoExtractor which uses preconfigured smooks to retrieve authentication info from the soap message. I have absolutely no intention of using <ns:Username> tag this way and have no idea how to override this behavior.
Any suggestions? Changing the wsdl is not an option ;-)