Skip to content

Commit

Permalink
refactor: scaffold zds 1.2 soap-endpoint OntvangAsynchroon_Overdragen…
Browse files Browse the repository at this point in the history
…_v2 (#135)

* Implement "genereerBesluitIdentificatie_Di02" SOAP-action

* add besluit to configmap and add soapTestCase

* refactor VrijeBerichten_v2 soapendpointrouter to use new template

* Update on VrijeBerichten_V2

* Add SoapEndpointRouter_OntvangAsynchroon_overdragen_v2 template

* Add ontvangAsynchroon_overdragen_v2 to Configmap

* Add Proper Error Handeling

* Change overdragen -> Overdragen

* Rename File

* renaming

---------

Co-authored-by: Meric Akgul <[email protected]>
  • Loading branch information
MikeErkemey and Meric Akgul authored Jul 28, 2023
1 parent efdcb33 commit 492ea99
Show file tree
Hide file tree
Showing 5 changed files with 121 additions and 0 deletions.
3 changes: 3 additions & 0 deletions charts/zaakbrug/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ data:
{{- with .ontvangAsynchroon }}
zaakbrug.soap.ontvang-asynchroon.endpoint: {{ .endpoint }}
zaakbrug.soap.ontvang-asynchroon.validation-soft-fail: "{{ .validationSoftFail }}"
{{- with .ontvangAsynchroonOverdragen_v2 }}
zaakbrug.soap.ontvang-asynchroon-overdragen.v2.endpoint: {{ .endpoint }}
zaakbrug.soap.ontvang-asynchroon-overdragen.v2.validation-soft-fail: "{{ .validationSoftFail }}"
{{- end }}
{{- with .ontvangAsynchroon_v2 }}
zaakbrug.soap.ontvang-asynchroon.v2.endpoint: {{ .endpoint }}
Expand Down
3 changes: 3 additions & 0 deletions charts/zaakbrug/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ zaakbrug:
ontvangAsynchroon:
endpoint: "translate/generic/zds/OntvangAsynchroon"
validationSoftFail: false
ontvangAsynchroonOverdragen_v2:
endpoint: "translate/generic/zds/v2/OntvangAsynchroonOverdragen"
validationSoftFail: false
vrijeBerichten:
endpoint: "translate/generic/zds/VrijBericht"
validationSoftFail: false
Expand Down
2 changes: 2 additions & 0 deletions src/main/configurations/Translate/Configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
<!ENTITY SetResultaatAndStatus SYSTEM "./Configuration_SetResultaatAndStatus.xml">
<!ENTITY SoapEndpointRouter_BeantwoordVraag SYSTEM "./Configuration_SoapEndpointRouter_BeantwoordVraag.xml">
<!ENTITY SoapEndpointRouter_BeantwoordVraag_v2 SYSTEM "./Configuration_SoapEndpointRouter_BeantwoordVraag_v2.xml">
<!ENTITY SoapEndpointRouter_OntvangAsynchroon_Overdragen_v2 SYSTEM "./Configuration_SoapEndpointRouter_OntvangAsynchroon_Overdragen_v2.xml">
<!ENTITY SoapEndpointRouter_OntvangAsynchroon SYSTEM "./Configuration_SoapEndpointRouter_OntvangAsynchroon.xml">
<!ENTITY SoapEndpointRouter_VrijeBerichten SYSTEM "./Configuration_SoapEndpointRouter_VrijeBerichten.xml">
<!ENTITY SoapEndpointRouter_VrijeBerichten_v2 SYSTEM "./Configuration_SoapEndpointRouter_VrijeBerichten_v2.xml">
Expand Down Expand Up @@ -121,6 +122,7 @@
&SetResultaatAndStatus;
&SoapEndpointRouter_BeantwoordVraag;
&SoapEndpointRouter_BeantwoordVraag_v2;
&SoapEndpointRouter_OntvangAsynchroon_Overdragen_v2;
&SoapEndpointRouter_OntvangAsynchroon;
&SoapEndpointRouter_VrijeBerichten;
&SoapEndpointRouter_VrijeBerichten_v2;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
<Module xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../FrankConfig.xsd">
<Adapter name="SoapEndpointRouter_OntvangAsynchroon_Overdragen_v2"
active="${SoapEndpointRouter_OntvangAsynchroon_Overdragen_v2.Active}"
description="">
<Receiver name="SoapEndpointRouter_OntvangAsynchroon_Overdragen_v2">
<WebServiceListener name="SoapEndpointRouter_OntvangAsynchroon_Overdragen_v2" address="${zaakbrug.soap.ontvang-asynchroon-overdragen.v2.endpoint}" soap="false"/>
<JdbcErrorStorage
name="JdbcErrorStorage"
datasourceName="jdbc/${database.instance.name}"
slotId="${instance.name}/OntvangAsynchroonOverdragen_v2"/>
</Receiver>
<Pipeline>
<Exits>
<Exit name="EXIT" state="SUCCESS"/>
<Exit name="EXCEPTION" state="ERROR"/>
</Exits>

<WsdlXmlValidatorPipe
name="ValidateInput"
wsdl="Common/xsd/Zaak-_Documentservices_1_2/zds0120/berichten/zds0120_ontvangAsynchroon_overdragen_zs-dms.wsdl"
>
<Forward name="success" path="UnwrapSoapMessage"/>
<Forward name="failure" path="WsdlValidationSoftFailForwarder"/>
</WsdlXmlValidatorPipe>

<XmlSwitchPipe
name="WsdlValidationSoftFailForwarder"
xpathExpression="$SoftFail = true()"
>
<Param name="SoftFail" value="${zaakbrug.soap.ontvang-asynchroon-overdragen.v2.validation-soft-fail}" type="BOOLEAN"/>
<Forward name="true" path="UnwrapSoapMessage" />
<Forward name="false" path="InvalidXml" />
</XmlSwitchPipe>

<SoapWrapperPipe
name="UnwrapSoapMessage"
storeResultInSessionKey="UnwrapMessageResult"
direction="UNWRAP"
removeOutputNamespaces="true">
<Forward name="success" path="SanitizeSoapAction"/>
</SoapWrapperPipe>

<XsltPipe
name="SanitizeSoapAction"
xpathExpression="replace($Action, '/', '_')"
storeResultInSessionKey="SatitizedSoapAction"
>
<Param name="Action" sessionKey="SOAPAction"/>
<Forward name="success" path="ActionSwitch"/>
<Forward name="error" path="BackEndError"/>
</XsltPipe>

<XmlSwitchPipe name="ActionSwitch"
forwardNameSessionKey="SatitizedSoapAction"
notFoundForwardName="UnsupportedSoapActionError"
/>

<!-- SenderPipes -->

<!-- SoapWrapperPipes -->

<!-- ERRORS -->
<XsltPipe
name="UnsupportedSoapActionError"
emptyInputReplacement="&lt;EmptyInput/&gt;"
styleSheetName="Common/xsl/BuildError.xsl"
>
<Param name="code" value="TechnicalError" /> <!-- codes: TechnicalError, TranslationError, ConfigurationError-->
<Param name="reason" pattern="Unsupported SOAP-action. No implementation found for: {SOAPAction}" />
<!-- <Param name="details" sessionKey="" /> -->
<!-- <Param name="detailsXml" type="DOMDOC" /> -->
<Forward name="success" path="BackEndError" />
<Forward name="exception" path="BackEndError" />
</XsltPipe>

<PutInSessionPipe name="InvalidXml">
<Param name="errorCode" value="INVALID_XML"/>
<Param name="errorReason" value="XML was invalid"/>
<Forward name="success" path="WrapFo03Response" />
</PutInSessionPipe>

<PutInSessionPipe name="NotWellFormed">
<Param name="errorCode" value="NOT_WELL_FORMED_XML"/>
<Param name="errorReason" value="XML was not according to xsd"/>
<Forward name="success" path="WrapFo03Response"/>
</PutInSessionPipe>

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

<SoapWrapperPipe
name="WrapFo03Response"
soapBodyStyleSheet="Common/xsl/CreateFo03Response.xslt"
>
<Param name="UnwrapMessageResult" sessionKey="UnwrapMessageResult" type="DOMDOC"/>
<Param name="errorCode" sessionKey="errorCode"/>
<Param name="errorReason" sessionKey="errorReason"/>
<Param name="errorDetailText" sessionKey="errorDetailText"/>
<Param name="errorDetailXML" sessionKey="errorDetailXML" type="DOMDOC"/>
<Forward name="success" path="EXIT"/>
</SoapWrapperPipe>
</Pipeline>
</Adapter>
</Module>
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ PutZgwZaakDocument.Active=true
SetResultaatAndStatus.Active=true
SoapEndpointRouter_BeantwoordVraag.Active=true
SoapEndpointRouter_BeantwoordVraag_v2.Active=true
SoapEndpointRouter_OntvangAsynchroon_Overdragen_v2.Active=true
SoapEndpointRouter_OntvangAsynchroon.Active=true
SoapEndpointRouter_VrijeBerichten.Active=true
SoapEndpointRouter_VrijeBerichten_v2.Active=true
Expand Down Expand Up @@ -106,6 +107,9 @@ zaakbrug.soap.beantwoord-vraag.v2.validation-soft-fail=false
zaakbrug.soap.ontvang-asynchroon.endpoint=translate/generic/zds/OntvangAsynchroon
zaakbrug.soap.ontvang-asynchroon.validation-soft-fail=false

zaakbrug.soap.ontvang-asynchroon-overdragen.v2.endpoint=translate/generic/zds/v2/OntvangAsynchroonOverdragen
zaakbrug.soap.ontvang-asynchroon-overdragen.v2.validation-soft-fail=false

zaakbrug.soap.vrije-berichten.endpoint=translate/generic/zds/VrijBericht
zaakbrug.soap.vrije-berichten.validation-soft-fail=false

Expand Down

0 comments on commit 492ea99

Please sign in to comment.