[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ContractFilter mismatch



   I am able to use soapUI to call the web service correctly.  When I use
   the RPG program I get `500 internal server error'.

   I'm pretty sure it has something to do with the SOAPAction.  Here is
   the information and test program I am using.

   Looking for help.


   Ken


   WSDL:

   http://24.199.166.173:13580/KampSightCounterPointService/KampSightCount
   erPointAPIService.svc?wsdl


   ERROR:

   The message with Action ' ' cannot be processed at the receiver, due to
   a ContractFilter mismatch at the EndpointDispatcher. This may be
   because of either a contract mismatch (mismatched Actions between
   sender and receiver) or a binding/security mismatch between the sender
   and the receiver.  Check that sender and receiver have the same
   contract and the same binding (including security requirements, e.g.
   Message, Transport, None).  HTTP/1.1 500 Internal Server Error


   PROGRAM:

   H DFTACTGRP(*NO) BNDDIR('HTTPAPI':'QC2LE')

   H DEBUG   DATFMT(*ISO)  OPTION(*NODEBUGIO)

    /copy httpapi_h


   D KAMP632_T       PR

   D KAMP632_T       PI


   D Incoming        PR

   D   returncode                   1A

   D   depth                       10I 0 value

   D   name                      1024A   varying const

   D   path                     24576A   varying const

   D   value                    32767A   varying const

   D   attrs                         *   dim(32767)

   D                                     const options(*varsize)

   D Add_SOAPACTION  PR

   D   Header                    1024A   varying

   D   UserData                      *   value


   D ConnClose       PR

   D    addl_hdr                 1024A   varying


   D SOAP            s          32767A   varying

   D rc              s             10I 0

   D returncode      s              1A

   D Response        s             10


    /free

     http_debug(*ON);


     SOAP =

       '<soapenv:Envelope '

     + 'xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; '

     + 'xmlns:tem="http://tempuri.org/"; '

     + 'xmlns:kam="http://schemas.datacontract.org/2004/07/'

     + 'KampSightCounterPointModel">'

     + ' <soapenv:Header/>'

     + ' <soapenv:Body>'

     + ' <tem:CreateSalesTicket>'

     + ' <!--Optional:-->'

     + ' <tem:Campground>941125</tem:Campground>'

     + ' <!--Optional:-->'

     + ' <tem:TransactionID>1</tem:TransactionID>'

     + ' <!--Optional:-->'

     + ' <tem:TicketDateTime>2012-02-15T12:00:00</tem:TicketDateTime>'

     + ' <!--Optional:-->'

     + ' <tem:TotalTax>0</tem:TotalTax>'

     + ' <!--Optional:-->'

     + ' <tem:TicketTotal>1.00</tem:TicketTotal>'

     + ' <!--Optional:-->'

     + ' <tem:TicketLines>'

     + ' <!--Zero or more repetitions:-->'

     + ' <kam:TicketLine>'

     + ' <!--Optional:-->'

     + ' <kam:ItemNumber>RAC-100001</kam:ItemNumber>'

     + ' <!--Optional:-->'

     + ' <kam:Quantity>1</kam:Quantity>'

     + ' <!--Optional:-->'

     + ' <kam:UnitPrice>1.00</kam:UnitPrice>'

     + ' </kam:TicketLine>'

     + ' </tem:TicketLines>'

     + ' </tem:CreateSalesTicket>'

     + ' </soapenv:Body>'

     + '</soapenv:Envelope>';


     http_xproc(HTTP_POINT_ADDL_HEADER : %paddr(Add_SOAPACTION));

     http_xproc(HTTP_POINT_ADDL_HEADER : %paddr(ConnClose));


     rc = http_url_post_xml(

         'http://24.199.166.173:13580/KampSightCounterPoint' +

         'Service/KampSightCounterPointAPIService.svc'

        : %addr(SOAP) + 2

        : %len(SOAP)

        : *NULL

        : %paddr(Incoming)

        : %addr(ReturnCode)

        : HTTP_TIMEOUT

        : HTTP_USERAGENT

        : 'text/xml'

        );


     if (rc <> 1);

       Response = 'Error';

     endif;


     *inlr = *on;

     return;

     /end-free


     // -------------------------------------------------------

     //Sub-procedure to deal with the data coming back to us.

   P Incoming        B

   D Incoming        PI

   D   returncode                   1A

   D   depth                       10I 0 value

   D   name                      1024A   varying const

   D   path                     24576A   varying const

   D   value                    32767A   varying const

   D   attrs                         *   dim(32767)

   D                                     const options(*varsize)

   /free

     select;

     When name = 'a:Successful';

       monitor;

         Response = value;

       on-error;

         Response = 'Error';

       endmon;

     endsl;

    /end-free

   P                 E

     // ---------------------------------------------------------

   P Add_SOAPACTION  B

   D Add_SOAPACTION  PI

   D   Header                    1024A   varying

   D   UserData                      *   value


    /free

       Header = 'SOAPAction: '

       + 'http://tempuri.org/IKampSightCounterPointAPIService/'

       + 'CreateSalesTicket' + x'0d25';

    /end-free

   P                 E

     // --------------------------------------------------------

   P ConnClose       B

   D ConnClose       PI

   D   addl_hdr                  1024A   varying

    /free

     addl_hdr = 'Connection: close' + x'0d25';

    /end-free

   p                 E
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------