IC5Notice: We have upgraded developerWorks Community to the latest version of IBM Connections. For more information, read our upgrade FAQ.
Topic
  • 13 replies
  • Latest Post - ‏2014-09-16T09:55:57Z by 40S8_Ankita_Choudhary
SystemAdmin
SystemAdmin
6772 Posts

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
    4524 Posts

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

    ‏2012-10-25T11:01:13Z  
    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

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

    ‏2012-10-29T01:49:50Z  
    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

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

    ‏2012-10-29T03:17:57Z  
    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.
  • HermannSW
    HermannSW
    4524 Posts

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

    ‏2012-10-29T18:37:23Z  
    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.
    A chained service adds latency, so if not really needed avoiding it is preferable.

    Just in case you use chained service (MPGW) on same box, please read 2.5.2 of this redbook:
    http://www.redbooks.ibm.com/redbooks/pdfs/sg247901.pdf

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

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

    ‏2012-12-10T20:01:39Z  
    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
    4524 Posts

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

    ‏2012-12-10T20:39:19Z  
    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.
    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

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

    ‏2012-12-11T23:21:10Z  
    • HermannSW
    • ‏2012-12-10T20:39:19Z
    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/>
    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
    37 Posts

    Re: illegal character '{' at offset 0

    ‏2014-09-15T06:59:00Z  
    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.

    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
    4524 Posts

    Re: illegal character '{' at offset 0

    ‏2014-09-15T08:38:59Z  

    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

    Hi Ankita,

    something is trying to parse your JSON as XML.

    Does this happen on request or response rule?

    Which action?


    Hermann.

  • NILAY97
    NILAY97
    215 Posts

    Re: illegal character '{' at offset 0

    ‏2014-09-15T18:39:48Z  
    • HermannSW
    • ‏2014-09-15T08:38:59Z

    Hi Ankita,

    something is trying to parse your JSON as XML.

    Does this happen on request or response rule?

    Which action?


    Hermann.

    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
    37 Posts

    Re: illegal character '{' at offset 0

    ‏2014-09-16T06:13:09Z  
    • NILAY97
    • ‏2014-09-15T18:39:48Z

    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

    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
    4524 Posts

    Re: illegal character '{' at offset 0

    ‏2014-09-16T07:26:51Z  
    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.

    "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.

  • 40S8_Ankita_Choudhary
    37 Posts

    Re: illegal character '{' at offset 0

    ‏2014-09-16T09:55:57Z  
    • HermannSW
    • ‏2014-09-16T07:26:51Z

    "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.

    Thank you so much hermann.

    Ankita