Sandy,

Thanks for the reply, but ....

I just changed the my SOAP envelope so that the root document is now, as you have suggested, like this:

<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xsi:schemaLocation=
"http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2
http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2.xsd";>



But the problem now is it does not even seem to try or perform a schema validation.
Running a sniffer, no attempt has been made by the parser to retrieve the schema document from www.3gpp.org.
But I do still get the following error, also reported on my original post:


Error: URI=null Line=8: cvc-elt.1: Cannot find the declaration of element 'SOAP-ENV:Envelope'.


The only way I could achieve some level of schema validation is by using xsi: noNamespaceSchemaLocation, as mentioned in here:


http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JAXPDOM9.html

I would prefer declaring the schemas in the XML document itself ... rather than assigning them by code.

Any ideas?

Thanks

John


[EMAIL PROTECTED] wrote:

In your instance document:



xsi:noNamespaceSchemaLocation="


http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2.xsd
">

which means that your xsd file doesn't have a target namespace. But in your
schema:



targetNamespace


="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2";


A contradiction! So Xerces is right in reporting an error. To fix it, instead of using xsi:noNamespaceSchemaLocation, use xsi:schemaLocation, like this:

xsi:schemaLocation="
http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2
http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2.xsd
"

Cheers,
Sandy Gao
Software Developer, IBM Canada
(1-905) 413-3255
[EMAIL PROTECTED]


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]






--
Jesus M. Salvo Jr.
Mobile Internet Group Pty Ltd
(formerly Softgame International Pty Ltd)
M: +61 409 126699
T: +61 2 94604777
F: +61 2 94603677

PGP Public key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xC0BA5348



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to