Print PRINT
PDF

webMethods step by step creating sample document types

 

TASK: create sample document types

OS: Windows

Platform: webMethods 7.1.2

 

Overview

 

Creating document types that represent those structures inside the Integration Server. In this exercise, you will create and use document types in Developer. One document type will be created manually, and the other imported from an existing XML schema.

 

1)    Take a sampe Purchase order file in xml format

2)    Go to Developer and create a new folder at acem.PurchaseOrder.docs folder and name it as request




3)    Rright click on the request document type -> New -> click on All choices -> Select document type click on next and give the document name as OrderRequest.




4)    Now you will be prompted with the following options.

None: If you want to create a document type manually

XML: In this case choose xml since you are importing the document schema from an xml file

DTD: If you have a file with extension DTD(Document type definition) you can select this option

XML Schema: If you have a XSD(XML Schema definition) reference file then you can select this option

Broker Document Type: To select the reference from a list of Broker document types(the documents which are available in a broker) can be taken as reference while creating a document type.




5)    Select the PORequest.xml file

Create the below XML in your local Drive and get the reference:

  <?xml version="1.0"?>

<PurchaseOrder PurchaseOrderNumber="99503" OrderDate="1999-10-20">

  <Address Type="Shipping">

    <Name>Ellen Adams</Name>

    <Street>123 Maple Street</Street>

    <City>Mill Valley</City>

    <State>CA</State>

    <Zip>10999</Zip>

    <Country>USA</Country>

  </Address>

  <Address Type="Billing">

    <Name>Tai Yee</Name>

    <Street>8 Oak Avenue</Street>

    <City>Old Town</City>

    <State>PA</State>

    <Zip>95819</Zip>

    <Country>USA</Country>

  </Address>

  <DeliveryNotes>Please leave packages in shed by driveway.</DeliveryNotes>

  <Items>

    <Item PartNumber="872-AA">

      <ProductName>Lawnmower</ProductName>

      <Quantity>1</Quantity>

      <USPrice>148.95</USPrice>

      <Comment>Confirm this is electric</Comment>

    </Item>

    <Item PartNumber="926-AA">

      <ProductName>Baby Monitor</ProductName>

      <Quantity>2</Quantity>

      <USPrice>39.98</USPrice>

      <ShipDate>1999-05-21</ShipDate>

    </Item>

  </Items>

</PurchaseOrder>

 



6)    Click on Finish




7)    It will generate the document type from the xml file taking the nodes in xml files as reference to generate the document description and corresponding strings/documents/document lists.




8)    Ignore the warning and remove the @version string from the document






9)    To manually create a document right click on the folder -> New -> document type and give a name as OrderCanonical

10)    Go the the newly created document and define new Document/Document list or variables…shown as below








 

11)    Right click on the list to expand or collapse it





Similar Blogs:

Creating a sample flow service

Creation of Indicies

Comments (0)Add Comment

Write comment
You must be logged in to post a comment. Please register if you do not have an account yet.

busy