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 ra...@blueyonder.co.uk on 2006/04/17 09:34:55 UTC
Java source code from WSDL
Hi there,
I have created Java source code from WSDL, but I'm not sure how to use
this code to invoke my service, I'v attached the classes that were created
...please advice me how I can use these to interact with my Web service?
Many thanx
yasmin
Re: Java source code from WSDL
Posted by Dies Koper <di...@jp.fujitsu.com>.
Hello Yasmin,
In the code that you attached to your original message you had such a
method:
public interface KeyAccidentService_Service extends javax.xml.rpc.Service {
public keyAccident2.KeyAccidentService_PortType getAxisServlet()
throws javax.xml.rpc.ServiceException;
[...]
}
I tried to reproduce your error here, but it compiled fine. I've
attached my client.
Did you regenerate this file and did the method name change? Then change
your client accordingly.
Else you might have a classpath issue (old KeyAccidentService_Service
interface in your classpath?). Check you settings, directories,
batch/ant scripts that you have no old files lying around.
Good luck,
Dies
rafiqy@blueyonder.co.uk wrote:
> Hi Dies,
>
> ...for some reason I'm getting the following error message:
> method service.getAxisServlet() is not found?
>
> Please advice
>
> thanx
>
> yasmin
>
>
>> Hello Yasmin,
>>
>> There are several ways.
>> I recommend the following (JAX-RPC compatible, no dependencies on Axis
>> so portable across JAX-RPC compatible SOAP engines).
>>
>> import javax.xml.rpc.*;
>>
>> ServiceFactory sf = ServiceFactory.newInstance();
>> KeyAccidentService_Service service =
>> (keyAccident2.KeyAccidentService_Service)sf.loadService(
>> keyAccident2.KeyAccidentService_Service.class);
>> keyAccident2.KeyAccidentService_PortType keyAccident =
>> service.getAxisServlet();
>>
>> String result = keyAccident.numAccident(...);
>>
>> Regards,
>> Dies
>>
>> rafiqy@blueyonder.co.uk wrote:
>>> Hi there,
>>>
>>> I have created Java source code from WSDL, but I'm not sure how to use
>>> this code to invoke my service, I'v attached the classes that were
>>> created
>>> ...please advice me how I can use these to interact with my Web service?
>>>
>>> Many thanx
>>>
>>> yasmin
Re: Java source code from WSDL
Posted by ra...@blueyonder.co.uk.
Hi Dies,
...for some reason I'm getting the following error message:
method service.getAxisServlet() is not found?
Please advice
thanx
yasmin
> Hello Yasmin,
>
> There are several ways.
> I recommend the following (JAX-RPC compatible, no dependencies on Axis
> so portable across JAX-RPC compatible SOAP engines).
>
> import javax.xml.rpc.*;
>
> ServiceFactory sf = ServiceFactory.newInstance();
> KeyAccidentService_Service service =
> (keyAccident2.KeyAccidentService_Service)sf.loadService(
> keyAccident2.KeyAccidentService_Service.class);
> keyAccident2.KeyAccidentService_PortType keyAccident =
> service.getAxisServlet();
>
> String result = keyAccident.numAccident(...);
>
> Regards,
> Dies
>
> rafiqy@blueyonder.co.uk wrote:
>> Hi there,
>>
>> I have created Java source code from WSDL, but I'm not sure how to use
>> this code to invoke my service, I'v attached the classes that were
>> created
>> ...please advice me how I can use these to interact with my Web service?
>>
>> Many thanx
>>
>> yasmin
>
>
>
Re: Java source code from WSDL
Posted by Dies Koper <di...@jp.fujitsu.com>.
Hello Yasmin,
There are several ways.
I recommend the following (JAX-RPC compatible, no dependencies on Axis
so portable across JAX-RPC compatible SOAP engines).
import javax.xml.rpc.*;
ServiceFactory sf = ServiceFactory.newInstance();
KeyAccidentService_Service service =
(keyAccident2.KeyAccidentService_Service)sf.loadService(
keyAccident2.KeyAccidentService_Service.class);
keyAccident2.KeyAccidentService_PortType keyAccident =
service.getAxisServlet();
String result = keyAccident.numAccident(...);
Regards,
Dies
rafiqy@blueyonder.co.uk wrote:
> Hi there,
>
> I have created Java source code from WSDL, but I'm not sure how to use
> this code to invoke my service, I'v attached the classes that were created
> ...please advice me how I can use these to interact with my Web service?
>
> Many thanx
>
> yasmin