You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Syed Haq <sh...@silver-peak.com> on 2008/04/08 20:44:37 UTC

Need help with WSDL2Java

Hi,

 

We have been using Axis (1.3)'s in our project for quite some time now.
While trying to evaluate migration effort to cxf, I'm stuck right at the
first step - unable to generate Java source out of WSDL file. 

 

Here is the error that I get:

 

WSDLToJava Error: Thrown by JAXB : undefined simple or complex type
'SOAP-ENC:Array'

 

I'm attaching the WSDL for reference. We use GSoap to generate it out of
C headers. 

 

When I remove the SOAP array reference, and just use the unbounded type,
it works find and generates code that uses List.

Note that ArrayOfAlarmInfo and ArrayOfDbChangeInfo are defined both as
unbounded and bounded arrays. Removing the unbounded reference also
doesn't have any effect.

Thanks for all the help.

 

Regards,

Syed

 

WSDL:

 

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

<definitions name="GMS"

 targetNamespace="http://silverpeak.com/gms.wsdl"

 xmlns:tns="http://silverpeak.com/gms.wsdl"

 xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"

 xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"

 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

 xmlns:xsd="http://www.w3.org/2001/XMLSchema"

 xmlns:ns="urn:soap:silverpeak:com"

 xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/"

 xmlns:MIME="http://schemas.xmlsoap.org/wsdl/mime/"

 xmlns:DIME="http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/"

 xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/"

 xmlns="http://schemas.xmlsoap.org/wsdl/">

 

<types>

 

 <schema targetNamespace="urn:soap:silverpeak:com"

  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"

  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"

  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

  xmlns:xsd="http://www.w3.org/2001/XMLSchema"

  xmlns:ns="urn:soap:silverpeak:com"

  xmlns="http://www.w3.org/2001/XMLSchema"

  elementFormDefault="unqualified"

  attributeFormDefault="unqualified">

  <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>

  <simpleType name="soap-boolean">

   <restriction base="xsd:string">

    <enumeration value="false"/>

    <enumeration value="true"/>

   </restriction>

  </simpleType>

  <simpleType name="AlarmSeverity">

   <restriction base="xsd:string">

    <enumeration value="Critical"/>

    <enumeration value="Major"/>

    <enumeration value="Minor"/>

    <enumeration value="Warning"/>

    <enumeration value="Info"/>

   </restriction>

  </simpleType>

  <simpleType name="AlarmAction">

   <restriction base="xsd:string">

    <enumeration value="actionNone"/>

    <enumeration value="actionRaise"/>

    <enumeration value="actionClear"/>

    <enumeration value="actionAck"/>

    <enumeration value="actionUnack"/>

   </restriction>

  </simpleType>

  <simpleType name="DbChangeAction">

   <restriction base="xsd:string">

    <enumeration value="DbActionNone"/>

    <enumeration value="DbActionCreate"/>

    <enumeration value="DbActionDelete"/>

    <enumeration value="DbActionModify"/>

   </restriction>

  </simpleType>

  <complexType name="Empty">

   <sequence>

   </sequence>

  </complexType>

  <complexType name="SystemRegister">

   <sequence>

     <element name="applianceIp" type="xsd:string" minOccurs="0"
maxOccurs="1" nillable="true"/>

     <element name="mgmtIp" type="xsd:string" minOccurs="0"
maxOccurs="1" nillable="true"/>

     <element name="user" type="xsd:string" minOccurs="0" maxOccurs="1"
nillable="true"/>

     <element name="passwd" type="xsd:string" minOccurs="0"
maxOccurs="1" nillable="true"/>

   </sequence>

  </complexType>

  <complexType name="AlarmInfo">

   <sequence>

     <element name="type" type="xsd:string" minOccurs="0" maxOccurs="1"
nillable="true"/>

     <element name="name" type="xsd:string" minOccurs="0" maxOccurs="1"
nillable="true"/>

     <element name="description" type="xsd:string" minOccurs="0"
maxOccurs="1" nillable="true"/>

     <element name="source" type="xsd:string" minOccurs="0"
maxOccurs="1" nillable="true"/>

     <element name="time" type="xsd:long" minOccurs="1" maxOccurs="1"/>

     <element name="severity" type="ns:AlarmSeverity" minOccurs="1"
maxOccurs="1"/>

     <element name="id" type="xsd:int" minOccurs="1" maxOccurs="1"/>

     <element name="count" type="xsd:int" minOccurs="1" maxOccurs="1"/>

     <element name="acknowledged" type="xsd:boolean" minOccurs="1"
maxOccurs="1"/>

     <element name="clearable" type="xsd:boolean" minOccurs="1"
maxOccurs="1"/>

     <element name="active" type="xsd:boolean" minOccurs="1"
maxOccurs="1"/>

     <element name="serviceAffect" type="xsd:boolean" minOccurs="1"
maxOccurs="1"/>

     <element name="action" type="ns:AlarmAction" minOccurs="1"
maxOccurs="1"/>

   </sequence>

  </complexType>

  <complexType name="ArrayOfAlarmInfo">

   <complexContent>

    <restriction base="SOAP-ENC:Array">

     <sequence>

      <element name="item" type="ns:AlarmInfo" minOccurs="0"
maxOccurs="unbounded"/>

     </sequence>

     <attribute ref="SOAP-ENC:arrayType"
WSDL:arrayType="ns:AlarmInfo[]"/>

    </restriction>

   </complexContent>

  </complexType>

  <complexType name="DbChangeInfo">

   <sequence>

     <element name="type" type="ns:DbChangeAction" minOccurs="1"
maxOccurs="1"/>

     <element name="object" type="xsd:string" minOccurs="0"
maxOccurs="1" nillable="true"/>

     <element name="object-id" type="xsd:string" minOccurs="0"
maxOccurs="1" nillable="true"/>

   </sequence>

  </complexType>

  <complexType name="ArrayOfDbChangeInfo">

   <complexContent>

    <restriction base="SOAP-ENC:Array">

     <sequence>

      <element name="item" type="ns:DbChangeInfo" minOccurs="0"
maxOccurs="unbounded"/>

     </sequence>

     <attribute ref="SOAP-ENC:arrayType"
WSDL:arrayType="ns:DbChangeInfo[]"/>

    </restriction>

   </complexContent>

  </complexType>

  <!-- operation request element -->

  <element name="sysReg" type="ns:SystemRegister"/>

  <!-- operation response element -->

  <element name="uniqueId" type="xsd:int"/>

  <!-- operation request element -->

  <element name="mgmtIp" type="xsd:string"/>

  <!-- operation request element -->

  <element name="applianceIp" type="xsd:string"/>

  <!-- operation request element -->

  <element name="almEvent" type="ns:ArrayOfAlarmInfo"/>

  <!-- operation response element -->

  <element name="val" type="xsd:int"/>

  <!-- operation request element -->

  <element name="dbChangeEvent" type="ns:ArrayOfDbChangeInfo"/>

 </schema>

 

</types>

 

<message name="registerSystem">

 <part name="sysReg" element="ns:sysReg"/>

</message>

 

<message name="registerSystemResponse">

 <part name="uniqueId" element="ns:uniqueId"/>

</message>

 

<message name="notifyAlarmEvent">

 <part name="mgmtIp" element="ns:mgmtIp"/>

 <part name="applianceIp" element="ns:applianceIp"/>

 <part name="almEvent" element="ns:almEvent"/>

</message>

 

<message name="notifyAlarmEventResponse">

 <part name="val" element="ns:val"/>

</message>

 

<message name="notifyAlarmEvents">

 <part name="mgmtIp" element="ns:mgmtIp"/>

 <part name="almEvent" element="ns:almEvent"/>

</message>

 

<message name="notifyAlarmEventsResponse">

 <part name="val" element="ns:val"/>

</message>

 

<message name="notifyDbChangeEvent">

 <part name="mgmtIp" element="ns:mgmtIp"/>

 <part name="dbChangeEvent" element="ns:dbChangeEvent"/>

</message>

 

<message name="notifyDbChangeEventResponse">

 <part name="val" element="ns:val"/>

</message>

 

<portType name="GMSPortType">

 <operation name="registerSystem">

  <documentation>Service definition of function
ns__registerSystem</documentation>

  <input message="tns:registerSystem"/>

  <output message="tns:registerSystemResponse"/>

 </operation>

 <operation name="notifyAlarmEvent">

  <documentation>Service definition of function
ns__notifyAlarmEvent</documentation>

  <input message="tns:notifyAlarmEvent"/>

  <output message="tns:notifyAlarmEventResponse"/>

 </operation>

 <operation name="notifyAlarmEvents">

  <documentation>Service definition of function
ns__notifyAlarmEvents</documentation>

  <input message="tns:notifyAlarmEvents"/>

  <output message="tns:notifyAlarmEventsResponse"/>

 </operation>

 <operation name="notifyDbChangeEvent">

  <documentation>Service definition of function
ns__notifyDbChangeEvent</documentation>

  <input message="tns:notifyDbChangeEvent"/>

  <output message="tns:notifyDbChangeEventResponse"/>

 </operation>

</portType>

 

<binding name="GMS" type="tns:GMSPortType">

 <SOAP:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>

 <operation name="registerSystem">

  <SOAP:operation style="rpc" soapAction=""/>

  <input>

     <SOAP:body parts="parameters" use="literal"
namespace="urn:soap:silverpeak:com"/>

  </input>

  <output>

     <SOAP:body parts="parameters" use="literal"
namespace="urn:soap:silverpeak:com"/>

  </output>

 </operation>

 <operation name="notifyAlarmEvent">

  <SOAP:operation style="rpc" soapAction=""/>

  <input>

     <SOAP:body parts="parameters" use="literal"
namespace="urn:soap:silverpeak:com"/>

  </input>

  <output>

     <SOAP:body parts="parameters" use="literal"
namespace="urn:soap:silverpeak:com"/>

  </output>

 </operation>

 <operation name="notifyAlarmEvents">

  <SOAP:operation style="rpc" soapAction=""/>

  <input>

     <SOAP:body parts="parameters" use="literal"
namespace="urn:soap:silverpeak:com"/>

  </input>

  <output>

     <SOAP:body parts="parameters" use="literal"
namespace="urn:soap:silverpeak:com"/>

  </output>

 </operation>

 <operation name="notifyDbChangeEvent">

  <SOAP:operation style="rpc" soapAction=""/>

  <input>

     <SOAP:body parts="parameters" use="literal"
namespace="urn:soap:silverpeak:com"/>

  </input>

  <output>

     <SOAP:body parts="parameters" use="literal"
namespace="urn:soap:silverpeak:com"/>

  </output>

 </operation>

</binding>

 

<service name="GMS">

 <documentation>Silver-Peak GMS service</documentation>

 <port name="GMS" binding="tns:GMS">

  <SOAP:address location="http://silverpeak.com"/>

 </port>

</service>

 

</definitions>

.


Re: Need help with WSDL2Java

Posted by Daniel Kulp <dk...@apache.org>.
On Tuesday 08 April 2008, Benson Margulies wrote:
> That's soap encoding. CXF 2.0.x doesn't support it at all. CXF 2.1
> might support it enough, I don't recall how complete is the job Dain
> did on it.

Not far enough for this case.  Dain hasn't started at all on any of the 
code generation parts.  Just runtime stuff.

Dan

>
> On Tue, Apr 8, 2008 at 2:44 PM, Syed Haq <sh...@silver-peak.com> wrote:
> > Hi,
> >
> >
> >
> > We have been using Axis (1.3)'s in our project for quite some time
> > now. While trying to evaluate migration effort to cxf, I'm stuck
> > right at the first step - unable to generate Java source out of WSDL
> > file.
> >
> >
> >
> > Here is the error that I get:
> >
> >
> >
> > WSDLToJava Error: Thrown by JAXB : undefined simple or complex type
> > 'SOAP-ENC:Array'
> >
> >
> >
> > I'm attaching the WSDL for reference. We use GSoap to generate it
> > out of C headers.
> >
> >
> >
> > When I remove the SOAP array reference, and just use the unbounded
> > type, it works find and generates code that uses List.
> >
> > Note that ArrayOfAlarmInfo and ArrayOfDbChangeInfo are defined both
> > as unbounded and bounded arrays. Removing the unbounded reference
> > also doesn't have any effect.
> >
> > Thanks for all the help.
> >
> >
> >
> > Regards,
> >
> > Syed
> >
> >
> >
> > WSDL:
> >
> >
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> >
> > <definitions name="GMS"
> >
> >  targetNamespace="http://silverpeak.com/gms.wsdl"
> >
> >  xmlns:tns="http://silverpeak.com/gms.wsdl"
> >
> >  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> >
> >  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
> >
> >  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >
> >  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> >
> >  xmlns:ns="urn:soap:silverpeak:com"
> >
> >  xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/"
> >
> >  xmlns:MIME="http://schemas.xmlsoap.org/wsdl/mime/"
> >
> >  xmlns:DIME="http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/"
> >
> >  xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/"
> >
> >  xmlns="http://schemas.xmlsoap.org/wsdl/">
> >
> >
> >
> > <types>
> >
> >
> >
> >  <schema targetNamespace="urn:soap:silverpeak:com"
> >
> >  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> >
> >  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
> >
> >  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >
> >  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> >
> >  xmlns:ns="urn:soap:silverpeak:com"
> >
> >  xmlns="http://www.w3.org/2001/XMLSchema"
> >
> >  elementFormDefault="unqualified"
> >
> >  attributeFormDefault="unqualified">
> >
> >  <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
> >
> >  <simpleType name="soap-boolean">
> >
> >   <restriction base="xsd:string">
> >
> >    <enumeration value="false"/>
> >
> >    <enumeration value="true"/>
> >
> >   </restriction>
> >
> >  </simpleType>
> >
> >  <simpleType name="AlarmSeverity">
> >
> >   <restriction base="xsd:string">
> >
> >    <enumeration value="Critical"/>
> >
> >    <enumeration value="Major"/>
> >
> >    <enumeration value="Minor"/>
> >
> >    <enumeration value="Warning"/>
> >
> >    <enumeration value="Info"/>
> >
> >   </restriction>
> >
> >  </simpleType>
> >
> >  <simpleType name="AlarmAction">
> >
> >   <restriction base="xsd:string">
> >
> >    <enumeration value="actionNone"/>
> >
> >    <enumeration value="actionRaise"/>
> >
> >    <enumeration value="actionClear"/>
> >
> >    <enumeration value="actionAck"/>
> >
> >    <enumeration value="actionUnack"/>
> >
> >   </restriction>
> >
> >  </simpleType>
> >
> >  <simpleType name="DbChangeAction">
> >
> >   <restriction base="xsd:string">
> >
> >    <enumeration value="DbActionNone"/>
> >
> >    <enumeration value="DbActionCreate"/>
> >
> >    <enumeration value="DbActionDelete"/>
> >
> >    <enumeration value="DbActionModify"/>
> >
> >   </restriction>
> >
> >  </simpleType>
> >
> >  <complexType name="Empty">
> >
> >   <sequence>
> >
> >   </sequence>
> >
> >  </complexType>
> >
> >  <complexType name="SystemRegister">
> >
> >   <sequence>
> >
> >     <element name="applianceIp" type="xsd:string" minOccurs="0"
> > maxOccurs="1" nillable="true"/>
> >
> >     <element name="mgmtIp" type="xsd:string" minOccurs="0"
> > maxOccurs="1" nillable="true"/>
> >
> >     <element name="user" type="xsd:string" minOccurs="0"
> > maxOccurs="1" nillable="true"/>
> >
> >     <element name="passwd" type="xsd:string" minOccurs="0"
> > maxOccurs="1" nillable="true"/>
> >
> >   </sequence>
> >
> >  </complexType>
> >
> >  <complexType name="AlarmInfo">
> >
> >   <sequence>
> >
> >     <element name="type" type="xsd:string" minOccurs="0"
> > maxOccurs="1" nillable="true"/>
> >
> >     <element name="name" type="xsd:string" minOccurs="0"
> > maxOccurs="1" nillable="true"/>
> >
> >     <element name="description" type="xsd:string" minOccurs="0"
> > maxOccurs="1" nillable="true"/>
> >
> >     <element name="source" type="xsd:string" minOccurs="0"
> > maxOccurs="1" nillable="true"/>
> >
> >     <element name="time" type="xsd:long" minOccurs="1"
> > maxOccurs="1"/>
> >
> >     <element name="severity" type="ns:AlarmSeverity" minOccurs="1"
> > maxOccurs="1"/>
> >
> >     <element name="id" type="xsd:int" minOccurs="1" maxOccurs="1"/>
> >
> >     <element name="count" type="xsd:int" minOccurs="1"
> > maxOccurs="1"/>
> >
> >     <element name="acknowledged" type="xsd:boolean" minOccurs="1"
> > maxOccurs="1"/>
> >
> >     <element name="clearable" type="xsd:boolean" minOccurs="1"
> > maxOccurs="1"/>
> >
> >     <element name="active" type="xsd:boolean" minOccurs="1"
> > maxOccurs="1"/>
> >
> >     <element name="serviceAffect" type="xsd:boolean" minOccurs="1"
> > maxOccurs="1"/>
> >
> >     <element name="action" type="ns:AlarmAction" minOccurs="1"
> > maxOccurs="1"/>
> >
> >   </sequence>
> >
> >  </complexType>
> >
> >  <complexType name="ArrayOfAlarmInfo">
> >
> >   <complexContent>
> >
> >    <restriction base="SOAP-ENC:Array">
> >
> >     <sequence>
> >
> >      <element name="item" type="ns:AlarmInfo" minOccurs="0"
> > maxOccurs="unbounded"/>
> >
> >     </sequence>
> >
> >     <attribute ref="SOAP-ENC:arrayType"
> > WSDL:arrayType="ns:AlarmInfo[]"/>
> >
> >    </restriction>
> >
> >   </complexContent>
> >
> >  </complexType>
> >
> >  <complexType name="DbChangeInfo">
> >
> >   <sequence>
> >
> >     <element name="type" type="ns:DbChangeAction" minOccurs="1"
> > maxOccurs="1"/>
> >
> >     <element name="object" type="xsd:string" minOccurs="0"
> > maxOccurs="1" nillable="true"/>
> >
> >     <element name="object-id" type="xsd:string" minOccurs="0"
> > maxOccurs="1" nillable="true"/>
> >
> >   </sequence>
> >
> >  </complexType>
> >
> >  <complexType name="ArrayOfDbChangeInfo">
> >
> >   <complexContent>
> >
> >    <restriction base="SOAP-ENC:Array">
> >
> >     <sequence>
> >
> >      <element name="item" type="ns:DbChangeInfo" minOccurs="0"
> > maxOccurs="unbounded"/>
> >
> >     </sequence>
> >
> >     <attribute ref="SOAP-ENC:arrayType"
> > WSDL:arrayType="ns:DbChangeInfo[]"/>
> >
> >    </restriction>
> >
> >   </complexContent>
> >
> >  </complexType>
> >
> >  <!-- operation request element -->
> >
> >  <element name="sysReg" type="ns:SystemRegister"/>
> >
> >  <!-- operation response element -->
> >
> >  <element name="uniqueId" type="xsd:int"/>
> >
> >  <!-- operation request element -->
> >
> >  <element name="mgmtIp" type="xsd:string"/>
> >
> >  <!-- operation request element -->
> >
> >  <element name="applianceIp" type="xsd:string"/>
> >
> >  <!-- operation request element -->
> >
> >  <element name="almEvent" type="ns:ArrayOfAlarmInfo"/>
> >
> >  <!-- operation response element -->
> >
> >  <element name="val" type="xsd:int"/>
> >
> >  <!-- operation request element -->
> >
> >  <element name="dbChangeEvent" type="ns:ArrayOfDbChangeInfo"/>
> >
> >  </schema>
> >
> >
> >
> > </types>
> >
> >
> >
> > <message name="registerSystem">
> >
> >  <part name="sysReg" element="ns:sysReg"/>
> >
> > </message>
> >
> >
> >
> > <message name="registerSystemResponse">
> >
> >  <part name="uniqueId" element="ns:uniqueId"/>
> >
> > </message>
> >
> >
> >
> > <message name="notifyAlarmEvent">
> >
> >  <part name="mgmtIp" element="ns:mgmtIp"/>
> >
> >  <part name="applianceIp" element="ns:applianceIp"/>
> >
> >  <part name="almEvent" element="ns:almEvent"/>
> >
> > </message>
> >
> >
> >
> > <message name="notifyAlarmEventResponse">
> >
> >  <part name="val" element="ns:val"/>
> >
> > </message>
> >
> >
> >
> > <message name="notifyAlarmEvents">
> >
> >  <part name="mgmtIp" element="ns:mgmtIp"/>
> >
> >  <part name="almEvent" element="ns:almEvent"/>
> >
> > </message>
> >
> >
> >
> > <message name="notifyAlarmEventsResponse">
> >
> >  <part name="val" element="ns:val"/>
> >
> > </message>
> >
> >
> >
> > <message name="notifyDbChangeEvent">
> >
> >  <part name="mgmtIp" element="ns:mgmtIp"/>
> >
> >  <part name="dbChangeEvent" element="ns:dbChangeEvent"/>
> >
> > </message>
> >
> >
> >
> > <message name="notifyDbChangeEventResponse">
> >
> >  <part name="val" element="ns:val"/>
> >
> > </message>
> >
> >
> >
> > <portType name="GMSPortType">
> >
> >  <operation name="registerSystem">
> >
> >  <documentation>Service definition of function
> > ns__registerSystem</documentation>
> >
> >  <input message="tns:registerSystem"/>
> >
> >  <output message="tns:registerSystemResponse"/>
> >
> >  </operation>
> >
> >  <operation name="notifyAlarmEvent">
> >
> >  <documentation>Service definition of function
> > ns__notifyAlarmEvent</documentation>
> >
> >  <input message="tns:notifyAlarmEvent"/>
> >
> >  <output message="tns:notifyAlarmEventResponse"/>
> >
> >  </operation>
> >
> >  <operation name="notifyAlarmEvents">
> >
> >  <documentation>Service definition of function
> > ns__notifyAlarmEvents</documentation>
> >
> >  <input message="tns:notifyAlarmEvents"/>
> >
> >  <output message="tns:notifyAlarmEventsResponse"/>
> >
> >  </operation>
> >
> >  <operation name="notifyDbChangeEvent">
> >
> >  <documentation>Service definition of function
> > ns__notifyDbChangeEvent</documentation>
> >
> >  <input message="tns:notifyDbChangeEvent"/>
> >
> >  <output message="tns:notifyDbChangeEventResponse"/>
> >
> >  </operation>
> >
> > </portType>
> >
> >
> >
> > <binding name="GMS" type="tns:GMSPortType">
> >
> >  <SOAP:binding style="rpc"
> > transport="http://schemas.xmlsoap.org/soap/http"/>
> >
> >  <operation name="registerSystem">
> >
> >  <SOAP:operation style="rpc" soapAction=""/>
> >
> >  <input>
> >
> >     <SOAP:body parts="parameters" use="literal"
> > namespace="urn:soap:silverpeak:com"/>
> >
> >  </input>
> >
> >  <output>
> >
> >     <SOAP:body parts="parameters" use="literal"
> > namespace="urn:soap:silverpeak:com"/>
> >
> >  </output>
> >
> >  </operation>
> >
> >  <operation name="notifyAlarmEvent">
> >
> >  <SOAP:operation style="rpc" soapAction=""/>
> >
> >  <input>
> >
> >     <SOAP:body parts="parameters" use="literal"
> > namespace="urn:soap:silverpeak:com"/>
> >
> >  </input>
> >
> >  <output>
> >
> >     <SOAP:body parts="parameters" use="literal"
> > namespace="urn:soap:silverpeak:com"/>
> >
> >  </output>
> >
> >  </operation>
> >
> >  <operation name="notifyAlarmEvents">
> >
> >  <SOAP:operation style="rpc" soapAction=""/>
> >
> >  <input>
> >
> >     <SOAP:body parts="parameters" use="literal"
> > namespace="urn:soap:silverpeak:com"/>
> >
> >  </input>
> >
> >  <output>
> >
> >     <SOAP:body parts="parameters" use="literal"
> > namespace="urn:soap:silverpeak:com"/>
> >
> >  </output>
> >
> >  </operation>
> >
> >  <operation name="notifyDbChangeEvent">
> >
> >  <SOAP:operation style="rpc" soapAction=""/>
> >
> >  <input>
> >
> >     <SOAP:body parts="parameters" use="literal"
> > namespace="urn:soap:silverpeak:com"/>
> >
> >  </input>
> >
> >  <output>
> >
> >     <SOAP:body parts="parameters" use="literal"
> > namespace="urn:soap:silverpeak:com"/>
> >
> >  </output>
> >
> >  </operation>
> >
> > </binding>
> >
> >
> >
> > <service name="GMS">
> >
> >  <documentation>Silver-Peak GMS service</documentation>
> >
> >  <port name="GMS" binding="tns:GMS">
> >
> >  <SOAP:address location="http://silverpeak.com"/>
> >
> >  </port>
> >
> > </service>
> >
> >
> >
> > </definitions>
> >
> > .



-- 
J. Daniel Kulp
Principal Engineer, IONA
dkulp@apache.org
http://www.dankulp.com/blog

Re: Need help with WSDL2Java

Posted by Benson Margulies <bi...@gmail.com>.
That's soap encoding. CXF 2.0.x doesn't support it at all. CXF 2.1 might
support it enough, I don't recall how complete is the job Dain did on it.

On Tue, Apr 8, 2008 at 2:44 PM, Syed Haq <sh...@silver-peak.com> wrote:

> Hi,
>
>
>
> We have been using Axis (1.3)'s in our project for quite some time now.
> While trying to evaluate migration effort to cxf, I'm stuck right at the
> first step - unable to generate Java source out of WSDL file.
>
>
>
> Here is the error that I get:
>
>
>
> WSDLToJava Error: Thrown by JAXB : undefined simple or complex type
> 'SOAP-ENC:Array'
>
>
>
> I'm attaching the WSDL for reference. We use GSoap to generate it out of
> C headers.
>
>
>
> When I remove the SOAP array reference, and just use the unbounded type,
> it works find and generates code that uses List.
>
> Note that ArrayOfAlarmInfo and ArrayOfDbChangeInfo are defined both as
> unbounded and bounded arrays. Removing the unbounded reference also
> doesn't have any effect.
>
> Thanks for all the help.
>
>
>
> Regards,
>
> Syed
>
>
>
> WSDL:
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <definitions name="GMS"
>
>  targetNamespace="http://silverpeak.com/gms.wsdl"
>
>  xmlns:tns="http://silverpeak.com/gms.wsdl"
>
>  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
>
>  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
>
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
>  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>
>  xmlns:ns="urn:soap:silverpeak:com"
>
>  xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/"
>
>  xmlns:MIME="http://schemas.xmlsoap.org/wsdl/mime/"
>
>  xmlns:DIME="http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/"
>
>  xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/"
>
>  xmlns="http://schemas.xmlsoap.org/wsdl/">
>
>
>
> <types>
>
>
>
>  <schema targetNamespace="urn:soap:silverpeak:com"
>
>  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
>
>  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
>
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
>  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>
>  xmlns:ns="urn:soap:silverpeak:com"
>
>  xmlns="http://www.w3.org/2001/XMLSchema"
>
>  elementFormDefault="unqualified"
>
>  attributeFormDefault="unqualified">
>
>  <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>
>  <simpleType name="soap-boolean">
>
>   <restriction base="xsd:string">
>
>    <enumeration value="false"/>
>
>    <enumeration value="true"/>
>
>   </restriction>
>
>  </simpleType>
>
>  <simpleType name="AlarmSeverity">
>
>   <restriction base="xsd:string">
>
>    <enumeration value="Critical"/>
>
>    <enumeration value="Major"/>
>
>    <enumeration value="Minor"/>
>
>    <enumeration value="Warning"/>
>
>    <enumeration value="Info"/>
>
>   </restriction>
>
>  </simpleType>
>
>  <simpleType name="AlarmAction">
>
>   <restriction base="xsd:string">
>
>    <enumeration value="actionNone"/>
>
>    <enumeration value="actionRaise"/>
>
>    <enumeration value="actionClear"/>
>
>    <enumeration value="actionAck"/>
>
>    <enumeration value="actionUnack"/>
>
>   </restriction>
>
>  </simpleType>
>
>  <simpleType name="DbChangeAction">
>
>   <restriction base="xsd:string">
>
>    <enumeration value="DbActionNone"/>
>
>    <enumeration value="DbActionCreate"/>
>
>    <enumeration value="DbActionDelete"/>
>
>    <enumeration value="DbActionModify"/>
>
>   </restriction>
>
>  </simpleType>
>
>  <complexType name="Empty">
>
>   <sequence>
>
>   </sequence>
>
>  </complexType>
>
>  <complexType name="SystemRegister">
>
>   <sequence>
>
>     <element name="applianceIp" type="xsd:string" minOccurs="0"
> maxOccurs="1" nillable="true"/>
>
>     <element name="mgmtIp" type="xsd:string" minOccurs="0"
> maxOccurs="1" nillable="true"/>
>
>     <element name="user" type="xsd:string" minOccurs="0" maxOccurs="1"
> nillable="true"/>
>
>     <element name="passwd" type="xsd:string" minOccurs="0"
> maxOccurs="1" nillable="true"/>
>
>   </sequence>
>
>  </complexType>
>
>  <complexType name="AlarmInfo">
>
>   <sequence>
>
>     <element name="type" type="xsd:string" minOccurs="0" maxOccurs="1"
> nillable="true"/>
>
>     <element name="name" type="xsd:string" minOccurs="0" maxOccurs="1"
> nillable="true"/>
>
>     <element name="description" type="xsd:string" minOccurs="0"
> maxOccurs="1" nillable="true"/>
>
>     <element name="source" type="xsd:string" minOccurs="0"
> maxOccurs="1" nillable="true"/>
>
>     <element name="time" type="xsd:long" minOccurs="1" maxOccurs="1"/>
>
>     <element name="severity" type="ns:AlarmSeverity" minOccurs="1"
> maxOccurs="1"/>
>
>     <element name="id" type="xsd:int" minOccurs="1" maxOccurs="1"/>
>
>     <element name="count" type="xsd:int" minOccurs="1" maxOccurs="1"/>
>
>     <element name="acknowledged" type="xsd:boolean" minOccurs="1"
> maxOccurs="1"/>
>
>     <element name="clearable" type="xsd:boolean" minOccurs="1"
> maxOccurs="1"/>
>
>     <element name="active" type="xsd:boolean" minOccurs="1"
> maxOccurs="1"/>
>
>     <element name="serviceAffect" type="xsd:boolean" minOccurs="1"
> maxOccurs="1"/>
>
>     <element name="action" type="ns:AlarmAction" minOccurs="1"
> maxOccurs="1"/>
>
>   </sequence>
>
>  </complexType>
>
>  <complexType name="ArrayOfAlarmInfo">
>
>   <complexContent>
>
>    <restriction base="SOAP-ENC:Array">
>
>     <sequence>
>
>      <element name="item" type="ns:AlarmInfo" minOccurs="0"
> maxOccurs="unbounded"/>
>
>     </sequence>
>
>     <attribute ref="SOAP-ENC:arrayType"
> WSDL:arrayType="ns:AlarmInfo[]"/>
>
>    </restriction>
>
>   </complexContent>
>
>  </complexType>
>
>  <complexType name="DbChangeInfo">
>
>   <sequence>
>
>     <element name="type" type="ns:DbChangeAction" minOccurs="1"
> maxOccurs="1"/>
>
>     <element name="object" type="xsd:string" minOccurs="0"
> maxOccurs="1" nillable="true"/>
>
>     <element name="object-id" type="xsd:string" minOccurs="0"
> maxOccurs="1" nillable="true"/>
>
>   </sequence>
>
>  </complexType>
>
>  <complexType name="ArrayOfDbChangeInfo">
>
>   <complexContent>
>
>    <restriction base="SOAP-ENC:Array">
>
>     <sequence>
>
>      <element name="item" type="ns:DbChangeInfo" minOccurs="0"
> maxOccurs="unbounded"/>
>
>     </sequence>
>
>     <attribute ref="SOAP-ENC:arrayType"
> WSDL:arrayType="ns:DbChangeInfo[]"/>
>
>    </restriction>
>
>   </complexContent>
>
>  </complexType>
>
>  <!-- operation request element -->
>
>  <element name="sysReg" type="ns:SystemRegister"/>
>
>  <!-- operation response element -->
>
>  <element name="uniqueId" type="xsd:int"/>
>
>  <!-- operation request element -->
>
>  <element name="mgmtIp" type="xsd:string"/>
>
>  <!-- operation request element -->
>
>  <element name="applianceIp" type="xsd:string"/>
>
>  <!-- operation request element -->
>
>  <element name="almEvent" type="ns:ArrayOfAlarmInfo"/>
>
>  <!-- operation response element -->
>
>  <element name="val" type="xsd:int"/>
>
>  <!-- operation request element -->
>
>  <element name="dbChangeEvent" type="ns:ArrayOfDbChangeInfo"/>
>
>  </schema>
>
>
>
> </types>
>
>
>
> <message name="registerSystem">
>
>  <part name="sysReg" element="ns:sysReg"/>
>
> </message>
>
>
>
> <message name="registerSystemResponse">
>
>  <part name="uniqueId" element="ns:uniqueId"/>
>
> </message>
>
>
>
> <message name="notifyAlarmEvent">
>
>  <part name="mgmtIp" element="ns:mgmtIp"/>
>
>  <part name="applianceIp" element="ns:applianceIp"/>
>
>  <part name="almEvent" element="ns:almEvent"/>
>
> </message>
>
>
>
> <message name="notifyAlarmEventResponse">
>
>  <part name="val" element="ns:val"/>
>
> </message>
>
>
>
> <message name="notifyAlarmEvents">
>
>  <part name="mgmtIp" element="ns:mgmtIp"/>
>
>  <part name="almEvent" element="ns:almEvent"/>
>
> </message>
>
>
>
> <message name="notifyAlarmEventsResponse">
>
>  <part name="val" element="ns:val"/>
>
> </message>
>
>
>
> <message name="notifyDbChangeEvent">
>
>  <part name="mgmtIp" element="ns:mgmtIp"/>
>
>  <part name="dbChangeEvent" element="ns:dbChangeEvent"/>
>
> </message>
>
>
>
> <message name="notifyDbChangeEventResponse">
>
>  <part name="val" element="ns:val"/>
>
> </message>
>
>
>
> <portType name="GMSPortType">
>
>  <operation name="registerSystem">
>
>  <documentation>Service definition of function
> ns__registerSystem</documentation>
>
>  <input message="tns:registerSystem"/>
>
>  <output message="tns:registerSystemResponse"/>
>
>  </operation>
>
>  <operation name="notifyAlarmEvent">
>
>  <documentation>Service definition of function
> ns__notifyAlarmEvent</documentation>
>
>  <input message="tns:notifyAlarmEvent"/>
>
>  <output message="tns:notifyAlarmEventResponse"/>
>
>  </operation>
>
>  <operation name="notifyAlarmEvents">
>
>  <documentation>Service definition of function
> ns__notifyAlarmEvents</documentation>
>
>  <input message="tns:notifyAlarmEvents"/>
>
>  <output message="tns:notifyAlarmEventsResponse"/>
>
>  </operation>
>
>  <operation name="notifyDbChangeEvent">
>
>  <documentation>Service definition of function
> ns__notifyDbChangeEvent</documentation>
>
>  <input message="tns:notifyDbChangeEvent"/>
>
>  <output message="tns:notifyDbChangeEventResponse"/>
>
>  </operation>
>
> </portType>
>
>
>
> <binding name="GMS" type="tns:GMSPortType">
>
>  <SOAP:binding style="rpc"
> transport="http://schemas.xmlsoap.org/soap/http"/>
>
>  <operation name="registerSystem">
>
>  <SOAP:operation style="rpc" soapAction=""/>
>
>  <input>
>
>     <SOAP:body parts="parameters" use="literal"
> namespace="urn:soap:silverpeak:com"/>
>
>  </input>
>
>  <output>
>
>     <SOAP:body parts="parameters" use="literal"
> namespace="urn:soap:silverpeak:com"/>
>
>  </output>
>
>  </operation>
>
>  <operation name="notifyAlarmEvent">
>
>  <SOAP:operation style="rpc" soapAction=""/>
>
>  <input>
>
>     <SOAP:body parts="parameters" use="literal"
> namespace="urn:soap:silverpeak:com"/>
>
>  </input>
>
>  <output>
>
>     <SOAP:body parts="parameters" use="literal"
> namespace="urn:soap:silverpeak:com"/>
>
>  </output>
>
>  </operation>
>
>  <operation name="notifyAlarmEvents">
>
>  <SOAP:operation style="rpc" soapAction=""/>
>
>  <input>
>
>     <SOAP:body parts="parameters" use="literal"
> namespace="urn:soap:silverpeak:com"/>
>
>  </input>
>
>  <output>
>
>     <SOAP:body parts="parameters" use="literal"
> namespace="urn:soap:silverpeak:com"/>
>
>  </output>
>
>  </operation>
>
>  <operation name="notifyDbChangeEvent">
>
>  <SOAP:operation style="rpc" soapAction=""/>
>
>  <input>
>
>     <SOAP:body parts="parameters" use="literal"
> namespace="urn:soap:silverpeak:com"/>
>
>  </input>
>
>  <output>
>
>     <SOAP:body parts="parameters" use="literal"
> namespace="urn:soap:silverpeak:com"/>
>
>  </output>
>
>  </operation>
>
> </binding>
>
>
>
> <service name="GMS">
>
>  <documentation>Silver-Peak GMS service</documentation>
>
>  <port name="GMS" binding="tns:GMS">
>
>  <SOAP:address location="http://silverpeak.com"/>
>
>  </port>
>
> </service>
>
>
>
> </definitions>
>
> .
>
>