You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ode.apache.org by Ian Harrigan <ia...@hotmail.com> on 2009/09/27 02:43:32 UTC
Possible bug in dynamic endpoints over SSL
Ive been doing more research on my problem, and have managed to get an ODE BPEL process deployed inside servicemix talking to a axis2 webservice inside tomcat via HTTPS.
However, when i try to dynamically call this web service i get the same error (below).
ERROR - HttpComponent - Error processing exchange InOut[
id: ID:192.168.1.101-123f8e602e3-2:1
status: Active
role: provider
service: {urn:servicemix:http}HttpComponent
endpoint: https://localhost:8443/axis2/services/VosSvr
operation: {urn:servicemix:http}echo
in: <?xml version="1.0" encoding="UTF-8"?><echo xmlns="http://ws.test">
<input>G12345</input>
</echo>
]
java.lang.NullPointerException
at org.apache.servicemix.http.processors.CommonsHttpSSLSocketFactory.<init>(CommonsHttpSSLSocketFactory.java:47)
at org.apache.servicemix.http.processors.ProviderProcessor.getHostConfiguration(ProviderProcessor.java:269)
at org.apache.servicemix.http.processors.ProviderProcessor.process(ProviderProcessor.java:160)
at org.apache.servicemix.soap.SoapEndpoint.process(SoapEndpoint.java:367)
at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:600)
at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:554)
at org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:510)
at org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)
at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:620)
at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168)
at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
ERROR - BpelRuntimeContextImpl - Invalid response state for mex hqejbhcnphr4midnmaigjo: ASYNC
The bpel to assign the dynamic endpoint is as follows:
<bpws:assign name="assignEndpoint">
<bpws:copy>
<bpws:from>
<bpws:literal><wsa:EndpointReference><wsa:Address></wsa:Address></wsa:EndpointReference></bpws:literal>
</bpws:from>
<bpws:to variable="endpointRef"/>
</bpws:copy>
<bpws:copy>
<bpws:from>concat("https://localhost:8443", "/axis2/services/VosSvr")</bpws:from>
<bpws:to>$endpointRef/wsa:Address</bpws:to>
</bpws:copy>
<bpws:copy>
<bpws:from>$endpointRef</bpws:from>
<bpws:to partnerLink="EchoServicePartnerLink"/>
</bpws:copy>
</bpws:assign>
And my xbean to provide the http endpoint is:
<http:endpoint service="test:EchoService"
endpoint="EchoServiceSOAP11port_http"
role="provider"
soap="true"
locationURI="https://localhost:8443/axis2/services/EchoService"
wsdlResource="classpath:EchoService.wsdl"
soapVersion="1.1">
<http:ssl>
<http:sslParameters keyStore="classpath:.keystore"
keyStorePassword="changeit"
trustStore="classpath:.keystore"
trustStorePassword="changeit"/>
</http:ssl>
</http:endpoint>
It seems to me that if I assign the endpoint in BPEL code then it overwrites the previous information that was there, as I said, if I don't assign it then all works as I would expect.
Can someone please advise as I do need dynamic endpoints in my project.
Thanks,
Ian Harrigan
Re: Possible bug in dynamic endpoints over SSL
Posted by Vincent GIRARDREYDET <vi...@thalesgroup.com>.
Hi,
I'm not an expert of this field, but looking at your code it seems to me
that the dynamic assignation is missing the SSL parameters assignation.
<http:sslParameters keyStore="classpath:.keystore"
keyStorePassword="changeit"
trustStore="classpath:.keystore"
trustStorePassword="changeit"/>
And the NPE you get is on the following line in the code:
String keyStore = ssl.getKeyStore();
So I guess you must find some way of passing SSL keystore parameters to
your endpoint. You do it in your static assignation, but you lack it in
your dynamic assignation. I'm afraid I don't know how to do this, but I
hope this helps.
Vincent
Ian Harrigan a écrit :
> Ive been doing more research on my problem, and have managed to get an ODE BPEL process deployed inside servicemix talking to a axis2 webservice inside tomcat via HTTPS.
>
> However, when i try to dynamically call this web service i get the same error (below).
>
> ERROR - HttpComponent - Error processing exchange InOut[
> id: ID:192.168.1.101-123f8e602e3-2:1
> status: Active
> role: provider
> service: {urn:servicemix:http}HttpComponent
> endpoint: https://localhost:8443/axis2/services/VosSvr
> operation: {urn:servicemix:http}echo
> in: <?xml version="1.0" encoding="UTF-8"?><echo xmlns="http://ws.test">
> <input>G12345</input>
> </echo>
> ]
> java.lang.NullPointerException
> at org.apache.servicemix.http.processors.CommonsHttpSSLSocketFactory.<init>(CommonsHttpSSLSocketFactory.java:47)
> at org.apache.servicemix.http.processors.ProviderProcessor.getHostConfiguration(ProviderProcessor.java:269)
> at org.apache.servicemix.http.processors.ProviderProcessor.process(ProviderProcessor.java:160)
> at org.apache.servicemix.soap.SoapEndpoint.process(SoapEndpoint.java:367)
> at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:600)
> at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:554)
> at org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:510)
> at org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)
> at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:620)
> at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
> at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168)
> at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
> at java.lang.Thread.run(Thread.java:595)
> ERROR - BpelRuntimeContextImpl - Invalid response state for mex hqejbhcnphr4midnmaigjo: ASYNC
>
> The bpel to assign the dynamic endpoint is as follows:
>
> <bpws:assign name="assignEndpoint">
> <bpws:copy>
> <bpws:from>
> <bpws:literal><wsa:EndpointReference><wsa:Address></wsa:Address></wsa:EndpointReference></bpws:literal>
> </bpws:from>
> <bpws:to variable="endpointRef"/>
> </bpws:copy>
> <bpws:copy>
> <bpws:from>concat("https://localhost:8443", "/axis2/services/VosSvr")</bpws:from>
> <bpws:to>$endpointRef/wsa:Address</bpws:to>
> </bpws:copy>
> <bpws:copy>
> <bpws:from>$endpointRef</bpws:from>
> <bpws:to partnerLink="EchoServicePartnerLink"/>
> </bpws:copy>
> </bpws:assign>
>
> And my xbean to provide the http endpoint is:
>
> <http:endpoint service="test:EchoService"
> endpoint="EchoServiceSOAP11port_http"
> role="provider"
> soap="true"
> locationURI="https://localhost:8443/axis2/services/EchoService"
> wsdlResource="classpath:EchoService.wsdl"
> soapVersion="1.1">
> <http:ssl>
> <http:sslParameters keyStore="classpath:.keystore"
> keyStorePassword="changeit"
> trustStore="classpath:.keystore"
> trustStorePassword="changeit"/>
> </http:ssl>
> </http:endpoint>
>
> It seems to me that if I assign the endpoint in BPEL code then it overwrites the previous information that was there, as I said, if I don't assign it then all works as I would expect.
>
> Can someone please advise as I do need dynamic endpoints in my project.
>
> Thanks,
> Ian Harrigan
>
>