You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "D'Arcy, Hamlet B" <Ha...@Pearson.com> on 2009/04/01 14:24:38 UTC

Using JAX-B in Axis2 Service without JAX-WS

Is it possible to use JAX-B binding without using JAX-WS deployment? 

As an example, I have a User class that is annotated with JAX-B
annotations. And I have a simple service that creates users: 

public interface MyService {
  public User createUser(User userSpecification); 
}

And I have a services.xml like this: 

<service name="Axis2UserService">
	<parameter name="ServiceClass"
locked="false">example.MyService</parameter>
	<operation name="createUser">
		<messageReceiver
class="org.apache.axis2.jaxws.server.JAXWSMessageReceiver"/>
	</operation>
</service>

The generated wsdl still uses ADB bindings. What message receiver do I
need to use to get the JAX-B bindings?  If I deploy the same service as
a JAX-WS service then it all works find and the schema is as I need it.
However, I don't want to deploy as JAX-WS. I want to deploy as a normal
Axis2 service so I can reuse my existing modules and Spring
configuration. 

Is this possible? 

--
Hamlet D'Arcy
hamlet.darcy@pearson.com
+1(952)681-3636