NET WSDL generates WebService exception: undefined simple or complex type ' soapenc:array '

Source: Internet
Author: User

The error code is as follows:

e:\>wsimport-keep service.xml

Parsing WSDL ...

[WARNING] Src-resolve:cannot resolve the name ' Soapenc:array ' to A (n) ' type definition ' component.

Line 505 of File:/e:/service1.xml#types?schema2

[ERROR] undefined simple or complex type ' soapenc:array '

Line 505 of File:/e:/service1.xml


Cause of Error:

NET over the WSDL to the use of the specification is too low, generated after the original specification, so that the generated code does not adapt to the use of our Java side.


<s:schema targetnamespace= "Http://tempuri.org/AbstractTypes" >      <s:import namespace= "/http schemas.xmlsoap.org/soap/encoding/"/>       <s:complextype name=" arrayofstring ">        <s:sequence>          <s:element minoccurs= "0" maxoccurs= "unbounded" name= "string" nillable= "true" type= "s:string"/>        </ s:sequence>      </s:complexType>  <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>

After the change:

<s:schema targetnamespace= "Http://tempuri.org/AbstractTypes" >      <s:import namespace= "/http schemas.xmlsoap.org/soap/encoding/"/>  <s:complextype name=" arrayofstring ">        <s:sequence>          <s:element minoccurs= "0" maxoccurs= "unbounded" name= "string" nillable= "true" type= "s:string"/>        </ s:sequence>      </s:complexType>    </s:schema>

Re-execute: Wsimport-keepService.xml successfully generated.


The solution is from an English web site found, so set for translation, unfortunately now can not find the site of the tat!



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.