Using this method | Follow this procedure |
XML File | 1. Retrieve the existing information for the flat file schema from the Integration Server namespace by invoking the pub.flatFile.generate:getFFSchemaAsXML service and write it to an XML file. For more information, seeRetrieving Namespace Data to Write
to an XML File. 2. Update the data for the flat file schema in the XML file. The XML file must conform to the XML schema: Integration Server_directory \instances\instance_name\packages\WmFlatFile\pub\FFGeneration.xsd 3. Retrieve the contents of the XML file as an XML string. For more information, see Creating a Service that Retrieves
the XML File. 4. Delete the existing flat file schema from the Integration Server namespace by invoking the pub.flatFile.generate:deleteFFSchema service. 5. Create the flat file schema in the Integration Server namespace again by invoking the pub.flatFile.generate:saveXMLAsFFSchema service. |
Mapping Data | 1. Retrieve the existing information for the flat file schema from the Integration Server namespace by invoking the pub.flatFile.generate:getFFSchemaAsXML service. The data is returned as an XML string in the FFXML variable. 2. To convert the XML string in the FFXML variable to an IData object: a. Invoke the pub.xml:xmlStringToXMLNode service to convert the XML string to an XML node. b. Invoke the pub.xml:XMLNodeToDocument service to convert the XML node to an IData object. When you invoke this service: Set the makeArrays input variable to false. Set the documentTypeName input variable to pub.flatFile.generate:FFSchema. This creates an IData object that conforms to the pub.flatFile.generate:FFSchema IS document type. For more information about the pub.xml:xmlStringToXMLNode and pub.xml:XMLNodeToDocument services, see the webMethods Integration Server Built-In Services Reference. 3. Map data to the IData object to make your changes. 4. Convert the IData object to an XML string by invoking the pub.xml:documentToXMLString service. When you invoke this service: Set the encode input variable to true. Set the documentTypeName input variable to pub.flatFile.generate:FFSchema. For more information about the pub.xml:documentToXMLString service, see the webMethods Integration Server Built-In Services Reference. 5. Delete the existing flat file schema from the Integration Server namespace by invoking the pub.flatFile.generate:deleteFFSchema service. 6. Create the flat file schema in the Integration Server namespace again by invoking the pub.flatFile.generate:saveXMLAsFFSchema service. |