Topic
No replies
El-Filahi
El-Filahi
2 Posts
ACCEPTED ANSWER

Pinned topic Error on CONTAINER DFHHEADER

‏2013-10-14T12:24:25Z |

Hi everyone.

I need help please.

 

I'm trying to set an xml on the header request of a SOAP COBOL CICS client.

 

in configured the xml pipeline  as followed

<?xml version="1.0" encoding="EBCDIC-CP-US"?>
<requester_pipeline xmlns="http://www.ibm.com/software/htp/cics/pipeline">
  <service>
    <service_handler_list>
      <cics_soap_1.1_handler>
        <headerprogram>
          <program_name>BIBLDE00</program_name>
          <namespace>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd</namespace>
          <localname>Security</localname>
          <mandatory>true</mandatory>
        </headerprogram>
      </cics_soap_1.1_handler>  
    </service_handler_list>
  </service>
</requester_pipeline>

after that tried to call the web service from the cobol program

 

the problem is that when i try to execute the

EXEC CICS PUT CONTAINER('DFHHEADER')

i'm receiveing an IEBRESP 110 and an IEBRESP2 18

 

can you help me please it is now 2 days i'm trying to figure out what is going on

we are on CICS TS 3.2

i have the following program code

Thank you in advance.

       PROCESS CICS,NODYNAM,NSYMBOL(NATIONAL),TRUNC(STD)
      * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
      * New CICS TS Web Service Requestor
      * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
       IDENTIFICATION DIVISION.
      * Begin Identification Divsion
        PROGRAM-ID. 'BIBLDE00'.
        AUTHOR. RDZ.
        INSTALLATION. 9.3.300.V20100501_0728.
        DATE-WRITTEN. 7/10/13 16:54.
      * End Identification Divsion
       DATA DIVISION.
      * Begin Data Divsion
       WORKING-STORAGE SECTION.
      * Begin Working-Storage Section
      * **************************************************************
      * Operations Available On The Remote Web Service
      * **************************************************************
       1 OPERATION-NAME-1.
       2 PIC X(11) USAGE DISPLAY
           VALUE 'CreateOrder'.
       1 OPERATION-NAME-2.
       2 PIC X(8) USAGE DISPLAY
           VALUE 'GetOrder'.
       1 OPERATION-NAME-3.
       2 PIC X(12) USAGE DISPLAY
           VALUE 'SearchOrders'.
       1 OPERATION-NAME-4.
       2 PIC X(17) USAGE DISPLAY
           VALUE 'GetTrackingPoints'.
       1 OPERATION-NAME-5.
       2 PIC X(20) USAGE DISPLAY
           VALUE 'ChangeTrackingPoints'.
       1 OPERATION-NAME-6.
       2 PIC X(11) USAGE DISPLAY
           VALUE 'ChangeOrder'.
       1 OPERATION-NAME-7.
       2 PIC X(11) USAGE DISPLAY
           VALUE 'DeleteOrder'.
       1 OPERATION-NAME-8.
       2 PIC X(10) USAGE DISPLAY
           VALUE 'ChangeTags'.
       1 OPERATION-NAME-9.
       2 PIC X(17) USAGE DISPLAY
           VALUE 'GetTagDefinitions'.
       1 OPERATION-NAME-10.
       2 PIC X(24) USAGE DISPLAY
           VALUE 'GetOrdersByStockRevision'.
       1 OPERATION-NAME-11.
       2 PIC X(16) USAGE DISPLAY
           VALUE 'ProcessAliveTest'.
      * End Working-Storage Section
       LOCAL-STORAGE SECTION.
      * Begin Local-Storage Section
      * **************************************************************
      * Program Work Variables
      * **************************************************************
       1 SOAP-PIPELINE-WORK-VARIABLES.
       2 WS-WEBSERVICE-NAME PIC X(32).
       2 WS-OPERATION-NAME PIC X(255).
       2 WS-CONTAINER-NAME PIC X(16).
       2 WS-CHANNEL-NAME PIC X(16).
       2 COMMAND-RESP PIC S9(8) COMP.
       2 COMMAND-RESP2 PIC S9(8) COMP.
       2 COMMAND-RESP2X PIC 9(8).
       2 WS-CONTAINER-LEN  PIC S9(4) COMP.
      * Specify A URI To Override The Web Service Description
       1 URI-RECORD-STRUCTURE.
       2 FILLER PIC X(10).
       2 WS-URI-OVERRIDE PIC X(255).
      * **************************************************************
       01 DISPLAYTD      PIC X(75).
       01 WS-MES-LN      PIC S9(4) COMP VALUE 75.
       01 ERRORLOG       PIC X(5000).
       01 CONTAINER-LEN  PIC S9(8) COMP-4 SYNCHRONIZED VALUE 0.
       01 OUTRESULT      PIC X(2000).
       01 XMLNS          PIC X(500).
       01 XMLNS-LENGHT   PIC S9(4) COMP.

       01 WS-DATA-I.
          03 executeoperation.
            05 operationString-length       PIC S9999 COMP-5 SYNC.
            05 operationstring              PIC x(32767).
       01 WS-DATA-O.
          03 executeoperationResponse.
             06 executeoperationRetu-length PIC S9999 COMP-5 SYNC.
             06 executeoperationReturn      PIC x(32767).
       01 WS-WSA-HEADER.
          03 WS-WSA-HEADERXML               PIC X(2000).
      * **************************************************************
      * Language Structures
      * **************************************************************
       1 LANG-BIBLIN01.
           COPY BIBLIN01.
       1 LANG-BIBLIN02.
           COPY BIBLIN02.
       1 LANG-BIBLIN03.
           COPY BIBLIN03.
       1 LANG-BIBLIN04.
           COPY BIBLIN04.
       1 LANG-BIBLIN05.
           COPY BIBLIN05.
       1 LANG-BIBLIN06.
           COPY BIBLIN06.
       1 LANG-BIBLIN07.
           COPY BIBLIN07.
       1 LANG-BIBLIN08.
           COPY BIBLIN08.
       1 LANG-BIBLIN09.
           COPY BIBLIN09.
       1 LANG-BIBLIN10.
           COPY BIBLIN10.
       1 LANG-BIBLIN11.
           COPY BIBLIN11.
       1 LANG-BIBLOU01.
           COPY BIBLOU01.
       1 LANG-BIBLOU02.
           COPY BIBLOU02.
       1 LANG-BIBLOU03.
           COPY BIBLOU03.
       1 LANG-BIBLOU04.
           COPY BIBLOU04.
       1 LANG-BIBLOU05.
           COPY BIBLOU05.
       1 LANG-BIBLOU06.
           COPY BIBLOU06.
       1 LANG-BIBLOU07.
           COPY BIBLOU07.
       1 LANG-BIBLOU08.
           COPY BIBLOU08.
       1 LANG-BIBLOU09.
           COPY BIBLOU09.
       1 LANG-BIBLOU10.
           COPY BIBLOU10.
       1 LANG-BIBLOU11.
           COPY BIBLOU11.
      * End Local-Storage Section
       LINKAGE SECTION.
      * Begin Linkage Section
      * 01 DFHCOMMAREA.
      *   03 DEALERNUMBER  PIC X(5).
      *   03 BRAND         PIC X.
      * End Linkage Section
      * End Data Divsion
       PROCEDURE DIVISION
           .
      * Begin Procedure Division
       MAINLINE SECTION.
      * --------------------------------------------------------------
      * Initialize Work Variables
      * --------------------------------------------------------------
           INITIALIZE SOAP-PIPELINE-WORK-VARIABLES.
           INITIALIZE URI-RECORD-STRUCTURE.
      * --------------------------------------------------------------
      * Container DFHWS-DATA must be present when a service requester pr
      * ogram issues an EXEC CICS INVOKE WEBSERVICE command. When the co
      * mmand is issued, CICS converts the language structure that is in
      *  the container into a SOAP request. When the soap response is re
      * ceived, CICS converts it into another language structure that is
      *  returned to the application in the same container.
      * --------------------------------------------------------------
           MOVE 'DFHWS-DATA'
             TO WS-CONTAINER-NAME
      * --------------------------------------------------------------
      * Channel Passed To The Web Service Call
      * --------------------------------------------------------------
           MOVE 'SERVICE-CHANNEL'
             TO WS-CHANNEL-NAME
      * --------------------------------------------------------------
      * WEBSERVICE resource installed in this CICS region
      * --------------------------------------------------------------
           MOVE 'NADINOrderService'
             TO WS-WEBSERVICE-NAME
      * --------------------------------------------------------------
      * Operation To Invoke On The Remote Web Service
      * Calling Operation Name 8 (Change tag operation to bloc a dealer)
      * --------------------------------------------------------------
           MOVE OPERATION-NAME-8
             TO WS-OPERATION-NAME
      * --------------------------------------------------------------
      * Populate Request Language Structure
      * --------------------------------------------------------------
           INITIALIZE LANG-BIBLIN08
           INITIALIZE BIBLIN08-SearchByDealer2
           INITIALIZE BIBLIN08-TagDealer
        

       STRING
             'http://10.193.7.234:8080/'
             'omd-server/'
             'NADINOrderServiceServlet' DELIMITED BY SIZE
             INTO WS-URI-OVERRIDE
           END-STRING
           INITIALIZE WS-WSA-HEADER.
*
           STRING
             '<wsse:Security xmlns:wsse='
             '"http://docs.oasis-open.org/wss/2004/01/'
             'oasis-200401-wss-wssecurity-secext-1.0.xsd">'
             '<saml2:Assertion xmlns:saml2='
             '"urn:oasis:names:tc:SAML:2.0:assertion" ID='
             '"0e45e581-7a85-45db-a3d9-e1ced97ccb65" IssueInstant='
             '"2008-10-14T13:29:29.219Z" Version="2.0">'
             '<saml2:Subject>'
             '<saml2:NameID Format='
             '"urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified" '
             'NameQualifier='
             '"http://xmldefs.volkswagenag.com/Technical/Security/'
             'NameQualifier/V1#DPGlobalUserID">'
             '11417'
             '</saml2:NameID>'
             '</saml2:Subject>'
             '<saml2:Advice>'
             '<saml2:Assertion ID='
             '"5a4aafba-5974-4fe7-bbee-825d156a235f" IssueInstant='
             '"2008-10-14T13:29:29.219Z" Version="2.0">'
             '<saml2:Subject>'
             '<saml2:NameID Format='
             '"urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified" '
             'NameQualifier='
             '"http://xmldefs.volkswagenag.com/Technical/Security/'
             'NameQualifier/V1#UMSGlobalUserID">'
             '11417'
             '</saml2:NameID>'
             '</saml2:Subject>'
             '</saml2:Assertion>'
             '</saml2:Advice>'
             '</saml2:Assertion>'
             '</wsse:Security>'
             '<wsa:To xmlns:wsu='
             '"http://docs.oasis-open.org/wss/2004/01/'
             'oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id='
             '"f5f7e8e3-5a14-4d8f-b71d-a312d1b70e89">'
             'ws://volkswagenag.com/Retail/Legacy/NADINOrderService/V2'
             '</wsa:To>'
             '<wsa:MessageID xmlns:wsu='
             '"http://docs.oasis-open.org/wss/2004/01/'
             'oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id='
             '"7bf3d5c4-7387-406f-9507-199cdb6624c4">'
             'aacb0bbd-f8e8-46de-9a03-48fb8781a659</wsa:MessageID>'
             DELIMITED BY SIZE
             INTO WS-WSA-HEADERXML
           END-STRING
           MOVE 1341 TO WS-CONTAINER-LEN
   

            SET SearchByDealer2  TO TRUE
            MOVE X'04'           TO
                 ChangeTagsItem-enum IN ChangeTagsItem
            MOVE 'ChangeTagsItem' TO
                 ChangeTagsItem-cont IN ChangeTagsItem

            MOVE 0 TO TagOrder-num IN TagCompleteList
            MOve 1 TO TagDealer-num IN TagCompleteList
            MOVE 'TagDealer' TO TagDealer-cont IN TagCompleteList


            MOVE 'BEL202_A'
              TO SalesCompanyKey IN LANG-BIBLIN08
            MOVE 8
              TO SalesCompanyKey-length IN LANG-BIBLIN08

            MOVE 1 TO SearchByDealer2-num IN BIBLIN08-SearchByDealer2

            MOVE 'BELA04014'
              TO Dealer IN BIBLIN08-SearchByDealer2
            MOVE 9
              TO Dealer-length IN BIBLIN08-SearchByDealer2

            MOVE 'SYSTEM'
              TO GroupKey IN TagDealer
            MOVE 6
              TO GroupKey-length IN TagDealer

            Move 'DEALER_BLOCKING'
              TO CategoryKey IN TagDealer
            MOVE 15
              TO CategoryKey-length IN TagDealer

            MOVE 'DELIVERY_BLOCKING'
              TO TagKey IN TagDealer
            MOVE 17
              TO TagKey-length  IN TagDealer


      *  ....
      *  ....

      * --------------------------------------------------------------
      * Put Request Language Structure Into SOAP Container
      * --------------------------------------------------------------
            EXEC CICS PUT CONTAINER('DFHHEADER')
              FROM(WS-WSA-HEADERXML)
               FLENGTH(WS-CONTAINER-LEN)
              RESP(COMMAND-RESP)
              RESP2(COMMAND-RESP2)
            END-EXEC
            PERFORM CHECK-CONTAINER-COMMAND-PUT

           EXEC CICS PUT CONTAINER(WS-CONTAINER-NAME)
             CHANNEL(WS-CHANNEL-NAME)
             FROM(LANG-BIBLIN08)
             RESP(COMMAND-RESP)
             RESP2(COMMAND-RESP2)
           END-EXEC
           PERFORM CHECK-CONTAINER-COMMAND-PUT


           EXEC CICS PUT CONTAINER('ChangeTagsItem')
             CHANNEL(WS-CHANNEL-NAME)
             FROM(BIBLIN08-SearchByDealer2)
             RESP(COMMAND-RESP)
             RESP2(COMMAND-RESP2)
           END-EXEC
           PERFORM CHECK-CONTAINER-COMMAND-PUT

           EXEC CICS PUT CONTAINER('TagDealer')
             CHANNEL(WS-CHANNEL-NAME)
             FROM(BIBLIN08-TagDealer)
             RESP(COMMAND-RESP)
             RESP2(COMMAND-RESP2)
           END-EXEC
           PERFORM CHECK-CONTAINER-COMMAND-PUT

      * --------------------------------------------------------------
      * Invoke The Web Service
      * --------------------------------------------------------------
           EXEC CICS INVOKE WEBSERVICE(WS-WEBSERVICE-NAME)
             CHANNEL(WS-CHANNEL-NAME)
             URI(WS-URI-OVERRIDE)
             OPERATION(WS-OPERATION-NAME)
             RESP(COMMAND-RESP) RESP2(COMMAND-RESP2)
           END-EXEC
           PERFORM CHECK-WEBSERVICE-COMMAND
      * --------------------------------------------------------------
      * Receive Response Language Structure
      * --------------------------------------------------------------
           EXEC CICS GET CONTAINER(WS-CONTAINER-NAME)
             CHANNEL(WS-CHANNEL-NAME)
             INTO(LANG-BIBLOU08)
           END-EXEC
           PERFORM CHECK-CONTAINER-COMMAND-GET
      * --------------------------------------------------------------
      * Process Response Language Structure
      * --------------------------------------------------------------
      *  ....
      * --------------------------------------------------------------
      * Finished
      * --------------------------------------------------------------
           EXEC CICS RETURN
           END-EXEC
           .
       CHECK-CONTAINER-COMMAND-PUT.
           MOVE SPACES TO DISPLAYTD
           EVALUATE COMMAND-RESP
             WHEN DFHRESP(NORMAL)
               MOVE 'PUT OK' TO DISPLAYTD
             WHEN DFHRESP(CCSIDERR)
               MOVE 'PUT KO CCSIDERR' TO DISPLAYTD
             WHEN DFHRESP(CONTAINERERR)
               MOVE 'PUT KO CONTAINERERR' TO DISPLAYTD
             WHEN DFHRESP(INVREQ)
               MOVE 'PUT KO INVREQ' TO DISPLAYTD
             WHEN DFHRESP(LENGERR)
               MOVE 'PUT KO LENGERR' TO DISPLAYTD
             WHEN OTHER
               MOVE 'PUT KO ERROR' TO DISPLAYTD
           END-EVALUATE

           EVALUATE COMMAND-RESP
             WHEN DFHRESP(NORMAL)
               CONTINUE
             WHEN OTHER
               EXEC CICS WRITEQ TD
                 QUEUE ('CSSL')
                 FROM  (DISPLAYTD)
                 LENGTH(WS-MES-LN)
               END-EXEC
           END-EVALUATE
           .
       CHECK-CONTAINER-COMMAND-GET.
           MOVE SPACES TO DISPLAYTD
           EVALUATE COMMAND-RESP
             WHEN DFHRESP(NORMAL)
               MOVE 'GET OK' TO DISPLAYTD
             WHEN DFHRESP(CCSIDERR)
               MOVE 'GET KO CCSIDERR' TO DISPLAYTD
             WHEN DFHRESP(CONTAINERERR)
               MOVE 'GET KO CONTAINERERR' TO DISPLAYTD
             WHEN DFHRESP(INVREQ)
               MOVE 'GET KO INVREQ' TO DISPLAYTD
             WHEN DFHRESP(LENGERR)
               MOVE 'GET KO LENGERR' TO DISPLAYTD
             WHEN OTHER
               MOVE 'GET KO ERROR' TO DISPLAYTD
           END-EVALUATE

           EVALUATE COMMAND-RESP
             WHEN DFHRESP(NORMAL)
               CONTINUE
             WHEN OTHER
               EXEC CICS WRITEQ TD
                 QUEUE ('CSSL')
                 FROM  (DISPLAYTD)
                 LENGTH(WS-MES-LN)
               END-EXEC
           END-EVALUATE
           .
       CHECK-WEBSERVICE-COMMAND.
           MOVE SPACES TO DISPLAYTD
           EVALUATE COMMAND-RESP
             WHEN DFHRESP(NORMAL)
               CONTINUE
             WHEN DFHRESP(INVREQ)
               MOVE COMMAND-RESP2 TO COMMAND-RESP2X
               MOVE 'INVOKE KO INVREQ:' TO DISPLAYTD
               MOVE COMMAND-RESP2X TO DISPLAYTD(20:8)
             WHEN DFHRESP(NOTFND)
               MOVE 'INVOKE KO NOT FOUND' TO DISPLAYTD
             WHEN OTHER
               MOVE 'INVOKE ERROR' TO DISPLAYTD
           END-EVALUATE
           EVALUATE COMMAND-RESP
             WHEN DFHRESP(NORMAL)
               CONTINUE
             WHEN OTHER
                EXEC CICS WRITEQ TD
                  QUEUE ('CSSL')
                  FROM  (DISPLAYTD)
                  LENGTH(WS-MES-LN)
               END-EXEC
               CONTINUE
           END-EVALUATE

           EVALUATE COMMAND-RESP
             WHEN DFHRESP(NORMAL)
      * --------------------------------------------------------------
      * Receive Response Language Structure
      * --------------------------------------------------------------
              EXEC CICS GET CONTAINER(WS-CONTAINER-NAME)
                CHANNEL(WS-CHANNEL-NAME)
                INTO(LANG-BIBLOU08)
              END-EXEC
              MOVE SPACES TO OUTRESULT
              MOVE 'INVOKE OK:' TO DISPLAYTD
              MOVE Dealer2 in ChangeTagsResponse to OUTRESULT
              MOVE OUTRESULT(1:65) TO DISPLAYTD(11:65)
              EXEC CICS WRITEQ TD
                QUEUE ('CSSL')
                FROM  (DISPLAYTD)
                LENGTH(WS-MES-LN)
              END-EXEC
              PERFORM CHECK-CONTAINER-COMMAND-GET
             WHEN OTHER
              PERFORM GET-DFHWS-BODY-CONTAINER
           END-EVALUATE
           .
       GET-DFHWS-BODY-CONTAINER.
           MOVE 'DFHRESPONSE' TO WS-CONTAINER-NAME
           EXEC CICS GET CONTAINER(WS-CONTAINER-NAME)
                CHANNEL(WS-CHANNEL-NAME)
                NODATA
                FLENGTH(CONTAINER-LEN)
                RESP(COMMAND-RESP) RESP2(COMMAND-RESP2)
           END-EXEC
           EVALUATE COMMAND-RESP
             WHEN DFHRESP(CONTAINERERR)
               MOVE 'CONTAINER NOT FOUND' TO DISPLAYTD
               EXEC CICS WRITEQ TD
                 QUEUE ('CSSL')
                 FROM  (DISPLAYTD)
                 LENGTH(WS-MES-LN)
               END-EXEC
             WHEN DFHRESP(NORMAL)
               IF CONTAINER-LEN > 0 THEN
                 MOVE SPACES TO ERRORLOG
                 EXEC CICS GET CONTAINER(WS-CONTAINER-NAME)
                   CHANNEL(WS-CHANNEL-NAME)
                   INTO(ERRORLOG)
                   FLENGTH(CONTAINER-LEN)
                 END-EXEC
                 DISPLAY 'ERREUR WEBSERVICE:' ERRORLOG(1:CONTAINER-LEN)
               END-IF
           END-EVALUATE
           .

      * End Procedure Division
       END PROGRAM 'BIBLDE00'.

Updated on 2013-10-14T12:26:08Z at 2013-10-14T12:26:08Z by El-Filahi