Hi all, 

I 'm getting strange errors when trying to compile my WSDL2Java code with ant: 

./WSDL2Java.sh -uri wsdl/service.wsdl -ss -sd -o wise/ -p 
com.siemens.swa.plugins.webservices.types

[javac] 
/home/iksrazal/white3/wise/com/siemens/swa/plugins/webservices/types/databinding/org/xmlsoap/schemas/TimeDocument.java:19:
 
package 
schemaorg_apache_xmlbeans.system.sECC7940C4012EB2293D5238A794D458D.TypeSystemHolder
 
does not exist
    [javac] public static final org.apache.xmlbeans.SchemaType type = 
(org.apache.xmlbeans.SchemaType)schemaorg_apache_xmlbeans.system.sECC7940C4012EB2293D5238A794D458D.TypeSystemHolder.typeSystem.resolveHandle("timea4a3doctype");

Googling showed that this is a xmlbean problem - I'm new here. The only 
schemas I see here are in wise/schemas : 

wise/schemas/temp1517.xsd

I'm not sure if I should be using the xmlbean ant task here as this is 
seemingly a temp file, but gave it a shot: 

<target name="compile-xbeans">
    <taskdef name="xmlbean" classname="org.apache.xmlbeans.impl.tool.XMLBean" 
classpath="lib/xbean-2.0.0.jar:lib/stax-api-1.0.jar" />
      <xmlbean schema="schemas" classgendir="build/xbeans/classes" 
destfile="lib/autoDispatchSchemas.jar">
        <fileset dir="wise/schemas" includes="*.xsd"/>
      </xmlbean>
  </target>

I get: 
compile-xbeans:

  [xmlbean] wise/schemas/temp1517.xsd:21: error: Invalid QName value: Can't 
resolve prefix 'xsd'
  [xmlbean] wise/schemas/temp1517.xsd:22: error: Invalid QName value: Can't 
resolve prefix 'xsd'
  [xmlbean] wise/schemas/temp1517.xsd:23: error: Invalid QName value: Can't 
resolve prefix 'ns2'
  [xmlbean] wise/schemas/temp1517.xsd:24: error: Invalid QName value: Can't 
resolve prefix 'ns2'

My wsdl file is: 

<?xml version="1.0" encoding="UTF-8"?>

<definitions name="SWAAutoDispatchService" 
targetNamespace="http://swaAutoDispatch"; xmlns:tns="http://swaAutoDispatch"; 
xmlns="http://schemas.xmlsoap.org/wsdl/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; 
xmlns:ns2="http://swaAutoDispatch/types";>
  <types>
    <schema targetNamespace="http://swaAutoDispatch/types"; 
xmlns:tns="http://swaAutoDispatch/types"; 
xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
xmlns="http://www.w3.org/2001/XMLSchema";>
      <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
      <complexType name="ReturnWeb_Base">
        <sequence>
          <element name="errorMessage" type="string"/>
          <element name="successErrorCode" 
type="int"/></sequence></complexType>
      <complexType name="ReturnWeb_Login">
        <complexContent>
          <extension base="tns:ReturnWeb_Base">
            <sequence>
              <element name="SOAP_Session_id" type="string"/>
              <element name="web_user_name" 
type="string"/></sequence></extension></complexContent></complexType>
      <element name="web_LoginElement">
        <complexType>
          <sequence>
            <element ref="tns:user_nameElement"/>
            <element ref="tns:user_passwordElement"/>
          </sequence>
        </complexType>
      </element>
      <element name="user_nameElement" type="xsd:string"/>
      <element name="user_passwordElement" type="xsd:string"/>
      <element name="ReturnWeb_LoginElement" type="ns2:ReturnWeb_Login"/>
      <element name="ReturnWeb_BaseElement" type="ns2:ReturnWeb_Base"/>
</schema></types>
  <message name="SWAAutoDispatchEndpoint_web_Login">
     <part name="parameters" element="ns2:web_LoginElement"/>
  </message>
  <message name="SWAAutoDispatchEndpoint_web_LoginResponse">
    <part name="result" element="ns2:ReturnWeb_LoginElement"/>
  </message>
  <portType name="SWAAutoDispatchEndpoint">
    <operation name="web_Login">
      <input message="tns:SWAAutoDispatchEndpoint_web_Login" 
name="SWAAutoDispatchEndpoint_web_Login"/>
      <output message="tns:SWAAutoDispatchEndpoint_web_LoginResponse" 
name="SWAAutoDispatchEndpoint_web_LoginResponse"/>
    </operation>
  </portType>
  <binding name="SWAAutoDispatchEndpointBinding" 
type="tns:SWAAutoDispatchEndpoint">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http"; 
style="document"/>
    <operation name="web_Login">
      <soap:operation soapAction=""/>
      <input name="SWAAutoDispatchEndpoint_web_Login">
        <soap:body use="literal"/>
      </input>
      <output name="SWAAutoDispatchEndpoint_web_LoginResponse"> 
        <soap:body use="literal"/>
      </output>
    </operation>
  </binding>
  <service name="SWAAutoDispatchService">
    <port name="SWAAutoDispatchEndpointPort" 
binding="tns:SWAAutoDispatchEndpointBinding">
      <soap:address 
location="http://127.0.0.1"/></port></service></definitions>


Any ideas? 
iksrazal

Reply via email to