Newbie Question

This should cover W3C XML Schema, Relax NG and DTD related problems.
kumarmenon
Posts: 2

Newbie Question

Mon Jun 02, 2008 7:02 pm

Hi

Can somebody help a noob. Note sure what the problem is with the xsd. It does not validate the correct xml properly

Can some point out the obvious error

-Arun

-------------------XML---------------------
<?xml version='1.0' encoding='utf-8' ?>
<jdeResponse xmlns="urn:jde/services/InvokeJDEBusinessFunction"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:jde/services/InvokeJDEBusinessFunction ../../Documents%20and%20Settings/amenon/Desktop/jderesponse.xsd"
pwd="AM20water"
type="callmethod"
user="AMENON"
session="2302.1211509547.3"
environment="JPY7334">
<callMethod app='BSE' name='InsertItemMasterRow' runOnError='no'>
<returnCode code='2'/>
<params>
<param name='mnShortItemNumber'>98253</param>
<param name='szSecondItemNumber'>TESTxxxxxx</param>
<param name='szThirdItemNumber'>TESTxxxxxx</param>
<param name='szItemDescription1'>TESTxxxxxx</param>
<param name='szItemDescription2'>TESTsfhfksdjhkjdfs</param>
<param name='szPrimaryUnitOfMeasure'>EA</param>
<param name='cStockingType'>S</param>
<param name='szLineType'></param>
<param name='szGLClassCode'>WS</param>
<param name='cSuppressErrorMessages'></param>
<param name='szErrorMessageID'>1021</param>
<param name='cLevelPurchasingPrice'></param>
<param name='szProgramId'></param>
<param name='cActionCode'>A</param>
<param name='szSalesCatalogSection'></param>
<param name='szSubSection'></param>
<param name='szSalesCategoryCode3'></param>
<param name='szSalesCategoryCode4'></param>
<param name='szSalesCategoryCode5'></param>
<param name='szCommodityClass'></param>
<param name='szCommoditySubClass'></param>
<param name='szVendorRebateCode'></param>
<param name='szMasterPlanningFamily'></param>
<param name='szPurchasingrCategoryCode5'></param>
<param name='mnBuyerNumber'>0</param>
<param name='mnLeadtimeLevel'>0</param>
<param name='mnPlannerNumber'>0</param>
<param name='cOrderPolicyCode'></param>
<param name='cIssueTypeCode'></param>
<param name='cErrorCode'>1</param>
<param name='cEv01LanguageType'></param>
</params>
<errors>
<error code='1021'>Error: Duplicate Records Not Allowed</error>
</errors>
</callMethod>
</jdeResponse>

-------------------XSD-------------------------
<?xml version="1.0" encoding="UTF-8" ?><!-- Generated by the iBSE 2008-04-30T16:00:23Z -->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:jde/services/InvokeJDEBusinessFunction"
xmlns:ns="urn:jde/services/InvokeJDEBusinessFunction"
elementFormDefault="qualified">
<xsd:element name="jdeResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="callMethod">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="returnCode">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="code" type="xsd:string"
use="required"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="errors" minOccurs="0" >
<xsd:complexType>
<xsd:sequence>
<xsd:element name="error" maxOccurs="unbounded">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="code" type="xsd:string"
use="optional"/>
<xsd:attribute name="name" type="xsd:string"
use="optional"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="params">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="param" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="name" use="required">
</xsd:attribute>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="app" type="xsd:string" use="optional"/>
<xsd:attribute name="returnNullData" type="xsd:string" use="optional"/>
<xsd:attribute name="runOnError" type="xsd:string" use="optional"/>
<xsd:attribute name="trans" type="xsd:string" use="optional"/>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="type" type="xsd:string" fixed="callmethod"/>
<xsd:attribute name="user" type="xsd:string" use="optional"/>
<xsd:attribute name="role" type="xsd:string" use="optional"/>
<xsd:attribute name="session" type="xsd:string" use="optional"/>
<xsd:attribute name="sessionidle" type="xsd:string" use="optional"/>
<xsd:attribute name="environment" type="xsd:string" use="optional"/>
<xsd:attribute name="pwd" type="xsd:string" use="optional"/>
</xsd:complexType>
</xsd:element>
</xsd:schema>
----------------------------------------------------------
kumarmenon
Posts: 2

Re: Newbie Question

Mon Jun 02, 2008 7:20 pm

No worries. Someone was kind enough to point out that my order of the error element was wrong

-Arun

Return to “XML Schemas”

Who is online

Users browsing this forum: No registered users and 2 guests