0 Replies Latest reply on Jun 2, 2008 5:06 PM by Sheshi Sankineni

    Error while generating annotated Java classes using wsconsum

    Sheshi Sankineni Newbie

      Hi All,

      I am trying to generate annotated Java classes/sources using wsconsume tool (top down approach) for WS-Trust WSDL. Everytime I run the tool, I get the following exception.


      E:\java\jboss-4.2.2.GA\bin>wsconsume -v -k http://docs.oasis-open.org/ws-sx/ws-t
      rust/200512/ws-trust-1.3.wsdl
      JBossWS-Native stack deployed
      parsing WSDL...


      [ERROR] Failed to read the WSDL document: http://docs.oasis-open.org/ws-sx/ws-tr
      ust/200512/ws-trust-1.3.wsdl, because 1) could not find the document; /2) the do
      cument could not be read; 3) the root element of the document is not <wsdl:defin
      itions>.
      unknown location

      Failed to parse the WSDL.
      Failed to invoke WsImport
      java.lang.IllegalStateException: WsImport invocation failed. Try the verbose swi
      tch for more information
      at org.jboss.ws.tools.jaxws.impl.SunRIConsumerImpl.consume(SunRIConsumer
      Impl.java:220)
      at org.jboss.wsf.spi.tools.cmd.WSConsume.importServices(WSConsume.java:2
      23)
      at org.jboss.wsf.spi.tools.cmd.WSConsume.main(WSConsume.java:81)

      I tried accessing the WSDL locally and it failed with an same kinda exception for a XSD file the WSDL refers to.

      E:\java\jboss-4.2.2.GA\bin>wsconsume -v -k ws-trust-1.3.wsdl
      JBossWS-Native stack deployed
      parsing WSDL...


      [ERROR] Failed to read the WSDL document: http://docs.oasis-open.org/ws-sx/ws-tr
      ust/200512/ws-trust-1.3.xsd, because 1) could not find the document; /2) the doc
      ument could not be read; 3) the root element of the document is not <wsdl:defini
      tions>.
      unknown location

      Failed to parse the WSDL.
      Failed to invoke WsImport
      java.lang.IllegalStateException: WsImport invocation failed. Try the verbose swi
      tch for more information
      at org.jboss.ws.tools.jaxws.impl.SunRIConsumerImpl.consume(SunRIConsumer
      Impl.java:220)
      at org.jboss.wsf.spi.tools.cmd.WSConsume.importServices(WSConsume.java:2
      23)
      at org.jboss.wsf.spi.tools.cmd.WSConsume.main(WSConsume.java:81)

      E:\java\jboss-4.2.2.GA\bin>

      I would appreciate if someone help me with this issue.

      Thanks in advance