Technote (troubleshooting)
Problem(Abstract)
Attempting to use the following schema:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.yourcompany.com/XMLSchema" elementFormDefault="qualified">
<xsd:element name="ELEMENTTYPEEXAMPLE">
<xsd:complexType>
<xsd:all>
<xsd:element name="ACTION" type="xsd:string" minOccurs="1"/>
<xsd:element name="FLAG" type="xsd:string"/>
<xsd:element name="EXAMPLE1" type="xsd:string"/>
<xsd:element name="EXAMPLE2" type="xsd:integer"/>
<xsd:element name="EXAMPLE3" type="xsd:string"/>
<xsd:element name="EXAMPLE4" type="xsd:integer"/>
</xsd:all>
</xsd:complexType>
</xsd:element>
</xsd:schema>
The schema checks in with no issues and a WSDL is created. The option of "Validate with Input Schema" is set when doing the Schema mapping step.
When a SOAP request is sent to SI using the WSDL generated, the request fails with:
"cvc-elt.1: Cannot find the
declaration of element 'xs:ACTION'".
Even though the request does contain the ACTION element.
Resolving the problem
Apply SI 5.2.4.1 for the fix on this issue.
This reworked schema worked. However, it is recommended the fix pack is applied. (notice how the minOccurs restriction is removed for this workaround)
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.yourcompany.com/XMLSchema" elementFormDefault="qualified">
<xsd:element name="ELEMENTTYPEEXAMPLE">
<xsd:complexType>
<xsd:all>
<xsd:element name="ACTION" type="xsd:string">
<xsd:element name="FLAG" type="xsd:string"/>
<xsd:element name="EXAMPLE1" type="xsd:string"/>
<xsd:element name="EXAMPLE2" type="xsd:integer"/>
<xsd:element name="EXAMPLE3" type="xsd:string"/>
<xsd:element name="EXAMPLE4" type="xsd:integer"/>
</xsd:all>
</xsd:complexType>
</xsd:element>
<xsd:element name="ACTION" type="xsd:string"/>
<xsd:element name="FLAG" type="xsd:string"/>
<xsd:element name="EXAMPLE1" type="xsd:string"/>
<xsd:element name="EXAMPLE2" type="xsd:integer"/>
<xsd:element name="EXAMPLE3" type="xsd:string"/>
<xsd:element name="EXAMPLE4" type="xsd:integer"/>
</xsd:schema>
Rate this page:
Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.