JaxWsOnJBoss
Web Services support on JBoss
Netbeans since 6.0 supports JAX-WS service development and consumption on JBoss with Web Profile (currently latest supported version is JBoss6.1.0Final).
See the JBossWS JBoss AS6 Documentation.
Supported scenarios
Almost all user actions actually supported for Sun Java System Application Server/GlassFish are supported also for JBoss:
- Create new Web Service as Java Class (in Web or EJB project)
- Create new Web Service from WSDL (in Web or EJB project)
- Add WS Operation action
- Create WS Client
- Call WS Operation, or Drag & Drop WS operation to java source file open in editor
Non supported scenarios
Test Web Service action
Test Web Service action is not supported for JBoss.
To make sure the web service is succesfully deployed the JBossWS manager can be used instead.
To list all services deployed on JBoss, type the following URL in your browser :
http://localhost:8080/jbossws/services
(the host name and port can be different)
Web Service injection (@WebServiceRef)
Since JBoss 4.2.1 supports Java EE 5 specification only for EJB (not for Web Applications), the @WebServiceRef annotation can only be used in EJBs, not in web applications.
Implementation Differences
Deployment Descriptor
For each JAX-WS service IDE generates the servlet and servlet-mapping entries to web.xml file:
<web-app ...>
<servlet>
<servlet-name>HelloService</servlet-name>
<servlet-class>my.package.Hello</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloService</servlet-name>
<url-pattern>/hello</url-pattern>
</servlet-mapping>
</web-app>
The servlet-mapping determines the target URL for the web service: http://localhost:8080/WebApplication1/hello.
This is different from SJSAS/GlassFish suppport, where server generates the servlet entry in runtime from @WebService:serviceName attribute.
URL for web service created in EJB
For web service develloped in EJB, JBoss generates a diffrent URL as for GlassFish.
Let's have a java class representing web service, developped in EjbModule1 :
@WebServive(serviceName="HelloService", portName="Hello", ...)
public class Hello {
...
}
The target URL of the web service in GlassFish/SJSAS:
http://localhost:8080/HelloService/Hello
The target URL of the web service in JBoss
http://localhost:8080/EjbModule1/HelloService
