You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Ma...@Dell.com on 2008/02/10 15:40:28 UTC

XSD Complex Type Preventing Client Proxy Generation

I have a WSDL from a MS WebService with a complex type defined as:

<s:complexType name="ArrayOfVendorItem">
        <s:sequence>
          <s:element minOccurs="0" maxOccurs="unbounded"
name="VendorItem" nillable="true" type="tns:VendorItem" />
        </s:sequence>
      </s:complexType>
      <s:complexType name="VendorItem">
        <s:sequence>
          <s:element minOccurs="0" maxOccurs="1" name="VENDOR_ID"
type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="PUR_LOC"
type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="LOCATION"
type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="VENDOR_PART_NUM"
type="s:string" />
        </s:sequence>
      </s:complexType>

With an import as:

 <s:schema targetNamespace="http://.....com/AbstractTypes">
      <s:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
      <s:complexType name="StringArray">
        <s:complexContent mixed="false">
          <s:restriction base="soapenc:Array">
            <s:sequence>
              <s:element minOccurs="0" maxOccurs="unbounded"
name="String" type="s:string" />
            </s:sequence>
          </s:restriction>
        </s:complexContent>
      </s:complexType>
    </s:schema>

When I attempt to generate a client proxy using the WsdlToJava tool I
get the following exception:
wsdltojava error : undefined simple or complex type soapenc:array

Any idea on why this is occurring and how to resolve this is greatly
appreciated.


Mark 

Re: XSD Complex Type Preventing Client Proxy Generation

Posted by Anne Thomas Manes <at...@gmail.com>.
My guess is that you will resolve the problem by declaring the
"soapenc" namespace.
Please be aware that Axis2 does not currently support SOAP Encoding.
You might be better off using Axis rather than Axis2.

Anne

On Feb 10, 2008 2:30 PM, Simone Maletta <si...@alice.it> wrote:
>
>
> Hy Mark,
>     I noticed two thing in your shema:
>    1) the error was reported using array while in the schema you used Array
> 2) I don't found something like xmlns:soapenc=""
>
> Try to look this things or if you thing that there's soething wrong in your
> schema use an xml validator.
> I hope to be helped you, regards
> Simone
>
>
>
> ----- Original Message -----
>
> From: Mark_Carter@Dell.com
> To: axis-user@ws.apache.org
> Sent: Sunday, February 10, 2008 3:40 PM
> Subject: XSD Complex Type Preventing Client Proxy Generation
>
>
>
> I have a WSDL from a MS WebService with a complex type defined as:
>
> <s:complexType name="ArrayOfVendorItem">
>         <s:sequence>
>           <s:element minOccurs="0" maxOccurs="unbounded" name="VendorItem"
> nillable="true" type="tns:VendorItem" />
>         </s:sequence>
>       </s:complexType>
>       <s:complexType name="VendorItem">
>         <s:sequence>
>           <s:element minOccurs="0" maxOccurs="1" name="VENDOR_ID"
> type="s:string" />
>           <s:element minOccurs="0" maxOccurs="1" name="PUR_LOC"
> type="s:string" />
>           <s:element minOccurs="0" maxOccurs="1" name="LOCATION"
> type="s:string" />
>           <s:element minOccurs="0" maxOccurs="1" name="VENDOR_PART_NUM"
> type="s:string" />
>         </s:sequence>
>       </s:complexType>
>
> With an import as:
>
>  <s:schema targetNamespace="http://.....com/AbstractTypes">
>       <s:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>       <s:complexType name="StringArray">
>         <s:complexContent mixed="false">
>           <s:restriction base="soapenc:Array">
>             <s:sequence>
>               <s:element minOccurs="0" maxOccurs="unbounded" name="String"
> type="s:string" />
>             </s:sequence>
>           </s:restriction>
>         </s:complexContent>
>       </s:complexType>
>     </s:schema>
>
> When I attempt to generate a client proxy using the WsdlToJava tool I get
> the following exception:
> wsdltojava error : undefined simple or complex type soapenc:array
>
> Any idea on why this is occurring and how to resolve this is greatly
> appreciated.
>
>
> Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: XSD Complex Type Preventing Client Proxy Generation

Posted by Simone Maletta <si...@alice.it>.
XSD Complex Type Preventing Client Proxy GenerationHy Mark,
    I noticed two thing in your shema:
   1) the error was reported using array while in the schema you used Array
2) I don't found something like xmlns:soapenc=""

Try to look this things or if you thing that there's soething wrong in your schema use an xml validator.
I hope to be helped you, regards
Simone

----- Original Message ----- 
  From: Mark_Carter@Dell.com 
  To: axis-user@ws.apache.org 
  Sent: Sunday, February 10, 2008 3:40 PM
  Subject: XSD Complex Type Preventing Client Proxy Generation


  I have a WSDL from a MS WebService with a complex type defined as: 

  <s:complexType name="ArrayOfVendorItem"> 
          <s:sequence> 
            <s:element minOccurs="0" maxOccurs="unbounded" name="VendorItem" nillable="true" type="tns:VendorItem" /> 
          </s:sequence> 
        </s:complexType> 
        <s:complexType name="VendorItem"> 
          <s:sequence> 
            <s:element minOccurs="0" maxOccurs="1" name="VENDOR_ID" type="s:string" /> 
            <s:element minOccurs="0" maxOccurs="1" name="PUR_LOC" type="s:string" /> 
            <s:element minOccurs="0" maxOccurs="1" name="LOCATION" type="s:string" /> 
            <s:element minOccurs="0" maxOccurs="1" name="VENDOR_PART_NUM" type="s:string" /> 
          </s:sequence> 
        </s:complexType> 

  With an import as: 

   <s:schema targetNamespace="http://.....com/AbstractTypes"> 
        <s:import namespace="http://schemas.xmlsoap.org/soap/encoding/" /> 
        <s:complexType name="StringArray"> 
          <s:complexContent mixed="false"> 
            <s:restriction base="soapenc:Array"> 
              <s:sequence> 
                <s:element minOccurs="0" maxOccurs="unbounded" name="String" type="s:string" /> 
              </s:sequence> 
            </s:restriction> 
          </s:complexContent> 
        </s:complexType> 
      </s:schema> 

  When I attempt to generate a client proxy using the WsdlToJava tool I get the following exception: 
  wsdltojava error : undefined simple or complex type soapenc:array 

  Any idea on why this is occurring and how to resolve this is greatly appreciated. 



  Mark