[jboss-user] [JBossWS] - new format required for wsdl in JBossws>2.0.0?

timeagentess do-not-reply at jboss.com
Wed Jun 25 06:02:05 EDT 2008


Hello all,

I have some problems transitioning from JBoss 4.0.5 + JBossws 2.0.0 to JBoss 4.2.0 + JBossws 3.0.2.
A simple web service (deployed as an annotated EJB within an ear) which was working perfectly in the initial configuration cannot be consumed by wsconsume in the second configuration:

anonymous wrote : [wsconsume] Failed to read the WSDL document: http://nifhel:8080/webservices-ws/services/WSTwo?wsdl, because 1) could not find the document; /2) the document could not be read; 3) the root element of the document is not <wsdl:definitions>.
  | [wsconsume] [ERROR] failed.noservice=Could not find wsdl:service in the provided WSDL(s): 
  | [wsconsume]  At least one WSDL with at least one service definition needs to be provided.
  | [wsconsume] 	Failed to parse the WSDL.
  | ...
  | 

My generated WSDL file indeed does not have a wsdl:service tag as root, it looks like this (with some parts eliminated for clarity):

anonymous wrote : 
  | <definitions name='WSTwoServiceBeanService' targetNamespace='http://localhost:8080/atb' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://localhost:8080/atb' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
  |  
  |   <xs:schema targetNamespace='http://localhost:8080/atb' version='1.0' xmlns:tns='http://localhost:8080/atb' xmlns:xs='http://www.w3.org/2001/XMLSchema'>
  |    <xs:element name='hello' type='tns:hello'/>
  |    <xs:element name='helloResponse' type='tns:helloResponse'/>
  |    <xs:complexType name='hello'>
  |     <xs:sequence>
  |      <xs:element minOccurs='0' name='arg0' type='xs:string'/>
  |     </xs:sequence>
  | 
  |    </xs:complexType>
  |    <xs:complexType name='helloResponse'>
  |     <xs:sequence>
  |      <xs:element minOccurs='0' name='return' type='xs:string'/>
  |     </xs:sequence>
  |    </xs:complexType>
  |   </xs:schema>
  |  
  |  [...]
  | 

How can I influence the generation of a wsdl document which complies to what wsconsume seems to expect? Or is there another mistake I might have made?

Additional things I tried: Searching around led me to this forum post: http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4102431
and this JIRA issue: http://jira.jboss.org/jira/browse/JBESB-1719, which seem (?) to be related to my problem.

Setting fork="true" for wsconsume like suggested in the forum post linked above led to the gnu.getopt.LongOpt class to be reported as not found, and after adding the corresponding jar to the classpath I get an almost identical error to the one I've started with:
anonymous wrote : [wsconsume] parsing WSDL...
  | [wsconsume] [ERROR] Connection reset
  | [wsconsume] Failed to read the WSDL document: http://nifhel:8080/webservices-ws/services/WSTwo?wsdl, because 1) could not find the document; /2) the document could not be read; 3) the root element of the document is not <wsdl:definitions>.
  | [wsconsume] [ERROR] failed.noservice=Could not find wsdl:service in the provided WSDL(s): 
  | [wsconsume]  At least one WSDL with at least one service definition needs to be provided.
  | [wsconsume] 	Failed to parse the WSDL.
  | [wsconsume] Failed to invoke WsImport
  | [wsconsume] java.lang.IllegalStateException: WsImport invocation failed. Try the verbose switch for more information
  | [wsconsume] 	at org.jboss.ws.tools.jaxws.impl.SunRIConsumerImpl.consume(SunRIConsumerImpl.java:234)
  | [wsconsume] 	at org.jboss.wsf.spi.tools.cmd.WSConsume.importServices(WSConsume.java:223)
  | [wsconsume] 	at org.jboss.wsf.spi.tools.cmd.WSConsume.main(WSConsume.java:81)
  | [wsconsume] Error: Could not import. (use --verbose to see full traces)
  | [wsconsume] java.lang.IllegalStateException: WsImport invocation failed. Try the verbose switch for more information
  | [wsconsume] 	at org.jboss.ws.tools.jaxws.impl.SunRIConsumerImpl.consume(SunRIConsumerImpl.java:234)
  | [wsconsume] 	at org.jboss.wsf.spi.tools.cmd.WSConsume.importServices(WSConsume.java:223)
  | [wsconsume] 	at org.jboss.wsf.spi.tools.cmd.WSConsume.main(WSConsume.java:81)

Can anyone help with this issue? 
Thank you very much!

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4160485#4160485

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4160485



More information about the jboss-user mailing list