This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Services and the fly likes After creating WSDL-to-JAVA what i need to do in RAD IDE? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "After creating WSDL-to-JAVA what i need to do in RAD IDE?" Watch "After creating WSDL-to-JAVA what i need to do in RAD IDE?" New topic
Author

After creating WSDL-to-JAVA what i need to do in RAD IDE?

Harsha Gedala
Ranch Hand

Joined: Jun 04, 2008
Posts: 41

Hi Everyone, I am pretty new to Web Services.

IDE: RAD
application server: WAS 6.0
Web sphere runtime environment for web services.

Here my assignment is to generate WSDL to JAVA (Top-down approach).Where i have given a WSDL. And after that i have created the Client stubs using RAD Environment ( like right clicking the wsdl and opting "generate the java Bean Skeleton"). I dont know what i have to do after this. My team lead said that i can take example with the already done wsdl where others have generated client java from the given wsdl's.

these are other related questions.
1. how to call the web service?
2. how to test this web service?

I think these are basic questions but i have no good idea related to webservices.

Thanks for the replies in Advance.
alpa
Greenhorn

Joined: Mar 02, 2002
Posts: 4
Hi,

I have done this using JDeveloper , generate the java from WSDL.
When you are generating a java from WSDL there will be wsdl port and method which are called operation.
There will be some documentation on all this
Here are some points whcih might help you to start.
1) what is the webservice functionality?
2) What are the inputs to the webservice and what is the output.
3) You can test Webservice as a regualr Java applciation.

In JDeveloper there is an option called "TestHArness" which are usually sued to test the webservice.
Chintan Rajyaguru
Ranch Hand

Joined: Aug 19, 2001
Posts: 341
RAD/WebSphere will generate a proxy class. For a web service named HelloWorld, the proxy class will be something like HelloWorldProxy. You need to write a test client that uses this proxy class.

public class WSTest {
public static void main (String [] args){
HelloWorldProxy proxy = new HelloWorldProxy ();
// invoke web service operation sayHello()
System.out.println (proxy.sayHello());
}
}

For a J2EE client, you can obtain a reference to a Service object using JNDI lookup and later call getPort method on this object to get the port, and then you can call the web service operation on the port. I will let you do some reading on that. BTW, if you look at the generated code, you will see all these classes.


ChintanRajyaguru.com
SOADevelopment.com - Coming soon!
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2921
    
    5
WebSphere Version 6 Web Services Handbook Development and Deployment
Harsha Gedala
Ranch Hand

Joined: Jun 04, 2008
Posts: 41

Hi Guys,

thanks for the help. those docs are really helpful.
I finally got the answer to my question.

What i actually did is first i copied the WSDL to my workspace, then right clicked on it " Generate java bean skeleton". that is the place what i did mistake. I have to " Generate Client" instead.

Now after making changes i got the proxy class, mapping xml file, other generator classes(helper, ser, deser), Service locator class, soap binding stub, service information class, and even updated web.xml file

i could manage with the test class finally.

thanks very much for the response.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: After creating WSDL-to-JAVA what i need to do in RAD IDE?
 
Similar Threads
how to consume a webservice using axis2
Any feedback for SCDJWS Beta?
General Doubts in WebServices after Fibonacci Example
RPC mapping file
how to write java web service client