Java client for IHMC CmapServer web services

Having problems with IHMC CmapServer? Think you have found a bug? Let us know!
Forum rules
Before you post a problem or bug, please be sure you have included the version number of IHMC CmapServer, the operating system and version, the amount of RAM, and any other information that allows us to be able to replicate the problem you are having. (i.e. what were you doing when the problem occur? were you running another program (application) by the time you have the problem?)
Post Reply
magsilva
Posts: 11
Joined: Wed Oct 20, 2010 12:44 pm

Java client for IHMC CmapServer web services

Post by magsilva » Wed Oct 20, 2010 3:26 pm

Is there any Java example that access the web services provided by IHMC CmapServer? I'm trying to use them, without success (BTW, I'm using IHMC CmapServer 5.04, 64 bits).

I'm developing a client for the IHMC CmapServer instance I installed in my machine (http://www.ironiacorp.com:8088/). The .Net client (the one available at http://cmap.ihmc.us/xml/CmapWSClientTutorial.html) worked just fine. However, every Java client that I try to build does not work. I've tried either Eclipse (CXL) and Netbeans, with no success at all (they couldn't generate Java code using the WSDL). Both have shown an error regarding SimpleLiteral (and dcterms).
The error shown by Netbeans is:
Screenshot.png
Although I think such problem can be solved (as advertised by Netbeans), I haven't got enough experience using web services to implement it (may be latter).

After several tries, I managed to create a client using Eclipse and Axis2. However, I had no success beyond accessing the methods/services 'getRootResourceMeta' and 'getRootResourceMetaList' (and that using Eclipse's Web Service Explorer, my own code cannot accomplish even that). The source code of the class I created is available at http://pastebin.com/cRG89GCT

magsilva
Posts: 11
Joined: Wed Oct 20, 2010 12:44 pm

Re: Java client for IHMC CmapServer web services

Post by magsilva » Wed Oct 20, 2010 8:28 pm

After several hours trying to generate Java stubs from the WSDL, I tried a dynamic implementation of the web services requests. Nothing fancy, neither pretty, but, hey, it works! I've post the code at http://pastebin.com/acX1gDmp

Nonetheless, I'd like to know if it's possible to generate clean and runnable Java code from the WSDL and, if yes, how.

Regards,

Marco

ghill47
Posts: 22
Joined: Fri Jan 29, 2010 12:50 pm

Re: Java client for IHMC CmapServer web services

Post by ghill47 » Wed Oct 20, 2010 10:41 pm

Hi. I just wanted to let you know that we are looking into this problem.

Sincerely,

Greg
Greg Hill -- IHMC -- CmapTools Group

ghill47
Posts: 22
Joined: Fri Jan 29, 2010 12:50 pm

Re: Java client for IHMC CmapServer web services

Post by ghill47 » Wed Oct 20, 2010 10:53 pm

Marco, when you say "a dynamic implementation", do you mean that you wrote the code "manually" (you wrote each line) without using an IDE to generate stubs from the WSDL?
Is that what you mean? I think so, but I just wanted to make sure.

Thanks

Greg
Greg Hill -- IHMC -- CmapTools Group

magsilva
Posts: 11
Joined: Wed Oct 20, 2010 12:44 pm

Re: Java client for IHMC CmapServer web services

Post by magsilva » Thu Oct 21, 2010 11:24 am

Exactly Greg, I could only make it work using "Dispatch<SOAPMessage>" (from javax.xml.ws.*), as implemented in the methods getResourceAtRoot() (and similar ones) at http://pastebin.com/acX1gDmp

Post Reply