JBoss Community

Re: JBossWS/CXF configuration / extensions

created by Alessio Soldano in JBoss AS 7 Development - View the full discussion

Hi Robert,

thanks for the feedback, a lot of stuff to be discussed:

 

 

This works - but only if every webservice is mentioned like

    <jaxws:endpoint

            address='http://@jboss.bind.address@/demo/service/SuperService'

            implementor='com.mycompany.demo.java.MySuperWebservice'/>

This is silly, because the jaxws:endpoint configuration specifies nothing meaningful.

It actually specifies that there's a jaxws endpoint with a given implementor.

 

 

Every invocation of a web service which is not mentioned in a jbossws-cxf.xml file, fails with a NullPointerException in org.jboss.wsf.stack.cxf.CXFInstanceProvider at line 57 - the CXFInstanceProvider is configured with a "null" ServerFactoryBean.

This is something to be improved, as that is basically hiding the actual source of the problem to the user, i.e. the jaxws endpoint has not been created in cxf bus. https://issues.jboss.org/browse/JBWS-3395

 

 

What I would like to have in AS7/JBossWS/CXF is

  • a mechanism, where I can configure the CXF bus for each deployment (specifying another bus definition in jbossws-cxf.xml does not work, because the "default" bus is created "inside the server code") and

A proposal here is to have a look at the endpoint configuration in the webservices domain of jboss AS7 and use @EndpointConfig(configFile=".." configName=".."). You can have any jaxws handler in the configuration and can also reference a configuration file in your deployment if you don't want to modify the AS7 domain.

 

  • no need to specify every web service in jbossws-cxf.xml and
  • no need to specify the fully qualified address attribute in jaxws:endpoint - developers do not know the exact address, port and context path ot a deployment. AS7/JBossWS should accept at least paths relative to the context root of the current deployment (specifying addresses like /service/SuperService does not work - it cannot find the destination of a web service call)
  • no need to specify the implementor in jaxws:endpoint, because it is already configured elsewhere (web.xml) - a functionaltity like a "servlet-link" would be great

These are actually related. To be honest the web.xml is not mandatory, you might have @EJB endpoints in a jar archive. In any case, I see what you mean, we could have that info automatically derived from the metadata model that's produced from the info in web.xml/endpoint annotations.

I've created a feature request for this: https://issues.jboss.org/browse/JBWS-3396

To be honest, especially on AS7, we're suggesting users to go the non-spring approach with jbossws-cxf ws deployments (so in this case, use the @EndpointConfig approach), however this feature request is quite interesting and might be scheduled for JBWS 4.0.1.

Reply to this message by going to Community

Start a new discussion in JBoss AS 7 Development at Community