Configured proxy to invoke web service using callout mediator with the following proxy. Since wsdl is exposed through HTTPS protocol it throws the below exception. However I have downloaded the certificates from the Application and configured in keystore wso2corbon.jks, but issue could not resolve. You can find the logs next to the proxy. Please help
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="getParties"
transports="https http"
startOnLoad="true"
trace="disable">
<description/>
<target faultSequence="fault">
<inSequence>
<payloadFactory media-type="xml">
<format>
<web:getParties xmlns:web="http://webservices.ttttt.com">
<web:userName>XXXXX</web:userName>
<web:password>XXXXX</web:password>
<web:sendToPartyId>TEST</web:sendToPartyId>
</web:getParties>
</format>
<args/>
</payloadFactory>
<callout serviceURL="https://<url>/ServiceHandler"
action="getParties">
<source xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"
xpath="soapenv:Body/child::*[fn:position()=1]"/>
<target xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"
xpath="soapenv:Body/child::*[fn:position()=1]"/>
</callout>
<log>
<property name="body" expression="$body"/>
</log>
</inSequence>
</target>
</proxy>
Logs:
TID: [-1234] [] [2016-05-18 13:41:59,840] INFO {org.apache.synapse.mediators.builtin.LogMediator} - To: /services/getParties.getPartiesHttpSoap12Endpoint, WSAction: urn:mediate, SOAPAction: urn:mediate, MessageID: urn:uuid:b3645157-e361-4117-9498-09dc99ee3602, Direction: request, MESSAGE = Executing default 'fault' sequence, ERROR_CODE = 401000, ERROR_MESSAGE = Connection has been shutdown: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><web:getParties xmlns:web="http://webservices.tradestonesoftware.com"><web:userName>XXXXX</web:userName><web:password>XXXXXX</web:password><web:sendToPartyId>TEST</web:sendToPartyId></web:getParties></soapenv:Body></soapenv:Envelope> {org.apache.synapse.mediators.builtin.LogMediator}
TID: [-1234] [] [2016-05-18 13:43:46,639] INFO {org.apache.axis2.transport.http.HTTPSender} - Unable to sendViaPost to url[https://tssdev.ae.com/TSS_DEV/services/ServiceHandler/wsdl/ServiceHandler] {org.apache.axis2.transport.http.HTTPSender}
org.apache.axis2.AxisFault: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:78)
at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:84)
at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)
at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:630)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:195)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:451)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:278)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:430)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at org.apache.synapse.message.senders.blocking.BlockingMsgSender.sendReceive(BlockingMsgSender.java:254)
at org.apache.synapse.message.senders.blocking.BlockingMsgSender.send(BlockingMsgSender.java:175)
at org.apache.synapse.mediators.builtin.CalloutMediator.mediate(CalloutMediator.java:180)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:81)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:48)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:149)
at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:185)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:173)
at org.apache.synapse.transport.nhttp.ServerWorker.processEntityEnclosingMethod(ServerWorker.java:473)
at org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:291)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)