0
votes

I am new to wso2

I have created a Custom Proxy Service to call a backend Soap Service... I need to POST a Soap XML request to back end service,using a proxy service.. I am using REST CLIENT (Mozilla firefox addon) for calling my proxy service

I put the method as POST and content type as text/xml

Below is my proxy service configuration

<target>
    <inSequence>
        <property name="messageType" value="text/xml" scope="axis2" type="STRING"/>
    </inSequence>
    <outSequence>
        <send/>
    </outSequence>
    <faultSequence>
        <log level="full">
            <property name="MESSAGE" value="Executing default &quot;fault&quot; sequence"/>
            <property name="ERROR_CODE" expression="get-property('ERROR_CODE')"/>
            <property name="ERROR_MESSAGE" expression="get-property('ERROR_MESSAGE')"/>
        </log>
    </faultSequence>
    <endpoint>
        <address uri="Soap Service URL"/>
    </endpoint>
</target>

Here is my REQUEST(Rest Client Body) that i passed thru proxy service

<?xml version="1.0" encoding="utf-8"?>
<UserLogin xmlns="http://tempuri.org/">
<LoginID>xxx</LoginID>
<Password>xxx</Password>
</UserLogin>

But i am getting the following error

[2014-03-14 18:01:51,443]  WARN {SERVICE_LOGGER.FilterMediatorProxy} -  Executing fault handler due to exception encountered
[2014-03-14 18:01:51,444]  WARN {SERVICE_LOGGER.FilterMediatorProxy} -  ERROR_CODE : 0 ERROR_MESSAGE : Unexpected error during sending message out
[2014-03-14 18:01:51,445]  INFO {SERVICE_LOGGER.FilterMediatorProxy} -  FaultHandler executing impl: org.apache.synapse.mediators.MediatorFaultHandler
[2014-03-14 18:01:51,445]  WARN {SERVICE_LOGGER.FilterMediatorProxy} -  Executing fault sequence mediator : org.apache.synapse.mediators.base.SequenceMediator
[2014-03-14 18:01:51,445]  INFO {SERVICE_LOGGER.FilterMediatorProxy} -  To: http://10.132.97.131:9763/services/FilterMediatorProxy.FilterMediatorProxyHttpEndpoint/, 
From: 10.132.97.131, Direction: request, MESSAGE = Executing default "fault" sequence, 
ERROR_CODE = 0, ERROR_MESSAGE = Unexpected error during sending message out, Envelope: 
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body><UserLogin xmlns="http://tempuri.org/">
<LoginID>xxx</LoginID>
<Password>xxx</Password>
</UserLogin></soapenv:Body></soapenv:Envelope>`

The formatted XML is not properly going to Soap Service,i think that is the error..

Shall i need to set anything in the above configuration,please help me on this

When i used the console envelope code directly to call the Soap Service,it's working fine

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body><UserLogin xmlns="http://tempuri.org/">
<LoginID>xxx</LoginID>
<Password>xxx</Password>
</UserLogin></soapenv:Body>
</soapenv:Envelope>

Can anyone help me on this

Response is also an XML...

NOTE : Sorry for the long question

You should find a stacktrace in wso2-esb-errors.log, could you share it ?Jean-Michel
@Jean I have installed ESB on wso2 Carbon,so there is no file like wso2-esb-errors.log. I am getting the following error in Console (I shared in Question) .Mahesh Narayanan
@Jean I am passing input as text/xml and output reponse also text/xml I think the message formatter and builder is not properly formmatted.... Can you help me on this pleaseMahesh Narayanan
Try to send a request directly to the soap endpoint using Soap client like SoapUI.Wenod Pathirana
@Wenod If i call the endpoint directly,i can able to get the response,but while using a PRoxy Service,i am not getting the resultMahesh Narayanan