[jboss-user] [JBossWS] - wstools bug?

biroj do-not-reply at jboss.com
Mon Nov 20 14:11:18 EST 2006


 Hi,

 I'm using JBoss AS 4.0.4 GA with the bundled JBossWS and the corresponding wstools.
 
I tried to compile a valid WSDL file (see below) but it failed with the following exception:


  | Exception in thread "main" java.lang.IllegalArgumentException: local part cannot be "null" when creating a QName
  | 	at javax.xml.namespace.QName.<init>(Unknown Source)
  | 	at javax.xml.namespace.QName.<init>(Unknown Source)
  | 	at org.jboss.ws.tools.XSDTypeToJava.handleAttributes(XSDTypeToJava.java:418)
  | 	at org.jboss.ws.tools.XSDTypeToJava.getVARList(XSDTypeToJava.java:198)
  | 	at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:153)
  | 	at org.jboss.ws.tools.XSDTypeToJava.createVARforXSElementDeclaration(XSDTypeToJava.java:632)
  | 	at org.jboss.ws.tools.XSDTypeToJava.createVARsForElements(XSDTypeToJava.java:519)
  | 	at org.jboss.ws.tools.XSDTypeToJava.createVARsforXSParticle(XSDTypeToJava.java:446)
  | 	at org.jboss.ws.tools.XSDTypeToJava.getVARList(XSDTypeToJava.java:248)
  | 	at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:153)
  | 	at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:113)
  | 	at org.jboss.ws.tools.WSDLToJava.generateJavaSource(WSDLToJava.java:497)
  | 	at org.jboss.ws.tools.WSDLToJava.getReturnType(WSDLToJava.java:377)
  | 	at org.jboss.ws.tools.WSDLToJava.appendMethods(WSDLToJava.java:220)
  | 	at org.jboss.ws.tools.WSDLToJava.createSEIFile(WSDLToJava.java:333)
  | 	at org.jboss.ws.tools.WSDLToJava.createSEI(WSDLToJava.java:355)
  | 	at org.jboss.ws.tools.WSDLToJava.generateSEI(WSDLToJava.java:174)
  | 	at org.jboss.ws.tools.helpers.ToolsHelper.handleWSDLToJavaGeneration(ToolsHelper.java:326)
  | 	at org.jboss.ws.tools.WSTools.process(WSTools.java:132)
  | 	at org.jboss.ws.tools.WSTools.generate(WSTools.java:119)
  | 	at org.jboss.ws.tools.WSTools.main(WSTools.java:61)
  | 

WSDL

  | ?xml version="1.0" encoding="UTF-8"?>
  | <!--
  | EMInterface 
  | EMServies.wsdl, WSDL 1.1, document/literal wrapped style
  |  -->
  | <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://siemens.com/ws/request" xmlns:tns="http://siemens.com/ws/request/beans" targetNamespace="http://siemens.com/ws/request" name="EMServices">
  | 	<wsdl:types>
  | 		<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xmlns:tns="http://siemens.com/ws/request/beans" targetNamespace="http://siemens.com/ws/request/beans">
  | 			<!-- synchronous responses (EM -> OM)-->
  | 			<xs:include schemaLocation="get-em-info-response.xsd"/>
  | 			<xs:include schemaLocation="get-em-info.xsd"/>
  | 			<!-- input/output message parameters types -->
  | 			<!-- <xs:element name="serviceResponse" type="tns:ServiceResponseType">
  | 				<xs:annotation>
  | 					<xs:documentation>Immediate (synchronous) service response (EM -> OM).</xs:documentation>
  | 				</xs:annotation>
  | 			</xs:element> -->
  | 			<xs:element name="getEMInfo" type="tns:GetEMInfoType">
  | 				<xs:annotation>
  | 					<xs:documentation>Get EM info.</xs:documentation>
  | 				</xs:annotation>
  | 			</xs:element>
  | 			<xs:element name="getEMInfoResponse" type="tns:GetEMInfoResponseType">
  | 				<xs:annotation>
  | 					<xs:documentation>Get EM info response.</xs:documentation>
  | 				</xs:annotation>
  | 			</xs:element>
  | 		</xs:schema>
  | 	</wsdl:types>
  | 	<wsdl:message name="getEMInfoIn">
  | 		<wsdl:part name="getEMInfo" element="tns:getEMInfo"/>
  | 	</wsdl:message>
  | 	<wsdl:message name="getEMInfoOut">
  | 		<wsdl:part name="getEMInfoResponse" element="tns:getEMInfoResponse"/>
  | 	</wsdl:message>
  | 	<wsdl:portType name="EMServices">
  | 		<wsdl:operation name="getEMInfo">
  | 			<wsdl:input message="ns:getEMInfoIn"/>
  | 			<wsdl:output message="ns:getEMInfoOut"/>
  | 		</wsdl:operation>
  | 	</wsdl:portType>
  | 	<wsdl:binding name="EMServicesSOAP" type="ns:EMServices">
  | 		<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
  | 		<wsdl:operation name="getEMInfo">
  | 			<wsdl:input>
  | 				<soap:body use="literal"/>
  | 			</wsdl:input>
  | 			<wsdl:output>
  | 				<soap:body use="literal"/>
  | 			</wsdl:output>
  | 		</wsdl:operation>
  | 	</wsdl:binding>
  | 	<wsdl:service name="EMServices">
  | 		<wsdl:port name="EMServicesSOAP" binding="ns:EMServicesSOAP">
  | 			<soap:address location="http://localhost:8080/axis2-1.1-SNAPSHOT/services/EMServices"/>
  | 		</wsdl:port>
  | 	</wsdl:service>
  | </wsdl:definitions>
  | 

I can also include the XSDs if it is neccessary.

The wstools config file was  the simpliest one:


  | <wsdl-java file="EMServices.wsdl">
  |     <mapping file="jaxrpc-mapping.xml" />
  |   </wsdl-java>
  | 

Could you help me?

Thanks a lot,
Bye,
Janos

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

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



More information about the jboss-user mailing list