Topic
13 replies Latest Post - ‏2014-09-16T09:55:57Z by 40S8_Ankita_Choudhary
SystemAdmin
SystemAdmin
6772 Posts
ACCEPTED ANSWER

Pinned topic illegal character '_' at offset; response failed from cics -> MQ -> WSP

‏2012-10-25T08:53:08Z |
hi
I tried to connect to mq using web service proxy and expected the response back.

cics will pick up the data, processed it and reply back to my web service proxy.

the request process is work, but failed in response with error illegal character '_' at offset 0 of https://<data power add>/<URI>

In remote, I set protocol to DPMQ and using my MQ Queue Manager.

Also I set to static backend and put my dpmq url in backend url under the Proxy setting tabs.

Any advice for this problem?
Updated on 2012-12-11T23:21:10Z at 2012-12-11T23:21:10Z by SystemAdmin
  • HermannSW
    HermannSW
    4369 Posts
    ACCEPTED ANSWER

    Re: illegal character '_' at offset; response failed from cics -&gt; MQ -&gt; WSP

    ‏2012-10-25T11:01:13Z  in response to SystemAdmin
    Please take a packet capture of a failed transaction.
    Then open the packet capture eg. in Wireshark and identify a packet from the transaction.
    Doing "Follow TCP stream" will then show you what comes back from the backend system.

    The error message indicates that DataPower did try to parse the response as XML.
    If the first character (offset 0) of backend response is '_' then the error is correct (response is Non-XML then).

     
    Hermann<myXsltBlog/> <myXsltTweets/>
  • SystemAdmin
    SystemAdmin
    6772 Posts
    ACCEPTED ANSWER

    Re: illegal character '_' at offset; response failed from cics -&gt; MQ -&gt; WSP

    ‏2012-10-29T01:49:50Z  in response to SystemAdmin
    Yes, the response is non-xml, but in XML Threat Protection tab , set Characterize server traffic type to "Non-XML" and set Request attachment processing mode to "Allow", still i got the same error.
    Do I missed something?
  • SystemAdmin
    SystemAdmin
    6772 Posts
    ACCEPTED ANSWER

    Re: illegal character '_' at offset; response failed from cics -&gt; MQ -&gt; WSP

    ‏2012-10-29T03:17:57Z  in response to SystemAdmin
    Hi Hermann, I solved the problem,
    one more thing, one of my friend used this flow, Web Service Proxy -> Multiple Protocol Gateway -> dpMQ - > CICS,
    but what i do is Web Service Proxy -> dpMQ - > CICS.

    based on your exp. and expertise, which one is better, and why.

    Thanks.
  • SystemAdmin
    SystemAdmin
    6772 Posts
    ACCEPTED ANSWER

    Re: illegal character '_' at offset; response failed from cics -&gt; MQ -&gt; WSP

    ‏2012-12-10T20:01:39Z  in response to SystemAdmin
    I don't see a resolution to this issue. How did you resolve it? We are experiencing the same problem. With response type set to Non-XML, the response is parsed as if it is looking for XML:

    wsgw (<MYSERVICE>): illegal character 'W' at offset 0 of https://<datapower>/<uri>
    wsgw (<MYSERVICE>): rule (<MYSERVICE_RESPONSE_RULE>): implied action xform: 'Transforming INPUT with store:///identity.xsl results stored in __PREPARSE_0' failed: illegal character 'W' at offset 0 of https://<datapower>/<uri>

    The probe also includes "Transaction aborted in Step 0".

    firmware: 4.0.2.8

    What is this "implied action xform"? How can we work around this?

    Thanks.
    • HermannSW
      HermannSW
      4369 Posts
      ACCEPTED ANSWER

      Re: illegal character '_' at offset; response failed from cics -&gt; MQ -&gt; WSP

      ‏2012-12-10T20:39:19Z  in response to SystemAdmin
      A WSP does several implied actions under the cover before the actions you specify in your processing policy are executed.
      An example on the request side is the implicit validation of input request against the WSP WSDL.

      If you have specified the response type of your WSP as Non-XML you should not see parse errors.
      Please check the Advanced Proxy tab in WSP Object screen whether the setting is really Non-XML.
      If it is Non-XML, and your configuration is applied, please create a PMR.
      Then Level2 support can gather your config and other artifacts like backend response.

       
      Hermann<myXsltBlog/> <myXsltTweets/>
      • SystemAdmin
        SystemAdmin
        6772 Posts
        ACCEPTED ANSWER

        Re: illegal character '_' at offset; response failed from cics -&gt; MQ -&gt; WSP

        ‏2012-12-11T23:21:10Z  in response to HermannSW
        Yes, we are using Non-XML. It only fails when we are using transport binding for the service. We opened a support ticket, unfortunately we aren't getting anywhere with level 1. They aren't understanding it is happening in an implied action before our rule is actually invoked.

        If we turn off the flag that says "NonXMLProcessing" on the response rule, then DataPower doesn't complain. Although that isn't a solution and doesn't explain why it works without transport binding.
        • 40S8_Ankita_Choudhary
          34 Posts
          ACCEPTED ANSWER

          Re: illegal character '{' at offset 0

          ‏2014-09-15T06:59:00Z  in response to SystemAdmin

          Hi Herman,

          In my MPG of datapower, request and response type is JSON . And simple AAA action is there just to validate and generate LTPA token.

          Still while hitting my datapower link the in probes i am getting below response :

          " illegal character '{' at offset 0 "

          Could you please help me out .

           

          Thanks

          Ankita

          • HermannSW
            HermannSW
            4369 Posts
            ACCEPTED ANSWER

            Re: illegal character '{' at offset 0

            ‏2014-09-15T08:38:59Z  in response to 40S8_Ankita_Choudhary

            Hi Ankita,

            something is trying to parse your JSON as XML.

            Does this happen on request or response rule?

            Which action?


            Hermann.

            • NILAY97
              NILAY97
              203 Posts
              ACCEPTED ANSWER

              Re: illegal character '{' at offset 0

              ‏2014-09-15T18:39:48Z  in response to HermannSW

              Illegal character at offset 0 means that the response entered to DataPower was not an XML message and DataPower parsed it as an XML.

              What processing you doing on DataPower? Are the request response types being properly set to NON XML?

              Are you sending in a blank message to DataPower without any payload? If yes, could you please switch Process empty messages set to ON.

              Offset 0 means the first occurance if I'am not wrong.

              Please let us know a further insight on this so that we can help accordingly.

              Thanks,

              Nilay

              • 40S8_Ankita_Choudhary
                34 Posts
                ACCEPTED ANSWER

                Re: illegal character '{' at offset 0

                ‏2014-09-16T06:13:09Z  in response to NILAY97
                Hi,
                 
                First of all thanks for your kind suggestions and as I am new to DataPower i need your help like this.
                Coming to the topic :
                 
                1-This is a JSON POST request . 
                2-The service which is hitting Datapower would be hitting with some POST JSON Parameters .
                3-The Calling service wants all the POST parameters to reach the backend service as itis (via Datapower).
                 
                I have set the request and response type as JSON(not Non-XML) and in the FSH i have clicked the post request also ON.
                 
                Herman,
                 
                It is in the request rule.

                 

                Kindly do help me.

                • HermannSW
                  HermannSW
                  4369 Posts
                  ACCEPTED ANSWER

                  Re: illegal character '{' at offset 0

                  ‏2014-09-16T07:26:51Z  in response to 40S8_Ankita_Choudhary

                  "And simple AAA action is there just to validate ..."

                  If you have INPUT as input context of that AAA action that would explain the parse error -- please try NULL as input then.

                  In case you need some JSON data for AAA then you need __JSONASJSONX context as input context of AAA.


                  Hermann.