Following is the xsd that i am trying to use while generating a client for SOAP Service, Eclipse is throwing an error : The prefix "xs" for element "xs:schema" is not bound.
<xs:schema version="1.0"
targetNamespace="bdo.com.ph/RemitAPI">
<xs:element name="CheckServiceResponse"
nillable="true" type="xs:string"/>
<xs:element name="apiRequest" nillable="true" type="tns:APIRequest"/>
.............................
<xs:element name="referenceNo" type="xs:string" form="qualified"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
I got this xsd from a webservice
1.1 The Schema Namespace ( xs ) The XML representation of schema components uses a vocabulary identified by the namespace name http://www.w3.org/2001/XMLSchema . For brevity, the text and examples in this specification use the prefix xs: to stand for this namespace; in practice, any prefix can be used.
xs:schema is the document (root) element of any W3C XML Schema. It's both a container for all the declarations and definitions of the schema and a place holder for a number of default values expressed as attributes.
xmlns:xs="http://www.w3.org/2001/XMLSchema"
was not added in the Schema XSD. adding it made me proceed to the next step.
xmlns:tns="http://www.bdo.com.ph/RemitAPI
was not there in the XSD, though it was present in the enclosing WSDL.
When extracting an XSD from a WSDL to local machine, the namespace references in the XSD do not get picked up from the WSDL, they need to be declared in the XSD.
This happens mainly because of the missing namespacedeclaration.
"<elem "namespace" ..xsi:nil=true.>"
will work. Basically the XML validator expects a namespace to validate against.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With