You need to sign in to do that
Don't have an account?
When using wsimport against an enterprise.wsdl, getting a warning regarding 'tns:ID'
I'm trying to run wsimport against an enterprise.wsdl.
However, I am greeted to this warning:
[WARNING] src-resolve: Cannot resolve the name 'tns:ID' to a(n) 'type definition' component.
line 21 of file:/home/sfloess/Development/Solenopsis/java/src/main/resources/wsdl/enterprise.wsdl#types?schema1
The section in the enterprise.wsdl is:
<complexType name="sObject">
<sequence>
<element name="fieldsToNull" type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
<element name="Id" type="tns:ID" nillable="true"/>
</sequence>
</complexType>
I've tried to create a bindings.xml file as follows:
<bindings xmlns="http://java.sun.com/xml/ns/jaxb" version="2.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl" xsd:version="1.0">
<bindings node="//element[@type='tns:ID']">
<class name="String"/>
<property name="String"/>
</bindings>
<globalBindings generateElementProperty="false">
<javaType name="java.lang.String" xmlType="Id"
parseMethod="javax.xml.bind.DatatypeConverter.parseString"
printMethod="javax.xml.bind.DatatypeConverter.printString"/>
<javaType name="java.util.Calendar" xmlType="xsd:dateTime"
parseMethod="javax.xml.bind.DatatypeConverter.parseDateTime"
printMethod="javax.xml.bind.DatatypeConverter.printDateTime"/>
</globalBindings>
</bindings>
I've not had any luck and am hoping someone else has gotten around this with some binding... My thinking is that this element should always map to a String :)
Its not so bad during code generation, however, when calling out to a webservice - I see this warning in the logs all the time (and thus my wanting to fix the mapping).
I also tried:
<bindings node="//element[@type='tns:ID']">
<class name="java.lang.String"/>
<property name="String"/>
</bindings>
and
<bindings node="//xsd:element[@type='tns:ID']">
<class name="java.lang.String"/>
<property name="String"/>
</bindings>
The result is that I get is:
[ERROR] XPath evaluation of "//xsd:element[@type='tns:ID']" results in empty target node
line 2 of file:/home/sfloess/Development/Solenopsis/java/src/jaxws/binding.xml
[WARNING] src-resolve: Cannot resolve the name 'tns:ID' to a(n) 'type definition' component.
line 21 of file:/home/sfloess/Development/Solenopsis/java/src/main/resources/wsdl/enterprise.wsdl#types?schema1
I believe I am close - and am hoping someone else has a simple/quick fix :)