CXF聞喘JMS恬葎勧補亅咏議塘崔 - 園殻秘壇利
ring-beans-2.5.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-jms.xml" />
<jaxws:client id="CustomerService"
xmlns:customer="http://customerservice.service.test/"
serviceName="customer:CustomerServiceService"
endpointName="customer:CustomerServiceEndpoint"
address="jms://localhost:61616"
serviceClass="test.service.CustomerService">
<jaxws:features>
<bean xmlns="http://www.springframework.org/schema/beans"
class="org.apache.cxf.transport.jms.JMSConfigFeature"
p:jmsConfig-ref="jmsConfig" />
</jaxws:features>
</jaxws:client>
<bean id="jmsConfig"
class="org.apache.cxf.transport.jms.JMSConfiguration"
p:connectionFactory-ref="jmsConnectionFactory"
p:targetDestination="test.cxf.jmstransport.queue" />
<bean id="jmsConnectionFactory"
class="org.springframework.jms.connection.SingleConnectionFactory">
<property name="targetConnectionFactory">
<bean
class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL"
value="tcp://localhost:61616" />
</bean>
</property>
</bean>
</beans>
CXFê1ó?JMS×÷?a′?ê?D-òéμ?????(2)ê±??:2011-01-06 BlogJava ?à1?1y?í·t????App£o public??class??ServerApp??{ ???????? public??static??void??main(String[]??args)??{ ???????????????? ClassPathXmlApplicationContext??applicationContext??=??new??ClassPathXmlApplicationContext( ???????????????? "server-applicationContext.xml"); ???????? } } ?í?§??App£o public??class??ClientApp??{ ???????? /** ?????????? *??@param??args ?????????? */ ???????? public??static??void??main(String[]??args)??{ ???????????????? ClassPathXmlApplicationContext??applicationContext??=??new??ClassPathXmlApplicationContext( ???????????????????????????????? "client-applicationContext.xml"); ???????????????? CustomerService??hello??=??(CustomerService)??applicationContext ???????????????? .getBean("CustomerService"); ???????????????? System.out.println(hello.getOrder(null) |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |