@WebServiceProvider at WAS 7.0
Hello everyone...
I'm completely new to WAS and relatively new to web services. I'm trying to build a jax-ws web service using the @WebServiceProvider annotation, but can't get it to work on WAS 7.0. In short, my class looks something like:
package mypackage;
...
@ServiceMode(value=Service.Mode.PAYLOAD)
@WebServiceProvider(serviceName="OutboundService", portName="OutboundPort", targetNamespace="http://test.mycompany.com")
public class OutboundProviderImpl implements Provider {
public Source invoke(Source source) {
...
}
}
I package the compiled class in a .war file (as I haven't been able to get RAD do it for me), with the following structure:
WEB-INF
- web.xml (please find file attached)
- classes
- mypackage
- OutboundProviderImpl.class
I then deploy the .war, but I can't seem to get things working (keep getting axis fault HTTP 404, when hitting URL [url]http://localhost:9080/CONTEXT_ROOT/WS_NAME[/url] (i.e. [url]http://localhost:9080/Outbound/OutboundService[/url]) with a SOAP client.
Is there something I'm missing? Should I have any specific servlet entries in my web.xml? Should I include any WAS specific configuration file? Should I include any JAX-WS generated artifacts, and if yes, how am I to generate them?
If someone has a sample working war file he/she could share, it would be of great help!
- Yiannis
Re: @WebServiceProvider at WAS 7.0
Finally figured it out! My web.xml should be version 2.5
...
Probably related to [url]http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/rwbs_jaxwsannotations.html:[/url]
"However, pre-Java EE 5 application modules (Web application modules version 2.4 or before, or EJB modules version 2.1 or before) are not scanned for JAX-WS annotations, by default, for performance considerations."