diff --git a/v13/src/TreeTransformApplication/.project b/v13/src/TreeTransformApplication/.project new file mode 100644 index 0000000..16613aa --- /dev/null +++ b/v13/src/TreeTransformApplication/.project @@ -0,0 +1,118 @@ + + + TreeTransformApplication + + + + + + com.ibm.etools.mft.applib.applibbuilder + + + + + com.ibm.etools.mft.applib.applibresourcevalidator + + + + + com.ibm.etools.mft.connector.policy.ui.PolicyBuilder + + + + + com.ibm.etools.mft.applib.mbprojectbuilder + + + + + com.ibm.etools.msg.validation.dfdl.mlibdfdlbuilder + + + + + com.ibm.etools.mft.flow.adapters.adapterbuilder + + + + + com.ibm.etools.mft.flow.sca.scabuilder + + + + + com.ibm.etools.msg.validation.dfdl.mbprojectresourcesbuilder + + + + + com.ibm.etools.mft.esql.lang.esqllangbuilder + + + + + com.ibm.etools.mft.map.builder.mslmappingbuilder + + + + + com.ibm.etools.mft.flow.msgflowxsltbuilder + + + + + com.ibm.etools.mft.flow.msgflowbuilder + + + + + com.ibm.etools.mft.decision.service.ui.decisionservicerulebuilder + + + + + com.ibm.etools.mft.pattern.capture.PatternBuilder + + + + + com.ibm.etools.mft.json.builder.JSONBuilder + + + + + com.ibm.etools.mft.restapi.ui.restApiDefinitionsBuilder + + + + + com.ibm.etools.mft.policy.ui.policybuilder + + + + + com.ibm.etools.mft.msg.assembly.messageAssemblyBuilder + + + + + com.ibm.etools.msg.validation.dfdl.dfdlqnamevalidator + + + + + com.ibm.etools.mft.bar.ext.barbuilder + + + + + com.ibm.etools.mft.unittest.ui.TestCaseBuilder + + + + + + com.ibm.etools.msgbroker.tooling.applicationNature + com.ibm.etools.msgbroker.tooling.messageBrokerProjectNature + + diff --git a/v13/src/TreeTransformApplication/ModelJSON.json b/v13/src/TreeTransformApplication/ModelJSON.json new file mode 100644 index 0000000..64a6696 --- /dev/null +++ b/v13/src/TreeTransformApplication/ModelJSON.json @@ -0,0 +1,16 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Issue", + "type": "object", + "properties": { + "Problem": { + "type": "object", + "properties": { + "Description": { + "type": "string" + } + } + } + }, + "required": ["Problem"] +} \ No newline at end of file diff --git a/v13/src/TreeTransformApplication/ModelXML.xsd b/v13/src/TreeTransformApplication/ModelXML.xsd new file mode 100644 index 0000000..5596805 --- /dev/null +++ b/v13/src/TreeTransformApplication/ModelXML.xsd @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/v13/src/TreeTransformApplication/TreeTransform.msgflow b/v13/src/TreeTransformApplication/TreeTransform.msgflow new file mode 100644 index 0000000..c3c32c1 --- /dev/null +++ b/v13/src/TreeTransformApplication/TreeTransform.msgflow @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/v13/src/TreeTransformApplication/TreeTransformValidateJSON.msgflow b/v13/src/TreeTransformApplication/TreeTransformValidateJSON.msgflow new file mode 100644 index 0000000..d37e47a --- /dev/null +++ b/v13/src/TreeTransformApplication/TreeTransformValidateJSON.msgflow @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/v13/src/TreeTransformApplication/TreeTransformValidateJSON_inputMessage.xml b/v13/src/TreeTransformApplication/TreeTransformValidateJSON_inputMessage.xml new file mode 100644 index 0000000..40af25a --- /dev/null +++ b/v13/src/TreeTransformApplication/TreeTransformValidateJSON_inputMessage.xml @@ -0,0 +1,9 @@ + + + + %7B%22Problem%22%3A+%7B%22Description%22%3A%22This+is+a+short+summary+description%22%7D%7D</plainText> + </InputMessage> + <InputMessage timestamp="1718873433958" nodeId="FCMComposite_1_1" name="Invalid JSON" id="1718873433958-356"> + <plainText>%7B%22ThisFieldIsNotInTheJSONSchema%22%3A+%7B%22Description%22%3A%22This+is+a+short+summary+description%22%7D%7D</plainText> + </InputMessage> +</MessagePool> diff --git a/v13/src/TreeTransformApplication/TreeTransformValidateXML.msgflow b/v13/src/TreeTransformApplication/TreeTransformValidateXML.msgflow new file mode 100644 index 0000000..3ba90a0 --- /dev/null +++ b/v13/src/TreeTransformApplication/TreeTransformValidateXML.msgflow @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ComIbmCompute.msgnode="ComIbmCompute.msgnode" xmlns:ComIbmWSInput.msgnode="ComIbmWSInput.msgnode" xmlns:ComIbmWSReply.msgnode="ComIbmWSReply.msgnode" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:eflow="http://www.ibm.com/wbi/2005/eflow" xmlns:utility="http://www.ibm.com/wbi/2005/eflow_utility" nsURI="TreeTransformValidateXML.msgflow" nsPrefix="TreeTransformValidateXML.msgflow"> + <eClassifiers xmi:type="eflow:FCMComposite" name="FCMComposite_1" nodeLayoutStyle="RECTANGLE"> + <eSuperTypes href="http://www.ibm.com/wbi/2005/eflow#//FCMBlock"/> + <translation xmi:type="utility:TranslatableString" key="TreeTransformValidateXML" bundleName="TreeTransformValidateXML" pluginId="TreeTransformerApplication"/> + <colorGraphic16 xmi:type="utility:GIFFileGraphic" resourceName="platform:/plugin/TreeTransformerApplication/icons/full/obj16/TreeTransformValidateXML.gif"/> + <colorGraphic32 xmi:type="utility:GIFFileGraphic" resourceName="platform:/plugin/TreeTransformerApplication/icons/full/obj30/TreeTransformValidateXML.gif"/> + <composition> + <nodes xmi:type="ComIbmWSInput.msgnode:FCMComposite_1" xmi:id="FCMComposite_1_1" location="102,75" URLSpecifier="/ValidateXML" messageDomainProperty="XMLNSC" validateTiming="immediate" validateMaster="contentAndValue"> + <translation xmi:type="utility:ConstantString" string="HTTP /ValidateXML"/> + </nodes> + <nodes xmi:type="ComIbmWSReply.msgnode:FCMComposite_1" xmi:id="FCMComposite_1_2" location="482,71"> + <translation xmi:type="utility:ConstantString" string="HTTP Reply"/> + </nodes> + <nodes xmi:type="ComIbmCompute.msgnode:FCMComposite_1" xmi:id="FCMComposite_1_3" location="288,33" computeExpression="esql://routine/#TreeTransformerValidateXML_Compute.Main"> + <translation xmi:type="utility:ConstantString" string="Compute"/> + </nodes> + <connections xmi:type="eflow:FCMConnection" xmi:id="FCMConnection_1" targetNode="FCMComposite_1_2" sourceNode="FCMComposite_1_1" sourceTerminalName="OutTerminal.out" targetTerminalName="InTerminal.in"/> + <connections xmi:type="eflow:FCMConnection" xmi:id="FCMConnection_2" targetNode="FCMComposite_1_3" sourceNode="FCMComposite_1_1" sourceTerminalName="OutTerminal.failure" targetTerminalName="InTerminal.in"/> + <connections xmi:type="eflow:FCMConnection" xmi:id="FCMConnection_3" targetNode="FCMComposite_1_2" sourceNode="FCMComposite_1_3" sourceTerminalName="OutTerminal.out" targetTerminalName="InTerminal.in"/> + </composition> + <propertyOrganizer/> + <stickyBoard/> + </eClassifiers> +</ecore:EPackage> diff --git a/v13/src/TreeTransformApplication/TreeTransformValidateXML_inputMessage.xml b/v13/src/TreeTransformApplication/TreeTransformValidateXML_inputMessage.xml new file mode 100644 index 0000000..4ef6abe --- /dev/null +++ b/v13/src/TreeTransformApplication/TreeTransformValidateXML_inputMessage.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<MessagePool xmlns="http://wwww.ibm.com/iib/test/1.0.0"> + <InputMessage timestamp="1718873856042" nodeId="FCMComposite_1_1" name="Invalid XML" id="1718873856042-647"> + <plainText>%3CThisFieldIsNotInTheSchema%3E%0D%0A%3CDescription%3EThis+is+a+short+summary+description%3C%2FDescription%3E%0D%0A%3C%2FThisFieldIsNotInTheSchema%3E</plainText> + </InputMessage> + <InputMessage timestamp="1718873911043" nodeId="FCMComposite_1_1" name="Valid XML" id="1718873911043-718"> + <plainText>%3CProblem%3E%0D%0A%3CDescription%3EThis+is+a+short+summary+description%3C%2FDescription%3E%0D%0A%3C%2FProblem%3E</plainText> + </InputMessage> +</MessagePool> diff --git a/v13/src/TreeTransformApplication/TreeTransform_inputMessage.xml b/v13/src/TreeTransformApplication/TreeTransform_inputMessage.xml new file mode 100644 index 0000000..ceb1df9 --- /dev/null +++ b/v13/src/TreeTransformApplication/TreeTransform_inputMessage.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<MessagePool xmlns="http://wwww.ibm.com/iib/test/1.0.0"> + <InputMessage timestamp="1718874372065" nodeId="FCMComposite_1_1" name="Input" id="1718874372065-780"> + <plainText>%3CProblem%3E%0D%0A%3CDescription%3EBen+magical+new+description+2%3C%2FDescription%3E%0D%0A%3C%2FProblem%3E</plainText> + </InputMessage> +</MessagePool> diff --git a/v13/src/TreeTransformApplication/TreeTransformerValidateJSON_Compute.esql b/v13/src/TreeTransformApplication/TreeTransformerValidateJSON_Compute.esql new file mode 100644 index 0000000..077845a --- /dev/null +++ b/v13/src/TreeTransformApplication/TreeTransformerValidateJSON_Compute.esql @@ -0,0 +1,24 @@ + + +CREATE COMPUTE MODULE TreeTransformerValidateJSON_Compute + CREATE FUNCTION Main() RETURNS BOOLEAN + BEGIN + CALL CopyMessageHeaders(); + SET OutputRoot.JSON.Data.Message.Feedback = 'The input message failed JSON validation'; + RETURN TRUE; + END; + + CREATE PROCEDURE CopyMessageHeaders() BEGIN + DECLARE I INTEGER 1; + DECLARE J INTEGER; + SET J = CARDINALITY(InputRoot.*[]); + WHILE I < J DO + SET OutputRoot.*[I] = InputRoot.*[I]; + SET I = I + 1; + END WHILE; + END; + + CREATE PROCEDURE CopyEntireMessage() BEGIN + SET OutputRoot = InputRoot; + END; +END MODULE; diff --git a/v13/src/TreeTransformApplication/TreeTransformerValidateXML_Compute.esql b/v13/src/TreeTransformApplication/TreeTransformerValidateXML_Compute.esql new file mode 100644 index 0000000..6e8409d --- /dev/null +++ b/v13/src/TreeTransformApplication/TreeTransformerValidateXML_Compute.esql @@ -0,0 +1,24 @@ + + +CREATE COMPUTE MODULE TreeTransformerValidateXML_Compute + CREATE FUNCTION Main() RETURNS BOOLEAN + BEGIN + CALL CopyMessageHeaders(); + SET OutputRoot.XMLNSC.Message.Feedback = 'The input message failed XML validation'; + RETURN TRUE; + END; + + CREATE PROCEDURE CopyMessageHeaders() BEGIN + DECLARE I INTEGER 1; + DECLARE J INTEGER; + SET J = CARDINALITY(InputRoot.*[]); + WHILE I < J DO + SET OutputRoot.*[I] = InputRoot.*[I]; + SET I = I + 1; + END WHILE; + END; + + CREATE PROCEDURE CopyEntireMessage() BEGIN + SET OutputRoot = InputRoot; + END; +END MODULE; diff --git a/v13/src/TreeTransformApplication/application.descriptor b/v13/src/TreeTransformApplication/application.descriptor new file mode 100644 index 0000000..166bf9e --- /dev/null +++ b/v13/src/TreeTransformApplication/application.descriptor @@ -0,0 +1 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?><ns2:appDescriptor xmlns="http://com.ibm.etools.mft.descriptor.base" xmlns:ns2="http://com.ibm.etools.mft.descriptor.app"><references/></ns2:appDescriptor> \ No newline at end of file