You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Sneha Nikum <sn...@gmail.com> on 2009/06/26 05:56:34 UTC

Re: cvc-elt.1: Cannot find the declaration of element 'SOAP-ENV:Envelope

Hi All,

Please help me urgently. Also I have tried validating the same SOAP response
against the same schemas with Xerces c++ and it gets validated successfully
without any errors.

Please please help me urgently as this has become a blocker issue for me.

Thanks in advance.
Sneha

On Thu, Jun 25, 2009 at 4:03 PM, Sneha Nikum <sn...@gmail.com> wrote:

> Hi All,
>
> I am totally new to xerces. I am trying to validate a SOAP response against
> its xsd files and am getting the error as
> cvc-elt.1: Cannot find the declaration of element 'SOAP-ENV:Envelope
>
> The Response .xml file is:
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="
> http://schemas.xmlsoap.org/soap/envelope/"
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"
>     xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
>
> xsi:schemaLocation="file://home/sneha/WORK/workspace/WSDLConverter/WSDLSchema.xsd"
> namespace="urn:sms"
>     >
>     <SOAP-ENV:Body>
>         <ns1:sendSMSToManyResponse xmlns:ns1="urn:SendSMSToMany">
>             <status xsi:type="xsd:string">invalid login</status>
>         </ns1:sendSMSToManyResponse>
>     </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
> GenericSchema.xsd
>
> <schema targetNamespace="http://schemas.xmlsoap.org/soap/envelope/"
>     xsi:schemaLocation="http://schemas.xmlsoap.org/soap/envelope/"
>     xmlns:tn="http://schemas.xmlsoap.org/soap/envelope/"
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>     xmlns="http://www.w3.org/2001/XMLSchema"
>     xmlns:pr1="urn:sms">
>     <xsd:import
> schemaLocation="file://home/sneha/WORK/workspace/WSDLConverter/WSDLSchema.xsd"
> namespace="urn:sms" />
>
>     <element name="Envelope" type="tn:EnvelopeType" />
>     <complexType name="EnvelopeType">
>         <sequence>
>             <element name="Body" type="tn:BodyType" />
>         </sequence>
>     </complexType>
>     <complexType name="BodyType">
>         <choice>
>             <element ref="pr1:sendSMSToManyRequest"/>
>             <element ref="pr1:sendSMSToManyResponse"/>
>     </choice>
>     </complexType>
> </schema>
>
> WSDLSchema.xsd
>
> <xsd:schema targetNamespace="urn:sms"
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="
> http://www.w3.org/2001/XMLSchema">
>     <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
>     <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
>     <element name="sendSMSToManyRequest">
>         <complexType>
>             <sequence>
>                 <element name="uid" type="xsd:string" />
>                 <element name="pwd" type="xsd:string" />
>                 <element name="phone" type="xsd:string" />
>                 <element name="msg" type="xsd:string" />
>             </sequence>
>         </complexType>
>     </element>
>     <element name="sendSMSToManyResponse">
>         <complexType>
>             <sequence>
>                 <element name="status" type="xsd:string" />
>             </sequence>
>         </complexType>
>     </element>
> </xsd:schema>
>
>
> Also the code that I am using is the same as the one Gunni has written in
> the following link:
> http://forums.sun.com/thread.jspa?threadID=250998&start=15&tstart=0
>
> I have looked on the net for various solutions for teh same, but have not
> yet been able to solve it.
>
> Please please please help.
>
>
> Thanks and Regards,
> --
> Sneha
>