I have a flow with an HTTPS inbound request/response that accepts a post with XML data (Port 8081). I do some processing with the data and then want to perform another HTTPS post via 443 to a different URL so that the data gets processed by an external process (PeopleSoft IB).
The problem is that when I try to post to the HTTPS:443 outbound what has come in from HTTPS:8081 inbound, I get the error shown below.
BUT, if I have the inbound connector set as HTTP and not HTTPS and comment out the https:connector name="httpsConnector" I have setup, everything works perfectly and I can post to the HTTPS/443 endpoint.
I've searched high and low and tried many different things to try to get around this error but all attempts so far have failed. I know it has something to do with the payload as MuleSoft is balking at it and never routes to the HTTPS endpoint. I confirmed this by changing the payload to plain text and it was sent successfully. It also is sent successfully as I noted above, when I come inbound as HTTP to 8081.
I am a MuleSoft neophyte so if this is a simple fix please excuse my ignorance.
Error Summary
Failed to route event via endpoint:
DefaultOutboundEndpoint{endpointUri=https://corp853.dev.corp.edu:443/PSIGW
/HttpListeningConnector, connector=HttpsConnector { name=httpsConnector lifecycle=start
this=3a2b2faa numberOfConcurrentTransactedReceivers=4
createMultipleTransactedReceivers=true connected=true supportedProtocols=[https]
serviceOverrides= session.handler=org.mule.session.NullSessionHandler
message.factory=org.mule.transport.http.HttpMuleMessageFactory } ,
name='endpoint.https.corp853.dev.corp.edu.443.PSIGW.HttpListeningConnector',
mep=REQUEST_RESPONSE, properties={exceptionOnMessageError=true, http.method=POST},
transactionConfig=Transaction{factory=null, action=INDIFFERENT, timeout=0},
deleteUnacceptedMessages=false, initialState=started, responseTimeout=10000,
endpointEncoding=UTF-8, disableTransportTransformer=false}. Message payload is of type:
PostMethod
Catch Error
Could not find a transformer to transform
"SimpleDataType{type=org.apache.commons.httpclient.methods.PostMethod,
mimeType='text/xml'}" to "SimpleDataType{type=org.mule.api.transport.OutputHandler,
mimeType='*/*'}". (org.mule.api.transformer.TransformerException)
(org.mule.api.transformer.TransformerException). The current MuleMessage is null! Please
report this to [email protected]
(org.mule.api.transformer.TransformerMessagingException). Message payload is of type:
PostMethod
Log Details
+ Started app 'checklisttest' +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
INFO 2014-08-29 04:20:04,623 [[checklisttest].httpsConnector.receiver.02] org.mule.api.processor.LoggerMessageProcessor:
org.mule.DefaultMuleMessage
{
id=6cca1ad0-2f6e-11e4-89b1-001c42000009
payload=org.apache.commons.httpclient.ContentLengthInputStream
correlationId=<not set>
correlationGroup=-1
correlationSeq=-1
encoding=UTF-8
exceptionPayload=<not set>
Message properties:
INVOCATION scoped properties:
Content-Type=text/xml
INBOUND scoped properties:
Accept=*/*
Accept-Encoding=gzip,deflate
Accept-Language=en-US,en;q=0.8
Cache-Control=no-cache
Connection=true
Content-Length=632
Content-Type=text/xml
Host=localhost:8082
Keep-Alive=true
MULE_ORIGINATING_ENDPOINT=endpoint.https.localhost.8082.checklist.v1
MULE_REMOTE_CLIENT_ADDRESS=/127.0.0.1:56585
Origin=chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop
Postman-Token=721feb2b-281c-382e-169d-2c2792153944
User-Agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36
http.context.path=/checklist_v1
http.context.uri=https://localhost:8082/checklist_v1
http.headers={Origin=chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop, Keep-Alive=true, Accept=*/*, Connection=true, User-Agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36, Host=localhost:8082, Accept-Encoding=gzip,deflate, Cache-Control=no-cache, Postman-Token=721feb2b-281c-382e-169d-2c2792153944, Accept-Language=en-US,en;q=0.8, Content-Length=632, Content-Type=text/xml}
http.method=POST
http.query.params={}
http.query.string=
http.relative.path=
http.request=/checklist_v1
http.request.path=/checklist_v1
http.version=HTTP/1.1
OUTBOUND scoped properties:
LOCAL_CERTIFICATES=[Ljava.security.cert.X509Certificate;@59884baf
MULE_ENCODING=UTF-8
SESSION scoped properties:
}
INFO 2014-08-29 04:20:04,636 [[checklisttest].httpsConnector.receiver.02] org.mule.transport.service.DefaultTransportServiceDescriptor: Loading default outbound transformer: org.mule.transport.http.transformers.ObjectToHttpClientMethodRequest
INFO 2014-08-29 04:20:04,642 [[checklisttest].httpsConnector.receiver.02] org.mule.transport.service.DefaultTransportServiceDescriptor: Loading default response transformer: org.mule.transport.http.transformers.MuleMessageToHttpResponse
INFO 2014-08-29 04:20:04,643 [[checklisttest].httpsConnector.receiver.02] org.mule.transport.service.DefaultTransportServiceDescriptor: Loading default outbound transformer: org.mule.transport.http.transformers.ObjectToHttpClientMethodRequest
INFO 2014-08-29 04:20:04,643 [[checklisttest].httpsConnector.receiver.02] org.mule.lifecycle.AbstractLifecycleManager: Initialising: 'httpsConnector.dispatcher.699512478'. Object is: HttpsClientMessageDispatcher
INFO 2014-08-29 04:20:04,645 [[checklisttest].httpsConnector.receiver.02] org.mule.lifecycle.AbstractLifecycleManager: Starting: 'httpsConnector.dispatcher.699512478'. Object is: HttpsClientMessageDispatcher
INFO 2014-08-29 04:20:04,660 [[checklisttest].httpsConnector.receiver.02] org.mule.transport.http.transformers.ObjectToHttpClientMethodRequest: Content-Type not set on outgoing request, defaulting to: text/plain
ERROR 2014-08-29 04:20:04,698 [[checklisttest].httpsConnector.receiver.02] org.mule.exception.DefaultMessagingExceptionStrategy:
********************************************************************************
Message : Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=https://corp853.dev.corp.edu:443/PSIGW/HttpListeningConnector, connector=HttpsConnector
{
name=httpsConnector
lifecycle=start
this=3a2b2faa
numberOfConcurrentTransactedReceivers=4
createMultipleTransactedReceivers=true
connected=true
supportedProtocols=[https]
serviceOverrides=
session.handler=org.mule.session.NullSessionHandler
message.factory=org.mule.transport.http.HttpMuleMessageFactory
}
, name='endpoint.https.corp853.dev.corp.edu.443.PSIGW.HttpListeningConnector', mep=REQUEST_RESPONSE, properties={exceptionOnMessageError=true, http.method=POST}, transactionConfig=Transaction{factory=null, action=INDIFFERENT, timeout=0}, deleteUnacceptedMessages=false, initialState=started, responseTimeout=10000, endpointEncoding=UTF-8, disableTransportTransformer=false}. Message payload is of type: PostMethod
Code : MULE_ERROR--2
--------------------------------------------------------------------------------
Exception stack is:
1. The server corp853.dev.corp.edu failed to respond (org.apache.commons.httpclient.NoHttpResponseException)
org.apache.commons.httpclient.HttpMethodBase:1976 (null)
2. Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=https://corp853.dev.corp.edu:443/PSIGW/HttpListeningConnector, connector=HttpsConnector
{
name=httpsConnector
lifecycle=start
this=3a2b2faa
numberOfConcurrentTransactedReceivers=4
createMultipleTransactedReceivers=true
connected=true
supportedProtocols=[https]
serviceOverrides=
session.handler=org.mule.session.NullSessionHandler
message.factory=org.mule.transport.http.HttpMuleMessageFactory
}
, name='endpoint.https.corp853.dev.corp.edu.443.PSIGW.HttpListeningConnector', mep=REQUEST_RESPONSE, properties={exceptionOnMessageError=true, http.method=POST}, transactionConfig=Transaction{factory=null, action=INDIFFERENT, timeout=0}, deleteUnacceptedMessages=false, initialState=started, responseTimeout=10000, endpointEncoding=UTF-8, disableTransportTransformer=false}. Message payload is of type: PostMethod (org.mule.api.transport.DispatchException)
org.mule.transport.http.HttpClientMessageDispatcher:151 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transport/DispatchException.html)
--------------------------------------------------------------------------------
Root Exception stack trace:
org.apache.commons.httpclient.NoHttpResponseException: The server corp853.dev.corp.edu failed to respond
at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1976)
at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1735)
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098)
+ 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
********************************************************************************
My project XML is:
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns:https="http://www.mulesoft.org/schema/mule/https" xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.5.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/https http://www.mulesoft.org/schema/mule/https/current/mule-https.xsd">
<https:connector name="httpsConnector" clientSoTimeout="10000"
cookieSpec="netscape" doc:name="HTTP-HTTPS" proxyHostname="localhost"
receiveBacklog="0" receiveBufferSize="0" sendBufferSize="0"
serverSoTimeout="10000" socketSoLinger="0" validateConnections="true">
<service-overrides messageFactory="org.mule.transport.http.HttpMuleMessageFactory"
sessionHandler="org.mule.session.NullSessionHandler" />
<https:tls-client path="${corp.folder}/conf/mulekeystore.jks"
storePassword="pwd" />
<https:tls-key-store path="${corp.folder}/conf/mulekeystore.jks"
keyPassword="pwd" storePassword="pwd" />
<https:tls-server path="${corp.folder}/conf/mulekeystore.jks"
storePassword="pwd" />
</https:connector>
<spring:beans>
<spring:bean id="corpProperties"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<spring:property name="ignoreUnresolvablePlaceholders"
value="true" />
<spring:property name="location" value="classpath:custom.properties" />
<!-- Added to support multiple placeholders -->
</spring:bean>
</spring:beans>
<flow name="checklisttestFlow1" doc:name="checklisttestFlow1">
<https:inbound-endpoint exchange-pattern="request-response"
host="localhost" port="8082" doc:name="HTTP" contentType="text/xml"
connector-ref="httpsConnector" path="checklist_v1" />
<logger level="INFO" doc:name="Logger" />
<https:outbound-endpoint exchange-pattern="request-response"
host="corp853.dev.corp.edu" port="443" path="PSIGW/HttpListeningConnector"
method="POST" doc:name="HTTP" />
</flow>
</mule>