<bean id="helloworldService" class="demo.contractlast.HelloWorldImpl" />
<cxf-jaxws:endpoint
xmlns="http://cxf.apache.org/jaxws"
xmlns:hw="http://contractlast.demo/"
id="HelloService"
address="camel://direct:HelloService"
serviceName="hw:HelloServiceService"
endpointName="hw:HelloServiceEndpoint"
implementor="#helloworldService">
<cxf-jaxws:binding>
<cxf-soap:soapBinding mtomEnabled="true" version="1.2"/>
</cxf-jaxws:binding>
<cxf-jaxws:features>
<!-- Enables logging of SOAP messages. -->
<cxf:logging xmlns="http://cxf.apache.org/core"/>
</cxf-jaxws:features>
</cxf-jaxws:endpoint>
<route>
<from uri="jetty:http://localhost:9998/app/contractlast"/>
<to uri="direct:HelloService"/>
</route>
@WebService(endpointInterface = "demo.contractlast.HelloWorld",
serviceName = "HelloWorld")
public class HelloWorldImpl implements HelloWorld { ... }
@BindingType(JSONBindingID.JSON_BINDING) annotation for HelloWorldImpl class
but it doesn't make any sense (with jsonwebservice and org.jvnet.jax-ws-commons, I've got the same error
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'HelloService': Invocation of init method failed; nested exception is javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Could not resolve a binding for https://jax-ws-commons.dev.java.net/json/
To use json-codec you must need to use metro.
We have made attempt to implement it for CFX. But most CFX jax-ws internal variables are not accessible, to use generic based json generation with in codec. So time to implement for cfx estimated higher.
2) Second most problem I had, cfx-json was using jettison json, to generate json with jettson library need to convert all objects in to jettison object format. It's quite slow. Specially when it come to reporting or big user object, To generate 2kb of json data we had difference of 10 times slow in cfx-json.
<cxf-jaxrs:server id="helloworldRestService" address="camel://direct:HelloWorldREST">So maybe it's possible to avoid jettison?
<cxf-jaxrs:serviceBeans>
<ref bean="helloworldService" />
</cxf-jaxrs:serviceBeans>
<cxf-jaxrs:providers>
<bean class="org.codehaus.jackson.jaxrs.JacksonJsonProvider"/>
</cxf-jaxrs:providers>
3) And the last but not least, it was bit handy to get start..
Hope it helps.