Search code examples
javaweb-serviceswsdl

src-resolve: Cannot resolve the name 'tns1:UmciAttributeType' to a(n) 'type definition' component


"src-resolve: Cannot resolve the name 'tns1:UmciAttributeType' to a(n) 'type definition' component." This error is shown in wsdl file

 <complexType name="UmciAttribute">
<complexContent>
 <extension base="tns1:UmciRoot">
  <sequence>
   <element name="domain" nillable="true" type="xsd:string"/>
   <element name="inherited" type="xsd:boolean"/>
   <element name="keyName" nillable="true" type="xsd:string"/>
   <element name="newName" nillable="true" type="xsd:string"/>
   <element name="parent" nillable="true" type="tns1:UmciElementID"/>
   <element name="type" nillable="true" type="tns1:UmciAttributeType"/>
   <element name="value" nillable="true" type="xsd:string"/>
  </sequence>
 </extension>
</complexContent>

The error is in this line: <element name="type" nillable="true" type="tns1:UmciAttributeType"/>

and on creating a webservice from a java file the following error is shown: "IWAB0399E Error in generating Java from WSDL: java.io.IOException: Type UmciAttributeType is referenced but not defined." I think this error is due to the above mentioned error in WSDL file.


Solution

  • The error is pretty obvious. It's saying that type UmciAttributeType is not defined. It should be defined somewhere in that file.

    You also have a UmciElementID type and it isn't giving error, so it must be defined somewhere, just like UmciAttributeType should be.