Thanks for your reply, Guillaume.
I've attached the servicemix.xml file for doing a very simple example:

  SOAP request -> XSL transformation -> Invocation of external webservice

It works if I remove the transformation (invokes the webservice with the XML received by the http binding). But when I add the XSL transformation (an intermediate step) then the sample fails. It returns directly the XML transformed. But my objective is to invoke the external web service with the transformed XML.
I think that "destinationService" elements are correct.
What's the problem?
Thanks

On 3/17/06, Guillaume Nodet < [EMAIL PROTECTED]> wrote:
Take a look at the bottom of the following page:
http://servicemix.org/servicemix-http#servicemix-http-Lightweightmode

Cheers,
Guillaume Nodet

On 3/17/06, Jaime Fernández <[EMAIL PROTECTED]> wrote:
>
> I'd like to route a SOAP request, depending on the value of one SOAP
> field,
> to one external web service or to another one:
>
> SOAP request --> content routing --> XSL transformation --> external
> webservice 1
>                                                    --> XSL transformation
> --> external webservice 2
>
> So I want to offer all of this as a web service offered by ServiceMix.
>
> I want to use servicemix-http in order to invoke the external web service.
> I've looked at soap-binding example but my example is a bit different
> because this service is not really implemented by any class (it's
> external).
> I know how to coordinate routing and transformations tasks with the "
> servicemix.xml" file. But servicemix-http requires xbean.xml. Is there any
> way to integrate or reference this xbean.xml in the servicemix.xml?.
> Because
> servicemix.xml in soap-binding example is almost empty and there's no
> activationSpec.
> Is there any documentation related to this kind of configuration?.
> Thanks.
>
>


<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:sm="http://servicemix.apache.org/config/1.0";
	 xmlns:http="http://servicemix.apache.org/http/1.0";
       xmlns:telas="http://www.foo.com/telas";>
    
  <!-- the JBI container -->
  <sm:container id="jbi"
                useMBeanServer="true"
                createMBeanServer="true"
                dumpStats="true"
                statsInterval="10">
  		
  	<sm:activationSpecs>

		<!-- Reception of the XML document -->  	
  		<sm:activationSpec componentName="httpReceiver" 	
  						   service="telas:httpBinding"
  						   endpoint="httpReceiver"
  						   destinationService="telas:transformation">
  		  <sm:component>
  		    <bean class="org.apache.servicemix.components.http.HttpConnector">
			      <property name="host" value="localhost"/>
			      <property name="port" value="8912"/>
  		    </bean>
  		  </sm:component>
  		</sm:activationSpec>

		<!-- XSL transformation
  		<sm:activationSpec componentName="transformer" service="telas:transformation" destinationService="telas:invokeService">
  		  <sm:component>
                <bean class="org.apache.servicemix.components.xslt.XsltComponent">
  		      <property name="xsltResource" value="file:resources/style.xsl"/>
                </bean>
              </sm:component>
  		</sm:activationSpec>

  		<!-- Invoke web service via servicemix-http -->
  		<sm:activationSpec componentName="lw-component">
              <sm:component>
                <http:component>
                  <http:endpoints>
                    <http:endpoint  service="telas:invokeService"
					     endpoint="invokeService"
					     role="provider" 
					     soap="yes"
					     locationURI="http://localhost:8080/test/testService.asmx";
					     wsdlResource="http://localhost:8080/test/testService.asmx?wsdl"/>
                  </http:endpoints>
                </http:component>
  		  </sm:component>
  		</sm:activationSpec>

  	</sm:activationSpecs>
  </sm:container>
  
</beans>



Reply via email to