Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Newbie: problem creating web service client
Newbie: problem creating web service client [message #484092] Fri, 04 September 2009 09:29 Go to next message
mike is currently offline mikeFriend
Messages: 35
Registered: July 2009
Member
Dear all,

I'm trying to create a client for a web service. (I'm new to web services.)

The wsdl for this service is at

http://www.techfortesco.com/tescoapi/TescoAPI.svc?wsdl

To create a client for this webservice in eclipse, i first created a Java
project called RescoClient, then right clicked that project, new | other |
web services | web service client.

I then get the `Web Service Client' dialog where i enter the url to the
wsdl, and then press enter.

The wsdl is parsed but after 2 seconds i get an exception:

IWAB0014E Unexpected exception occurred.

java.lang.NullPointerException
etc etc.

What's going on?? All help appreciated.

Bye, Mike
Re: Newbie: problem creating web service client [message #484112 is a reply to message #484092] Fri, 04 September 2009 11:03 Go to previous messageGo to next message
Tilak Sharma is currently offline Tilak SharmaFriend
Messages: 48
Registered: July 2009
Member
Hi Mike,

I used the wsdl you provided, in my Web Service Client Implementation, and I am able to parse the WSDL and list Service, Ports and all their corresponding Operations.

Just in case, If you missed something, follow the below steps:

You need to use the following extension points to implement Web Service Client:

To add your custom Runtime, use <extension point="org.eclipse.jst.ws.consumption.ui.runtimes">
</extension>

To add your custom Client Type, use <extension
point="org.eclipse.jst.ws.consumption.ui.wsClientImpl">
</extension>

To add your client Runtime, use <extension
point="org.eclipse.jst.ws.consumption.ui.clientRuntimes">
</extension>

From your Runtime class getWebServiceClient() method, you need to return your Web Service Client object.

If everything is fine till now, then check if result of the WSDL parsing is handled correctly.
Re: Newbie: problem creating web service cl ient [message #484159 is a reply to message #484112] Fri, 04 September 2009 13:12 Go to previous messageGo to next message
mike is currently offline mikeFriend
Messages: 35
Registered: July 2009
Member
Hi Tilak,

Thanks for taking the time to answer!

Unfortunately, your answer did not help me much: I'm using the `web
service client' wizard that's available when right-clicking the java
project and then choosing new | other | web services | web service client.
This menu doesn't allow me to specify extension points, it hides
configuration details from the user. However, i get the error mentioned
earlier. For some other wsdl's the wizard operates fine.

As a sideways question: why is it necessary to specify a SERVER (e.g.
tomcat 6) when creating a web service CLIENT using the aforementioned
wizard????

(I'm a total newbie w.r.t. web services, so maybe I'm overlooking
something trivial or fundamental.)

Bye

Mike
Re: Newbie: problem creating web service cl ient [message #484717 is a reply to message #484159] Tue, 08 September 2009 20:47 Go to previous messageGo to next message
Mark Hutchinson is currently offline Mark HutchinsonFriend
Messages: 53
Registered: July 2009
Member
Hi Mike,

I think you are running into this problem because you are trying to
generate into a Java project. It looks like WTP only supports generating
clients into Dynamic Web Projects or Java Utility Projects.

You can try generating your client into a Dynamic Web Project that
targets Tomcat. For a tutorial on how to create a client into a Dynamic
web project see http://wiki.eclipse.org/Creating_a_Java_Web_Service_Client

There is an enhancement request open to add support for generating Axis2
clients into Java projects, see:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=249922
I can't find any bugs or enhancements open for the original Axis
runtime. You can open an enhancement request for this, or vote for the
Axis2 enhancement.

I think it is also a defect that you are getting some null pointer
exception, rather than a more friendly message saying that java projects
aren't supported. (Or perhaps the wizard should not let you select a
java project if it's not supported). Please open a defect for this as
well if you can't find one already open.

Hope this helps,
Mark

mike wrote:
> Hi Tilak,
>
> Thanks for taking the time to answer!
> Unfortunately, your answer did not help me much: I'm using the `web
> service client' wizard that's available when right-clicking the java
> project and then choosing new | other | web services | web service
> client. This menu doesn't allow me to specify extension points, it hides
> configuration details from the user. However, i get the error mentioned
> earlier. For some other wsdl's the wizard operates fine.
>
> As a sideways question: why is it necessary to specify a SERVER (e.g.
> tomcat 6) when creating a web service CLIENT using the aforementioned
> wizard????
> (I'm a total newbie w.r.t. web services, so maybe I'm overlooking
> something trivial or fundamental.)
>
> Bye
>
> Mike
>
Re: Newbie: problem creating web service cl ient [message #484764 is a reply to message #484717] Wed, 09 September 2009 07:53 Go to previous message
mike is currently offline mikeFriend
Messages: 35
Registered: July 2009
Member
Mark Hutchinson wrote:

> Hi Mike,

> I think you are running into this problem because you are trying to
> generate into a Java project. It looks like WTP only supports generating
> clients into Dynamic Web Projects or Java Utility Projects.

Hi Mark,

Unfortunately this problem also occurs when adding the client to a dynamic
web project. I will file a bug report in bugzilla.

Bye and thanks, Mike
Previous Topic:Overriding Validator settings via the API
Next Topic:Galileo Workspace Corruption
Goto Forum:
  


Current Time: Sun Dec 21 02:36:49 GMT 2014

Powered by FUDForum. Page generated in 0.02679 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software