File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes web service Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "web service" Watch "web service" New topic
Author

web service

Joe Jose
Ranch Hand

Joined: Jan 14, 2004
Posts: 125
Hi,

I am a newbie to java web service. In my currect project [ using jsf, j2se5.x and tomcat 5.5.17 and Oracle as DB ] I need to update an external system's database (Clarity,CA). So far I read, I understand that I need to use web services to do that. One of colleague has already used jwsdp-2(jax-rpc) to a different system. Clarity's web service system uses XOG(Xml open gateway) which uses wsdl.
In this stage, I am totally confused.
How can I start with web service (coding) ?

Please help me.

Thanks,
Joe.

[ May 20, 2008: Message edited by: Joe Jose ]

[ May 20, 2008: Message edited by: Joe Jose ]
[ May 20, 2008: Message edited by: Joe Jose ]
Joe Jose
Ranch Hand

Joined: Jan 14, 2004
Posts: 125
Please anybody help me or give me a suggestion on this ?

Many Thanks,
Joe.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42951
    
  72
I don't understand how the need to use a WS follows from the need to update a database, but that's fine if you're sure that that's really a requirement.

If you have the WSDL of the target WS, then you should be able to create Java client access code from it. Most SOAP stacks have a tool that does this; it's often called wsdl2java or some such. Check the documentation of whatever SOAP stack you're using (Axis or JWSDP or ...).
Joe Jose
Ranch Hand

Joined: Jan 14, 2004
Posts: 125
QUOTE]Originally posted by Ulf Dittmer:
I don't understand how the need to use a WS follows from the need to update a database, but that's fine if you're sure that that's really a requirement.

If you have the WSDL of the target WS, then you should be able to create Java client access code from it. Most SOAP stacks have a tool that does this; it's often called wsdl2java or some such. Check the documentation of whatever SOAP stack you're using (Axis or JWSDP or ...).

-------------------------------------------------------------------------

Hi,
Thanks for the reply.
I am sure that the requirement is to update the database. What I am not sure is how can I use web service for that. Clarity (CA's) is an external system. I have given some quotes from Clarity document :
The XML Open Gateway (XOG) is Clarity´┐Żs Web service interface.These Web
services are available on the same HTTP and/or HTTPS port as the Clarity HTML web
browser interface. XOG, however, uses Simple Object Access Protocol (SOAP), an
open-standard, human-readable, XML-based protocol. Using XOG, you can read and
write data objects from Clarity, execute NSQL queries, and execute other serverside
actions.7.5.3 272
Each XOG service includes a Web Service Description Language (WSDL).The XOG WSDL is available on your Clarity server at the following URL:
http://<servername ort>//wsdl.
7.5.3 294
As previously mentioned, the XOG WSDL is compatible with the following platforms: Apache AXIS 1.3


I have downloaded jwsdp-2.0. But I am not sure where to start with it.
Can you please read the above and help/direct me ?

Many Thanks,
Joe.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42951
    
  72
Since the text explicitly mentions Axis, I'd use that instead of JWSDP. Point its wsdl2java tool at the WSDL given in the text, and you'll end up with a bunch of Java classes you can use to implement a Java client for the web service.
Joe Jose
Ranch Hand

Joined: Jan 14, 2004
Posts: 125
Originally posted by Ulf Dittmer:
Since the text explicitly mentions Axis, I'd use that instead of JWSDP. Point its wsdl2java tool at the WSDL given in the text, and you'll end up with a bunch of Java classes you can use to implement a Java client for the web service.


-----------------------------------------------------------------------

Thanks.

I couldn't get the url displayed if I give this 'http://<servername ort>//wsdl'(given the correct server and port) url on the browser's address bar. Should it supposed to give the wsdl obejcts ? Is it something to deal with networks ? Or can it be got when I use it in the program ?

Thanks,
Joe.
[ May 27, 2008: Message edited by: Joe Jose ]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42951
    
  72
What does "I couldn't get" mean? What happened?
Joe Jose
Ranch Hand

Joined: Jan 14, 2004
Posts: 125
Originally posted by Ulf Dittmer:
What does "I couldn't get" mean? What happened?


Hi Ulf,

Sorry that I am not fully understand how to use web service (Avis/jwsdp).
I have got an existing complex project. Axis says to use our own application just to copy the jars and web.xml from axis. But I don't know how to use it with WSDL2Java tool with Axis.
As I mentioned earlier Clarity gives a wsdl url as 'http://<servername ort>//wsdl' . How can I write a java class ? Can you please a bit more clear for me ? Since I am new to this web services, experience difficulty in understanding things.Since I am working alone, that adds my time to sort things in time.

Thank you very much,
Joe.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42951
    
  72
The wsdl2java tool is discussed in the Axis documentation: http://ws.apache.org/axis/java/user-guide.html#WSDL2JavaBuildingStubsSkeletonsAndDataTypesFromWSDL

But you need to have the WSDL first. In your previous post you indicated you couldn't get it, but you didn't say why you couldn't get it. You need to figure that out, possibly with the help of the system administrators or whoever is responsible for the system that exposes the WS.

If you've never used Axis, it would be beneficial if you used it for running an example web service, before using it for this task. That way you can learn how it exposes its WSDL, how the WSDL looks like, how you can use the wsdl2java tool etc, and how to create a Java client for the WS.

WS are not a simple thing that you can learn in a day.
Joe Jose
Ranch Hand

Joined: Jan 14, 2004
Posts: 125
Thanks Ulf,

I am reading the documentation of axis and web services. I think I am lacking knowledge of basic web service.
Thanks for your help. I will be here again with some other doubts with this.

Very thoughtful of you,
Joe.
[ May 27, 2008: Message edited by: Ulf Dittmer ]
 
 
subject: web service