You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Lam, King" <Ki...@bankofamerica.com> on 2005/01/31 21:08:32 UTC
question about usage of org.apache.axis.client.Service
I am not sure if there will be future problem the way that I am using the Service class.
I initilized the service class as static class in the super class.
super class:
public static org.apache.axis.client.Service axisService;
static
{
axisService = new org.apache.axis.client.Service();
}
I am using the same axisService that was initialized from the super class to create the Stub class that was auto-generated from the WSDL2Java in the subclasses:
subclass:
binding = new CreateScheduleTransferFundsV001Stub(new java.net.URL(url), axisService);
Is there problems the way that I am using it? I didn't use the ServiceLocator class that was generated. The reason that I am using a static service class is that it may improve the performance because I don't have to create the service class everytime. Not sure if this is true.
Thanks,
-King Lam
Re: question about usage of org.apache.axis.client.Service
Posted by Bill Keese <bi...@tech.beacon-it.co.jp>.
I'm not sure but I tend to think that it's better to initialize the
service object from your WSDL:
QName serviceName = new QName("http://soapinterop.org",
"TestService");
service = new
Service("http://localhost:8080/axis/services/test", serviceName);
That's a bit orthogonal to your question but I thought I'd mention it.
Lam, King wrote:
>I am not sure if there will be future problem the way that I am using the Service class.
>
>I initilized the service class as static class in the super class.
>
>super class:
>public static org.apache.axis.client.Service axisService;
>static
>{
> axisService = new org.apache.axis.client.Service();
>}
>
>I am using the same axisService that was initialized from the super class to create the Stub class that was auto-generated from the WSDL2Java in the subclasses:
>
>subclass:
>binding = new CreateScheduleTransferFundsV001Stub(new java.net.URL(url), axisService);
>
>Is there problems the way that I am using it? I didn't use the ServiceLocator class that was generated. The reason that I am using a static service class is that it may improve the performance because I don't have to create the service class everytime. Not sure if this is true.
>
>Thanks,
>-King Lam
>
>
>
>