Unable to use READ-XMLSCHEMA command

Posted by pisiith on 14-Oct-2010 02:07

I've try the following command to read the xml schema file.

--------------------------------------------------------------------------------------

define variable retOK as logical no-undo.
define variable cSourceType as character no-undo.
define variable lOverrideDefaultMapping as logical no-undo.
define variable cFieldTypeMapping as character no-undo.
define variable cVerifySchemaMode as character no-undo.
DEFINE VARIABLE iXSDFile AS CHAR NO-UNDO.

define variable hDataset as handle no-undo.

create dataset hDataset.

ASSIGN
    cSourceType = "file"
    lOverrideDefaultMapping = NO
    cFieldTypeMapping = ?
    cVerifySchemaMode = ?.
iXSDFile = "D:\issueInventory-eB_2.xsd".
retOK = hDataset:READ-XMLSCHEMA (cSourceType,
    iXSDFile,
    lOverrideDefaultMapping,
    cFieldTypeMapping,
    cVerifySchemaMode) no-error.
message "retOK:" retOK ":" iXSDFile view-as alert-box.

--------------------------------------------------------------------------------------

I've try with 2 xsd files.

File issueInventory-eB_2.xsd is OK can be read.

but File receiveInventory-eB_2.xsd is not OK.

Both file contains almost the same structure.

I don't know why one file can be read but another cannot

I've try both 10.2A and 10.2B environment but result is the same.

I just wondering that any tag in file can corrpupt the read process ?

[View:~/cfs-file.ashx/__key/communityserver-discussions-components-files/19/issueInventory_2D00_eB_5F00_2.xsd.zip:550:0]

[View:~/cfs-file.ashx/__key/communityserver-discussions-components-files/19/receiveInventory_2D00_eB_5F00_2.xsd.zip:550:0]

All Replies

Posted by mresnick on 14-Oct-2010 07:51

What error message do you get when the READ-XML( ) schema call fails?

Posted by pisiith on 14-Oct-2010 21:47

when I take no-error option out.

it shows

"Index name is limited to 32 characters.(13123)"

"Unable to create Temp-Table or dataset schema from XML Schema (13032)"

Posted by Robin Brown on 15-Oct-2010 07:26

READ-XMLSCHEMA tries to create unique temp-table indexes for the xsd:unique constructs.  In the schema that doesn't work, the name attributes are longer than 32 characters, which is the limit for a temp-table index name.

For example:

<xsd:unique name="receiveInventory_PK_inventoryReceipt">

Posted by bdearborn on 15-Oct-2010 07:28

Hi,

I am currently out of the office on vacation and will be returning to

the office on September 29,2010. If you need immediate assistance

please contact Jim Stein at jstein@cornerstar.com.

Thanks,

Bryn Dearborn

503-805-8598

--

Bryn Dearborn

503-928-8115 (Work)

503-805-8598 (Cell)

Cornerstar

This thread is closed