-
1. Re: service-name-pattern
ropalka Nov 6, 2007 3:45 AM (in response to sefai)Hi,
unfortunately javaee:service-name-pattern element isn't supported by jbossws post-handler-chains configuration.
However, you're doing your job right. Create new JAX-WS client config, define there your post-handler-chains configurations but use config-name instead of service-name-pattern subelement.
The last step you should do is to refer to this config by annotating the SEI interface, you're using on your client side. Here's the example.@EndpointConfig(configName = "Config Name Sample", configFile = "META-INF/custom-jaxws-client-config.xml") public interface SEI { ... }
Richard -
2. Re: service-name-pattern
sefai Nov 6, 2007 8:51 AM (in response to sefai)I added this handler-chain in standard-jaxws-endpoint-config.xml,and it didn't work,then I added it in standard-jaxws-client-config.xml,I looked into the DEBUG output,and didn't see any anything regarding this config during deployment.So I posted here.
Then I worked on it more, and discovered that this client-config is loaded after you call it,not during deployment,and if you put service-name-pattern in endpoint-config you get an exception,but you dont get any exceptions if you put this in client-config. Also the web-service-call I want to make with secure works smooth, and other web-services-call I make continue to work without any security constraint,meaning this pattern provides us using different authentication mechanisms.
When I logged in this forum to post the resolution I saw your reply and I am confused. I changed the service-name-pattern definiton to point to an unsecured web-service-client,to test if it worked before by chance. But it didn't,it throw exception as excepted. And I am now confused more.
You say it is not supported,but it works as expected.
Can you enlighten me please?
best regards... -
3. Re: service-name-pattern
ropalka Nov 6, 2007 10:37 AM (in response to sefai)There's no source code that would read service-name-pattern element content at all.
Richard -
4. Re: service-name-pattern
sefai Nov 6, 2007 11:11 AM (in response to sefai)This is the debug output of JBossAS
2007-11-06 17:58:34,493 DEBUG [org.jboss.ws.metadata.umdm.EndpointMetaData] Configure SOAPBinding 2007-11-06 17:58:34,493 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerResolverImpl] initHandlerChain: PRE 2007-11-06 17:58:34,493 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerResolverImpl] initHandlerChain: ENDPOINT 2007-11-06 17:58:34,493 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerResolverImpl] initHandlerChain: POST 2007-11-06 17:58:34,493 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerResolverImpl] addHandler: HandlerMetaDataJAXWS: type=POST name=WSSecurity Handler Client(x509v3) class=class org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerClient params=[] protocols=null services={http://mywebservice.org/}MyWebService ports=null
And this is the client-config<jaxws-config xmlns="urn:jboss:jaxws-config:2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:javaee="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="urn:jboss:jaxws-config:2.0 jaxws-config_2_0.xsd"> <client-config> <config-name> My Web Service Client Security Config </config-name> <post-handler-chains> <javaee:handler-chain> <javaee:service-name-pattern xmlns:myns="http://mywebservice.org/"> myns:MyWebService </javaee:service-name-pattern> <javaee:handler> <javaee:handler-name> WSSecurity Handler Client(x509v3) </javaee:handler-name> <javaee:handler-class> org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerClient </javaee:handler-class> </javaee:handler> </javaee:handler-chain> </post-handler-chains> </client-config> </jaxws-config>
This seems to me OK.
What you say about this? -
5. Re: service-name-pattern
ropalka Nov 6, 2007 11:52 AM (in response to sefai)I was looking to the wrong element schema definition. Sorry for that. Your element is handled by third-party jars so you're right.
Richard