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 WSimport of Amazon Webservices 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 "WSimport of Amazon Webservices" Watch "WSimport of Amazon Webservices" New topic

WSimport of Amazon Webservices kumar

Joined: Jul 15, 2008
Posts: 18

I am studying Webservices up and running and trying to execute the exmaples which involve Amazon's e-commerce webservice.
I am using the following command to import the wsdl:
java -Xmx1024M -cp "C:\Program Files\Java\jdk1.7.0_21\lib\tools.jar" -keep -p awsClient /

but when i execute the command i get the following error:
parsing WSDL...

[ERROR] com.sun.istack.internal.SAXParseException2;

Failed to read the WSDL document:
WSECommerceService.wsdl, because 1) could not find the document; /2) the documen
t could not be read; 3) the root element of the document is not <wsdl:definition

[ERROR] duplicate "message" entity: "CreatePartyRequest"
line 232 of file:/C:/Documents%20and%20Settings/***/****/****/wsdl/Party.wsdl
This is the wsdl folder of another project on my computer.

The project is not even loaded in Eclipse when i am executing the command.

Can someone please help me to get rid of this error message.

Thanks. kumar

Joined: Jul 15, 2008
Posts: 18
Can someone please provide a response , i still dont have any luck after trying few options.
Steven Taylor

Joined: Nov 24, 2008
Posts: 2
I am able to generate the code using the below command

wsimport -d c:\ws kumar

Joined: Jul 15, 2008
Posts: 18
Steven Taylor wrote:I am able to generate the code using the below command

wsimport -d c:\ws

Thanks for the response Steve, but my issue is the command is searching for other wsdls that are present on my machine and thorwing the above error
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41068
Have you actually tried the command Steven posted? It's quite different from what you did.

Ping & DNS - my free Android networking tools app
subject: WSimport of Amazon Webservices
Similar Threads
wsimport with amazon problem
wsdl2java error: Property "Any" is already defined. Use <jaxb:property> to resolve this conflict.
How to capture the soap envelop
404 Error
Up and Running, not so much.