OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

ebxml-dev message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: [ebxml-dev] Re: Problem in validating the ebXML message with XSD


> From: "Vijaya Kumar" <nmvijay@SAMSUNGSDSINDIA.com>
> To: <xerces-j-user@xml.apache.org>, <xerces-j-dev@xml.apache.org>
> Cc: <sandygao@ca.ibm.com>, <Neeraj.Bajaj@Sun.COM>, <neilg@ca.ibm.com>, 
<chad.thompson@e-markets.com>, <apache@mienterprise.com>, 
<mschneller@swissonline.ch>, <ebxml-msg@lists.oasis-open.org>, 
<firefly@us.ibm.com>, <ebxml-dev@lists.oasis-open.org>, 
<ebxml-dev-digest@lists.oasis-open.org>
> 
> 
> 
> Hi all,
> 
> i am trying to validate the ebXML message with the XSD.
> 
> but i am getting the fallowing Exception

1.
The ebxml.xml file, you attached defines schemaLocation as:
xsi:schemaLocation="http://ebxml.org/project_teams/transport/envelope.xsd"

But, schemaLocation is a pair of namespace and uri. So, you must define it as:
xsi:schemaLocation="http://schemas.xmlsoap.org/soap/envelope/                    
                    http://ebxml.org/project_teams/transport/envelope.xsd"

2.
The instance file has a prefix 'eb' which is not bound to any namespace. This is 
an error.

3.
since your schema document is on the internet, maybe you have to use 
http.proxyHost and http.proxyPort. 
See: http://xml.apache.org/xerces2-j/faq-general.html#faq-6

4.
The schema document you are trying to refer is outdated and uses 
http://www.w3.org/2000/10/XMLSchema namespace instead of 
http://www.w3.org/2001/XMLSchema. 
Try http://www.oasis-open.org/committees/ebxml-msg/schema/envelope.xsd but you 
should check out for the latest and current schemas.

Hope this helps.

Ps: Avoid such a huge cross-posting.

Cheers,
Rahul.

> 
> Error:  org.xml.sax.SAXParseException: Value
> "http://ebxml.org/project_teams/transport/envelope.xsd" is not valid
> schema
> Location syntax. anyURI must be followed by schema file
> Error:  org.xml.sax.SAXParseException: General Schema Error: Grammar
> with uri: http://schemas.xmlsoap.org/soap/envelope/
>  , can not be found; schema namespace may be wrong:  Xerces supports
> schemas from the "http://www.w3.org/2001/XMLSchema"
>  namespace or the instance document's namespace may not match the
> targetNamespace of the schema.
> Error:  org.xml.sax.SAXParseException: Element type "SOAP-ENV:Envelope"
> must be declared.
> Error:  org.xml.sax.SAXParseException: Element type "SOAP-ENV:Header"
> must be declared.
> Error:  org.xml.sax.SAXParseException: The namespace prefix "eb" was not
> declared.
> Error:  org.xml.sax.SAXParseException: Element type "eb:MessageHeader"
> must be declared.
> Error:  org.xml.sax.SAXParseException: The namespace prefix "eb" was not
> declared.
> Error:  org.xml.sax.SAXParseException: The namespace prefix "eb" was not
> declared.
> ....
> ......
> ....
> and it continues............
> 
> is it the problem with my java code or it is problem with the Schema or
> Xerces api.
> 
> i am attaching the ebXML message and the Java file which i am using for
> validation.
> 
> 
> thanks and regards
> Vijay
> 
>  <<SchemaValidate.java>>  <<ebxml.xml>> 




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Search: Match: Sort by:
Words: | Help


Powered by eList eXpress LLC