Hmm...  I was hoping for an easy answer to this and, unfortunately, I 
don't have one.  :-(

I don't know Groovy, but if you can do something like:

Map<String, Object> context = new HashMap<String, Object>();
Map<String, Object> reqContext = new HashMap<String, Object>();
reqContext.put(Message.ENDPOINT_ADDRESS, newAddress)
context.put(Client.REQUEST_CONTEXT, reqContext);

And then call the client.invoke method that looks like:

Object[] invoke(BindingOperationInfo oi, Object[] params, 
                           Map<String, Object> context)

That kind of sucks though.


Alternatively, BEFORE you do any invoke, you MAY be able to do:

client.getEndpoint().getEndpointInfo().setAddress(newAddress);

The problem is if it connects at anypoint before then, that call will be 
ignored.    Usually if you call before the first invokation, you should 
be OK.

Dan



       


On Tuesday 22 January 2008, keke wrote:
> Hi,
>
> I am trying to using Dynamic Client + Groovy for my project.
>
> I can create a client using a WSDL file. However, the target service
> url is not the one specified in the WSDL file.
>
> How can I enable the dynamic client to access a target service other
> than the one in WSDL?
>
> I have checked the user list but can not find a clear answer.
>
> Could anyone please give me a hint?
>
> Thanks in advanced.
>
> Cheers,
> Keke



-- 
J. Daniel Kulp
Principal Engineer, IONA
[EMAIL PROTECTED]
http://www.dankulp.com/blog

Reply via email to