0% found this document useful (0 votes)
67 views2 pages

Aaa

The document outlines a code snippet for a compute module named 'digi_flow_Compute' that processes SOAP messages and inserts data into a database. It includes functions for copying message headers and entire messages, as well as inserting specific values from the input message into a database table. The code also sets various SQL error handling variables and defines namespaces for XML parsing.

Uploaded by

Abhinav Garg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views2 pages

Aaa

The document outlines a code snippet for a compute module named 'digi_flow_Compute' that processes SOAP messages and inserts data into a database. It includes functions for copying message headers and entire messages, as well as inserting specific values from the input message into a database table. The code also sets various SQL error handling variables and defines namespaces for XML parsing.

Uploaded by

Abhinav Garg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

INSERT INTO Database.WMBPGM.

WMB_LOG (
NAME
)
VALUES (
InputRoot.SOAP.Body.ns:DigitalDocServiceCallRequest.ns:DigitalDo
cument.ns:CreationDate);
SET Environment.SQLCODE =
SQLCODE;
Environment.XMLNSC.Data.Mobile );
RETURN TRUE;
END;
----------------------------------------DECLARE ns4 NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
DECLARE ns NAMESPACE 'http://cusa.s21.com/s21/integration/digitaldocument';
CREATE COMPUTE MODULE digi_flow_Compute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
-- CALL CopyMessageHeaders();
-- CALL CopyEntireMessage();
CREATE LASTCHILD OF Environment DOMAIN 'XMLNSC' PARSE(InputRoot.
BLOB.BLOB);
INSERT INTO Database.S21LNKLIB7.WSPS21HD (
ACRTDA
,APROTM
,AUSRID
)
VALUES (
Environment.XMLNSC.ns4:Envelope.ns4:Body.ns:DigitalDocument.ns:C
reationDate /// first we would write inputroot instead of environment so that au
tomatically the values can be shown by ctrl space,after that we replace it with
environment
,Environment.XMLNSC.ns4:Envelope.ns4:Body.ns:DigitalDocument.ns:
ProcessingTime
,inputroot
);
SET Environment.SQLCODE =
SET Environment.SQLNATIVEERROR
SET Environment.SQLERRORTEXT
SET Environment.SQLSTATE
-Environment.XMLNSC.Data.Mobile
RETURN TRUE;
END;

SQLCODE;
=
SQLNATIVEERROR;
=
SQLERRORTEXT;
=
SQLSTATE;
);

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;

You might also like