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!