You are on page 1of 36

WmEDIsamples Service Documentation

VERSION 6.5.2

webMethods, Inc.
South Tower
3877 Fairfax Ridge Road
Fairfax, VA 22030
USA
703.460.2500
http://www.webmethods.com
webMethods Access, webMethods Administrator, webMethods Broker, webMethods Dashboard, webMethods Developer, webMethods Fabric, webMethods 
Glue, webMethods Installer, webMethods Integration Server, webMethods Mainframe, webMethods Manager, webMethods Modeler, webMethods Monitor, 
webMethods Optimize, webMethods Portal, webMethods Servicenet, webMethods Trading Networks, and webMethods Workflow are trademarks of 
webMethods, Inc. webMethods and the webMethods logo are registered trademarks of webMethods, Inc. 
Acrobat and Adobe are registered trademarks, and Reader is a trademark of Adobe Systems Incorporated. Amdocs is a registered trademark, and ClarifyCRM 
is a trademark of Amdocs. Ariba is a registered trademark of Ariba, Inc. BEA, BEA WebLogic Server, Jolt, and Tuxedo are registered trademarks, and BEA 
WebLogic Platform is a trademark of BEA Systems, Inc. Action Request System, BMC Software, PATROL, and Remedy are registered trademarks of BMC 
Software, Inc. BroadVision is a registered trademark of BroadVision, Inc. ChemeStandards and CIDX are trademarks of Chemical Industry Data Exchange. 
Unicenter is a registered trademark of Computer Associates International, Inc. PopChart is a registered trademark of CORDA Technologies, Inc. Kenan and 
Arbor are registered trademarks of CSG Systems, Inc. Data Connection and SNAP‐IX are registered trademarks of Data Connection Corporation. DataDirect, 
DataDirect Connect, and SequeLink are registered trademarks of DataDirect Technologies. D&B and D‐U‐N‐S are registered trademarks of Dun & Bradstreet 
Corporation. Entrust is a registered trademark of Entrust, Inc. papiNet is a registered trademark of the European Union and the United States. Financial 
Information eXchange, F.I.X, and F.I.X Protocol are trademarks of FIX Protocol Ltd. UCCnet and eBusinessReady are registered trademarks, and 1SYNC and 
Transora are trademarks of GS1 US. Hewlett‐Packard, HP, HP‐UX, OpenView, PA‐RISC, and SNAplus2 are trademarks of Hewlett‐Packard Company. i2 is a 
registered trademark of i2 Technologies, Inc. AIX, AS/400, CICS, DB2, Domino, IBM, Informix, Infoprint, Lotus, Lotus Notes, MQSeries, OS/390, OS/400, 
RACF, RS/6000, SQL/400, S/390, System/390, VTAM, z/OS, and WebSphere are registered trademarks; and Communications System for Windows NT, DB2 
Universal Database, IMS, MVS, and SQL/DS are trademarks of IBM Corporation. InnoDB is a trademark of Innobase Oy. Itanium is a registered trademark of 
Intel Corporation. JBoss is a registered trademark, and JBoss Group is a trademark of Jboss, Inc. Linux is a registered trademark of Linus Torvalds. W3C is a 
registered trademark, and X Window System is a trademark of the Massachusetts Institute of Technology. MetaSolv is a registered trademark of Metasolv 
Software, Inc. ActiveX, Microsoft, Outlook, Visual Basic, Windows, and Windows NT are registered trademarks; and Windows Server is a trademark of 
Microsoft Corporation.  Six Sigma is a registered trademark of Motorola, Inc. Firefox is a registered trademark, and Mozilla is a trademark of the Mozilla 
Foundation. MySQL is a registered trademark of MySQL AB. nCipher is a trademark of nCipher Corporation Ltd. Teradata is a registered trademark of NCR 
International, Inc. Netscape is a registered trademark of Netscape Communications Corporation. SUSE is a registered trademark of Novell, Inc. ServletExec is 
a registered trademark, and New Atlanta is a trademark of New Atlanta Communications, LLC. CORBA is a registered trademark of Object Management 
Group, Inc. JD Edwards, OneWorld, Oracle, PeopleSoft, Siebel, and Vantive are registered trademarks, and PeopleSoft Pure Internet Architecture and 
WorldSoftware are trademarks of Oracle Corporation. Infranet and Portal are trademarks of Portal Software, Inc. Red Hat is a registered trademark of Red 
Hat, Inc. PIP and RosettaNet are trademarks of RosettaNet, a non‐profit organization. SAP and R/3 are registered trademarks of SAP AG. SWIFT and 
SWIFTNet are registered trademarks of Society for Worldwide Interbank Financial Telecommunication SCRL. SPARC and SPARCStation are registered 
trademarks of SPARC International, Inc. SSA is a registered trademark, and Baan and SSA Global are trademarks of SSA Global Technologies, Inc. EJB, 
Enterprise JavaBeans, Java, JavaServer, JDBC, JSP, J2EE, Solaris, Sun, and Sun Microsystems are registered trademarks; and Java Naming and Directory 
Interface, SOAP with Attachments API for Java, JavaServer Pages, and SunSoft are trademarks of Sun Microsystems, Inc. Sybase is a registered trademark of 
Sybase, Inc. VERITAS is a registered trademark, and VERITAS Cluster Server is a trademark of Symantec Corporation. UNIX is a registered trademark of The 
Open Group. Unicode is a trademark of Unicode, Inc. VeriSign is a registered trademark of Verisign, Inc.
All other marks are the property of their respective owners.  
Copyright © 2003‐2006 by webMethods, Inc. All rights reserved, including the right of reproduction in whole or in part in any form.

Document ID: 20070406


CHAPTER 1
WmEDIsamples Service Documentation

EDIFFSchema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Tutorial.EDItoXML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Tutorial.EDItoXML:segmentMapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

Tutorial.FlatFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

Tutorial.Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

Tutorial.XMLtoEDI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Tutorial.XMLtoEDI.segmentMapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

Tutorial.properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

Sample Flow Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

Sample Business Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

wm.EDIINT.sample . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

Note: The WmEDIsamples package is located in the Knowledge Base Samples area 
on the Advantage Web site at http://advantage.webmethods.com. The samples in 
this package have been certified, meaning that they have been tested by 
webMethods.

WmEDIsamples Service Documentation 1


CHAPTER 1 WmEDIsamples Service Documentation

EDIFFSchema
The EDIFFSchema folder contains flat file schemas and dictionaries that other services in the 
WmEDIsamples package can use to validate EDI documents, as well as, some sample flat file schemas.

EDIFFSchema.FlatFile:CSVSchema
Sample flat file schema for a comma separated values (CSV) flat file. 
For more information about flat file schemas and dictionaries, see the Flat File Schema Developer’s Guide.

EDIFFSchema.FlatFile:Dictionary
Sample flat file schema dictionary. 
For more information about flat file schemas and dictionaries, see the Flat File Schema Developer’s Guide.

EDIFFSchema.FlatFile:Example1
Sample flat file schema. 
For more information about flat file schemas and dictionaries, see the Flat File Schema Developer’s Guide.

EDIFFSchema.FlatFile:Example2
Sample flat file schema. 
For more information about flat file schemas and dictionaries, see the Flat File Schema Developer’s Guide.

EDIFFSchema.UNEDIFACT.V98A:Dictionary
Sample flat file schema dictionary. 
For more information about flat file schemas and dictionaries, see the Flat File Schema Developer’s Guide.

EDIFFSchema.UNEDIFACT.V98A:TORDERS
Flat file schema used to parse and validate a UN/EDIFACT 98A ORDERS document.

2 WmEDIsamples Service Documentation


EDIFFSchema.X12.V4010:Dictionary

EDIFFSchema.X12.V4010:Dictionary
Sample flat file schema dictionary. 
For more information about flat file schemas and dictionaries, see the Flat File Schema Developer’s Guide.

EDIFFSchema.X12.V4010:T810
Flat file schema is used to parse and validate an ANSI X12, version 4010, 810 document.

EDIFFSchema.X12.V4010:T850
Flat file schema used to parse and validate an ANSI X12, version 4010, 850 document.

EDIFFSchema.X12.V4010:T997
Flat file schema used to parse and validate an ANSI X12, version 4010, 997 document.

WmEDIsamples Service Documentation 3


CHAPTER 1 WmEDIsamples Service Documentation

Tutorial.EDItoXML
The services in this folder illustrate how to map an EDI document to an XML document.

Tutorial.EDItoXML:EDItoXMLPOMap
Illustrates how an to convert an EDI document into a different format (in this case, an XML PO).

Input Parameters

EDIValues Document The source EDI transaction set.

Output Parameters

POTarget Document The target XML document.
mappingStatus String Status of the mapping result.

Usage Notes
This is the main ANSI X12‐to‐XML target mapping service. This service uses the mapping services in 
the Tutorial.EDItoXML:segmentMapping folder described below.

See Also
Tutorial.Records:POTarget

Tutorial.EDItoXML:dateParse
Parses out the date from YYMMDD or YYYYMMDD to pipeline variables.

Input Parameters

date String Date input in format ʺYYMMDDʺ or ʺYYYYMMDDʺ.

Output Parameters

newYear String Four digit year.
newMonth String Two digit month.
newDay String Two digit day.
newHour String Current time in hour.
newMinute String Current time in minute.
newSecond String Current time in second.

4 WmEDIsamples Service Documentation


Tutorial.EDItoXML:processEDI850_4010

Usage Notes
Output variable status is not used.

Tutorial.EDItoXML:processEDI850_4010
Illustrates how to convert an X12 4010 850 document to an XML String. 

Input Parameters

edidata String Sample X12 4010 850 document.

Output Parameters

xmldata String Output XML String.

Usage Notes
The sampleServices:X12toValues service is used to generate an IData object from the EDI document. The 
pub.xml:documentToXMLString service is used to generate an XML String.

WmEDIsamples Service Documentation 5


CHAPTER 1 WmEDIsamples Service Documentation

Tutorial.EDItoXML:segmentMapping
All of the services contained in this folder (not listed individually) are used to map ANSI X12 segments to 
XML targets.The Tutorial.EDItoXML:EDItoXMLPOMap service uses these services.

6 WmEDIsamples Service Documentation


Tutorial.FlatFile:parseCsvInput

Tutorial.FlatFile
The services in this folder illustrate how to convert the two main types of flat files (character‐delimited and 
positional) to an IData object using a template and flat file as input.

Tutorial.FlatFile:parseCsvInput
Illustrates how to convert a character‐delimited flat file to an IData object using the flat file and template as 
input.

Input Parameters

None

Output Parameters

None

See Also
Tutorial.Records:rec_XCEL

Tutorial.FlatFile:parseFlatFile
Illustrates how to convert a positional flat file to an IData object using the flat file and template as input. 
The flat file was created with Microsoft Excel.

Input Parameters

None

Output Parameters

None

See Also
Tutorial.Records:rec_FF

WmEDIsamples Service Documentation 7


CHAPTER 1 WmEDIsamples Service Documentation

Tutorial.FlatFile:parseFlatFile2
Illustrates how to convert a positional flat file to an IData object using the flat file and template as input. 
The flat file was created with Microsoft Excel.

Input Parameters

None

Output Parameters

None

See Also
Tutorial.Records:rec_FF2

8 WmEDIsamples Service Documentation


Tutorial.Records:POSource

Tutorial.Records
All of the IS document types in this folder are used for mapping purposes in the following three folders 
Tutorial.EDItoXML, Tutorial.XMLtoEDI, and Tutorial.FlatFile.

Tutorial.Records:POSource
Reflects the source XML document that the services in the Tutorial.XMLtoEDI folder use.

Tutorial.Records:POTarget
Reflects the target XML document that the services in the Tutorial.EDItoXML folder use.

Tutorial.Records:rec_FF
The IS document type that the flat file sample in Tutorial.FlatFile:parseFlatFile uses. It represents the output of 
that service.

Tutorial.Records:rec_FF2
The IS document type that the flat file sample in Tutorial.FlatFile:parseFlatFile2 uses. It represents the output of 
that service.

Tutorial.Records:rec_XCEL
The IS document type that the flat file sample in Tutorial.FlatFile:parseCsvInput uses. It represents the output of 
that service.

WmEDIsamples Service Documentation 9


CHAPTER 1 WmEDIsamples Service Documentation

Tutorial.XMLtoEDI
All the services in this folder illustrate mapping and converting an XML document into an EDI document.

Tutorial.XMLtoEDI:XMLPOtoEDIMap
Maps an XML PO to an ANSI X12 4010 850 EDI document.
This service invokes many mapping services that reside in the Tutorial.XMLtoEDI.segmentMapping folder.

Input Parameters

POSource Document A PO that uses the format defined by the Tutorial.Records:POSource IS 
document type, which represents the XML PO document structure.

Output Parameters

EDIT850_4010 Document An X12 4010 850 EDI document that uses the format defined by the 
EDIrecords:X12_4010_850 IS document type.
Variable in
EDIT850_4010 Description

ST Document EDI segment from which the IData object starts.

Tutorial.XMLtoEDI:XMLdateConversionToDateTime
Converts the date and time format based on input specifications.

Input Parameters

XMLDate String Input date in format of ʺYYYYMMDD hh:mm:ss.ʺ
yearDigit String (optional) Number of digits for year in the output. Default is set to four.

Output Parameters

date String Date.
time String Time.

10 WmEDIsamples Service Documentation


Tutorial.XMLtoEDI:appendSegment

Tutorial.XMLtoEDI:appendSegment
Appends an IData object that represents a segment to an array of IData objects.

Input Parameters

record Document The segment to add.
recordList Document List The array of IData objects to which to append the segment.

Output Parameters

recordList Document List The array of IData objects after the segment is appended.

Tutorial.XMLtoEDI:conditionalTruncate
Truncates an input String to specified length.

Input Parameters

inString String Input String.
truncateLength String Length to truncate.

Output Parameters

outString String Resulting truncated String.

Tutorial.XMLtoEDI:processXMLSource
Converts an input XML document into an IData object and maps the IData object into a String that 
represents an EDI document.

Input Parameters

xmldata String (optional) Input XML document.

Output Parameters

EDIDocument String (optional) ANSI X12 850 document as output of this service.

WmEDIsamples Service Documentation 11


CHAPTER 1 WmEDIsamples Service Documentation

Tutorial.XMLtoEDI:replaceControlChar
Replaces the control characters (such as carriage return, line feed, tab, etc.) with the specified String.

Input Parameters

inString String Input String.
replaceString String Character String used to replace the control characters.

Output Parameters

outString String Resulting String.

12 WmEDIsamples Service Documentation


Tutorial.XMLtoEDI.segmentMapping:XMLToBEG

Tutorial.XMLtoEDI.segmentMapping
This folder contains segment mappings that map from XML source into EDI segments. Use these as 
examples for your own mapping needs.

Tutorial.XMLtoEDI.segmentMapping:XMLToBEG
Maps an XML document equivalent to a BEG segment to an IData object that represents a BEG segment. 
This service uses the Tutorial.XMLtoEDI:XMLdateConversionToDateTime service.

Tutorial.XMLtoEDI.segmentMapping:XMLToDTM
Maps an XML document equivalent to a DTM segment to an IData object that represents a DTM segment. 
This service uses the Tutorial.XMLtoEDI:XMLdateConversionToDateTime and Tutorial.XMLtoEDI:appendSegment 
services.

Tutorial.XMLtoEDI.segmentMapping:XMLToFOB
Maps an XML document equivalent to a FOB segment to an IData object that represents a FOB segment. 
This service uses the Tutorial.XMLtoEDI:appendSegment service to append a FOB IData object to an array of FOB 
IData objects.

Tutorial.XMLtoEDI.segmentMapping:XMLToGS
Maps an XML document equivalent to a GS segment to an IData object that represents a GS segment. 

Tutorial.XMLtoEDI.segmentMapping:XMLToISA
Maps an XML document equivalent to a ISA segment to an IData object that represents a ISA segment. 

Tutorial.XMLtoEDI.segmentMapping:XMLToN1
Maps an XML document equivalent to a N1 segment to an IData object that represents a N1 segment. 

WmEDIsamples Service Documentation 13


CHAPTER 1 WmEDIsamples Service Documentation

Tutorial.XMLtoEDI.segmentMapping:XMLToPO1_CTT
Maps an input XML source line item to ANSI X12 850 PO1 and CTT segment. 

Input Parameters

LineItem Document List XML source line items.


POTotal String (optional) Maps to AMT02 in the AMT segment under CTT segment.

Output Parameters

PO1 Document List PO1 loop for ANSI X12 850 transaction set.


CTT Document List CTT segment for ANSI X12 850 transaction set.

Tutorial.XMLtoEDI.segmentMapping:XMLToREF
Creates REF segment loop for ANSI X12 850 transaction sets. 

Input Parameters

CustomerPONumber String Purchase order number.
AccountingCode Document List Accounting code.

Output Parameters

REF Document List REF segment loop for ANSI X12 850 transaction set.

Tutorial.XMLtoEDI.segmentMapping:XMLToTD5
Creates TD5 segment loop for ANSI X12 850 transaction sets.

Input Parameters

ShipMethodCode String Ship method code.
ShipmentPriorityCode String Shipment priority code.

Output Parameters

TD5 Document List TD5 segment loop for ANSI X12 850 transaction set.

14 WmEDIsamples Service Documentation


Tutorial.XMLtoEDI.segmentMapping:XMLToTXI

Tutorial.XMLtoEDI.segmentMapping:XMLToTXI
Creates TXI segment loop for ANSI X12 850 transaction sets.

Input Parameters

TaxExemptCode String Tax exempt code.
TaxExemptNumber String Tax exempt number.

Output Parameters

TXI Document List TXI segment loop for ANSI X12 850 transaction set.

WmEDIsamples Service Documentation 15


CHAPTER 1 WmEDIsamples Service Documentation

Tutorial.properties
This folder contains a Java service that obtains trading partner‐specific information that the mapping 
services in the Tutorial.XMLtoEDI.segmentMapping folder use to create the Interchange Header/Trailer.

Tutorial.properties:getProperties
Gets properties defined in the partnerʹs configuration file.

Input Parameters

B2B_config_file String Configuration file name.
properties String List Property names to retrieve.

Output Parameters

values String List Retrieved property values

16 WmEDIsamples Service Documentation


sampleServices:Iterator810

Sample Flow Services


These sample flow services illustrate how you can use different built‐in services and features of the EDI 
Module to process your documents.

sampleServices:Iterator810
Demonstrates the use of the iterator variable of the wm.b2b.edi:convertToValues service to parse large input data 
by processing it piece by piece. Each time the wm.b2b.edi:convertToValues service is invoked, the iterator 
variable is set to true. 
The format of the EDIFFSchema.X12.V4010:Sample810_Large flat file schema dictates how the service processes 
the sample 810 document. This flat file schema defines three top‐level segment structures: 1) ST, 2) IT1, and 
3) TDS.
The first time the Iterator810 service invokes the wm.b2b.edi:convertToValues service, the ST segment structure is 
processed. It reads the input data from the sample 810 document until it encounters the next top‐level 
segment structure, which is the first IT1 segment structure. The Iterator810 service invokes the 
wm.b2b.edi:convertToValues service for each IT1 segment structure until it encounters the TDS segment 
structure. After processing the TDS segment structure, the Iterator810 service exists the REPEAT loop 
because there is no more input data. The Iterator810 service determines there is no more input when 
ediObject, which is an output parameter from the wm.b2b.edi:convertToValues service, is null.
Because the wm.b2b.edi:convertToValues service always returns its output in EDIValues, each pass of the service 
invocation should save the output or map it somewhere else. In this example, the main iteration maps each 
segment under ISA. In the iteration steps under the ST segment, an empty sequence operation is used. This 
can be replaced by services that process one item in the invoice. The services have access to the current 
items as well as all of the information in ISA, GS, ST and other segments under ST.This service does not 
validate or check the structure of any segments.

Input Parameters

edidata String EDI 810 document of ANSI X12 version 4010. If it is not specified, the 


default sample document is used.

Output Parameters

Values Document An 810 document structure (defined in the 


EDIFFSchema.X12.V4010:Sample810_Large flat file schema).
EDIValues Document Single invoice item. It will only show up after the sub‐level iterator call.

WmEDIsamples Service Documentation 17


CHAPTER 1 WmEDIsamples Service Documentation

sampleServices:UNEDIFACTtoValues
Illustrates an example flow service for an inbound UN/EDIFACT document.

Input Parameters

edidata String UN/EDIFACT standard document.
complianceCheck String (optional) Whether the compliance check is required. Specify true or 
false.

Value of
complianceCheck Meaning

true Compliance check is required.
false Compliance check is not required.
validate String (optional)
Value of validate Meaning

true Validation check is required.
false Validation check is not required.
returnErrors String (optional) How you want this service to return error messages when 
validate is set to true. Specify one of the following.
Value of validate Meaning

asArray Return validation errors with the edidata in an array called 
errors. This is the default.
inResults Return validation errors in the EDIValues object.
both Return validation errors in both errors and EDIValues.

Output Parameters

Values Document The output UN/EDIFACT document in IData object format.

sampleServices:X12toValues
Illustrates an example flow service for an inbound ANSI X12 document.

Input Parameters

edidata String EDI document.
docProcessingSvc String A service to process an ANSI X12 transaction.

18 WmEDIsamples Service Documentation


sampleServices:X12toValues

complianceCheck String (optional) Whether the compliance check is required. Specify true or 
false.

Value of complianceCheck Meaning

true Compliance check is required.
false Compliance check is not required.
validate String (optional)
Value of validate Meaning

true Validation check is required.
false Validation check is not required.
returnErrors String (optional) How you want this service to return error messages when 
validate is set to true. Specify one of the following.
Value of validate Meaning

asArray Return validation errors with the edidata in an array 
called errors. This is the default.
inResults Return validation errors in the EDIValues object.
both Return validation errors in both errors and EDIValues.

Output Parameters

Values Document The output ANSI X12 IS document in IData object format.

WmEDIsamples Service Documentation 19


CHAPTER 1 WmEDIsamples Service Documentation

Sample Business Process


The WmEDIsamples package, which you can download from the Knowledge Base on the Advantage Web 
site at http://advantage.webmethods.com, provides a sample that illustrates one way of using EDI 
documents in a business process. To read an overview of the sample, learn how to set it up and to run it, 
perform the following procedure.

Note: If you intend to also run the sample provided for the webMethods EDIINT Module 
(which is also included in the WmEDIsamples package), set up the EDIINT Module 
sample before setting up this sample business process.

1 Download the WmEDIsamples package from the Knowledge Base on the Advantage Web site at 
http://advantage.webmethods.com.

Important! You should delete the WmEDIsamples package before going into production.

2 Open the Server Administrator if it is not already open.
3 In the Solutions menu of the navigation panel, click EDI. The Server Administrator opens a new 
browser window to display the EDI Module home page.
4 From the EDI Module home page, in the EDI Processes menu of the navigation panel, click Run a Demo.
To continue, follow the instructions on the home page.
The following sections describe the services that are used in the execution and setup of the sample. The 
sample services have been certified, meaning that they have been tested by webMethods.

wm.b2b.editn.sample.setup:setupSample
Creates the partner profiles and TN document types for the sample, if they do not exist.

Input Parameters

SenderCorporateName String Corporate Name of the sender’s profile.
SenderDuns String Sender’s D‐U‐N‐S number.
SenderHost String The machine name for the sender.
SenderPort String The machine name for the sender.
SenderUserName String The user name used to connect to the sender’s machine.
SenderPassword String The password used to connect to the sender’s machine.
ReceiverCorporateName String Corporate Name of the receiver’s profile.
ReceiverDuns String Receiver’s D‐U‐N‐S number.

20 WmEDIsamples Service Documentation


wm.b2b.editn.sample.setup:setupEDIBizDocTypes

ReceiverHost String The machine name for the receiver.
ReceiverPort String The port on which the Receiver will be listening.
ReceiverUsername String The user name used to connect to the receiver’s machine.
ReceiverPassword String The password used to connect to the receiver’s machine.

Output Parameters

None

Usage Notes
Only the sample web pages should invoke this service. If you intend to also run the sample provided 
for the webMethods EDIINT Module (in the WmEDIsamples package, which is located in the 
Knowledge Base Samples area on the Advantage Web site at http://advantage.webmethods.com), set 
up the EDIINT Module sample before setting up the WmEDIforTN sample.

wm.b2b.editn.sample.setup:setupEDIBizDocTypes
Installs the TN document types that are needed for EDI documents used in the sample.

Input Parameters

None

Output Parameters

None

Usage Notes
Only the sample web pages should invoke this service.

wm.b2b.editn.sample.setup:setupXMLBizDocTypes
Installs the TN document types that are needed for XML documents used in the sample.

Input Parameters

None

Output Parameters

None

Usage Notes
Only the sample web pages should invoke this service.

WmEDIsamples Service Documentation 21


CHAPTER 1 WmEDIsamples Service Documentation

wm.b2b.editn.sample.setup:setupProfile
Sets up the profiles for partners in the sample.

Input Parameters

CorporationName String The corporate name for the profile.
DUNS String The external ID for the profile.
host String The machine name.
port String The port for this profile.
url String The URL to which to connect.
user String The user name for this profile.
password String The password for the profile.

Output Parameters

None

Usage Notes
Only the sample web pages should invoke this service.

wm.b2b.editn.sample.receiver:Process850
Takes an EDI X12 4010 850 and generates an 855 in response.

Input Parameters

None

Output Parameters

edidata String EDI 855 document.

Usage Notes
The ‘EDI Seller 850‐855’ business process invokes this service.

22 WmEDIsamples Service Documentation


wm.b2b.editn.sample.receiver:Send997

wm.b2b.editn.sample.receiver:Send997
Transmits a 997 document to the receiver trading partner.

Input Parameters

997 String Text of an EDI 997 document.

Output Parameters

None

Usage Notes
The ‘Receive EDI Envelope’ business process invokes this service.

wm.b2b.editn.sample.receiver:Generate997
Creates a 997 document in response to an X12 Envelope.

Input Parameters

X12Env Document The X12 envelope.
edidata String X12 Envelope used to generate 997 functional acknowledgement.

Output Parameters

997 String The 997 document.

Usage Notes
The ‘Receive EDI Envelope’ business process invokes this service.

wm.b2b.editn.sample.receiver:Send855
Sends an EDI 855 document to the sender trading partner.

Input Parameters

edidata String Text of the EDI 855 document.

Output Parameters

None

WmEDIsamples Service Documentation 23


CHAPTER 1 WmEDIsamples Service Documentation

Usage Notes
The ‘EDI Seller 850‐855’ business process invokes this service.

wm.b2b.editn.sample.receiver:ProcessEnvelope
Used to represent where envelope processing would occur in a business process.

Input Parameters

None

Output Parameters

None

Usage Notes
The ‘Receive EDI Envelope’ business process invokes this service.

wm.b2b.editn.sample.util:getLastDocuments
Retrieves the BizDocEnvelopes for events that occurred in a business process.

Input Parameters

parameters Document Provided by the process run time facility of the Integration Server. (The 
process run time facility manages the execution of business processes.)
documents Document Provided by the process run time facility of the Integration Server.
getContent String Whether the document content, which is saved in the BizDocEnvelope, 
should be retrieved.
lastEvents String List Names of the most recent event(s) that occurred in the business process.

Output Parameters

recordCount String Number of events returned.
events Document List (optional) The BizDocEnvelopes for all document events.

24 WmEDIsamples Service Documentation


wm.b2b.editn.sample.util:enable

wm.b2b.editn.sample.util:enable
This service places a variable in the pipeline that alters the way in which conversation IDs are constructed 
for EDI documents. 
To run both sides of a conversation on a single instance of the Integration Server, the construction of the 
conversation ID is forced to be ReceiverID-SenderID-InstanceID.

Input Parameters

None

Output Parameters

None

Usage Notes
This service should be used only in demonstration circumstances. The conversation ID is only 
constructed this way if the variable is present in the pipeline when the service wm.tn:receive is invoked.

wm.b2b.editn.sample.util:return997
Determines whether a 997 should be sent in response to a document.

Input Parameters

parameters Document Provided by the process run time facility of the Integration Server. (The 
process run time facility manages the execution of business processes.)
documents Document Provided by the process run time facility of the Integration Server.

Output Parameters

X12Env Document BizDocEnvelope of the last event in the business process that occurred.
send997 String Whether a 997 should be sent. This will be true if a 997 should be sent or 
false if not.

WmEDIsamples Service Documentation 25


CHAPTER 1 WmEDIsamples Service Documentation

wm.b2b.editn.sample.util:getBizDocFromEvent
Retrieves the BizDocEnvelopes for events that occurred in a business process.

Input Parameters

parameters Document Provided by the process run time facility of the Integration Server. (The 
process run time facility manages the execution of business processes.)
documents Document Provided by the process run time facility of the Integration Server.
getContent String Whether the document content, which is saved in the BizDocEnvelope, 
should be retrieved.
lastEvents String List Names of the most recent event(s) that occurred in the business process.

Output Parameters

bizEnv Document The BizDocEnvelope.

wm.b2b.editn.sample.util:checkSetup
Checks the system to determine whether the sample is configured properly.

Input Parameters

None

Output Parameters

setupProperly String Whether all the components of the sample appear to be configured 
properly. This will be true if configured properly; otherwise false. 
profilesOkay String Whether the trading partner profiles for the sample are present. This will 
be true if profiles are present; otherwise false. 
docsOkay String Whether the TN document types for the sample are present. This will be 
true if TN document types are present; otherwise false.
scriptsOkay String Whether the process models for the sample are present. This will be true if 
the process models are present; otherwise false.

26 WmEDIsamples Service Documentation


wm.b2b.editn.sample.util:receive

wm.b2b.editn.sample.util:receive
Alternate receive method that first calls wm.b2b.editn.sample.util:enable, and then wm.tn:receive. 
This is to force the conversation IDs in such a way that both sides of the conversation can take place on a 
single instance of the Integration Server.

Input Parameters

None

Output Parameters

None

Usage Notes
Only the sample web pages should invoke this service.

wm.b2b.editn.sample.util:deliver
Deliver BizDocEnvelopes from one trading partner to another. 
Defaults to using the Secondary HTTP delivery method that is specified in the receiver’s trading partner 
profile.

Input Parameters

bizdoc Document The BizDocEnvelope to deliver.

Output Parameters

None

Usage Notes
Only the sample web pages should invoke this service.

wm.b2b.editn.sample.sender:Process997
This is a placeholder service to represent the processing of a 997 done by the sender.

Input Parameters

None

Output Parameters

None

WmEDIsamples Service Documentation 27


CHAPTER 1 WmEDIsamples Service Documentation

Usage Notes
The ‘Send EDI Envelope’ business process invokes this service.

wm.b2b.editn.sample.sender:Log850
This is a placeholder service to represent the logging of an outbound 850 message done by the sender.

Input Parameters

None

Output Parameters

None

Usage Notes
The ‘EDI Buyer 850‐855’ business process invokes this service.

wm.b2b.editn.sample.sender:SendEnvelope
Sends an X12 envelope containing an EDI 850 document to a trading partner.

Input Parameters

None

Output Parameters

None

Usage Notes
The ‘Send EDI Envelope’ business process invokes this service.

wm.b2b.editn.sample.sender:GenerateEnvelope
Generates an X12 envelope containing an EDI 850 document.

Input Parameters

None

Output Parameters

None

28 WmEDIsamples Service Documentation


wm.b2b.editn.sample.sender:Process855

Usage Notes
The ‘EDI Buyer 850‐855’ business process invokes this service.

wm.b2b.editn.sample.sender:Process855
Placeholder to represent business logic that is executed when an 855 document is received.

Input Parameters

None

Output Parameters

None

Usage Notes
The ‘EDI Buyer 850‐855’ business process

wm.b2b.editn.sample.sender:start
Starts the sample. Creates an XML Purchase Order document that is submitted to Trading Networks.

Input Parameters

SenderID String D‐U‐N‐S number of the trading partner that is sending the document.
ReceiverID String D‐U‐N‐S number of the trading partner to whom the document will be 
sent.
DocumentID String Unique identifier for the purchase order.
ControlNumber String Unique identifier for the group segment that will contain the purchase 
order.

Output Parameters

SenderTNID String The Trading Networks internal ID for the sender.
ReceiverTNID String The Trading Networks internal ID for the receiver.

Usage Notes
Only the sample web pages should invoke this service.

WmEDIsamples Service Documentation 29


CHAPTER 1 WmEDIsamples Service Documentation

wm.EDIINT.sample
You can run the following sample send service within the webMethods Developer to exchange sample 
EDIINT messages. 

wm.EDIINT.sample:send
Reads the input file as an InputStream and invokes the wm.EDIINT.send service.

Input Parameters

dataFileName String Name and location of the file to send.
dataContentType String The content type of the file to send, for example application/edi-x12.
type String The S/MIME type that you want to use for the outbound EDIINT message. 
Specify one of the following:
Value of type Description

plain You want the wm.EDIINT.sample:send service to neither 
sign nor encrypt the outbound EDIINT message.
signed You want the wm.EDIINT.sample:send service to sign the 
outbound EDIINT message.
encrypted You want the wm.EDIINT.sample:send service to encrypt 
the outbound EDIINT message.
signedAndEncrypted You want the wm.EDIINT.sample:send service to sign and 
encrypt the outbound EDIINT message.
getFromProfile You want the wm.EDIINT.sample:send service to determine 
whether to sign and/or encrypt the outbound EDIINT 
message using the value of the S/MIME Type extended 
field from the receiver’s profile.

30 WmEDIsamples Service Documentation


wm.EDIINT.sample:send

deliveryMethod String The delivery method you want to use to send the EDIINT document. The 
wm.EDIINT:send service obtains the Trading Networks profile for the receiver 
(specified by the receiverID input variable) and delivers the EDIINT document to 
the receiver’s system using the information specified for the delivery method you 
specify. Specify a delivery method that is defined in the receiver’s Trading 
Networks profile.
For EDIINT AS1, specify one of the following:
PrimarySMTP (corresponds to the Trading Networks Primary E-mail 
delivery method)
SecondarySMTP (corresponds to the Trading Networks Secondary E-mail 
delivery method)
For EDIINT AS2, specify one of the following:
PrimaryHTTP
SecondaryHTTP
PrimaryHTTPS
SecondaryHTTPS

For EDIINT AS3, specify the following:


AS3
requestMDN String Whether you want the receiver to return an MDN. Specify one of the 
following:
Value of requestMDN Meaning

none Do not request a return MDN.
synchronousMDN Request a return synchronous MDN.
asynchronousMDN Request a return asynchronous MDN.
Note: If you specify PrimarySMTP, SecondarySMTP, PrimaryFTPS, or 
SecondaryFTPS for deliveryMethod, you can only receive an asynchronous MDN.
requestSignedReceipt String Whether you want the MDN to be signed.
Note: requestSignedReceipt is ignored when requestMDN is false.
Value of
requestSignedReceipt Meaning

true Request a signed MDN.
false Request a plain (not signed) MDN.

WmEDIsamples Service Documentation 31


CHAPTER 1 WmEDIsamples Service Documentation

senderID Document Identification of the sender of the EDIINT message.
Variable in senderID Description

id The sender’s external ID. That is, the identification that 
you want for the sender in the message.
idTypeDesc Optional. The external ID type for the sender ID you 
specified in id. This is an external ID type as defined in 
Trading Networks.

Note: By default, the service uses the appropriate 
external ID type based on the value you specify for the 
deliveryMethod parameter. For example, if you specify 
AS3 for the deliveryMethod parameter, the service uses 
the EDIINT AS3 external ID type. Specify a value for 
idTypeDesc only if you want to override this default.

receiverID Document Identification of the receiver of the EDIINT message.
Variable in senderID Description

id The receiver’s external ID. That is, the identification 
that you want for the receiver in the message.
idTypeDesc Optional. The external ID type for the receiver ID you 
specified in id. This is an external ID type as defined in 
Trading Networks.

Note: By default, the service uses the appropriate 
external ID type based on the value you specify for the 
deliveryMethod parameter. For example, if you specify 
AS3 for the deliveryMethod parameter, the service uses 
the EDIINT AS3 external ID type. Specify a value for 
idTypeDesc only if you want to override this default.

conversationID String (optional) The conversation ID for the outbound EDIINT message. 
The conversationID parameter is an identifier that links all documents that are 
part of the same business process (also called a conversation). That is, all 
documents in the same business process need to have the same conversationID. As 
described in the webMethods Trading Networks User’s Guide, Trading Networks can 
extract conversationIDs from EDI documents and use them to pass documents to 
the webMethods Process Run Time (PRT) after Trading Networks performs the 
actions identified by a processing rule. 

32 WmEDIsamples Service Documentation


wm.EDIINT.sample:send

In this field, you might want to specify the same conversation ID as that of the 
payload that you are sending. The EDIINT Module automatically assigns to a 
return MDN the same conversation ID that is assigned here. 

Note: Leave this field blank unless you own a license for the webMethods Process 
Run Time (PRT).

Output Parameters

None

WmEDIsamples Service Documentation 33


CHAPTER 1 WmEDIsamples Service Documentation

34 WmEDIsamples Service Documentation

You might also like