integrating multiple services

venukjs's picture

I have two web services say one and two and want to pass the message to one service and output of one service to two service. Once the service two process the message it should return it to client.

   client { ---> one ---> two ---> }client

I have created service "one" as proxy and added the endpoint of service two in outsequence. If i run synapse and send request to esb i get following error.

21:42:06,797 INFO [SchemaUtils] Getting schema http://localhost:8280/soap/ntWs?wsdl 21:42:07,212 DEBUG [AbstractDefinitionContext] Loaded Definition: ok 21:42:07,214 INFO [WsdlImporter] Finding importer for {http://wsone}ntWsSoap11Binding 21:42:07,223 INFO [WsdlImporter] Importing binding {http://wsone}ntWsSoap11Binding 21:42:07,266 INFO [Soap11HttpBindingImporter] importing endpoint http://sushil-laptop:8280/soap/ntWs.ntWsHttpSoap11Endpoint 21:42:07,277 INFO [Soap11HttpBindingImporter] importing endpoint https://sushil-laptop:8243/soap/ntWs.ntWsHttpsSoap11Endpoint 21:42:07,278 INFO [Soap11HttpBindingImporter] importing operation hello 21:42:07,327 INFO [WsdlImporter] Finding importer for {http://wsone}ntWsSoap12Binding 21:42:07,327 INFO [WsdlImporter] Importing binding {http://wsone}ntWsSoap12Binding 21:42:07,328 INFO [Soap12HttpBindingImporter] importing endpoint https://sushil-laptop:8243/soap/ntWs.ntWsHttpsSoap12Endpoint 21:42:07,329 INFO [Soap12HttpBindingImporter] importing endpoint http://sushil-laptop:8280/soap/ntWs.ntWsHttpSoap12Endpoint 21:42:07,329 INFO [Soap12HttpBindingImporter] importing operation hello 21:42:07,330 INFO [WsdlImporter] Finding importer for {http://wsone}ntWsHttpBinding 21:42:07,330 INFO [WsdlImporter] Missing importer for {http://wsone}ntWsHttpBinding 21:42:07,331 INFO [WsdlImporter] Finding importer for {http://wsone}ntWsHttpBinding 21:42:07,331 INFO [WsdlImporter] Missing importer for {http://wsone}ntWsHttpBinding 21:42:07,331 INFO [WsdlImporter] Finding importer for {http://wsone}ntWsHttpBinding 21:42:07,331 INFO [WsdlImporter] Missing importer for {http://wsone}ntWsHttpBinding 21:42:26,872 DEBUG [SoapUIMultiThreadedHttpConnectionManager] HttpConnectionManager.getConnection: config = HostConfiguration[host=http://sushil-laptop:8280], timeout = 0 21:42:26,872 DEBUG [SoapUIMultiThreadedHttpConnectionManager] Allocating new connection, hostConfig=HostConfiguration[host=http://sushil-laptop:8280] 21:43:26,876 DEBUG [SoapUIMultiThreadedHttpConnectionManager] Freeing connection, hostConfig=HostConfiguration[host=http://sushil-laptop:8280] 21:43:26,876 DEBUG [SoapUIMultiThreadedHttpConnectionManager] Notifying no-one, there are no waiting threads java.lang.NullPointerException at org.apache.commons.httpclient.HttpMethodBase.getStatusCode(HttpMethodBase.java:570) at com.eviware.soapui.impl.wsdl.submit.transports.http.BaseHttpResponse.(BaseHttpResponse.java:71) at com.eviware.soapui.impl.wsdl.submit.transports.http.SinglePartHttpResponse.(SinglePartHttpResponse.java:40) at com.eviware.soapui.impl.wsdl.submit.transports.http.support.attachments.WsdlSinglePartHttpResponse.(WsdlSinglePartHttpResponse.java:35) at com.eviware.soapui.impl.wsdl.submit.filters.WsdlPackagingResponseFilter.afterWsdlRequest(WsdlPackagingResponseFilter.java:45)

I am struggling to create synapse.xml file for my application please help me to correct my file this is my synapse.xml file:

<definitions xmlns="http://ws.apache.org/ns/synapse">
    <proxy name="ntWs">
        <target>
            <endpoint>
                <address uri="http://localhost:8084/axis2/services/one"/>
            </endpoint>
            <outSequence>
                  <send>
                        <endpoint>
                            <address uri="http://localhost:8084/axis2/services/two"/>
                        </endpoint>
                    </send>
                    <drop/>
               
                <send/>
            </outSequence>
        </target>
        <publishWSDL uri="http://localhost:8084/axis2/services/one?wsdl"/>
    </proxy>
</definitions>

 

asankha's picture

This should help you :

This should help you : http://adroitlogic.org/knowledge-base-synapse/11-message-chaining-with-synapse.html cheers asankha http://adroitlogic.org
library project main code
Learn Cloud
Learn
Cloud

The WSO2 Application Server is a reliable application server that can host your enterprise web applications. The WSO2 Application Server as a Service is offered in StratosLive, the WSO2 Platform as a Service. This article explains how a simple web application can be developed and deployed from Carbon Studio to the WSO2 Application Server...

Latest Webinar
Different groups within an organization need to monitor different Key Performance Indicators (KPIs) - An operations team will be interested in the response times of business services and loads of each service,..
Thursday, February 9th 2012, 09.00 AM (PST)

Thursday, February 9th 2012, 10.00 AM (GMT)