Topic
  • 2 replies
  • Latest Post - ‏2013-04-19T00:59:40Z by swlinn
smashyrahul
smashyrahul
394 Posts

Pinned topic Need help: urgent

‏2013-04-18T22:03:53Z |

Hello Experts,

Please help me in achiving below in datapower.

 

We have configured a datapower b2b service which request and response type as NON-XML. At backend, we have a Java service. The datapower service is expecting a response from backend service . The response from backend java service will be a payload which will include a base 64 representation of the PDF document. However if the requested document cannot be retrieved (due to lack of authorization or document not found) an HTTPS 403 Forbidden error response should be returned to the client from the datapower.

How can I achieve this, when request and response type for datapower is Non XML?

Thanks,

Rahul

 

 

  • smashyrahul
    smashyrahul
    394 Posts

    Re: Need help: urgent

    ‏2013-04-18T22:04:54Z  

    Forgot to mention in the previous post. It's MPGW service.

  • swlinn
    swlinn
    1348 Posts

    Re: Need help: urgent

    ‏2013-04-19T00:59:40Z  

    Forgot to mention in the previous post. It's MPGW service.

    What does the Java backend return if it cannot retrieve the document?  Does it set the HTTP Status code?  Is there any payload to be returned in addition to the HTTP Status of 403?  The forum has numerous examples of setting the HTTP Status code.  Depending upon what the backend returns would dictate if you could let DataPower process the backside errors or if you need to check x-dp-response-code and handle this yourself in a stylesheet executed in the response rule.

    Regards,

    Steve