I am trying to get some data from wso2 data service via wso2 esb sequence as below
<sequence xmlns="http://ws.apache.org/ns/synapse" name="ConcurGetSAEExtractFlow">
<log level="custom">
<property name="Debugging" value="ConcurGetSAEExtractFlow" />
</log>
<xslt key="GetConcurSAE_Extract_Transformation" />
<property name="post-data-service-sequence" value="ConcurTransformSAEExtractFlow" />
<property name="OUT_ONLY" value="false" />
<send receive="DataServiceInvocationErrorFlow">
<endpoint key="ConcurDataServiceEndpoint" />
</send>
<description />
</sequence>
The xslt transformation GetConcurSAE_Extract_Transformation is as below
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dat="http://ws.wso2.org/dataservice" xmlns:fn="http://www.w3.org/2005/02/xpath-functions" version="1.0">
<xsl:template match="/">
<xsl:element name="dat:GetConcurSAEExtract">
</xsl:element>
</xsl:template>
</xsl:stylesheet>
As seen there is no input mappings for the service and output mappings are provided. I have already tested the service in the wso2 dss "try this service" and it runs well.
But whereas when I am trying to run this through the wso2 esb through a proxy I receive the below error block
TID: [] [WSO2 ESB] [2013-01-25 01:26:24,244] INFO {org.apache.synapse.mediators.builtin.LogMediator} - Debugging = ConcurGetSAEExtractFlow {org.apache.synapse.mediators.builtin.LogMediator}
TID: [] [WSO2 ESB] [2013-01-25 01:26:24,252] WARN {org.apache.synapse.transport.nhttp.ClientHandler} - Received an internal server error : Internal Server Error For : 10.12.46.5:9764 For Request : Axis2Request [Message ID : urn:uuid:2b34a4c3-796e-410b-aa62-47f28f88f8b7] [Status Completed : true] [Status SendingCompleted : true] {org.apache.synapse.transport.nhttp.ClientHandler}
TID: [] [WSO2 ESB] [2013-01-25 01:26:24,253] INFO {org.apache.axis2.builder.BuilderUtil} - OMException in getSOAPBuilder {org.apache.axis2.builder.BuilderUtil}
org.apache.axiom.soap.SOAPProcessingException: First Element must contain the local name, Envelope , but found html
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.constructNode(StAXSOAPModelBuilder.java:305)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createOMElement(StAXSOAPModelBuilder.java:252)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createNextOMElement(StAXSOAPModelBuilder.java:234)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:249)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:204)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:154)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:140)
at org.apache.axis2.builder.BuilderUtil.getSOAPBuilder(BuilderUtil.java:728)
at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:197)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:145)
at org.apache.synapse.transport.nhttp.ClientWorker.run(ClientWorker.java:223)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
TID: [] [WSO2 ESB] [2013-01-25 01:26:24,254] INFO {org.apache.axis2.builder.BuilderUtil} - Remaining input stream :[] {org.apache.axis2.builder.BuilderUtil}
TID: [] [WSO2 ESB] [2013-01-25 01:26:24,254] WARN {org.apache.synapse.transport.nhttp.ClientWorker} - Unexpected response received. HTTP response code : 500 HTTP status : Internal Server Error exception : First Element must contain the local name, Envelope , but found html {org.apache.synapse.transport.nhttp.ClientWorker}
TID: [] [WSO2 ESB] [2013-01-25 01:26:24,273] INFO {org.apache.synapse.mediators.builtin.LogMediator} - status = success response from DSS {org.apache.synapse.mediators.builtin.LogMediator}
I am not able to find out what's going wrong which results in this kind of error.Please if anybody have an idea on this.
You're not copying the soap envelope and header with your XSLT. Make once a <log level="full"/> before and after your <xslt> call, then you'll see that your XSLT will also get a <soap:envelope><soap:body>...
So you'll have to put that in the output as well.
Pseudo code:
<xsl:template match="envelope|body">
<xsl:copy>
<xsl:apply-templates/>
</xsl:copy/>
</xsl:template>
Related
My resource looks like this after creating my APIM using wsdl url
<header description="SOAPAction" name="SOAPAction" scope="transport" value="urn:mediate"/>
<property name="REST_URL_POSTFIX" scope="axis2" action="remove"/>
<property expression="json-eval($.)" name="req.var."/>
<payloadFactory description="transform" media-type="xml">
<format>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:web="http://ws.apache.org/axis2">
<soapenv:Header/>
<soapenv:Body>
<web:mediate xmlns:web="http://ws.apache.org/axis2"/>
</soapenv:Body>
</soapenv:Envelope>
</format>
<args>
<arg evaluator="xml" expression="get-property('req.var.')"/>
</args>
</payloadFactory>
<property description="messageProperty" name="messageType" scope="axis2" type="STRING" value="application/soap+xml"/>
I cannot understand this code...
When I try it gives
{
"Error": {
"Message": "invalid input"
}
}
In log I am getting
[2022-04-21 11:40:07,448] INFO - CarbonAuthenticationUtil 'admin#carbon.super [-1234]' logged in at [2022-04-21 11:40:07,448+0530]
[2022-04-21 11:40:07,760] WARN - SourceHandler STATE_DESCRIPTION = Socket Timeout occurred after accepting the request headers and the request body, INTERNAL_STATE = REQUEST_DONE, DIRECTION = REQUEST, CAUSE_OF_ERROR = Connection between the client and the EI timeouts, HTTP_URL = /SampelProxyAPI/1.0/mediate, HTTP_METHOD = POST, SOCKET_TIMEOUT = 180000, CLIENT_ADDRESS = /0:0:0:0:0:0:0:1:49255, CONNECTION http-incoming-105
[2022-04-21 11:40:08,015] INFO - LogMediator STATUS = Message dispatched to the main sequence. Invalid URL., RESOURCE = /SampelProxyAPI/1.0/mediate, HEALTH CHECK URL = /SampelProxyAPI/1.0/mediate
[2022-04-21 11:48:54,087] WARN - SourceHandler I/O error: Received fatal alert: certificate_unknown
I'm getting "Connection closed before sending request out" in my WSO2 ESB API when a request is made to an endpoint. I am not using a proxy server.
Here is the source for the API that I have created:
<api xmlns="http://ws.apache.org/ns/synapse" name="WorkspaceONEUser" context="/workspaceone/user" port="8243">
<resource methods="POST" uri-template="*">
<inSequence>
<log>
<property name="Message Flow" value="POST WorkspaceONEUser Search - IN"/>
</log>
<send>
<endpoint key="workspaceOneUserSearchEndpoint"/>
</send>
</inSequence>
<outSequence>
<property name="Access-Control-Allow-Headers" value="authorization,Access-Control-Allow-Origin,Content-Type,X-Requested-With,Accept,Allow,Access-Control-Allow-Credentials" scope="transport"/>
<property name="Access-Control-Allow-Origin" value="HOST_NAME" scope="transport" type="STRING"/>
<property name="Access-Control-Allow-Credentials" value="true" scope="transport" type="STRING"/>
<log>
<property name="Message Flow" value="POST WorkspaceONEUser - OUT"/>
</log>
<log level="full"/>
<send/>
</outSequence>
<faultSequence>
<log>
<property name="message" value="in fault"/>
<property name="text" value="An unexpected error occured"/>
<property name="message" expression="get-property('ERROR_MESSAGE')"/>
<property name="header" expression="get-property('REQUEST_HOST_HEADER')"/>
</log>
</faultSequence>
</resource>
<resource methods="OPTIONS" url-mapping="/">
<inSequence>
<log>
<property name="Message Flow" value="IN OPTIONS"/>
</log>
<log level="full"/>
<property name="Access-Control-Allow-Headers" value="authorization,Access-Control-Allow-Origin,Content-Type,X-Requested-With,Accept,Allow,Access-Control-Allow-Credentials" scope="transport"/>
<property name="Access-Control-Allow-Origin" value="https://HOST_NAME" scope="transport" type="STRING"/>
<property name="Access-Control-Allow-Credentials" value="true" scope="transport" type="STRING"/>
<respond/>
</inSequence>
</resource>
</api>
In the logs, it appears that the connection is being closed before it is sent out:
TID: [-1234] [] [2019-01-28 13:38:29,283] DEBUG {org.apache.synapse.endpoints.AddressEndpoint} - Sending message through endpoint : workspaceOneUserSearchEndpoint resolving to address = https://TARGET_HOST {org.apache.synapse.endpoints.AddressEndpoint}
TID: [-1234] [] [2019-01-28 13:38:29,283] DEBUG {org.apache.synapse.endpoints.AddressEndpoint} - SOAPAction: null {org.apache.synapse.endpoints.AddressEndpoint}
TID: [-1234] [] [2019-01-28 13:38:29,283] DEBUG {org.apache.synapse.endpoints.AddressEndpoint} - WSA-Action: null {org.apache.synapse.endpoints.AddressEndpoint}
TID: [-1234] [] [2019-01-28 13:38:29,283] DEBUG {org.apache.synapse.core.axis2.Axis2FlexibleMEPClient} - Sending [add = false] [sec = false] [mtom = false] [swa = false] [format = null] [force soap11=false] [force soap12=false] [pox=false] [get=false] [encoding=null] [to=https://TARGET_HOST] {org.apache.synapse.core.axis2.Axis2FlexibleMEPClient}
TID: [-1234] [] [2019-01-28 13:38:29,283] DEBUG {org.apache.synapse.core.axis2.Axis2FlexibleMEPClient} - Message [Original Request Message ID : urn:uuid:09116122-22b4-4acf-be8e-31570623bd39] [New Cloned Request Message ID : urn:uuid:b242c096-4348-4977-8048-d70a5ac8c15b] {org.apache.synapse.core.axis2.Axis2FlexibleMEPClient}
TID: [-1234] [] [2019-01-28 13:38:29,283] DEBUG {org.apache.synapse.core.axis2.Axis2FlexibleMEPClient} - Setting Timeout for endpoint : Endpoint [workspaceOneUserSearchEndpoint], URI : https://TARGET_HOST to static timeout value : 120000 {org.apache.synapse.core.axis2.Axis2FlexibleMEPClient}
TID: [-1234] [] [2019-01-28 13:38:29,284] DEBUG {org.apache.synapse.core.axis2.SynapseCallbackReceiver} - Callback added. Total callbacks waiting for : 2 {org.apache.synapse.core.axis2.SynapseCallbackReceiver}
TID: [-1234] [] [2019-01-28 13:38:29,297] DEBUG {org.apache.axis2.transport.http.ApplicationXMLFormatter} - start writeTo() {org.apache.axis2.transport.http.ApplicationXMLFormatter}
TID: [-1234] [] [2019-01-28 13:38:29,297] DEBUG {org.apache.axis2.transport.http.ApplicationXMLFormatter} - end writeTo() {org.apache.axis2.transport.http.ApplicationXMLFormatter}
TID: [-1234] [] [2019-01-28 13:38:29,297] DEBUG {org.apache.synapse.mediators.builtin.SendMediator} - End : Send mediator {org.apache.synapse.mediators.builtin.SendMediator}
TID: [-1234] [] [2019-01-28 13:38:29,297] DEBUG {org.apache.synapse.mediators.base.SequenceMediator} - End : Sequence <anonymous> {org.apache.synapse.mediators.base.SequenceMediator}
TID: [-1] [] [2019-01-28 13:38:34,781] WARN {org.apache.synapse.transport.passthru.TargetHandler} - Connection closed before sending request out Remote Address : wsoidm01pa.jefferson.edu/147.140.23.161:443 {org.apache.synapse.transport.passthru.TargetHandler}
Does anyone know what might be causing this? I suspect that this indicates a connection between the ESB and a downstream server has closed before the ESB was able to completely write the request out.
However, I'm able to POST to the same endpoint from another API that's almost identical. Is there something that's obviously wrong with my API or endpoint that's causing this mysterious problem?
Try to add this property before your <send> mediator.
<property name="ClientApiNonBlocking"
value="true"
scope="axis2"
action="remove"/>
It will remove your Client Api Non Blocking in your <send> mediator (which is enable by default)
I have a proxy service with below definition:
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="TestProxy"
transports="https,http"
statistics="disable"
trace="disable"
startOnLoad="true">
<target>
<inSequence>
<header name="Action" value="urn:loadPerson"/>
<payloadFactory media-type="xml">
<format>
<sear:loadPerson xmlns:sear="http://localhost/SearchService">
<sear:Id>1234</sear:Id>
</sear:loadPerson>
</format>
<args/>
</payloadFactory>
<log level="full"/>
<call>
<endpoint key="SearchService"/>
</call>
<respond/>
</inSequence>
</target>
<description/>
</proxy>
So it's work fine when I call the proxy service(by tryIt) first time and I get right response of proxy service but for the next time it faces a problem and show me fault response:
<soapenv:Fault xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<faultcode>axis2ns11:Server</faultcode>
<faultstring>Missing operation for soapAction [urn:loadPerson] and body element [null] with SOAP Version [SOAP 1.1]</faultstring>
</soapenv:Fault>
As you can see I log the message and it's the same for every proxy call:
INFO - LogMediator To: /services/TestProxy.TestProxyHttpSoap11Endpoint, WSAction: urn:loadPerson, SOAPAction: urn:loadPerson, MessageID: urn:uuid:cc9557cc-e2a0-4b8d-97a8-ae393a411157, Direction: request, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><sear:loadPerson xmlns:sear="http://localhost/SearchService"><sear:Id>1234</sear:Id></sear:loadPerson></soapenv:Body></soapenv:Envelope>
I found that the problem resolved by restarting the server(not redeploying the proxy service) or leave it for few minutes!
any idea?!
I am new to the wso2 esb server and I am trying to create a proxy service to connect to a rest service. I am having issue trying to test the proxy when in the "Deployed Services" page of the esb. The source view of the proxy service is:
> <?xml version="1.0" encoding="UTF-8"?>
> <proxy xmlns="http://ws.apache.org/ns/synapse"
> name="search"
> transports="https,http,local"
> statistics="disable"
> trace="disable"
> startOnLoad="true">
> <target>
> <outSequence>
> <send/>
> </outSequence>
> <faultSequence>
> <log level="full" category="DEBUG"/>
> </faultSequence>
> <endpoint>
> <http method="get" uri-template="http://52.24.50.197:8080/search"/>
> <property name="q" value="test"/>
> </endpoint> </target> <description/> </proxy>
I click on "Try this Service" link and I get this in the console:
[2015-05-19 09:06:43,573] DEBUG - SynapseMessageReceiver Synapse received a new message for message mediation...
[2015-05-19 09:06:43,574] DEBUG - SynapseMessageReceiver Received To: /services/mediate/mediate
[2015-05-19 09:06:43,575] DEBUG - SynapseMessageReceiver SOAPAction: null
[2015-05-19 09:06:43,575] DEBUG - SynapseMessageReceiver WSA-Action: null
[2015-05-19 09:06:43,575] DEBUG - Axis2SynapseEnvironment Injecting MessageContext
[2015-05-19 09:06:43,576] DEBUG - Axis2SynapseEnvironment Using Main Sequence for injected message
[2015-05-19 09:06:43,576] DEBUG - SequenceMediator Start : Sequence <main>
[2015-05-19 09:06:43,576] DEBUG - SequenceMediator Sequence <SequenceMediator> :: mediate()
[2015-05-19 09:06:43,577] DEBUG - SequenceMediator Mediation started from mediator position : 0
[2015-05-19 09:06:43,577] DEBUG - InMediator Start : In mediator
[2015-05-19 09:06:43,578] DEBUG - InMediator Current message is incoming - executing child mediators
[2015-05-19 09:06:43,578] DEBUG - InMediator Sequence <InMediator> :: mediate()
[2015-05-19 09:06:43,578] DEBUG - InMediator Mediation started from mediator position : 0
[2015-05-19 09:06:43,579] DEBUG - LogMediator Start : Log mediator
[2015-05-19 09:06:43,579] INFO - LogMediator To: /services/mediate/mediate, MessageID: urn:uuid:e2c5b5f7-3c2c-4969-9c0b-6aa4d8282f2d, Direction: requ
st, Envelope: <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body></soapen
:Body></soapenv:Envelope>
[2015-05-19 09:06:43,580] DEBUG - LogMediator End : Log mediator
[2015-05-19 09:06:43,581] DEBUG - FilterMediator Start : Filter mediator
[2015-05-19 09:06:43,581] DEBUG - FilterMediator Source : get-property('To') against : http://localhost:9000.* does not match - skipping child mediato
s
[2015-05-19 09:06:43,582] DEBUG - FilterMediator End : Filter mediator
[2015-05-19 09:06:43,582] DEBUG - InMediator End : In mediator
[2015-05-19 09:06:43,582] DEBUG - OutMediator Start : Out mediator
[2015-05-19 09:06:43,583] DEBUG - OutMediator Current message is a request - skipping child mediators
[2015-05-19 09:06:43,583] DEBUG - OutMediator End : Out mediator
[2015-05-19 09:06:43,584] DEBUG - SequenceMediator End : Sequence <main>
Can someone explain to me why the data is not coming back.We have open the ports to the server the service resides, which is port 8080.
Thanks
It seems that you´re pointing to the wrong URL in ESB. The log shows a message received for the folowing URI: /services/mediate/mediate. Since your proxy is named "search", it should be something link /services/search.
Also, I see that your http endpoint template is not taking any parameters, which probably is not what you want.
The send mediator should look something like that:
<inSequence>
<!-- Assigns URI-Template var to some value. You could use an expression here too -->
<property name="uri.var.search" value="test"/>
</inSequence>
<outSequence>
<send/>
</outSequence>
<endpoint>
<html uri-template="http://52.24.50.197:8080/search?q={uri.var.search}" method="GET"/>
</endpoint>
Rather define your endpoint outside the proxy , so in the ESB main console create your endpoint :
<endpoint xmlns="http://ws.apache.org/ns/synapse" name="HTTPEndpoint">
<http uri-template="http://{uri.var.ip}:8080/{uri.var.servicepath} method="GET">
</http>
</endpoint>
Then try out this proxy :
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse" name="search"
transports="https,http,local"
statistics="disable"
trace="disable"
startOnLoad="true">
<target>
<inSequence>
<property name="uri.var.ip" value="52.24.50.197"/>
<property name="uri.var.servicepath" value="search"/>
<send>
<endpoint key="MyHTTPEndpoint"/>
</send>
</inSequence>
<outSequence>
<respond/>
</outSequence>
<faultSequence>
<log level="full" category="DEBUG"/>
</faultSequence>
</target> <description/> </proxy>
So you will be sending the get request to the proxy endpoint , that will forward it to the service , and show response , hopefully.
I am implementing the Fan out -- Fan in splitter EIP inside a proxy , whereby :
|-----> shoe store-(1-M)-------------
productSearchRq -- |-->Rs
|-----> ack clothes store-(0-1)------
Shoe store = Data service and Clothes store = Axis 2 service .
So in short I implement the pattern above ; I clone the request , send it , get responses , format them using payloadFactory:
<productDetails>
<productID>$1</productID>
<productName>$2</productName>
<productSize>$3</productSize>
<productColour>$4</productColour>
<productType>$5</productType>
<sourceID>$6</sourceID>
</productDetails>
on both responses ( and iterate [//productDetails , iterate id = iT] on shoe products since it's one to many). Then in the following response handler , I try to aggregate all these productDetails.
<sequence xmlns="http://ws.apache.org/ns/synapse" name="productSearchHandler">
<log level="custom">
<property name="pocSearchRsHandlerSeq reached" value="++++++++++++++=========Aggregating now========+++++++++++++++++=="></property>
</log>
<aggregate id="iT">
<completeCondition>
<messageCount min="-1" max="-1"></messageCount>
</completeCondition>
<onComplete xmlns:ns="http://org.apache.synapse/xsd" expression="//productDetails">
<log level="custom" separator=",">
<property name="::::" value="======================= Formatting the Aggregated Responses. ==============="></property>
</log>
<log level="full"></log>
</onComplete>
</aggregate>
<aggregate>
<completeCondition>
<messageCount min="-1" max="-1"></messageCount>
</completeCondition>
<onComplete xmlns:ns="http://org.apache.synapse/xsd" expression="//productDetails">
<payloadFactory media-type="xml">
<format>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:prod="http://za.co.pepkor/product_service/">
<soapenv:Body>
<prod:productSearchResp> $1 </prod:productSearchResp>
</soapenv:Body>
</soapenv:Envelope>
</format>
<args>
<arg expression="//productDetails" evaluator="xml"></arg>
</args>
</payloadFactory>
<switch source="get-property('CallType')">
<case regex="SOAP">
<send></send>
</case>
<case regex="REST">
<property name="messageType" value="application/json" scope="axis2" type="STRING"></property>
<send></send>
</case>
<default></default>
</switch>
</onComplete>
</aggregate>
</sequence>
The filter's there to cater for the API implementation of this proxy. And I do need 2 aggregators because I use a clone AND iterator mediator.
So I am wondering why before my second aggregator , the message is being "reset" to an empty soap message and therefore the 2nd agg fails to find //productDetails. See following log entries :
After 1st agg which aggregates shoe prods:
TID: [0] [ESB] [2015-02-27 09:46:24,520] DEBUG {org.apache.synapse.mediators.eip.aggregator.AggregateMediator} - Merging message : <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><productDetails><productID>1124596</productID><productName>REEBOK_SNEAKERS</productName><productSize>7</productSize><productColour>BROWN</productColour><productType>SHOES</productType><sourceID>SHC</sourceID></productDetails></soapenv:Body></soapenv:Envelope> using XPath : //productDetails {org.apache.synapse.mediators.eip.aggregator.AggregateMediator}
TID: [0] [ESB] [2015-02-27 09:46:24,522] DEBUG {org.apache.synapse.mediators.eip.aggregator.AggregateMediator} - Merged result : <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><productDetails><productID>1452168</productID><productName>PUMPS</productName><productSize>7</productSize><productColour>ORANGE</productColour><productType>SHOE</productType><sourceID>SHC</sourceID></productDetails><productDetails><productID>1124596</productID><productName>REEBOK_SNEAKERS</productName><productSize>7</productSize><productColour>BROWN</productColour><productType>SHOES</productType><sourceID>SHC</sourceID></productDetails></soapenv:Body></soapenv:Envelope> {org.apache.synapse.mediators.eip.aggregator.AggregateMediator}
TID: [0] [ESB] [2015-02-27 09:46:24,523] DEBUG {org.apache.synapse.mediators.eip.aggregator.AggregateMediator} - Merging message : <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><productDetails><productID>1123456</productID><productName>NIKE_SHIRTS</productName><productSize>7</productSize><productColour>RED</productColour><productType>SHIRT</productType><sourceID>SHC</sourceID></productDetails></soapenv:Body></soapenv:Envelope> using XPath : //productDetails {org.apache.synapse.mediators.eip.aggregator.AggregateMediator}
TID: [0] [ESB] [2015-02-27 09:46:24,525] DEBUG {org.apache.synapse.mediators.eip.aggregator.AggregateMediator} - Merged result : <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><productDetails><productID>1452168</productID><productName>PUMPS</productName><productSize>7</productSize><productColour>ORANGE</productColour><productType>SHOE</productType><sourceID>SHC</sourceID></productDetails><productDetails><productID>1124596</productID><productName>REEBOK_SNEAKERS</productName><productSize>7</productSize><productColour>BROWN</productColour><productType>SHOES</productType><sourceID>SHC</sourceID></productDetails><productDetails><productID>1123456</productID><productName>NIKE_SHIRTS</productName><productSize>7</productSize><productColour>RED</productColour><productType>SHIRT</productType><sourceID>SHC</sourceID></productDetails></soapenv:Body></soapenv:Envelope> {org.apache.synapse.mediators.eip.aggregator.AggregateMediator}
Then as we are going into 2nd agg :
TID: [0] [ESB] [2015-02-27 09:46:24,545] DEBUG {org.apache.synapse.mediators.eip.aggregator.AggregateMediator} - Generating Aggregated message from : <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><productDetails><noItemFound>No item in Ackerman's</noItemFound></productDetails></soapenv:Body></soapenv:Envelope> {org.apache.synapse.mediators.eip.aggregator.AggregateMediator}
TID: [0] [ESB] [2015-02-27 09:46:24,547] DEBUG {org.apache.synapse.mediators.eip.aggregator.AggregateMediator} - Merging message : <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body></soapenv:Body></soapenv:Envelope> using XPath : //productDetails {org.apache.synapse.mediators.eip.aggregator.AggregateMediator}
TID: [0] [ESB] [2015-02-27 09:46:24,550] ERROR {org.apache.synapse.mediators.eip.aggregator.AggregateMediator} - Error evaluating expression: //productDetails {org.apache.synapse.mediators.eip.aggregator.AggregateMediator}
What I want is to merge
<?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><productDetails><productID>1452168</productID><productName>PUMPS</productName><productSize>7</productSize><productColour>ORANGE</productColour><productType>SHOE</productType><sourceID>SHC</sourceID></productDetails><productDetails><productID>1124596</productID><productName>REEBOK_SNEAKERS</productName><productSize>7</productSize><productColour>BROWN</productColour><productType>SHOES</productType><sourceID>SHC</sourceID></productDetails><productDetails><productID>1123456</productID><productName>NIKE_SHIRTS</productName><productSize>7</productSize><productColour>RED</productColour><productType>SHIRT</productType><sourceID>SHC</sourceID></productDetails></soapenv:Body></soapenv:Envelope>
with
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><productDetails><noItemFound>No item in Ackerman's</noItemFound></productDetails></soapenv:Body></soapenv:Envelope>
Hi if you are using clone mediator with one aggregate mediator you can aggregate the response from two different services. check this tutorial how that works
http://architects.dzone.com/articles/wso2-esb-cloning-and