Forget that last question, I was too busy looking in the the XFire
javadoc that I didin't see the wood for the trees
Regards
Frank
Frank Sweeney wrote:
Hi Dan,
Thanks, but I still have a "Proxy not resolved" error, what package
is the class Proxy in ??
Frank
Dan Diephouse wrote:
Hi Frank,
Try this:
DocServiceClient webService = new DocServiceClient();
DocServicePortType docClient = webService.getDocServiceHttpPort();
Client client = ((XFireProxy)
Proxy.getInvocationHandler(docClient)).getClient();
client.setUrl("http://dest.host.com");
docClient.doYourThing();
Cheers,
- Dan
Frank Sweeney wrote:
Hi Dan
I am also trying configure the endpoints, at the moment they are
hardcoded and got as follows
DocServiceClient webService = new DocServiceClient();
DocServicePortType docClient =
webService.getDocServiceHttpPort();
I presume my lines would be like This line I am unsure about where
is the definition for "Proxy" in
DocServiceClient webService = new DocServiceClient();
Client client = ((XFireProxy)
Proxy.getInvocationHandler(webService)).getClient();
client.setUrl("http://dest.host.com");
DocServicePortType docClient = webService.getDocServiceHttpPort();
Regards
Frank
Dan Diephouse wrote:
Rahul Pilani wrote:
Hi All,
I am using the wsgen task to create a client to an existing XFire
Server. The task works fine, but it hardcodes the parameters from
the WSDL into the java files. Is there a way to opening up the
Client so that you can configure the endpoints at a later stage? I
have this requirement because we have 3 different environments for
both the server and the client, and the urls for both can change
depending on the environment. Ideally we would want to generate
the java files only once per interface change.
Thanks,
Rahul
Yes, this is easily accomplished:
Echo echo = .... // this is your echo client
// now get the underlying Client class:
Client client = ((XFireProxy)
Proxy.getInvocationHandler(echo)).getClient();
// set the url
client.setUrl("http://dest.host.com");
Hope that helps.
- Dan