aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--curl/request-with-large-attachment/.gitignore1
-rwxr-xr-xcurl/request-with-large-attachment/gen-large-request.sh82
-rwxr-xr-xcurl/request-with-large-attachment/to_container.sh2
-rwxr-xr-xcurl/request-with-large-attachment/to_standalone.sh2
4 files changed, 87 insertions, 0 deletions
diff --git a/curl/request-with-large-attachment/.gitignore b/curl/request-with-large-attachment/.gitignore
new file mode 100644
index 0000000..b6137f1
--- /dev/null
+++ b/curl/request-with-large-attachment/.gitignore
@@ -0,0 +1 @@
+request.xml
diff --git a/curl/request-with-large-attachment/gen-large-request.sh b/curl/request-with-large-attachment/gen-large-request.sh
new file mode 100755
index 0000000..e537a1a
--- /dev/null
+++ b/curl/request-with-large-attachment/gen-large-request.sh
@@ -0,0 +1,82 @@
+#!/bin/sh
+
+echo -n '<?xml version="1.0" encoding="UTF-8"?>
+<soapenv:Envelope
+ xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:mzs="http://reference.e-government.gv.at/namespace/zustellung/mzs/app2mzs#"
+ xmlns:p="http://reference.e-government.gv.at/namespace/zustellung/mzs/persondata#"
+ xmlns:msg="http://reference.e-government.gv.at/namespace/zustellung/msg/phase2/20181206#">
+ <soapenv:Body>
+ <mzs:DeliveryRequest>
+ <mzs:Sender>
+ <p:CorporateBody>
+ <p:Identification>
+ <p:Value>kkvj693+tw99uW8UPuEK9en1LzZItkylPajkUUyJJDWQB78VGPkAuhCEk+TD12yQDD/WRglsf+JfQpjubIs/4l/ptluJ9teF3nwkNlu5Dm7mIjzgW1qxrDyomCmPvVxTWOCBuMUbOWRZBhOq+KvDQAu9Vv9KnqSfjYeDZrpHYu4=</p:Value>
+ <p:Type>urn:publicid:gv:at:cemtoken</p:Type>
+ </p:Identification>
+ <p:FullName>Bundesministerium für Testzwecke</p:FullName>
+ </p:CorporateBody>
+ <mzs:WebserviceURL>https://authority.gv.at/delivery_notification</mzs:WebserviceURL>
+ </mzs:Sender>
+ <mzs:Receiver>
+ <p:PhysicalPerson>
+ <p:Name>
+ <p:GivenName>Max</p:GivenName>
+ <p:FamilyName>Mustermann</p:FamilyName>
+ </p:Name>
+ <p:DateOfBirth>1940-01-01</p:DateOfBirth>
+ </p:PhysicalPerson>
+ <p:PostalAddress>
+ <p:CountryCode>AT</p:CountryCode>
+ <p:PostalCode>1010</p:PostalCode>
+ <p:Municipality>Wien</p:Municipality>
+ <p:DeliveryAddress>
+ <p:StreetName>Muststrasse</p:StreetName>
+ <p:BuildingNumber>10</p:BuildingNumber>
+ </p:DeliveryAddress>
+ </p:PostalAddress>
+ </mzs:Receiver>
+ <msg:MetaData>
+ <msg:AppDeliveryID>delivery-request-id</msg:AppDeliveryID>
+ <msg:Origin>
+ <msg:ParticipantID>VKABC</msg:ParticipantID>
+ </msg:Origin>
+ <msg:Subject>WichtigeMitteilung</msg:Subject>
+ <msg:DeliveryQuality>RSa</msg:DeliveryQuality>
+ </msg:MetaData>
+ <mzs:Payload>
+ <mzs:BinaryDocument>' > request.xml
+head -c 50000000 < /dev/zero | base64 >> request.xml
+echo -n '</mzs:BinaryDocument>
+ <mzs:FileName>large-file-witz-zeros</mzs:FileName>
+ <mzs:MIMEType>application/pdf</mzs:MIMEType>
+ <msg:CheckSum>
+ <msg:AlgorithmID>SHA1</msg:AlgorithmID>
+ <msg:Value>' >> request.xml
+head -c 50000000 < /dev/zero | sha1sum -b | awk '{print $1}' | xxd -r -p | base64 >> request.xml
+echo -n '</msg:Value>
+ </msg:CheckSum>
+ <mzs:Size>50000000</mzs:Size>
+ </mzs:Payload>
+ <mzs:Config>
+ <mzs:PerformQueryPersonRequest>false</mzs:PerformQueryPersonRequest>
+ <mzs:MsgResponseSinks>
+ <mzs:SaveResponseToFile>
+ <mzs:Active>true</mzs:Active>
+ <mzs:Path>tmp/responses</mzs:Path>
+ </mzs:SaveResponseToFile>
+ <mzs:LogResponse>true</mzs:LogResponse>
+ <mzs:ForwardResponseToService>
+ <mzs:Active>false</mzs:Active>
+ <mzs:AppClient>
+ <mzs:URL>http://localhost/appurl</mzs:URL>
+ <mzs:ConnectionTimeout>0</mzs:ConnectionTimeout>
+ <mzs:ReceiveTimeout>0</mzs:ReceiveTimeout>
+ </mzs:AppClient>
+ </mzs:ForwardResponseToService>
+ </mzs:MsgResponseSinks>
+ </mzs:Config>
+ </mzs:DeliveryRequest>
+ </soapenv:Body>
+</soapenv:Envelope>
+' >> request.xml
diff --git a/curl/request-with-large-attachment/to_container.sh b/curl/request-with-large-attachment/to_container.sh
new file mode 100755
index 0000000..0aff27b
--- /dev/null
+++ b/curl/request-with-large-attachment/to_container.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+curl -v --header "Content-Type: text/xml;charset=UTF-8" --header "SOAPAction: \"\"" http://localhost:8080/moa-zs/services/mzs --data-binary @request.xml
diff --git a/curl/request-with-large-attachment/to_standalone.sh b/curl/request-with-large-attachment/to_standalone.sh
new file mode 100755
index 0000000..95ae8c6
--- /dev/null
+++ b/curl/request-with-large-attachment/to_standalone.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+curl -v --header "Content-Type: text/xml;charset=UTF-8" --header "SOAPAction: \"\"" http://localhost:8080/services/mzs --data-binary @request.xml