Topic
4 replies Latest Post - ‏2013-06-26T02:31:37Z by swlinn
Daviiid
Daviiid
221 Posts
ACCEPTED ANSWER

Pinned topic dp:reject

‏2013-06-24T14:41:09Z |

Hello All

I use an xslt wich is use for select backEnd of me services in a database. I use this only xsl for more than 30 differents WSP.

Today, i have a new need which consist to add a new column 'STATUS' in database which determine if the service is UP or DOWN

So, i need to stop process if status is DOWN. 

If i use dp;reject, it works except the format of my message. Is there a way to combine a dp:reject and a special xml return format?

Thanks

 

  • HermannSW
    HermannSW
    3144 Posts
    ACCEPTED ANSWER

    Re: dp:reject

    ‏2013-06-25T10:31:20Z  in response to Daviiid

    You can only pass "text" (xs:string) to <dp:reject>:
    http://pic.dhe.ibm.com/infocenter/wsdatap/v5r0m0/index.jsp?topic=%2Fcom.ibm.dp.xm.doc%2Fextensionfunctions18.htm

    If you want to pass XML, you will need to serialize it first (<dp:serialize .../>).

     

    Hermann<myXsltBlog/> <myXsltTweets/> <myCE/>

  • Daviiid
    Daviiid
    221 Posts
    ACCEPTED ANSWER

    Re: dp:reject

    ‏2013-06-25T11:39:09Z  in response to Daviiid

    Thanks Hermann

    So i can't use dp:reject to create my own soap fault like this ?

     

    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:xml="http://www.w3.org/XML/1998/namespace">
    <env:Body>
     <env:Fault>
      <env:Code>
        <env:Value>env:Receiver</env:Value>
        <env:Subcode>
         <env:Value>Unavailable</env:Value>
        </env:Subcode>
      </env:Code>
      <env:Reason>
        <env:Text xml:lang="fr">Service indiponible</env:Text>
      </env:Reason>
     </env:Fault>
    </env:Body>
    </env:Envelope>

    Updated on 2013-06-25T11:42:10Z at 2013-06-25T11:42:10Z by Daviiid
    • HermannSW
      HermannSW
      3144 Posts
      ACCEPTED ANSWER

      Re: dp:reject

      ‏2013-06-25T12:57:08Z  in response to Daviiid

      I think you can, if you define an error-rule -- that can create the response you want, and should be triggered by dp:reject.


      Hermann<myXsltBlog/> <myXsltTweets/> <myCE/>

      • swlinn
        swlinn
        1330 Posts
        ACCEPTED ANSWER

        Re: dp:reject

        ‏2013-06-26T02:31:37Z  in response to HermannSW

        The string you have in the dp:reject body is in one of the var://service/error* variables, so you can include that in your soap fault detail.

        Regards,

        Steve