IBM Support

SI 5.2.1 - Web Service schema error "cvc-elt.1: Cannot find the
declaration of element"

Troubleshooting


Problem

Attempting to use the following 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>

[{"Product":{"code":"SS3JSW","label":"IBM Sterling B2B Integrator"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"--","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"5.2.1","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
14 November 2019

UID

swg21624237