Hi Pubudu,

It seems for some reason back-end response does not have a SOAP message but
some other. Can you check the wire log and make sure back-end is sending a
proper SOAP response.

On Wed, Jul 13, 2016 at 10:12 PM, Pubudu Priyashan <pubu...@wso2.com> wrote:

>
> Hi ESB team,
>
> I have a simple proxy service with a clone mediator and within that, I
> call three different endpoints where each endpoint returns an XML body [1].
> I would like to aggregate those three XML bodies into one message using
> the aggregate mediator.
>
> But in my config, I am getting the error message [2]. Can someone please
> advise if something is missing in this config [3]? You can directly add [3]
> into an ESB proxy and see the error message.
>
> *[1] XML Message from the endpoint:-*
>
> <soap:Envelope><soap:Header/><soap:Body><ser:getFullQuote><!--Optional:-->
> <ser:request><!--Optional:-->
>
> <xsd:symbol>USD</xsd:symbol></ser:request></ser:getFullQuote></soap:Body></soap:Envelope>
>
>
> *[2] Error Message:-*
>
> [2016-07-13 21:53:04,821] ERROR - SequenceMediator Expecting an
> implementation of SOAP Envelope as the parent. But received some other
> implementation
> org.apache.axiom.soap.SOAPProcessingException: Expecting an implementation
> of SOAP Envelope as the parent. But received some other implementation
> at
> org.apache.axiom.soap.impl.llom.SOAPHeaderImpl.checkParent(SOAPHeaderImpl.java:408)
> at
> org.apache.axiom.soap.impl.llom.SOAPElement.setParent(SOAPElement.java:81)
> at
> org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:296)
> at
> org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:212)
> at
> org.apache.axiom.soap.impl.llom.SOAPBodyImpl.addChild(SOAPBodyImpl.java:231)
> at org.apache.synapse.mediators.eip.EIPUtils.addChildren(EIPUtils.java:171)
> at
> org.apache.synapse.mediators.eip.EIPUtils.enrichEnvelope(EIPUtils.java:135)
> at
> org.apache.synapse.mediators.eip.aggregator.AggregateMediator.getAggregatedMessage(AggregateMediator.java:498)
> at
> org.apache.synapse.mediators.eip.aggregator.AggregateMediator.completeAggregate(AggregateMediator.java:416)
> at
> org.apache.synapse.mediators.eip.aggregator.AggregateMediator.mediate(AggregateMediator.java:330)
> at
> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:95)
> at
> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:57)
> at
> org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
> at
> org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:333)
> at
> org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:554)
> at
> org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:188)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
> at
> org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:255)
> at
> org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
>
>
>
> *[3] ESB  Proxy config:-*
>
> <?xml version="1.0" encoding="UTF-8"?>
> <proxy xmlns="http://ws.apache.org/ns/synapse";
>        name="CloneProxy1"
>        transports="http,https"
>        statistics="disable"
>        trace="disable"
>        startOnLoad="true">
>    <target>
>       <inSequence>
>          <property name="ROOT" scope="default">
>             <root:rootelement xmlns:root="www.wso2esb.com"/>
>          </property>
>          <clone continueParent="true" id="1">
>             <target>
>                <sequence>
>                   <log level="custom">
>                      <property name="Message"
>                                value="======================= message
> 1==============================="/>
>                   </log>
>                   <send>
>                      <endpoint>
>                         <address uri="
> http://www.mocky.io/v2/5786694b0f0000740aa58487"/>
>                      </endpoint>
>                   </send>
>                </sequence>
>             </target>
>             <target>
>                <sequence>
>                   <log level="custom">
>                      <property name="m2"
>                                value="=============================message
> 2============================="/>
>                   </log>
>                   <send>
>                      <endpoint>
>                         <address uri="
> http://www.mocky.io/v2/578669550f0000740aa58488"/>
>                      </endpoint>
>                   </send>
>                </sequence>
>             </target>
>             <target>
>                <sequence>
>                   <log level="custom">
>                      <property name="Message"
>                                value="======================= message
> 3==============================="/>
>                   </log>
>                   <send>
>                      <endpoint>
>                         <address uri="
> http://www.mocky.io/v2/5786695f0f0000740aa58489"/>
>                      </endpoint>
>                   </send>
>                </sequence>
>             </target>
>          </clone>
>          <loopback/>
>       </inSequence>
>       <outSequence>
>          <log level="custom">
>             <property name="MESSAGE"
>
> value="++++++++++++++++++Aggregate+++++++++++++++++++++++++++++++++++++"/>
>          </log>
>          <aggregate>
>             <completeCondition>
>                <messageCount min="3" max="3"/>
>             </completeCondition>
>             <onComplete xmlns:xsd="http://services.samples/xsd";
>                         xmlns:ser="http://services.samples";
>                         xmlns:soap="
> http://www.w3.org/2003/05/soap-envelope";
>                         expression="/*">
>                <respond/>
>             </onComplete>
>          </aggregate>
>       </outSequence>
>       <faultSequence/>
>    </target>
>    <description/>
> </proxy>
>
>
> Cheers,
> Pubudu D.P
> Senior Software Engineer - QA Team | WSO2 inc.
> Mobile : +94775464547
>
> Linkedin: https://uk.linkedin.com/in/pubududp
> Medium: https://medium.com/@pubududp
>
>


-- 
Regards,
*Shafreen*
Software Engineer
WSO2 Inc
Mobile : 077-556-395-1
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to