aspose file tools*
The moose likes Web Services and the fly likes wsimport -b gives me an XMLStreamReaderException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "wsimport -b gives me an XMLStreamReaderException" Watch "wsimport -b gives me an XMLStreamReaderException" New topic
Author

wsimport -b gives me an XMLStreamReaderException

Himai Minh
Ranch Hand

Joined: Jul 29, 2012
Posts: 734
I am trying the example in chapter 2 of Java Web Services Up and Running,

But I get this error message:


C:\jdk1.6.0_18\bin>wsimport -keep -p awsClient2 http://ecs.amazonaws.com/AWSECom
merceService/AWSECommerceService.wsdl -b custom.xml
Exception in thread "main" com.sun.xml.internal.ws.streaming.XMLStreamReaderExce
ption: XML reader error: javax.xml.stream.XMLStreamException: ParseError at [row
,col]:[1,1]
Message: Premature end of file.
at com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil.wrapException(X
MLStreamReaderUtil.java:256)
at com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil.next(XMLStreamR
eaderUtil.java:84)
at com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil.nextContent(XML
StreamReaderUtil.java:99)
at com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil.nextElementCont
ent(XMLStreamReaderUtil.java:89)
at com.sun.tools.internal.ws.wscompile.WsimportOptions.parseBindings(Wsi
mportOptions.java:417)
at com.sun.tools.internal.ws.wscompile.WsimportTool.run(WsimportTool.jav
a:160)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.tools.internal.ws.Invoker.invoke(Invoker.java:105)
at com.sun.tools.internal.ws.WsImport.main(WsImport.java:41)
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
Message: Premature end of file.
at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLS
treamReaderImpl.java:593)
at com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil.next(XMLStreamR
eaderUtil.java:65)
... 10 more

C:\jdk1.6.0_18\bin>
Himai Minh
Ranch Hand

Joined: Jul 29, 2012
Posts: 734
I know why. I actually need to create this custom.xml file myself.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: wsimport -b gives me an XMLStreamReaderException