Sie sind auf Seite 1von 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

webMethodsAccess,webMethodsAdministrator,webMethodsBroker,webMethodsDashboard,webMethodsDeveloper,webMethodsFabric,webMethods
Glue,webMethodsInstaller,webMethodsIntegrationServer,webMethodsMainframe,webMethodsManager,webMethodsModeler,webMethodsMonitor,
webMethodsOptimize,webMethodsPortal,webMethodsServicenet,webMethodsTradingNetworks,andwebMethodsWorkflowaretrademarksof
webMethods,Inc.webMethodsandthewebMethodslogoareregisteredtrademarksofwebMethods,Inc.
AcrobatandAdobeareregisteredtrademarks,andReaderisatrademarkofAdobeSystemsIncorporated.Amdocsisaregisteredtrademark,andClarifyCRM
isatrademarkofAmdocs.AribaisaregisteredtrademarkofAriba,Inc.BEA,BEAWebLogicServer,Jolt,andTuxedoareregisteredtrademarks,andBEA
WebLogicPlatformisatrademarkofBEASystems,Inc.ActionRequestSystem,BMCSoftware,PATROL,andRemedyareregisteredtrademarksofBMC
Software,Inc.BroadVisionisaregisteredtrademarkofBroadVision,Inc.ChemeStandardsandCIDXaretrademarksofChemicalIndustryDataExchange.
UnicenterisaregisteredtrademarkofComputerAssociatesInternational,Inc.PopChartisaregisteredtrademarkofCORDATechnologies,Inc.Kenanand
ArborareregisteredtrademarksofCSGSystems,Inc.DataConnectionandSNAPIXareregisteredtrademarksofDataConnectionCorporation.DataDirect,
DataDirectConnect,andSequeLinkareregisteredtrademarksofDataDirectTechnologies.D&BandDUNSareregisteredtrademarksofDun&Bradstreet
Corporation.EntrustisaregisteredtrademarkofEntrust,Inc.papiNetisaregisteredtrademarkoftheEuropeanUnionandtheUnitedStates.Financial
InformationeXchange,F.I.X,andF.I.XProtocolaretrademarksofFIXProtocolLtd.UCCnetandeBusinessReadyareregisteredtrademarks,and1SYNCand
TransoraaretrademarksofGS1US.HewlettPackard,HP,HPUX,OpenView,PARISC,andSNAplus2aretrademarksofHewlettPackardCompany.i2isa
registeredtrademarkofi2Technologies,Inc.AIX,AS/400,CICS,DB2,Domino,IBM,Informix,Infoprint,Lotus,LotusNotes,MQSeries,OS/390,OS/400,
RACF,RS/6000,SQL/400,S/390,System/390,VTAM,z/OS,andWebSphereareregisteredtrademarks;andCommunicationsSystemforWindowsNT,DB2
UniversalDatabase,IMS,MVS,andSQL/DSaretrademarksofIBMCorporation.InnoDBisatrademarkofInnobaseOy.Itaniumisaregisteredtrademarkof
IntelCorporation.JBossisaregisteredtrademark,andJBossGroupisatrademarkofJboss,Inc.LinuxisaregisteredtrademarkofLinusTorvalds.W3Cisa
registeredtrademark,andXWindowSystemisatrademarkoftheMassachusettsInstituteofTechnology.MetaSolvisaregisteredtrademarkofMetasolv
Software,Inc.ActiveX,Microsoft,Outlook,VisualBasic,Windows,andWindowsNTareregisteredtrademarks;andWindowsServerisatrademarkof
MicrosoftCorporation.SixSigmaisaregisteredtrademarkofMotorola,Inc.Firefoxisaregisteredtrademark,andMozillaisatrademarkoftheMozilla
Foundation.MySQLisaregisteredtrademarkofMySQLAB.nCipherisatrademarkofnCipherCorporationLtd.TeradataisaregisteredtrademarkofNCR
International,Inc.NetscapeisaregisteredtrademarkofNetscapeCommunicationsCorporation.SUSEisaregisteredtrademarkofNovell,Inc.ServletExecis
aregisteredtrademark,andNewAtlantaisatrademarkofNewAtlantaCommunications,LLC.CORBAisaregisteredtrademarkofObjectManagement
Group,Inc.JDEdwards,OneWorld,Oracle,PeopleSoft,Siebel,andVantiveareregisteredtrademarks,andPeopleSoftPureInternetArchitectureand
WorldSoftwarearetrademarksofOracleCorporation.InfranetandPortalaretrademarksofPortalSoftware,Inc.RedHatisaregisteredtrademarkofRed
Hat,Inc.PIPandRosettaNetaretrademarksofRosettaNet,anonprofitorganization.SAPandR/3areregisteredtrademarksofSAPAG.SWIFTand
SWIFTNetareregisteredtrademarksofSocietyforWorldwideInterbankFinancialTelecommunicationSCRL.SPARCandSPARCStationareregistered
trademarksofSPARCInternational,Inc.SSAisaregisteredtrademark,andBaanandSSAGlobalaretrademarksofSSAGlobalTechnologies,Inc.EJB,
EnterpriseJavaBeans,Java,JavaServer,JDBC,JSP,J2EE,Solaris,Sun,andSunMicrosystemsareregisteredtrademarks;andJavaNamingandDirectory
Interface,SOAPwithAttachmentsAPIforJava,JavaServerPages,andSunSoftaretrademarksofSunMicrosystems,Inc.Sybaseisaregisteredtrademarkof
Sybase,Inc.VERITASisaregisteredtrademark,andVERITASClusterServerisatrademarkofSymantecCorporation.UNIXisaregisteredtrademarkofThe
OpenGroup.UnicodeisatrademarkofUnicode,Inc.VeriSignisaregisteredtrademarkofVerisign,Inc.
Allothermarksarethepropertyoftheirrespectiveowners.
Copyright20032006bywebMethods,Inc.Allrightsreserved,includingtherightofreproductioninwholeorinpartinanyform.

Document ID: 20070406

CHAPTER

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: TheWmEDIsamplespackageislocatedintheKnowledgeBaseSamplesarea
ontheAdvantageWebsiteathttp://advantage.webmethods.com.Thesamplesin
thispackagehavebeencertified,meaningthattheyhavebeentestedby
webMethods.

WmEDIsamples Service Documentation

CHAPTER 1 WmEDIsamples Service Documentation

EDIFFSchema
TheEDIFFSchemafoldercontainsflatfileschemasanddictionariesthatotherservicesinthe
WmEDIsamplespackagecanusetovalidateEDIdocuments,aswellas,somesampleflatfileschemas.

EDIFFSchema.FlatFile:CSVSchema
Sampleflatfileschemaforacommaseparatedvalues(CSV)flatfile.
Formoreinformationaboutflatfileschemasanddictionaries,seetheFlatFileSchemaDevelopersGuide.

EDIFFSchema.FlatFile:Dictionary
Sampleflatfileschemadictionary.
Formoreinformationaboutflatfileschemasanddictionaries,seetheFlatFileSchemaDevelopersGuide.

EDIFFSchema.FlatFile:Example1
Sampleflatfileschema.
Formoreinformationaboutflatfileschemasanddictionaries,seetheFlatFileSchemaDevelopersGuide.

EDIFFSchema.FlatFile:Example2
Sampleflatfileschema.
Formoreinformationaboutflatfileschemasanddictionaries,seetheFlatFileSchemaDevelopersGuide.

EDIFFSchema.UNEDIFACT.V98A:Dictionary
Sampleflatfileschemadictionary.
Formoreinformationaboutflatfileschemasanddictionaries,seetheFlatFileSchemaDevelopersGuide.

EDIFFSchema.UNEDIFACT.V98A:TORDERS
FlatfileschemausedtoparseandvalidateaUN/EDIFACT98AORDERSdocument.

WmEDIsamples Service Documentation

EDIFFSchema.X12.V4010:Dictionary

EDIFFSchema.X12.V4010:Dictionary
Sampleflatfileschemadictionary.
Formoreinformationaboutflatfileschemasanddictionaries,seetheFlatFileSchemaDevelopersGuide.

EDIFFSchema.X12.V4010:T810
FlatfileschemaisusedtoparseandvalidateanANSIX12,version4010,810document.

EDIFFSchema.X12.V4010:T850
FlatfileschemausedtoparseandvalidateanANSIX12,version4010,850document.

EDIFFSchema.X12.V4010:T997
FlatfileschemausedtoparseandvalidateanANSIX12,version4010,997document.

WmEDIsamples Service Documentation

CHAPTER 1 WmEDIsamples Service Documentation

Tutorial.EDItoXML
TheservicesinthisfolderillustratehowtomapanEDIdocumenttoanXMLdocument.

Tutorial.EDItoXML:EDItoXMLPOMap
IllustrateshowantoconvertanEDIdocumentintoadifferentformat(inthiscase,anXMLPO).
Input Parameters
EDIValues

DocumentThesourceEDItransactionset.

Output Parameters
POTarget

DocumentThetargetXMLdocument.

mappingStatus

StringStatusofthemappingresult.

Usage Notes
ThisisthemainANSIX12toXMLtargetmappingservice.Thisserviceusesthemappingservicesin
theTutorial.EDItoXML:segmentMappingfolderdescribedbelow.
See Also
Tutorial.Records:POTarget

Tutorial.EDItoXML:dateParse
ParsesoutthedatefromYYMMDDorYYYYMMDDtopipelinevariables.
Input Parameters
date

StringDateinputinformatYYMMDDorYYYYMMDD.

Output Parameters

newYear

StringFourdigityear.

newMonth

StringTwodigitmonth.

newDay

StringTwodigitday.

newHour

StringCurrenttimeinhour.

newMinute

StringCurrenttimeinminute.

newSecond

StringCurrenttimeinsecond.

WmEDIsamples Service Documentation

Tutorial.EDItoXML:processEDI850_4010

Usage Notes
Outputvariablestatusisnotused.

Tutorial.EDItoXML:processEDI850_4010
IllustrateshowtoconvertanX124010850documenttoanXMLString.
Input Parameters
edidata

StringSampleX124010850document.

Output Parameters
xmldata

StringOutputXMLString.

Usage Notes
ThesampleServices:X12toValuesserviceisusedtogenerateanIDataobjectfromtheEDIdocument.The
pub.xml:documentToXMLStringserviceisusedtogenerateanXMLString.

WmEDIsamples Service Documentation

CHAPTER 1 WmEDIsamples Service Documentation

Tutorial.EDItoXML:segmentMapping
Alloftheservicescontainedinthisfolder(notlistedindividually)areusedtomapANSIX12segmentsto
XMLtargets.TheTutorial.EDItoXML:EDItoXMLPOMapserviceusestheseservices.

WmEDIsamples Service Documentation

Tutorial.FlatFile:parseCsvInput

Tutorial.FlatFile
Theservicesinthisfolderillustratehowtoconvertthetwomaintypesofflatfiles(characterdelimitedand
positional)toanIDataobjectusingatemplateandflatfileasinput.

Tutorial.FlatFile:parseCsvInput
IllustrateshowtoconvertacharacterdelimitedflatfiletoanIDataobjectusingtheflatfileandtemplateas
input.
Input Parameters
None
Output Parameters
None
See Also
Tutorial.Records:rec_XCEL

Tutorial.FlatFile:parseFlatFile
IllustrateshowtoconvertapositionalflatfiletoanIDataobjectusingtheflatfileandtemplateasinput.
TheflatfilewascreatedwithMicrosoftExcel.
Input Parameters
None
Output Parameters
None
See Also
Tutorial.Records:rec_FF

WmEDIsamples Service Documentation

CHAPTER 1 WmEDIsamples Service Documentation

Tutorial.FlatFile:parseFlatFile2
IllustrateshowtoconvertapositionalflatfiletoanIDataobjectusingtheflatfileandtemplateasinput.
TheflatfilewascreatedwithMicrosoftExcel.
Input Parameters
None
Output Parameters
None
See Also
Tutorial.Records:rec_FF2

WmEDIsamples Service Documentation

Tutorial.Records:POSource

Tutorial.Records
AlloftheISdocumenttypesinthisfolderareusedformappingpurposesinthefollowingthreefolders
Tutorial.EDItoXML,Tutorial.XMLtoEDI,andTutorial.FlatFile.

Tutorial.Records:POSource
ReflectsthesourceXMLdocumentthattheservicesintheTutorial.XMLtoEDIfolderuse.

Tutorial.Records:POTarget
ReflectsthetargetXMLdocumentthattheservicesintheTutorial.EDItoXMLfolderuse.

Tutorial.Records:rec_FF
TheISdocumenttypethattheflatfilesampleinTutorial.FlatFile:parseFlatFileuses.Itrepresentstheoutputof
thatservice.

Tutorial.Records:rec_FF2
TheISdocumenttypethattheflatfilesampleinTutorial.FlatFile:parseFlatFile2uses.Itrepresentstheoutputof
thatservice.

Tutorial.Records:rec_XCEL
TheISdocumenttypethattheflatfilesampleinTutorial.FlatFile:parseCsvInputuses.Itrepresentstheoutputof
thatservice.

WmEDIsamples Service Documentation

CHAPTER 1 WmEDIsamples Service Documentation

Tutorial.XMLtoEDI
AlltheservicesinthisfolderillustratemappingandconvertinganXMLdocumentintoanEDIdocument.

Tutorial.XMLtoEDI:XMLPOtoEDIMap
MapsanXMLPOtoanANSIX124010850EDIdocument.
ThisserviceinvokesmanymappingservicesthatresideintheTutorial.XMLtoEDI.segmentMappingfolder.
Input Parameters
POSource

DocumentAPOthatusestheformatdefinedbytheTutorial.Records:POSourceIS
documenttype,whichrepresentstheXMLPOdocumentstructure.

Output Parameters
EDIT850_4010

DocumentAnX124010850EDIdocumentthatusestheformatdefinedbythe
EDIrecords:X12_4010_850ISdocumenttype.
Variable in
EDIT850_4010

Description

ST

DocumentEDIsegmentfromwhichtheIDataobjectstarts.

Tutorial.XMLtoEDI:XMLdateConversionToDateTime
Convertsthedateandtimeformatbasedoninputspecifications.
Input Parameters
XMLDate

StringInputdateinformatofYYYYMMDDhh:mm:ss.

yearDigit

String(optional)Numberofdigitsforyearintheoutput.Defaultissettofour.

Output Parameters

10

date

StringDate.

time

StringTime.

WmEDIsamples Service Documentation

Tutorial.XMLtoEDI:appendSegment

Tutorial.XMLtoEDI:appendSegment
AppendsanIDataobjectthatrepresentsasegmenttoanarrayofIDataobjects.
Input Parameters
record

DocumentThesegmenttoadd.

recordList

Document ListThearrayofIDataobjectstowhichtoappendthesegment.

Output Parameters
recordList

Document ListThearrayofIDataobjectsafterthesegmentisappended.

Tutorial.XMLtoEDI:conditionalTruncate
TruncatesaninputStringtospecifiedlength.
Input Parameters
inString

StringInputString.

truncateLength

StringLengthtotruncate.

Output Parameters
outString

StringResultingtruncatedString.

Tutorial.XMLtoEDI:processXMLSource
ConvertsaninputXMLdocumentintoanIDataobjectandmapstheIDataobjectintoaStringthat
representsanEDIdocument.
Input Parameters
xmldata

String(optional)InputXMLdocument.

Output Parameters
EDIDocument

String(optional)ANSIX12850documentasoutputofthisservice.

WmEDIsamples Service Documentation

11

CHAPTER 1 WmEDIsamples Service Documentation

Tutorial.XMLtoEDI:replaceControlChar
Replacesthecontrolcharacters(suchascarriagereturn,linefeed,tab,etc.)withthespecifiedString.
Input Parameters
inString

StringInputString.

replaceString

StringCharacterStringusedtoreplacethecontrolcharacters.

Output Parameters
outString

12

StringResultingString.

WmEDIsamples Service Documentation

Tutorial.XMLtoEDI.segmentMapping:XMLToBEG

Tutorial.XMLtoEDI.segmentMapping
ThisfoldercontainssegmentmappingsthatmapfromXMLsourceintoEDIsegments.Usetheseas
examplesforyourownmappingneeds.

Tutorial.XMLtoEDI.segmentMapping:XMLToBEG
MapsanXMLdocumentequivalenttoaBEGsegmenttoanIDataobjectthatrepresentsaBEGsegment.
ThisserviceusestheTutorial.XMLtoEDI:XMLdateConversionToDateTimeservice.

Tutorial.XMLtoEDI.segmentMapping:XMLToDTM
MapsanXMLdocumentequivalenttoaDTMsegmenttoanIDataobjectthatrepresentsaDTMsegment.
ThisserviceusestheTutorial.XMLtoEDI:XMLdateConversionToDateTimeandTutorial.XMLtoEDI:appendSegment
services.

Tutorial.XMLtoEDI.segmentMapping:XMLToFOB
MapsanXMLdocumentequivalenttoaFOBsegmenttoanIDataobjectthatrepresentsaFOBsegment.
ThisserviceusestheTutorial.XMLtoEDI:appendSegmentservicetoappendaFOBIDataobjecttoanarrayofFOB
IDataobjects.

Tutorial.XMLtoEDI.segmentMapping:XMLToGS
MapsanXMLdocumentequivalenttoaGSsegmenttoanIDataobjectthatrepresentsaGSsegment.

Tutorial.XMLtoEDI.segmentMapping:XMLToISA
MapsanXMLdocumentequivalenttoaISAsegmenttoanIDataobjectthatrepresentsaISAsegment.

Tutorial.XMLtoEDI.segmentMapping:XMLToN1
MapsanXMLdocumentequivalenttoaN1segmenttoanIDataobjectthatrepresentsaN1segment.

WmEDIsamples Service Documentation

13

CHAPTER 1 WmEDIsamples Service Documentation

Tutorial.XMLtoEDI.segmentMapping:XMLToPO1_CTT
MapsaninputXMLsourcelineitemtoANSIX12850PO1andCTTsegment.
Input Parameters
LineItem

Document ListXMLsourcelineitems.

POTotal

String(optional)MapstoAMT02intheAMTsegmentunderCTTsegment.

Output Parameters
PO1

Document ListPO1loopforANSIX12850transactionset.

CTT

Document ListCTTsegmentforANSIX12850transactionset.

Tutorial.XMLtoEDI.segmentMapping:XMLToREF
CreatesREFsegmentloopforANSIX12850transactionsets.
Input Parameters
CustomerPONumber

StringPurchaseordernumber.

AccountingCode

Document ListAccountingcode.

Output Parameters
REF

Document ListREFsegmentloopforANSIX12850transactionset.

Tutorial.XMLtoEDI.segmentMapping:XMLToTD5
CreatesTD5segmentloopforANSIX12850transactionsets.
Input Parameters
ShipMethodCode

StringShipmethodcode.

ShipmentPriorityCode

StringShipmentprioritycode.

Output Parameters
TD5

14

Document ListTD5segmentloopforANSIX12850transactionset.

WmEDIsamples Service Documentation

Tutorial.XMLtoEDI.segmentMapping:XMLToTXI

Tutorial.XMLtoEDI.segmentMapping:XMLToTXI
CreatesTXIsegmentloopforANSIX12850transactionsets.
Input Parameters
TaxExemptCode

StringTaxexemptcode.

TaxExemptNumber

StringTaxexemptnumber.

Output Parameters
TXI

Document ListTXIsegmentloopforANSIX12850transactionset.

WmEDIsamples Service Documentation

15

CHAPTER 1 WmEDIsamples Service Documentation

Tutorial.properties
ThisfoldercontainsaJavaservicethatobtainstradingpartnerspecificinformationthatthemapping
servicesintheTutorial.XMLtoEDI.segmentMappingfolderusetocreatetheInterchangeHeader/Trailer.

Tutorial.properties:getProperties
Getspropertiesdefinedinthepartnersconfigurationfile.
Input Parameters
B2B_config_file

StringConfigurationfilename.

properties

String ListPropertynamestoretrieve.

Output Parameters
values

16

String ListRetrievedpropertyvalues

WmEDIsamples Service Documentation

sampleServices:Iterator810

Sample Flow Services


ThesesampleflowservicesillustratehowyoucanusedifferentbuiltinservicesandfeaturesoftheEDI
Moduletoprocessyourdocuments.

sampleServices:Iterator810
Demonstratestheuseoftheiteratorvariableofthewm.b2b.edi:convertToValuesservicetoparselargeinputdata
byprocessingitpiecebypiece.Eachtimethewm.b2b.edi:convertToValuesserviceisinvoked,theiterator
variableissettotrue.
TheformatoftheEDIFFSchema.X12.V4010:Sample810_Largeflatfileschemadictateshowtheserviceprocesses
thesample810document.Thisflatfileschemadefinesthreetoplevelsegmentstructures:1)ST,2)IT1,and
3)TDS.
ThefirsttimetheIterator810serviceinvokesthewm.b2b.edi:convertToValuesservice,theSTsegmentstructureis
processed.Itreadstheinputdatafromthesample810documentuntilitencountersthenexttoplevel
segmentstructure,whichisthefirstIT1segmentstructure.TheIterator810serviceinvokesthe
wm.b2b.edi:convertToValuesserviceforeachIT1segmentstructureuntilitencounterstheTDSsegment
structure.AfterprocessingtheTDSsegmentstructure,theIterator810serviceexiststheREPEATloop
becausethereisnomoreinputdata.TheIterator810servicedeterminesthereisnomoreinputwhen
ediObject,whichisanoutputparameterfromthewm.b2b.edi:convertToValuesservice,isnull.
Becausethewm.b2b.edi:convertToValuesservicealwaysreturnsitsoutputinEDIValues,eachpassoftheservice
invocationshouldsavetheoutputormapitsomewhereelse.Inthisexample,themainiterationmapseach
segmentunderISA.IntheiterationstepsundertheSTsegment,anemptysequenceoperationisused.This
canbereplacedbyservicesthatprocessoneitemintheinvoice.Theserviceshaveaccesstothecurrent
itemsaswellasalloftheinformationinISA,GS,STandothersegmentsunderST.Thisservicedoesnot
validateorcheckthestructureofanysegments.
Input Parameters
edidata

String EDI810documentofANSIX12version4010.Ifitisnotspecified,the
defaultsampledocumentisused.

Output Parameters
Values

Document An810documentstructure(definedinthe
EDIFFSchema.X12.V4010:Sample810_Largeflatfileschema).

EDIValues

DocumentSingleinvoiceitem.Itwillonlyshowupafterthesubleveliteratorcall.

WmEDIsamples Service Documentation

17

CHAPTER 1 WmEDIsamples Service Documentation

sampleServices:UNEDIFACTtoValues
IllustratesanexampleflowserviceforaninboundUN/EDIFACTdocument.
Input Parameters
edidata

StringUN/EDIFACTstandarddocument.

complianceCheck

String(optional)Whetherthecompliancecheckisrequired.Specifytrueor
false.

validate

returnErrors

Value of
complianceCheck

Meaning

true

Compliancecheckisrequired.

false

Compliancecheckisnotrequired.

String(optional)
Value of validate

Meaning

true

Validationcheckisrequired.

false

Validationcheckisnotrequired.

String(optional)Howyouwantthisservicetoreturnerrormessageswhen
validateissettotrue.Specifyoneofthefollowing.
Value of validate

Meaning

asArray

Returnvalidationerrorswiththeedidatainanarraycalled
errors.Thisisthedefault.

inResults

ReturnvalidationerrorsintheEDIValuesobject.

both

ReturnvalidationerrorsinbotherrorsandEDIValues.

Output Parameters
Values

DocumentTheoutputUN/EDIFACTdocumentinIDataobjectformat.

sampleServices:X12toValues
IllustratesanexampleflowserviceforaninboundANSIX12document.
Input Parameters

18

edidata

StringEDIdocument.

docProcessingSvc

StringAservicetoprocessanANSIX12transaction.

WmEDIsamples Service Documentation

sampleServices:X12toValues

complianceCheck

validate

returnErrors

String(optional)Whetherthecompliancecheckisrequired.Specifytrueor
false.
Value of complianceCheck

Meaning

true

Compliancecheckisrequired.

false

Compliancecheckisnotrequired.

String(optional)
Value of validate

Meaning

true

Validationcheckisrequired.

false

Validationcheckisnotrequired.

String(optional)Howyouwantthisservicetoreturnerrormessageswhen
validateissettotrue.Specifyoneofthefollowing.
Value of validate

Meaning

asArray

Returnvalidationerrorswiththeedidatainanarray
callederrors.Thisisthedefault.

inResults

ReturnvalidationerrorsintheEDIValuesobject.

both

ReturnvalidationerrorsinbotherrorsandEDIValues.

Output Parameters
Values

DocumentTheoutputANSIX12ISdocumentinIDataobjectformat.

WmEDIsamples Service Documentation

19

CHAPTER 1 WmEDIsamples Service Documentation

Sample Business Process


TheWmEDIsamplespackage,whichyoucandownloadfromtheKnowledgeBaseontheAdvantageWeb
siteathttp://advantage.webmethods.com,providesasamplethatillustratesonewayofusingEDI
documentsinabusinessprocess.Toreadanoverviewofthesample,learnhowtosetitupandtorunit,
performthefollowingprocedure.
Note: IfyouintendtoalsorunthesampleprovidedforthewebMethodsEDIINTModule
(whichisalsoincludedintheWmEDIsamplespackage),setuptheEDIINTModule
samplebeforesettingupthissamplebusinessprocess.
1

DownloadtheWmEDIsamplespackagefromtheKnowledgeBaseontheAdvantageWebsiteat
http://advantage.webmethods.com.
Important! YoushoulddeletetheWmEDIsamplespackagebeforegoingintoproduction.

OpentheServerAdministratorifitisnotalreadyopen.

IntheSolutionsmenuofthenavigationpanel,clickEDI.TheServerAdministratoropensanew
browserwindowtodisplaytheEDIModulehomepage.

FromtheEDIModulehomepage,intheEDI Processes menuofthenavigationpanel,clickRun a Demo.


Tocontinue,followtheinstructionsonthehomepage.

Thefollowingsectionsdescribetheservicesthatareusedintheexecutionandsetupofthesample.The
sampleserviceshavebeencertified,meaningthattheyhavebeentestedbywebMethods.

wm.b2b.editn.sample.setup:setupSample
CreatesthepartnerprofilesandTNdocumenttypesforthesample,iftheydonotexist.
Input Parameters

20

SenderCorporateName

StringCorporateNameofthesendersprofile.

SenderDuns

StringSendersDUNSnumber.

SenderHost

StringThemachinenameforthesender.

SenderPort

StringThemachinenameforthesender.

SenderUserName

StringTheusernameusedtoconnecttothesendersmachine.

SenderPassword

StringThepasswordusedtoconnecttothesendersmachine.

ReceiverCorporateName

StringCorporateNameofthereceiversprofile.

ReceiverDuns

StringReceiversDUNSnumber.

WmEDIsamples Service Documentation

wm.b2b.editn.sample.setup:setupEDIBizDocTypes

ReceiverHost

StringThemachinenameforthereceiver.

ReceiverPort

StringTheportonwhichtheReceiverwillbelistening.

ReceiverUsername

StringTheusernameusedtoconnecttothereceiversmachine.

ReceiverPassword

StringThepasswordusedtoconnecttothereceiversmachine.

Output Parameters
None
Usage Notes
Onlythesamplewebpagesshouldinvokethisservice.Ifyouintendtoalsorunthesampleprovided
forthewebMethodsEDIINTModule(intheWmEDIsamplespackage,whichislocatedinthe
KnowledgeBaseSamplesareaontheAdvantageWebsiteathttp://advantage.webmethods.com),set
uptheEDIINTModulesamplebeforesettinguptheWmEDIforTNsample.

wm.b2b.editn.sample.setup:setupEDIBizDocTypes
InstallstheTNdocumenttypesthatareneededforEDIdocumentsusedinthesample.
Input Parameters
None
Output Parameters
None
Usage Notes
Onlythesamplewebpagesshouldinvokethisservice.

wm.b2b.editn.sample.setup:setupXMLBizDocTypes
InstallstheTNdocumenttypesthatareneededforXMLdocumentsusedinthesample.
Input Parameters
None
Output Parameters
None
Usage Notes
Onlythesamplewebpagesshouldinvokethisservice.

WmEDIsamples Service Documentation

21

CHAPTER 1 WmEDIsamples Service Documentation

wm.b2b.editn.sample.setup:setupProfile
Setsuptheprofilesforpartnersinthesample.
Input Parameters
CorporationName

StringThecorporatenamefortheprofile.

DUNS

StringTheexternalIDfortheprofile.

host

StringThemachinename.

port

StringTheportforthisprofile.

url

StringTheURLtowhichtoconnect.

user

StringTheusernameforthisprofile.

password

StringThepasswordfortheprofile.

Output Parameters
None
Usage Notes
Onlythesamplewebpagesshouldinvokethisservice.

wm.b2b.editn.sample.receiver:Process850
TakesanEDIX124010850andgeneratesan855inresponse.
Input Parameters
None
Output Parameters
edidata

StringEDI855document.

Usage Notes
TheEDISeller850855businessprocessinvokesthisservice.

22

WmEDIsamples Service Documentation

wm.b2b.editn.sample.receiver:Send997

wm.b2b.editn.sample.receiver:Send997
Transmitsa997documenttothereceivertradingpartner.
Input Parameters
StringTextofanEDI997document.

997
Output Parameters
None
Usage Notes

TheReceiveEDIEnvelopebusinessprocessinvokesthisservice.

wm.b2b.editn.sample.receiver:Generate997
Createsa997documentinresponsetoanX12Envelope.
Input Parameters
X12Env

DocumentTheX12envelope.

edidata

StringX12Envelopeusedtogenerate997functionalacknowledgement.

Output Parameters
StringThe997document.

997
Usage Notes

TheReceiveEDIEnvelopebusinessprocessinvokesthisservice.

wm.b2b.editn.sample.receiver:Send855
SendsanEDI855documenttothesendertradingpartner.
Input Parameters
edidata

StringTextoftheEDI855document.

Output Parameters
None

WmEDIsamples Service Documentation

23

CHAPTER 1 WmEDIsamples Service Documentation

Usage Notes
TheEDISeller850855businessprocessinvokesthisservice.

wm.b2b.editn.sample.receiver:ProcessEnvelope
Usedtorepresentwhereenvelopeprocessingwouldoccurinabusinessprocess.
Input Parameters
None
Output Parameters
None
Usage Notes
TheReceiveEDIEnvelopebusinessprocessinvokesthisservice.

wm.b2b.editn.sample.util:getLastDocuments
RetrievestheBizDocEnvelopesforeventsthatoccurredinabusinessprocess.
Input Parameters
parameters

DocumentProvidedbytheprocessruntimefacilityoftheIntegrationServer.(The
processruntimefacilitymanagestheexecutionofbusinessprocesses.)

documents

DocumentProvidedbytheprocessruntimefacilityoftheIntegrationServer.

getContent

StringWhetherthedocumentcontent,whichissavedintheBizDocEnvelope,
shouldberetrieved.

lastEvents

String ListNamesofthemostrecentevent(s)thatoccurredinthebusinessprocess.

Output Parameters

24

recordCount

StringNumberofeventsreturned.

events

Document List(optional)TheBizDocEnvelopesforalldocumentevents.

WmEDIsamples Service Documentation

wm.b2b.editn.sample.util:enable

wm.b2b.editn.sample.util:enable
ThisserviceplacesavariableinthepipelinethataltersthewayinwhichconversationIDsareconstructed
forEDIdocuments.
TorunbothsidesofaconversationonasingleinstanceoftheIntegrationServer,theconstructionofthe
conversationIDisforcedtobeReceiverID-SenderID-InstanceID.
Input Parameters
None
Output Parameters
None
Usage Notes
Thisserviceshouldbeusedonlyindemonstrationcircumstances.TheconversationIDisonly
constructedthiswayifthevariableispresentinthepipelinewhentheservicewm.tn:receiveisinvoked.

wm.b2b.editn.sample.util:return997
Determineswhethera997shouldbesentinresponsetoadocument.
Input Parameters
parameters

DocumentProvidedbytheprocessruntimefacilityoftheIntegrationServer.(The
processruntimefacilitymanagestheexecutionofbusinessprocesses.)

documents

DocumentProvidedbytheprocessruntimefacilityoftheIntegrationServer.

Output Parameters
X12Env
send997

DocumentBizDocEnvelopeofthelasteventinthebusinessprocessthatoccurred.
StringWhethera997shouldbesent.Thiswillbetrueifa997shouldbesentor
falseifnot.

WmEDIsamples Service Documentation

25

CHAPTER 1 WmEDIsamples Service Documentation

wm.b2b.editn.sample.util:getBizDocFromEvent
RetrievestheBizDocEnvelopesforeventsthatoccurredinabusinessprocess.
Input Parameters
parameters

DocumentProvidedbytheprocessruntimefacilityoftheIntegrationServer.(The
processruntimefacilitymanagestheexecutionofbusinessprocesses.)

documents

DocumentProvidedbytheprocessruntimefacilityoftheIntegrationServer.

getContent

StringWhetherthedocumentcontent,whichissavedintheBizDocEnvelope,
shouldberetrieved.

lastEvents

String ListNamesofthemostrecentevent(s)thatoccurredinthebusinessprocess.

Output Parameters
bizEnv

DocumentTheBizDocEnvelope.

wm.b2b.editn.sample.util:checkSetup
Checksthesystemtodeterminewhetherthesampleisconfiguredproperly.
Input Parameters
None
Output Parameters

26

setupProperly

StringWhetherallthecomponentsofthesampleappeartobeconfigured
properly.Thiswillbetrueifconfiguredproperly;otherwisefalse.

profilesOkay

StringWhetherthetradingpartnerprofilesforthesamplearepresent.Thiswill
betrueifprofilesarepresent;otherwisefalse.

docsOkay

StringWhethertheTNdocumenttypesforthesamplearepresent.Thiswillbe
trueifTNdocumenttypesarepresent;otherwisefalse.

scriptsOkay

String Whethertheprocessmodelsforthesamplearepresent.Thiswillbetrueif
theprocessmodelsarepresent;otherwisefalse.

WmEDIsamples Service Documentation

wm.b2b.editn.sample.util:receive

wm.b2b.editn.sample.util:receive
Alternatereceivemethodthatfirstcallswm.b2b.editn.sample.util:enable,andthenwm.tn:receive.
ThisistoforcetheconversationIDsinsuchawaythatbothsidesoftheconversationcantakeplaceona
singleinstanceoftheIntegrationServer.
Input Parameters
None
Output Parameters
None
Usage Notes
Onlythesamplewebpagesshouldinvokethisservice.

wm.b2b.editn.sample.util:deliver
DeliverBizDocEnvelopesfromonetradingpartnertoanother.
DefaultstousingtheSecondaryHTTPdeliverymethodthatisspecifiedinthereceiverstradingpartner
profile.
Input Parameters
bizdoc

DocumentTheBizDocEnvelopetodeliver.

Output Parameters
None
Usage Notes
Onlythesamplewebpagesshouldinvokethisservice.

wm.b2b.editn.sample.sender:Process997
Thisisaplaceholderservicetorepresenttheprocessingofa997donebythesender.
Input Parameters
None
Output Parameters
None

WmEDIsamples Service Documentation

27

CHAPTER 1 WmEDIsamples Service Documentation

Usage Notes
TheSendEDIEnvelopebusinessprocessinvokesthisservice.

wm.b2b.editn.sample.sender:Log850
Thisisaplaceholderservicetorepresenttheloggingofanoutbound850messagedonebythesender.
Input Parameters
None
Output Parameters
None
Usage Notes
TheEDIBuyer850855businessprocessinvokesthisservice.

wm.b2b.editn.sample.sender:SendEnvelope
SendsanX12envelopecontaininganEDI850documenttoatradingpartner.
Input Parameters
None
Output Parameters
None
Usage Notes
TheSendEDIEnvelopebusinessprocessinvokesthisservice.

wm.b2b.editn.sample.sender:GenerateEnvelope
GeneratesanX12envelopecontaininganEDI850document.
Input Parameters
None
Output Parameters
None

28

WmEDIsamples Service Documentation

wm.b2b.editn.sample.sender:Process855

Usage Notes
TheEDIBuyer850855businessprocessinvokesthisservice.

wm.b2b.editn.sample.sender:Process855
Placeholdertorepresentbusinesslogicthatisexecutedwhenan855documentisreceived.
Input Parameters
None
Output Parameters
None
Usage Notes
TheEDIBuyer850855businessprocess

wm.b2b.editn.sample.sender:start
Startsthesample.CreatesanXMLPurchaseOrderdocumentthatissubmittedtoTradingNetworks.
Input Parameters
SenderID

StringDUNSnumberofthetradingpartnerthatissendingthedocument.

ReceiverID

StringDUNSnumberofthetradingpartnertowhomthedocumentwillbe
sent.

DocumentID

StringUniqueidentifierforthepurchaseorder.

ControlNumber

String Uniqueidentifierforthegroupsegmentthatwillcontainthepurchase
order.

Output Parameters
SenderTNID

StringTheTradingNetworksinternalIDforthesender.

ReceiverTNID

String TheTradingNetworksinternalIDforthereceiver.

Usage Notes
Onlythesamplewebpagesshouldinvokethisservice.

WmEDIsamples Service Documentation

29

CHAPTER 1 WmEDIsamples Service Documentation

wm.EDIINT.sample
YoucanrunthefollowingsamplesendservicewithinthewebMethodsDevelopertoexchangesample
EDIINTmessages.

wm.EDIINT.sample:send
ReadstheinputfileasanInputStreamandinvokesthewm.EDIINT.sendservice.
Input Parameters

30

dataFileName

StringNameandlocationofthefiletosend.

dataContentType

StringThecontenttypeofthefiletosend,forexampleapplication/edi-x12.

type

StringTheS/MIMEtypethatyouwanttousefortheoutboundEDIINTmessage.
Specifyoneofthefollowing:
Value of type

Description

plain

Youwantthewm.EDIINT.sample:sendservicetoneither
signnorencrypttheoutboundEDIINTmessage.

signed

Youwantthewm.EDIINT.sample:sendservicetosignthe
outboundEDIINTmessage.

encrypted

Youwantthewm.EDIINT.sample:sendservicetoencrypt
theoutboundEDIINTmessage.

signedAndEncrypted

Youwantthewm.EDIINT.sample:send servicetosignand
encrypttheoutboundEDIINTmessage.

getFromProfile

Youwantthewm.EDIINT.sample:sendservicetodetermine
whethertosignand/orencrypttheoutboundEDIINT
messageusingthevalueoftheS/MIME Typeextended
fieldfromthereceiversprofile.

WmEDIsamples Service Documentation

wm.EDIINT.sample:send

deliveryMethod

StringThedeliverymethodyouwanttousetosendtheEDIINTdocument.The
wm.EDIINT:sendserviceobtainstheTradingNetworksprofileforthereceiver
(specifiedbythereceiverIDinputvariable)anddeliverstheEDIINTdocumentto
thereceiverssystemusingtheinformationspecifiedforthedeliverymethodyou
specify.SpecifyadeliverymethodthatisdefinedinthereceiversTrading
Networksprofile.
For EDIINT AS1,specifyoneofthefollowing:
PrimarySMTP(correspondstotheTradingNetworksPrimary E-mail

deliverymethod)
SecondarySMTP(correspondstotheTradingNetworksSecondary E-mail
deliverymethod)

For EDIINT AS2,specifyoneofthefollowing:


PrimaryHTTP
SecondaryHTTP
PrimaryHTTPS
SecondaryHTTPS

For EDIINT AS3,specifythefollowing:


AS3

requestMDN

StringWhetheryouwantthereceivertoreturnanMDN.Specifyoneofthe
following:
Value of requestMDN

Meaning

none

DonotrequestareturnMDN.

synchronousMDN

RequestareturnsynchronousMDN.

asynchronousMDN

RequestareturnasynchronousMDN.

Note: IfyouspecifyPrimarySMTP,SecondarySMTP,PrimaryFTPS,or
SecondaryFTPSfordeliveryMethod,youcanonlyreceiveanasynchronousMDN.
requestSignedReceipt

StringWhetheryouwanttheMDNtobesigned.
Note: requestSignedReceiptisignoredwhenrequestMDNisfalse.
Value of
requestSignedReceipt

Meaning

true

RequestasignedMDN.

false

Requestaplain(notsigned)MDN.

WmEDIsamples Service Documentation

31

CHAPTER 1 WmEDIsamples Service Documentation

senderID

DocumentIdentificationofthesenderoftheEDIINTmessage.
Variable in senderID

Description

id

ThesendersexternalID.Thatis,theidentificationthat
youwantforthesenderinthemessage.

idTypeDesc

Optional.TheexternalIDtypeforthesenderIDyou
specifiedinid.ThisisanexternalIDtypeasdefinedin
TradingNetworks.
Note: Bydefault,theserviceusestheappropriate
externalIDtypebasedonthevalueyouspecifyforthe
deliveryMethodparameter.Forexample,ifyouspecify
AS3forthedeliveryMethodparameter,theserviceuses
theEDIINTAS3externalIDtype.Specifyavaluefor
idTypeDesconlyifyouwanttooverridethisdefault.

receiverID

DocumentIdentificationofthereceiveroftheEDIINTmessage.
Variable in senderID

Description

id

ThereceiversexternalID.Thatis,theidentification
thatyouwantforthereceiverinthemessage.

idTypeDesc

Optional.TheexternalIDtypeforthereceiverIDyou
specifiedinid.ThisisanexternalIDtypeasdefinedin
TradingNetworks.
Note: Bydefault,theserviceusestheappropriate
externalIDtypebasedonthevalueyouspecifyforthe
deliveryMethodparameter.Forexample,ifyouspecify
AS3forthedeliveryMethodparameter,theserviceuses
theEDIINTAS3externalIDtype.Specifyavaluefor
idTypeDesconlyifyouwanttooverridethisdefault.

conversationID

String(optional)TheconversationIDfortheoutboundEDIINTmessage.
TheconversationIDparameterisanidentifierthatlinksalldocumentsthatare
partofthesamebusinessprocess(alsocalledaconversation).Thatis,all
documentsinthesamebusinessprocessneedtohavethesameconversationID. As
describedinthewebMethodsTradingNetworksUsersGuide,TradingNetworkscan
extractconversationIDsfromEDIdocumentsandusethemtopassdocumentsto
thewebMethodsProcessRunTime(PRT)afterTradingNetworksperformsthe
actionsidentifiedbyaprocessingrule.

32

WmEDIsamples Service Documentation

wm.EDIINT.sample:send

Inthisfield,youmightwanttospecifythesameconversationIDasthatofthe
payloadthatyouaresending.TheEDIINTModuleautomaticallyassignstoa
returnMDNthesameconversationIDthatisassignedhere.
Note: LeavethisfieldblankunlessyouownalicenseforthewebMethodsProcess
RunTime(PRT).
Output Parameters
None

WmEDIsamples Service Documentation

33

CHAPTER 1 WmEDIsamples Service Documentation

34

WmEDIsamples Service Documentation

Das könnte Ihnen auch gefallen