You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Glen Mazza <gl...@gmail.com> on 2010/08/17 06:31:59 UTC

Setting ENDPOINT_ADDRESS_PROPERTY via cxf.xml file

Hello, the below page gives a programmatic way of changing the SOAP client's
endpoint URL using BindingProvider.ENDPOINT_ADDRESS_PROPERTY:

https://cwiki.apache.org/confluence/display/CXF20DOC/Client+HTTP+Transport+%28including+SSL+support%29

Question: Is there a way to do the same using the cxf.xml file?  (XML
configuration).  The link above describes a "Host" property that can be
assigned to the Client element -- is that the same thing as
ENDPOINT_ADDRESS_PROPERTY?

Thanks,
Glen

-- 
View this message in context: http://cxf.547215.n5.nabble.com/Setting-ENDPOINT-ADDRESS-PROPERTY-via-cxf-xml-file-tp2637676p2637676.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Setting ENDPOINT_ADDRESS_PROPERTY via cxf.xml file

Posted by Daniel Kulp <dk...@apache.org>.
On Tuesday 17 August 2010 3:12:31 pm Glen Mazza wrote:
> Thanks Dan.  But to generalize what you're saying, the BindingProvider.XXXX
> properties (not just endpoint URL but also basic auth username & password)
> are meant to be programmatically set and *not* done via the cxf.xml file,
> correct?  (Even though there are some values that can be informally used,
> such as the one you're giving below) That's why they're not defined here in
> cxf.xml configuration:
> 
> https://cwiki.apache.org/confluence/display/CXF20DOC/Client+HTTP+Transport+
> %28including+SSL+support%29
> 
> Am I correct in that sense?

Possibly.  I'm not 100% sure.  :-)

When you use the programmatic stuff, the getRequestContext() call returns a 
map that maps the passed in keys into the appropriate keys needed for CXF.   
Thus, the BindingProvider.ENDPOINT_ADDRESS thing really ends up setting the 
org.apache.cxf.request.uri property which is what the HTTP transport would be 
looking for.    

What I DON'T know (would need to try) is if properties mapped in via the 
jaxws:properties thing also end up getting mapped.   I THINK it does as 
jaxws:endpoint is a wrapper to our EndpointImpl which I think does wrap things 
set on it.   However, I'm not 100% sure.

Dan



> 
> Thanks,
> Glen
> 
> Daniel  Kulp wrote:
> > No, the  "Host"property is  just the value stuck in the Host HTTP header.
> > Not
> > needed 99% of the time (or more).
> > 
> > In general, you can set the endpoint property of
> > 
> > org.apache.cxf.request.uri
> > 
> > to the URL you want to hit using the jaxws:properties  child element of
> > jaxws:client.   I believe that will work.   Not 100% sure though.

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog

Re: Setting ENDPOINT_ADDRESS_PROPERTY via cxf.xml file

Posted by Glen Mazza <gl...@gmail.com>.
Thanks Dan.  But to generalize what you're saying, the BindingProvider.XXXX
properties (not just endpoint URL but also basic auth username & password)
are meant to be programmatically set and *not* done via the cxf.xml file,
correct?  (Even though there are some values that can be informally used,
such as the one you're giving below) That's why they're not defined here in
cxf.xml configuration:

https://cwiki.apache.org/confluence/display/CXF20DOC/Client+HTTP+Transport+%28including+SSL+support%29

Am I correct in that sense?

Thanks,
Glen


Daniel  Kulp wrote:
> 
> No, the  "Host"property is  just the value stuck in the Host HTTP header. 
> Not 
> needed 99% of the time (or more).
> 
> In general, you can set the endpoint property of
> 
> org.apache.cxf.request.uri
> 
> to the URL you want to hit using the jaxws:properties  child element of 
> jaxws:client.   I believe that will work.   Not 100% sure though.
> 

-- 
View this message in context: http://cxf.547215.n5.nabble.com/Setting-ENDPOINT-ADDRESS-PROPERTY-via-cxf-xml-file-tp2637676p2638624.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Setting ENDPOINT_ADDRESS_PROPERTY via cxf.xml file

Posted by Daniel Kulp <dk...@apache.org>.
On Tuesday 17 August 2010 12:31:59 am Glen Mazza wrote:
> Hello, the below page gives a programmatic way of changing the SOAP
> client's endpoint URL using BindingProvider.ENDPOINT_ADDRESS_PROPERTY:
> 
> https://cwiki.apache.org/confluence/display/CXF20DOC/Client+HTTP+Transport+
> %28including+SSL+support%29
> 
> Question: Is there a way to do the same using the cxf.xml file?  (XML
> configuration).  The link above describes a "Host" property that can be
> assigned to the Client element -- is that the same thing as
> ENDPOINT_ADDRESS_PROPERTY?

No, the  "Host"property is  just the value stuck in the Host HTTP header.  Not 
needed 99% of the time (or more).

In general, you can set the endpoint property of

org.apache.cxf.request.uri

to the URL you want to hit using the jaxws:properties  child element of 
jaxws:client.   I believe that will work.   Not 100% sure though.


-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog