You may also use something like the following:

        String url =
"http://localhost/BrokerPPTServer/BrokerPPTService.asmx";;

      BrokerPPTServiceLocator locator = new BrokerPPTServiceLocator();

      URL serviceUrl = new URL(url);
      BrokerPPTServiceSoapStub archive = (BrokerPPTServiceSoapStub) locator.
          getBrokerPPTServiceSoap(serviceUrl);

      archive.process();

In this example you may set the url through the variable url.
The classes BrokerPPTServiceLocator, BrokerPPTServiceSoapStub are generated
by Axis.

Alex

> -----Urspr�ngliche Nachricht-----
> Von: Cervi, Anthony (PCLN-NW) [mailto:[EMAIL PROTECTED]
> Gesendet: Dienstag, 3. August 2004 20:03
> An: [EMAIL PROTECTED]; Anand Natrajan
> Betreff: RE: two questions...
> 
> 
> thanks.  i'm not concerned with the server side at all though.  my client
> is running against a test server right now and will need to switch to a
> production server soon.  instead of recompiling my client code, i would
> like to be able to read the url from a config file and use code to point
> to the new server.
> 
> -----Original Message-----
> From: Anand Natrajan [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 03, 2004 2:00 PM
> To: [EMAIL PROTECTED]
> Subject: Re: two questions...
> 
> 
> The classes that have the web server hard-coded in them are purely
> client-side stub classes. They are not necessary on the server side.
> 
> After you deploy your services on the production server, your clients can
> get a WSDL, run wsdl2java and generate the stubs themselves. You should
> not
> have to hand them the stubs as well.
> 
> Anand
> 
> On Tue, 3 Aug 2004, Cervi, Anthony (PCLN-NW) wrote:
> 
> :
> : first question might sound dumb since i'm not hip to the web service
> lingo but here it goes anyway.  when i generate the client classes from
> the wsdl, the webservice url (endpoint?) gets hard-coded right into the
> classes themselves.  i need to change that address when i move to the
> production server.  is there some way i can set that value through code or
> do i need to run wsdl2java on the wsdl that has the production url?
> :
> : second question.  i'm using Stub.setTimeout and it doesn't seem to
> timeout even with very small timeout specified?  any known issues with
> this?
> :
> : thanks.


Reply via email to