permaculture playing cards*
The moose likes Web Services and the fly likes wsimport Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "wsimport" Watch "wsimport" New topic
Author

wsimport

kannan Chocku
Greenhorn

Joined: Mar 13, 2013
Posts: 8
Hi,

I'm new to web services. I have got wsdl url.

1. I used > wsimport -keep -verbose http://....?wsdl
2. It generate java classes, interface & service Implementation class which extends service
3. I created the web service client class in which I acess the getXXXport() in serviceImplementation class to call the remote method
4. I also created interfaceImplementation class(Is this right??? In this class I implemented the interface(which is auto generated))

Problem is that I couldn't see some particular schema type java class which is present in wsdl
without that schema type class I wont be able to build the response

Please guide me if I'm wrong in these steps & also point out why I couldn't see schema type java file when I use wsimport
Himai Minh
Ranch Hand

Joined: Jul 29, 2012
Posts: 775
Create a method that takes an object type as argument, say you pass a String, an Animal object, a Person object.... to the method , also define the class by using this @SOAPBinding (style = Style.Document) instead of @SOAPBinding (style=Style.RPC), then you will see the schema in the wsdl.
kannan Chocku
Greenhorn

Joined: Mar 13, 2013
Posts: 8
Thanks for your reply Himai,

But I think I din't project my issue exactly.

I'm using Top down approach(So WSDL is already present I'm using the existing WSDL to consume their services)- Trying to consume web services from wsdl

When I use wsimport -keep -verbose http://.....?wsdl
Some of the java files which includes interface & service implementation file are generated

Then I manually created a client class based on generated service implementation

When I read my WSDL, I came to know that response is through complex type with complex type in turn- But My problem is when wsimport generated some automatic files-It did not generate some schema type classes
So I'm not able to generate the response

Please reply me back
Himai Minh
Ranch Hand

Joined: Jul 29, 2012
Posts: 775
By the way , which is schema type classes?

I am reading a good book, Java Web Services Up and Running by Martin Kalin.
You may find his examples useful.
Himai Minh
Ranch Hand

Joined: Jul 29, 2012
Posts: 775
kannan Chocku wrote:
I'm using Top down approach(So WSDL is already present I'm using the existing WSDL to consume their services)- Trying to consume web services from wsdl

When I use wsimport -keep -verbose http://.....?wsdl
Some of the java files which includes interface & service implementation file are generated

Then I manually created a client class based on generated service implementation

When I read my WSDL, I came to know that response is through complex type with complex type in turn- But My problem is when wsimport generated some automatic files-It did not generate some schema type classes
So I'm not able to generate the response



I guess your wsdl does not have a reference to any schema and that is why it does not generate any response. It may be because the SIB from which your WSDL is generated is an RPC not a document style.
Can you still use whatever classes generated from your wsdl? Can you use the getXXXXPort() in the XXXXService.java generated?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: wsimport