Forgot to mention that I brought up the extent of this override on
cxf-dev a few weeks ago, in a thread[1] entitled "Why does
ClientImpl.invoke() override the EndpointInfo address?".

Cheers,
Eoghan

[1]
http://mail-archives.apache.org/mod_mbox/incubator-cxf-dev/200703.mbox/%
[EMAIL PROTECTED] 

> -----Original Message-----
> From: Glynn, Eoghan [mailto:[EMAIL PROTECTED] 
> 
> > Please do not change the soap:address location in this case. 
> > Yes, the location is not a valid URL but it was testing an 
> important 
> > case to see if the overwrite of the endpoint address on the 
> proxy was 
> > working properly. See
> > https://issues.apache.org/jira/browse/CXF-414
> 
> 
> Hi Jarek,
> 
> Looking at your JIRA entry ...
> 
> "To fix this I had to add the following to JaxWsClientProxy: 
> 
>         ... 
>         ContextPropertiesMapping.mapRequestfromJaxws2Cxf(reqContext); 
> 
>         String address =
> (String)reqContext.get(org.apache.cxf.message.Message.ENDPOINT
> _ADDRESS);
> 
>         if (address != null) { 
>             endpoint.getEndpointInfo().setAddress(address); 
>         }" 
> 
> Was this code intended as a permanent or per-request over-ride of the
> EndpointInfo address?
> 
> Now what I wanted to avoid is a *permanent* over-ride of the
> EndpointInfo address. Instead, I think a setting of
> BindingProvider.ENDPOINT_ADDRESS_PROPERTY in the request 
> context should
> only extend over a *single* request. So I removed the code similar to
> the above from ClientImpl.invoke().
> 
> An override/restore of the EndpointInfo address for a single request
> would also be problematic, as it would be introduce a race 
> condition for
> concurrent requests (which would share the same EndpointInfo 
> instance).
> 
> Now I need to revisit that test anyway, but I think a better solution
> may be to avoid the upfront creation of the URL in the 
> HTTPConduit ctor,
> in which case the test could probably revert to the <soap:address
> location="FOO"/>.
> 
> But in general, would you agree about a single MEP being the correct
> extent of a BindingProvider.ENDPOINT_ADDRESS_PROPERTY setting in the
> request context?
> 
> Cheers,
> Eoghan
> 
>  
> > Jarek
> > 
> > ==============================================================
> > ================
> > > --- 
> > > 
> > incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_wo
> > rld.wsdl 
> > > (original)
> > > +++ 
> > incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world.
> > > +++ wsdl Mon Apr 16 08:42:53 2007
> > > @@ -392,7 +392,7 @@
> > >      </wsdl:service>
> > >      <wsdl:service name="SOAPServiceBogusAddressTest">
> > >          <wsdl:port name="SoapPort" 
> > binding="tns:Greeter_SOAPBinding">
> > > -            <soap:address location="FOO"/>
> > > +            <soap:address 
> > > + location="http://nowhere.nada.nil:45678/null/never"/>
> > >          </wsdl:port>
> > >      </wsdl:service>
> > >      <wsdl:service name="SOAPServiceMultiPortTypeTest">
> > >
> > >
> > >
> > 
> 

Reply via email to