This method is only used when a WSDL is not used to created the client afaict.

Thanks,
David

On 05/04/2013 11:13 AM, Andrei Shakirin wrote:
Hi,

Why you don't just use location property of STSClient?

STS client endpoint will be initialized using location property in STSUtils:
     private static Endpoint createSTSEndpoint(Bus bus,
                                              String namespace,
                                              String transportId,
                                              String location,
                                              String soapVersion,
                                              Policy policy,
                                              QName epName,
                                              boolean sc) throws BusException, 
EndpointException {
         ...
         EndpointInfo ei = new EndpointInfo(si, transportId);
         ei.setBinding(bi);
         ei.setName(epName == null ? iName : epName);
         ei.setAddress(location);
         si.addEndpoint(ei);
         if (policy != null) {
             ei.addExtensor(policy);
         }
         ...
}

Regards,
Andrei.

-----Original Message-----
From: David Mansfield [mailto:c...@dm.cobite.com]
Sent: Freitag, 3. Mai 2013 19:22
To: users@cxf.apache.org
Subject: set the endpoint address of a STSClient created from WSDL

Hi All:

I'm using an STSClient configured from spring XML.  I have put the
BindingProvider.ENDPOINT_ADDRESS_PROPERTY into the requestContext of
the STSClient, and confirmed it sets this on the ClientImpl (in the debugger),
but it seems this is not enough to change the actual URL used in the
transport.

Here's the xml that configures it (unsuccessfully):

      <bean id="myStsClient"
class="org.apache.cxf.ws.security.trust.STSClient">
          <constructor-arg ref="myStsCxfBus" />
        ...
          <property
name="requestContext[javax.xml.ws.service.endpoint.address]"
value="https://blah.blah.blah/blah"; />
      </bean>

I'm willing to do this programmatically.  So given a ClientImpl, how could one
programmatically set the endpoint address?

Thanks,
David

Reply via email to