Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Improve error messages #62

Merged
merged 2 commits into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Attribuut name is nodig om een zinnige operation name=... te krijgen in de WSDL

<SoapWrapperPipe name="Unwrapper" direction="UNWRAP" removeOutputNamespaces="true">
<Forward name="success" path="CheckOperation" />
<Forward name="exception" path="EXCEPTION" />
<Forward name="exception" path="SoapWrapper" />
</SoapWrapperPipe>

<XmlSwitchPipe
Expand Down Expand Up @@ -89,7 +89,7 @@ Attribuut name is nodig om een zinnige operation name=... te krijgen in de WSDL
javaListener="VersionAction">
</IbisLocalSender>
<Forward name="success" path="SUCCESS" />
<Forward name="exception" path="BackEndError" />
<Forward name="exception" path="SoapWrapper" />
</SenderPipe>

<SenderPipe
Expand All @@ -99,7 +99,7 @@ Attribuut name is nodig om een zinnige operation name=... te krijgen in de WSDL
javaListener="opslaanInkNatuurlijkPersoon">
</IbisLocalSender>
<Forward name="success" path="SUCCESS" />
<Forward name="exception" path="WrapFo03ResponseNew" />
<Forward name="exception" path="SoapWrapper" />
</SenderPipe>

<SenderPipe
Expand All @@ -109,14 +109,14 @@ Attribuut name is nodig om een zinnige operation name=... te krijgen in de WSDL
javaListener="opslaanInkNietNatuurlijkPersoon">
</IbisLocalSender>
<Forward name="success" path="SUCCESS" />
<Forward name="exception" path="WrapFo03ResponseNew" />
<Forward name="exception" path="SoapWrapper" />
</SenderPipe>

<!-- OperationChecker adds a few random variables on top of the message.
To mitigate this, we get the originalMessage and unwrap it. -->
<SoapWrapperPipe name="UnwrapBijlageRequest" direction="UNWRAP" removeOutputNamespaces="true" getInputFromSessionKey="originalMessage">
<Forward name="success" path="CallopslaanBijlage" />
<Forward name="exception" path="EXCEPTION" />
<Forward name="exception" path="SoapWrapper" />
</SoapWrapperPipe>

<SenderPipe
Expand All @@ -126,7 +126,7 @@ Attribuut name is nodig om een zinnige operation name=... te krijgen in de WSDL
javaListener="opslaanBijlage">
</IbisLocalSender>
<Forward name="success" path="SUCCESS" />
<Forward name="exception" path="WrapFo03ResponseNew" />
<Forward name="exception" path="SoapWrapper" />
</SenderPipe>

<SenderPipe
Expand All @@ -136,33 +136,12 @@ Attribuut name is nodig om een zinnige operation name=... te krijgen in de WSDL
javaListener="InfoAction">
</IbisLocalSender>
<Forward name="success" path="SUCCESS" />
<Forward name="exception" path="WrapFo03ResponseNew" />
<Forward name="exception" path="SoapWrapper" />
</SenderPipe>

<SoapWrapperPipe
name="WrapFo03ResponseNew"
soapBodyStyleSheet="xsl/CreateFo03ResponseNew.xslt"
>
<Forward name="success" path="SUCCESS" />
</SoapWrapperPipe>

<PutInSessionPipe name="BackEndError" unlessSessionKey="errorCode">
<Param name="errorCode" styleSheetName="xsl/BackEndError.xsl" />
<Param name="errorReason" xpathExpression="/error/reason"/>
<Param name="errorDetailText" xpathExpression="concat(/error/code, ' ', /error/reason, ' ', /error/details)"/>
<Forward name="success" path="WrapFo03Response" />
</PutInSessionPipe>

<SoapWrapperPipe
name="WrapFo03Response"
soapBodyStyleSheet="xsl/CreateFo03Response.xslt"
>
<Param name="errorCode" sessionKey="errorCode" />
<Param name="errorReason" sessionKey="errorReason"/>
<Param name="errorDetailText" sessionKey="errorDetailText"/>
<Forward name="success" path="SUCCESS" />
<SoapWrapperPipe name="SoapWrapper">
<Forward name="success" path="EXCEPTION" />
</SoapWrapperPipe>

</Pipeline>
</Adapter>
</Module>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Localhost URL so testing can be done with the SoapUI Mockservice.
corsa.url=http://localhost:8080/

stub4testtool.configuration=true
stub4testtool.configuration=false
33 changes: 33 additions & 0 deletions configurations/WebformulierenVerwerker/xsl/CreateErrorResponse.xsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema" version="2.0"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" omit-xml-declaration="yes" />
<xsl:param name="corsaRequest" select="''" as="xs:string" />
<xsl:param name="corsaResponse" select="''" as="xs:string" />
<xsl:param name="soapAction" select="''" as="xs:string" />
<xsl:param name="corsaErrorMessage" as="xs:string" />

<xsl:template match="/">
<Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>
<xsl:value-of select="$corsaErrorMessage" />
</faultstring>
<detail>
<xsl:value-of
select="
concat(
concat(
concat(
concat(codepoints-to-string(10),'Soap Action: '),
$soapAction),
concat(
concat(codepoints-to-string(10),'Request: '),
$corsaRequest)),
concat(
concat(codepoints-to-string(10),'Response: '),
$corsaResponse))" />
</detail>
</Fault>
</xsl:template>
</xsl:stylesheet>
25 changes: 0 additions & 25 deletions configurations/WebformulierenVerwerker/xsl/CreateFo03Response.xslt

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.