You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Shekh <sh...@gmail.com> on 2015/12/08 08:08:57 UTC
RE: CXF endpoint's address dynamically modified?
cxf:myCXFBean?address=${in.headers.addressToSendTo}
Is not working.
I have deployed same service one or more places, Service is same only
address is defferent.
I want to provide service address at runtime.
when i get value from header which is i have set get following exception
Caused by: java.net.URISyntaxException: Illegal character in path at index
1: ${in.headers.ServiceUri}
at java.net.URI$Parser.fail(URI.java:2848)[:1.8.0_45]
at java.net.URI$Parser.checkChars(URI.java:3021)[:1.8.0_45]
at java.net.URI$Parser.parseHierarchical(URI.java:3105)[:1.8.0_45]
at java.net.URI$Parser.parse(URI.java:3063)[:1.8.0_45]
at java.net.URI.<init>(URI.java:588)[:1.8.0_45]
at
org.apache.cxf.transport.http.HTTPConduit.getURI(HTTPConduit.java:734)[123:org.apache.cxf.cxf-rt-transports-http:3.0.4.redhat-620133]
at
org.apache.cxf.transport.http.HTTPConduit.getURI(HTTPConduit.java:722)[123:org.apache.cxf.cxf-rt-transports-http:3.0.4.redhat-620133]
at
org.apache.cxf.transport.http.HTTPConduit.setupAddress(HTTPConduit.java:678)[123:org.apache.cxf.cxf-rt-transports-http:3.0.4.redhat-620133]
at
org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:487)[123:org.apache.cxf.cxf-rt-transports-http:3.0.4.redhat-620133]
... 85 more
In my camel route
<to pattern="InOut"
uri="cxf:bean:SpWebService?address=${in.headers.ServiceUri}"/>
--
View this message in context: http://camel.465427.n5.nabble.com/CXF-endpoint-s-address-dynamically-modified-tp3349431p5774808.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: CXF endpoint's address dynamically modified?
Posted by Claus Ibsen <cl...@gmail.com>.
See this FAQ
http://camel.apache.org/how-to-use-a-dynamic-uri-in-to.html
On Tue, Dec 8, 2015 at 8:08 AM, Shekh <sh...@gmail.com> wrote:
> cxf:myCXFBean?address=${in.headers.addressToSendTo}
>
> Is not working.
>
> I have deployed same service one or more places, Service is same only
> address is defferent.
> I want to provide service address at runtime.
>
> when i get value from header which is i have set get following exception
>
> Caused by: java.net.URISyntaxException: Illegal character in path at index
> 1: ${in.headers.ServiceUri}
> at java.net.URI$Parser.fail(URI.java:2848)[:1.8.0_45]
> at java.net.URI$Parser.checkChars(URI.java:3021)[:1.8.0_45]
> at java.net.URI$Parser.parseHierarchical(URI.java:3105)[:1.8.0_45]
> at java.net.URI$Parser.parse(URI.java:3063)[:1.8.0_45]
> at java.net.URI.<init>(URI.java:588)[:1.8.0_45]
> at
> org.apache.cxf.transport.http.HTTPConduit.getURI(HTTPConduit.java:734)[123:org.apache.cxf.cxf-rt-transports-http:3.0.4.redhat-620133]
> at
> org.apache.cxf.transport.http.HTTPConduit.getURI(HTTPConduit.java:722)[123:org.apache.cxf.cxf-rt-transports-http:3.0.4.redhat-620133]
> at
> org.apache.cxf.transport.http.HTTPConduit.setupAddress(HTTPConduit.java:678)[123:org.apache.cxf.cxf-rt-transports-http:3.0.4.redhat-620133]
> at
> org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:487)[123:org.apache.cxf.cxf-rt-transports-http:3.0.4.redhat-620133]
> ... 85 more
>
> In my camel route
>
> <to pattern="InOut"
> uri="cxf:bean:SpWebService?address=${in.headers.ServiceUri}"/>
>
>
>
>
>
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/CXF-endpoint-s-address-dynamically-modified-tp3349431p5774808.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2
RE: CXF endpoint's address dynamically modified?
Posted by Shekh <sh...@gmail.com>.
Finally I Found the solution.
here my Service CXf endpoint is
<cxf:cxfEndpoint id="SpWebService"
serviceClass="in.gov.mit.sp.service.SEI.ConnectSubmitPortType">
<cxf:properties>
<entry key="dataFormat" value="POJO"/>
<entry key="operationName" value="processSubmitDocument"/>
<entry key="operationNamespace"
value="http://www.mit.gov.in/eGov/schema/ConnectorServices/wsdl"/>
</cxf:properties>
</cxf:cxfEndpoint>
than, i have create a header called serviceuri and use recipientList
<recipientList>
<simple>cxf:bean:SpWebService?address=${header.ServiceUri}</simple>
</recipientList>
provide service addree at run time.
--
View this message in context: http://camel.465427.n5.nabble.com/CXF-endpoint-s-address-dynamically-modified-tp3349431p5775859.html
Sent from the Camel - Users mailing list archive at Nabble.com.