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: RE: [ebxml-dev] Error in validating the ebXML document withthe"msg-header-2_0.xsd" schema file


Title:
Please see my embedded comments.
 
-Arvola

-----Original Message-----
From: Momidi, Ashok [
mailto:Ashok_Momidi@syntelinc.com]
Sent: Monday, March 04, 2002 10:45 PM
To: 'arvola@tibco.com'
Cc: 'ebxml-dev@lists.ebxml.org'
Subject: RE: [ebxml-dev] Error in validating the ebXML document with
the"msg-header-2_0.xsd" schema file


hai,

Thanks for ur reply,

Problem : To parse ebxml message using xsd schema.

For ur reference we r enclosing the xml and scheme files

Orginal Files

 <<msg-header-2_0.xsd>>  <<SoapebXML.xml>>

Refer below for modification files


We r using Apache Xerces parser 1.4.4 (sax)

Modification

Adding a line (
xsi:schemaLocation="
http://schemas.xmlsoap.org/soap/envelope/
msg-header-2_0.xsd" ) to SoapebXML.xml.

I took a look at your modified SoapebXML.xml and saw a number of problems:

1. The correct ebMS namespace is "http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd". Please note that the ".xsd" filename extension is actually part of the namespace URI. This namespace URI is directly resolvable to yield the desired schema, so the use of a xsi:schemaLocation attribute to specify its schema location is not strictly required.

2. The schema location for the SOAP Envelope namespace should be set to "http://www.oasis-open.org/committees/ebxml-msg/schema/envelope.xsd"

3. Your SoapebXML.xml seems to be based on the ebMS 1.0 schema; it needs to be updated to reflect the 2.0 schema before it will pass validation.

I am attaching a slightly modified SoapebXML.xml that should get you further towards passing validation.

Error :
org.xml.sax.SAXParseException: General Schema Error: Schema in
msg-header-2_0.xs
d has a different target namespace from the one specified in the instance
docume
nt :
http://schemas.xmlsoap.org/soap/envelope/.
        at
org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1213
)

Corrections :
1.Changed a line in msg-header-2_0.xsd
,targetNamespace="
http://www.oasis-open.org/committees/ebxml-msg/schema/msg-
header-2_0.xsd" to
targetNamespace="
http://www.oasis-open.org/committees/ebxml-msg/schema"

This change is incorrect. "msg-header-2_0.xsd" is actually part of the namespace URI.


2. Replaced xmlns:SOAP-ENV="
http://schemas.xmlsoap.org/soap/envelope/" in
SoapebXML.xml with
http://www.oasis-open.org/committees/ebxml-msg/schema

You cannot change the Soap Envelope namespace URI; you should change the schema location to "http://www.oasis-open.org/committees/ebxml-msg/schema/envelope.xsd"


3. Also replaced in schema location (SoapebXML.xml)
        xsi:schemaLocation="
http://schemas.xmlsoap.org/soap/envelope/
msg-header-2_0.xsd" to
       
xsi:schemaLocation="
http://www.oasis-open.org/committees/ebxml-msg/schema
msg-header-2_0.xsd"

Your syntax for xsi:schemaLocation is incorrect. It should contain pair(s) of namespace name and namespace location. Also, you must not change any of the namespace names.


4.Replaced
xmlns:tns="
http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-
2_0.xsd" in msg-header-2_0.xsd to
        xmlns:tns="
http://www.oasis-open.org/committees/ebxml-msg/schema"

Again, you must not change the namespace name.


With these modifications, when we tried to run the following erros occured

Error :
org.xml.sax.SAXParseException: Schema error: no attribute named "type" was
defin
ed in schema :
http://www.w3.org/1999/xlink.
        at
org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1221
)

After Modifications


 <<msg-header-2_0.xsd>>  <<SoapebXML.xml>>

Pl, suggest any alternative solutions or guide us with proper procedure to
validate.

if posible, with example source code.

Waiting for ur valuable reply,

Thanx

rgds

ash & sen

<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope 
	xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
	xmlns:xlink="http://www.w3.org/1999/xlink" 
	xmlns:eb="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	
xsi:schemaLocation="http://schemas.xmlsoap.org/soap/envelope/ http://www.oasis-open.org/committees/ebxml-msg/schema/envelope.xsd"
	
	>  
<SOAP-ENV:Header>  <eb:MessageHeader SOAP-ENV:mustUnderstand="1" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" eb:version="1.0">              <eb:From>                  <eb:PartyId context="uriReference">urn:bobsbike.com</eb:PartyId>              </eb:From>              <eb:To>                  <eb:PartyId context="uriReference">urn:sues-sprockets.com</eb:PartyId>              </eb:To>              <eb:CPAId>yoursandmycpa</eb:CPAId>              <eb:ConversationId>2806174.1015306897186.apache-soap.pc244</eb:ConversationId>              <eb:Service>OrderProcessing</eb:Service>              <eb:Action>ProcessNewOrder</eb:Action>              <eb:MessageData>                  <eb:MessageId>3441047.1015306897847.apache-soap.pc244</eb:MessageId>                  <eb:Timestamp>2002-03-05T11:11:37Z</eb:Timestamp>                  <eb:RefToMessageId/>              </eb:MessageData>              <eb:QualityOfServiceInfo eb:deliverySemantics="BestEffort"/>          </eb:MessageHeader>  <Signature Id="S1" xmlns="http://www.w3.org/2000/09/xmldsig#">              <SignedInfo>                  <CanonicalizationMethod Algorithm="http://www.w3.org/TR/2000/WD-xml-c14n-20001011"/>                  <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"/>                  <Reference URI="">                      <Transforms>                          <Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">                              <XPath xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">  	not(ancestor-or-self::dsig:Signature[@Id='S1'] or              ancestor-or-self::eb:TraceHeaderList)  	</XPath>                          </Transform>                      </Transforms>                      <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>                      <DigestValue>nyelHsTnI+XnkCT/VpNQ1eV9WMk=</DigestValue>                  </Reference>                  <Reference URI="cid:5383591.1015306897367.apache-soap.pc244">                      <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>                      <DigestValue>HKcsgXTp8+HKzk24gDfxOzHVm6o=</DigestValue>                  </Reference>              </SignedInfo>              <SignatureValue>      GnGmxG4pnBkPH6xXkC8b5d1Iqz1FMtKsXcpA2b3ROESkec/Tez2ArA==    </SignatureValue>    <KeyInfo>      <KeyValue>        <DSAKeyValue>          <P>            /X9TgR11EilS30qcLuzk5/YRt1I870QAwx4/gLZRJmlFXUAiUftZPY1Y+r/F9bow9s            ubVWzXgTuAHTRv8mZgt2uZUKWkn5/oBHsQIsJPu6nX/rfGG/g7V+fGqKYVDwT7g/bT            xR7DAjVUE1oWkTL2dfOuK2HXKu/yIgMZndFIAcc=          </P>          <Q>l2BQjxUjC8yykrmCouuEC/BYHPU=</Q>          <G>            9+GghdabPd7LvKtcNrhXuXmUr7v6OuqC+VdMCz0HgmdRWVeOutRZT+ZxBxCBgLRJFn            Ej6EwoFhO3zwkyjMim4TwWeotUfI0o4KOuHiuzpnWRbqN/C/ohNWLx+2J6ASQ7zKTx            vqhRkImog9/hWuWfBpKLZl6Ae1UlZAFMO/7PSSo=          </G>          <Y>            yk+LHw2xcMZSbE0KRBOLMGDerRKC8wB3Ur2M2Cf2onAQdfyMoEqTnEu27hgHAsQUXq            lT4t0e7J07cA8Y4MFb4nvogo8vOxEqNDyRnTDk0LfJElfQXVckkZbZaLlM8adeev8/            /Mqp0bBiW6KSO6MGVE3Mf+mZ6MDtpt2WzAcOUlc=          </Y>        </DSAKeyValue>      </KeyValue>      <X509Data>        <X509IssuerSerial>          <X509IssuerName>CN=John Doe, OU=Technology Development, O=example.com, L=nowhere, ST=atall, C=US</X509IssuerName>          <X509SerialNumber>1014638128</X509SerialNumber></X509IssuerSerial>        <X509SubjectName>CN=John Doe, OU=Technology Development, O=example.com, L=nowhere, ST=atall, C=US</X509SubjectName>        <X509Certificate>  MIIDJzCCAuUCBDx6JjAwCwYHKoZIzjgEAwUAMHkxCzAJBgNVBAYTAlVTMQ4wDAYDVQQIEwVhdGFs  bDEQMA4GA1UEBxMHbm93aGVyZTEUMBIGA1UEChMLZXhhbXBsZS5jb20xHzAdBgNVBAsTFlRlY2hu  b2xvZ3kgRGV2ZWxvcG1lbnQxETAPBgNVBAMTCEpvaG4gRG9lMB4XDTAyMDIyNTExNTUyOFoXDTAy  MDUyNjExNTUyOFoweTELMAkGA1UEBhMCVVMxDjAMBgNVBAgTBWF0YWxsMRAwDgYDVQQHEwdub3do  ZXJlMRQwEgYDVQQKEwtleGFtcGxlLmNvbTEfMB0GA1UECxMWVGVjaG5vbG9neSBEZXZlbG9wbWVu  dDERMA8GA1UEAxMISm9obiBEb2UwggG4MIIBLAYHKoZIzjgEATCCAR8CgYEA/X9TgR11EilS30qc  Luzk5/YRt1I870QAwx4/gLZRJmlFXUAiUftZPY1Y+r/F9bow9subVWzXgTuAHTRv8mZgt2uZUKWk  n5/oBHsQIsJPu6nX/rfGG/g7V+fGqKYVDwT7g/bTxR7DAjVUE1oWkTL2dfOuK2HXKu/yIgMZndFI  AccCFQCXYFCPFSMLzLKSuYKi64QL8Fgc9QKBgQD34aCF1ps93su8q1w2uFe5eZSvu/o66oL5V0wL  PQeCZ1FZV4661FlP5nEHEIGAtEkWcSPoTCgWE7fPCTKMyKbhPBZ6i1R8jSjgo64eK7OmdZFuo38L  +iE1YvH7YnoBJDvMpPG+qFGQiaiD3+Fa5Z8GkotmXoB7VSVkAUw7/s9JKgOBhQACgYEAyk+LHw2x  cMZSbE0KRBOLMGDerRKC8wB3Ur2M2Cf2onAQdfyMoEqTnEu27hgHAsQUXqlT4t0e7J07cA8Y4MFb  4nvogo8vOxEqNDyRnTDk0LfJElfQXVckkZbZaLlM8adeev8//Mqp0bBiW6KSO6MGVE3Mf+mZ6MDt  pt2WzAcOUlcwCwYHKoZIzjgEAwUAAy8AMCwCFH1JnduIO6vBvs8KeDszbkShh5hTAhRdhsNEL2Or  z+cj0QnozvZNdSHS+A==        </X509Certificate>      </X509Data>    </KeyInfo>          </Signature>  </SOAP-ENV:Header>  <SOAP-ENV:Body>  <eb:Manifest eb:version="1.0" id="Mani01">              <eb:Reference xlink:href="5383591.1015306897367.apache-soap.pc244" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:role="ProcessNewOrder" xlink:type="simple"/>          </eb:Manifest>  </SOAP-ENV:Body>  </SOAP-ENV:Envelope>


[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