Mule + webservice + Spring by Maven - HelloWorld

初学Mule
1. 导入Maven工程.
2. 运行Maven install, 自动下载jar依赖.
Maven会发布war包到jboss7中."D:/iSystem/runtime/jboss-as-7.0.2.Final/jboss-as-7.0.2.Final/standalone/deployments". 如果路径不一样, 可以查找pom.xml中修改之。
3. 运行jboss 7的standalone.bat
4. 成功运行后, 访问http://localhost:65089/services/managerService?wsdl成功表示webservice成功.
5. 运行ManagerServiceTest测试.

主要文件mule-config.xml. 如下.
这是引入Spring的annotation-config
<spring:beans>
<context:component-scan base-package="org.mule.example.echo" />
<context:annotation-config />
</spring:beans>
如下定义webservice.
<flow name="managerPublishService">
<inbound-endpoint address="http://localhost:65089/services/managerService" exchange-pattern="request-response">
<cxf:jaxws-service serviceClass="org.mule.example.echo.ManagerService" />
</inbound-endpoint>
<component>
<spring-object bean="managerService" />
</component>
</flow>

你可能感兴趣的:(Mule + webservice + Spring by Maven - HelloWorld)