我试图效仿这个例子
http://www.mulesoft.org/documentation/display/MULE3USER/Building+Web+Services+with+CXF
在一个遗留项目上,然后我创建一个主类,使用main方法启动spring(或者我认为这是如何做到的)
XmlBeanFactory beanFactory = new XmlBeanFactory(new ClassPathResource(
"mule-config.xml"));
Run Code Online (Sandbox Code Playgroud)
但我然后telnet到我的web服务端口,它不起作用!
如何让这个工作?
这是我的xml ..
<flow name="helloService">
<http:inbound-endpoint address="http://localhost:63081/enrollment" exchange-pattern="request-response">
<cxf:jaxws-service serviceClass="com.ifp.esb.integration.ingest.EnrollmentWS"/>
</http:inbound-endpoint>
<component>
<spring-object bean="enrollmentBean" />
</component>
</flow>
Run Code Online (Sandbox Code Playgroud)
您需要使用特定于Mule的Spring配置加载器:
SpringXmlConfigurationBuilder builder = new SpringXmlConfigurationBuilder("mule-config.xml");
MuleContextFactory muleContextFactory = new DefaultMuleContextFactory();
MuleContext muleContext = muleContextFactory.createMuleContext(builder);
muleContext.start();
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1886 次 |
| 最近记录: |