You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "anirban.gupta4" <an...@gmail.com> on 2017/03/28 07:01:45 UTC
Caused by: org.apache.cxf.transport.http.HTTPException when trying
to invoke a cxf bean
Hi,
I have exposed two webservices as CXF beans, below is the code
<cxf:cxfEndpoint id="endpoint1"
address="http://localhost:9090/endpoint1"
serviceClass="serviceClass1"
serviceName="tns:serviceName1"
endpointName="tns:endpointName1"
wsdlURL="wsdl/WSDL1.wsdl"
xmlns:tns="namespace1">
<cxf:properties>
<entry key="dataFormat" value="POJO" />
</cxf:properties>
</cxf:cxfEndpoint>
cxf:cxfEndpoint id="endpoint2"
address="http://localhost:9090/endpoint2"
serviceClass="serviceClass2"
serviceName="tns:serviceName2"
endpointName="tns:endpointName2"
wsdlURL="wsdl/WSDL2.wsdl"
xmlns:tns="namespace2">
<cxf:properties>
<entry key="dataFormat" value="POJO" />
</cxf:properties>
</cxf:cxfEndpoint>
My routes are as below
from("cxf:bean:endpoint1")
.streamCaching()
.process(new MappingProcessor())
.setHeader("operationName", constant("someOperation"))
.setHeader("operationNamespace", constant("someNamespace"))
.to("cxf:bean:endpoint2")
.process(new ResponseProcessor())
.end();
I am getting the following error
Caused by: org.apache.cxf.transport.http.HTTPException: HTTP response '404:
Not Found' when communicating with http://localhost:9090/endpoint2
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.doProcessResponseCode(HTTPConduit.java:1608)
~[cxf-rt-transports-http-3.1.10.jar:3.1.10]
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1615)
~[cxf-rt-transports-http-3.1.10.jar:3.1.10]
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream$1.run(HTTPConduit.java:1176)
~[cxf-rt-transports-http-3.1.10.jar:3.1.10]
at
org.apache.cxf.workqueue.AutomaticWorkQueueImpl$3.run(AutomaticWorkQueueImpl.java:428)
~[cxf-core-3.1.7.jar:3.1.7]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
~[na:1.8.0_111]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
~[na:1.8.0_111]
at
org.apache.cxf.workqueue.AutomaticWorkQueueImpl$AWQThreadFactory$1.run(AutomaticWorkQueueImpl.java:353)
~[cxf-core-3.1.7.jar:3.1.7]
... 1 common frames omitted
Please help where I am going wrong.
--
View this message in context: http://camel.465427.n5.nabble.com/Caused-by-org-apache-cxf-transport-http-HTTPException-when-trying-to-invoke-a-cxf-bean-tp5796573.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Caused by: org.apache.cxf.transport.http.HTTPException when
trying to invoke a cxf bean
Posted by Joe Luo <lu...@gmail.com>.
Did you have a web service running on address: http://localhost:9090
/endpoint2 in the same JVM?
Regards,
/Joe
On Tue, Mar 28, 2017 at 8:01 AM, anirban.gupta4 <an...@gmail.com>
wrote:
> Hi,
>
> I have exposed two webservices as CXF beans, below is the code
>
> <cxf:cxfEndpoint id="endpoint1"
> address="http://localhost:9090/endpoint1"
> serviceClass="serviceClass1"
> serviceName="tns:serviceName1"
> endpointName="tns:endpointName1"
> wsdlURL="wsdl/WSDL1.wsdl"
> xmlns:tns="namespace1">
> <cxf:properties>
> <entry key="dataFormat" value="POJO" />
> </cxf:properties>
> </cxf:cxfEndpoint>
>
> cxf:cxfEndpoint id="endpoint2"
> address="http://localhost:9090/endpoint2"
> serviceClass="serviceClass2"
> serviceName="tns:serviceName2"
> endpointName="tns:endpointName2"
> wsdlURL="wsdl/WSDL2.wsdl"
> xmlns:tns="namespace2">
> <cxf:properties>
> <entry key="dataFormat" value="POJO" />
> </cxf:properties>
> </cxf:cxfEndpoint>
>
> My routes are as below
>
> from("cxf:bean:endpoint1")
> .streamCaching()
> .process(new MappingProcessor())
> .setHeader("operationName", constant("someOperation"))
> .setHeader("operationNamespace",
> constant("someNamespace"))
> .to("cxf:bean:endpoint2")
> .process(new ResponseProcessor())
> .end();
>
> I am getting the following error
>
> Caused by: org.apache.cxf.transport.http.HTTPException: HTTP response
> '404:
> Not Found' when communicating with http://localhost:9090/endpoint2
> at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.
> doProcessResponseCode(HTTPConduit.java:1608)
> ~[cxf-rt-transports-http-3.1.10.jar:3.1.10]
> at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.
> handleResponseInternal(HTTPConduit.java:1615)
> ~[cxf-rt-transports-http-3.1.10.jar:3.1.10]
> at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream$1.run(
> HTTPConduit.java:1176)
> ~[cxf-rt-transports-http-3.1.10.jar:3.1.10]
> at
> org.apache.cxf.workqueue.AutomaticWorkQueueImpl$3.run(
> AutomaticWorkQueueImpl.java:428)
> ~[cxf-core-3.1.7.jar:3.1.7]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown
> Source)
> ~[na:1.8.0_111]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
> Source)
> ~[na:1.8.0_111]
> at
> org.apache.cxf.workqueue.AutomaticWorkQueueImpl$AWQThreadFactory$1.run(
> AutomaticWorkQueueImpl.java:353)
> ~[cxf-core-3.1.7.jar:3.1.7]
> ... 1 common frames omitted
>
> Please help where I am going wrong.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.
> com/Caused-by-org-apache-cxf-transport-http-HTTPException-
> when-trying-to-invoke-a-cxf-bean-tp5796573.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>