Monday, April 4, 2011

JAX-WS with JBoss 6 Day 7 : Provider API

java.xml.ws.Provider interface offers an alternative to SEIs and may be implemented by services wishing to work at the XML message level.


The Provider interface is relatively easy to implement. It only has one method, invoke(), that must be implemented.

In addition it has three simple requirements:
An implementation must have the @javax.xml.ws.WebServiceProvider annotation.
An implementation must have a default public constructor.
An implementation must implement a typed version of the Provider interface.

1. web service, as below you are free to do anything at message level


2. web.xml to expose HelloProvider as a servlet


3. wsdl


4. generate client
wsconsume -k -n -p jboss.ws.hello.provider.client
http://localhost:8080/iJBossWS/ws/testServiceProvider?wsdl

5. test case


6. outbound xml used by test case

No comments: