Exforsys

Home arrow Reviews arrow Java SOA Training

XBean based servicemix http Binding

Author : Exforsys Inc.     Published on: 20th Jun 2008

XBean-based servicemix-http Binding

For XBean-based deployment of servicemix-http, our xbean.xml matches the following:

Ads

Sample Code
  1. <beans xmlns:http="http://servicemix.apache.org/http/1.0"
  2. xmlns:test="http://AxisEndToEnd.axis.apache.binildas.com">
  3. <classpath>
  4. <location>.</location>
  5. </classpath>
  6. <http:endpoint service="test:IHelloWebService"
  7. endpoint="HelloWebService"
  8. role="provider"
  9. locationURI="http://localhost:8080/AxisEndToEnd/
  10. services/HelloWebService"
  11. soap="true"
  12. soapAction=""
  13. wsdlResource="http://localhost:8080/AxisEndToEnd/
  14. services/HelloWebService?WSDL" />
  15. <http:endpoint service="test:MyConsumerService"
  16. endpoint="HelloWebService"
  17. role="consumer"
  18. targetService="test:IHelloWebService"
  19. locationURI="http://localhost:8081/services/
  20. HelloWebService"
  21. soap="true"
  22. defaultMep="http://www.w3.org/2004/08/wsdl/in-out" target="_blank" rel="nofollow"
  23. wsdlResource="http://localhost:8080/AxisEndToEnd/
  24. services/HelloWebService?WSDL" />
  25. </beans>
Copyright exforsys.com


The previous execution of ant has already built and packaged the service assembly for the sample.

Deploying and Running the Sample

To deploy the ServiceMix sample, we have the following servicemix.xml:

Sample Code
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns:sm="http://servicemix.apache.org/config/1.0"
  3. xmlns:binil="http://www.binildas.com/voipservice" target="_blank" rel="nofollow">
  4. <bean id="propertyConfigurer"
  5. class="org.springframework.beans.factory.config.
  6. PropertyPlaceholderConfigurer">
  7. <property name="location"
  8. value="classpath:servicemix.properties" />
  9. </bean>
  10. <import resource="classpath:jmx.xml" />
  11. <import resource="classpath:jndi.xml" />
  12. <import resource="classpath:security.xml" />
  13. <import resource="classpath:tx.xml" />
  14. <sm:container id="jbi"
  15. MBeanServer="#jmxServer"
  16. useMBeanServer="true"
  17. createMBeanServer="true"
  18. rootDir="./wdir"
  19. installationDirPath="./install"
  20. deploymentDirPath="./deploy"
  21. flowName="seda">
  22. <sm:activationSpecs>
  23. </sm:activationSpecs>
  24. </sm:container>
  25. </beans>
Copyright exforsys.com


To bring up the ServiceMix, change directory to ch10\ServiceMixHttpBinding and execute the ServiceMix script as follows.

cd ch10\ServiceMixHttpBinding
%SERVICEMIX_HOME%\bin\servicemix servicemix.xml

Ads

We can now test our ServiceMix deployment by using the following test client:

ch10\ServiceMixHttpBinding\Client.html

Read Next: Access WSDL


 
This tutorial is part of a Java SOA Training tutorial series. Read it from the beginning and learn yourself.

Java SOA Training

 

Comments