Hi

Please make sure the below line in the beans.xml

<import resource="classpath:META-INF/cxf/cxf-extension-http-binding.xml" />

Tap wrote:
Hi,
I tried to run the restful_http_binding example within Tomcat, using Spring
to load the JaxWsServerFactoryBean. The address is set to “/xml” instead of http://localhost:8080/xml and got the following exception.
java.lang.ClassCastException: org.apache.cxf.service.model.BindingInfo
      at
org.apache.cxf.binding.soap.SoapTransportFactory.createPortExtensors(SoapTransportFactory.java:89)
      at
org.apache.cxf.frontend.AbstractEndpointFactory.createEndpointInfo(AbstractEndpointFactory.java:212)
      at
org.apache.cxf.frontend.AbstractEndpointFactory.createEndpoint(AbstractEndpointFactory.java:104)
      at
org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:84)

Here is my beans.xml
<bean id="customerService"
      class="org.apache.cxf.jaxws.JaxWsServerFactoryBean"
init-method="create">
      <property name="bus" ref="cxf"/>
      <property name="serviceClass"
value="com.acme.customer.CustomerService" />
      <property name="serviceBean">
                  <bean class="com.acme.customer.CustomerServiceImpl"/>
          </property>
      <property name="address" value="/xml"/>
      <property name="bindingId">
            <value>http://apache.org/cxf/binding/http</value>
</property> </bean>

I was able to find only a Jetty Http Transport factory implementation. Is
there a Tomcat transport factory implementation available for Http?  What
should I do to run it within Tomcat?
Current CXF has not use Tomcat as a embedded HTTP engine , so there is no tomcat transport factory implementation for HTTP.
You could run it as servlet in the Tomcat.
Thanks,
Thaiyal

Cheers,

Willem.

Reply via email to