I would to know what are the various ways we can validate the inbound and outbound ANSI X12 Document. Ex: Invalid Segment Count, Invalid ANSI X12 Qualifier, Missing Requirement, Missing Required Segment etc. I am using 6.1 and Using TN to submit the EDI document.
The normal EDI validations done for (Inbound/Outbound)based on the Schema the WmEDI packages services will help.
For Inbound validation document level use the (wm.b2b.edi:convertToValues)and provide the following inputs EDIFFSchema=(X12document),validate=true,maxErrors=-1,
returnErrors=AsArray it will give output "errors"list,fomat this errors and display to users
For Outbound Validation document level use the
wm.b2b.edi:convertToString service and provide the inputs
ffSchema(X12 document) and if any errors it will give output “errorArray”,so format this errors and display to users.
And TN will do the EDI X12 Envelope Validation upon receiving the document,so basically you have to handle documentlevel validations using the inputs as i mentioned above.
Regarding OutboundValidation on REF segment,check in the FFSchema itself whether REF/REF02 field is required in runtime or not.Another way is see in the X12 document rightclick on this REF02 field and check the properties Constraints whether this Field is checked(Field mustexist in runtime)?same thing applies for the required segments.
Then only the convertToString will validate based on the ffSchema.
I verified the REF02 properties it is not a required field. But as per ANSI X12 Constratins if REF01 is there then REF02 should be there…
is webMethods considered all X12 validation in their schemas???
You can go a head and change REF02 in the EDI X12 4030 schema itself,but if you find same problems with remaining other seqments then contact tech support and raise the ANSI X12 validation rule,so they will provide a fix and solve the issue.This might be useful info for all the clients and will know how to fix it.