cancel
Showing results for 
Search instead for 
Did you mean: 

How create Data type for my below Output format.

former_member191435
Contributor
0 Kudos

Hi Folks,

Can anyone explain me how would I create a data type for below Structure. How would I maintain Field for Every Field. Help me how would I create Data Type for Below XML format

<?xml version="1.0" encoding="UTF-8" ?>

<Command xmlns:xsi="urn:i.com:cnu:abc:xyz"

xsi:noNamespaceSchemaLocation="Command.xsd">

<WriteTagData readerID="Hello">

<Item>

<FieldList format="C:\Documents and Settings\wlee\Desktop\Format" jobName="Test1" quantity="1">

<Field name="PlantNo">4012</Field>

<Field name="PlantName">ZYX</Field>

<Field name="SKU">12000001</Field>

<Field name="Batch">4121001720</Field>

<Field name="DateCalendar">20110125</Field>

<Field name="DateJulian">025</Field>

<Field name="Qty">440</Field>

<Field name="QTYL">9</Field>

<Field name="QTYBCU">3960</Field>

<Field name="Line">A2</Field>

<Field name="Shift">2</Field>

</FieldList>

</Item>

</WriteTagData>

</Command>

Thanks,

Enivass

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member208856
Active Contributor
0 Kudos

Create Data type - Command

--> WriteTagData

---> readerID

--> Item

---> Fieldlist

-


> Format

-


> Jobname

-


> Quantity

--->Field

-


> name

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

First you need to create the data type of field list type


DT_FieldListType
-->format (attribute) (xsd:string) (optional)
-->jobName (attribute) (xsd:string) (optional)
-->quantity (attribute) (xsd:string) (optional)
-->Field (element) (xsd:string) (0..unbounded or 1..unbounded)
------>name (attribute) (xsd:string) (optional)   

afterwards, you need to create another data type of Command type


DT_Command
-->WriteTagData (element) (xsd:string) (1)
----->readerID (attribute) (xsd:string) (optional)
-->Item (0..unbounded)
----->FieldList (element) (DT_FieldListType) (1 or 0..1)

Now this depends on where you will be using the message type for this datatype e.g

If the data type is a sender. There is no need for modifications. If the data type is a target, you need to use duplicate subtree on the Field about 11 times I think.

Hope this helps,

Mark