Topic
  • 1 reply
  • Latest Post - ‏2013-06-17T16:31:16Z by smashyrahul
smashyrahul
smashyrahul
394 Posts

Pinned topic 500 Internal server error needs to be passd to SOAPUI

‏2013-06-17T15:51:28Z |

 

 I am working on the below bit. And I have a question on the same.

Below is the request flow.

SOAPUI --> DP Gateway MPGW --> DP backend MPGW --> Java service (deployed on jboss).

In case of internal server error ( 500) in Java service, SOAPUI is receiving the 200 OK http status.

I have configured the error rule in DP backend MPGW service which will set the ' service/error-protocol-response' variable to 500. ( Here I have configured the error rule with match action confiured to match the error codes (0x01130007, 0x01130008, 0x01130009, 0x01130006)

As these error codes are not getting passed to datapower front end service (DP Gateway MPGW) I am unable to configure such error in the front end service. and hence SOAPUI still receives 200 in case of backend failure.

How can I configure the Datapower fromend service to pass 500 response to client (SOAPUI)?

Thanks,

Rahul

 

 

  • smashyrahul
    smashyrahul
    394 Posts
    ACCEPTED ANSWER

    Re: 500 Internal server error needs to be passd to SOAPUI

    ‏2013-06-17T16:31:16Z  

    Well, this issue has been resolved. I used below stylesheet in response rule.

      <xsl:variable name="backside_transport" select="dp:response-header('X-Backside-Transport')"/>
            
            <xsl:value-of select="dp:response-header('Content-Type')"/>
            
            <xsl:choose>
            <xsl:when test="contains ($backside_transport,'FAIL')">
        <dp:set-http-response-header name= "'x-dp-response-code'" value= "'500'" />
     
      </xsl:when>
     
     </xsl:choose>
    </xsl:template>
    </xsl:stylesheet>

  • smashyrahul
    smashyrahul
    394 Posts

    Re: 500 Internal server error needs to be passd to SOAPUI

    ‏2013-06-17T16:31:16Z  

    Well, this issue has been resolved. I used below stylesheet in response rule.

      <xsl:variable name="backside_transport" select="dp:response-header('X-Backside-Transport')"/>
            
            <xsl:value-of select="dp:response-header('Content-Type')"/>
            
            <xsl:choose>
            <xsl:when test="contains ($backside_transport,'FAIL')">
        <dp:set-http-response-header name= "'x-dp-response-code'" value= "'500'" />
     
      </xsl:when>
     
     </xsl:choose>
    </xsl:template>
    </xsl:stylesheet>