Hi Sneha,
   Could you please let us know:

1. What is your input XML (I guess it's Response.xml)? but please confirm..
2. What XSD document you are using to validate this XML? What is it's location?
3. How are you performing the validation? Do you use some API? If yes,
which API are you using?
4. Which version of Xerces-J are you using?

After we could know the answers to these questions, it would be easy
to reproduce the problem, and suggest something.

On Thu, Jun 25, 2009 at 4:03 PM, Sneha Nikum<snehani...@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



-- 
Regards,
Mukul Gandhi

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org
For additional commands, e-mail: j-users-h...@xerces.apache.org

Reply via email to