I am attempting to set up a web service endpoint in servicemix using
Xfire and HttpBinding. I have attached the web.xml and
appcontext-sm.xml (spring context) files that I am using. For some
reason when I navigate to the
http://localhost:8080/servicemix-example/jbi/test it just freezes and
doesn't return back a response of any kind. I also don't see anything
in the log files. Am I missing something in my config? Your help is
appreciated.
Jeff Puro
Senior Java Developer
Sterling Testing Systems
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>ServiceMix Example</display-name>
<description>Example ServiceMix Application</description>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath*:org/codehaus/xfire/spring/xfire*.xml
/WEB-INF/appcontext-*.xml
</param-value>
</context-param>
<context-param>
<param-name>contextClass</param-name>
<param-value>org.xbean.spring.context.XmlWebApplicationContext</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- servlet mappings -->
<!-- the HTTP binding servlet -->
<!-- START SNIPPET: httpBinding -->
<servlet>
<servlet-name>BindingServlet</servlet-name>
<servlet-class>
org.servicemix.components.http.SpringBindingServlet
</servlet-class>
<init-param>
<param-name>endpoint</param-name>
<param-value>httpBinding</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>BindingServlet</servlet-name>
<url-pattern>/jbi/*</url-pattern>
</servlet-mapping>
<!-- END SNIPPET: httpBinding -->
<!-- Struts Servlet -->
<servlet>
<servlet-name>struts-action</servlet-name>
<servlet-class>
org.apache.struts.action.ActionServlet
</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>
/WEB-INF/struts-config.xml
</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- Servlet Mapping -->
<servlet-mapping>
<servlet-name>struts-action</servlet-name>
<url-pattern>/struts/*</url-pattern>
</servlet-mapping>
</web-app><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://xbean.org/schemas/spring/1.0"
xmlns:spring="http://xbean.org/schemas/spring/1.0"
xmlns:sm="http://servicemix.org/config/1.0"
xmlns:my="http://servicemix.org/demo/"
xmlns:foo="http://servicemix.org/demo/">
<!-- the JBI container -->
<sm:container spring:id="jbi"
rootDir="../wdir"
useMBeanServer="true"
createMBeanServer="true"
installationDirPath="../install"
deploymentDirPath="../deploy"
monitorInstallationDirectory="true"
dumpStats="true"
statsInterval="10"
transactionManager="#transactionManager">
<sm:activationSpecs>
<sm:activationSpec componentName="httpBinding" service="example:httpBinding" destinationService="xfire:echoService">
<sm:component><bean class="org.servicemix.components.http.HttpInOutBinding" /></sm:component>
</sm:activationSpec>
<!-- a simple Echo service to test InOut message exchanges using HTTP-->
<sm:activationSpec componentName="echo" service="example:echo" >
<sm:component>
<bean class="com.sterling.servicemix.component.ExampleComponent">
<property name="property"><value>name</value></property>
</bean>
</sm:component>
</sm:activationSpec>
<sm:activationSpec componentName="xfireBinding" service="xfire:echoService">
<sm:component>
<bean class="org.servicemix.components.xfire.XFireBinding">
<property name="xfire" ref="xfire"/>
</bean>
</sm:component>
</sm:activationSpec>
</sm:activationSpecs>
</sm:container>
<bean id="echo" class="com.sterling.servicemix.component.xfire.Echo" singleton="true"/>
<bean name="echoService" class="org.codehaus.xfire.spring.ServiceBean">
<property name="service" ref="echo"/>
<property name="serviceFactory" ref="xfire.serviceFactory"/>
<property name="xfire" ref="xfire"/>
</bean>
<!-- the JCA container -->
<bean id="jencks" class="org.jencks.JCAContainer" singleton="true">
<!-- lets use the default configuration of work manager and transaction manager-->
<property name="bootstrapContext">
<bean class="org.jencks.factory.BootstrapContextFactoryBean">
<property name="threadPoolSize" value="25"/>
</bean>
</property>
<!-- the JCA Resource Adapter -->
<property name="resourceAdapter">
<bean id="activeMQResourceAdapter" class="org.activemq.ra.ActiveMQResourceAdapter" singleton="true">
<property name="serverUrl" value="tcp://localhost:61636"/>
</bean>
</property>
</bean>
<bean id="transactionManager" class="org.jencks.factory.TransactionManagerFactoryBean"/>
</beans>