Forum Discussion
14 years ago
Hello,
I'm a new SOAPUI PRO user (for some reason I can’t Post or Reply in the dedicated Forum).
I try to save responses (including attachments) to an external folder and unfortunately I can't succeed adapting the "groovy scripts" I found in the Forum, or with the parameters (TestRequestProperties etc…).
• Requirements are:
- Automatically export Xml response in a dedicated Folder (that's work!)
- Automatically export response attachments in a dedicated Folder (that don’t work :/)
• Request :
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://xxxxxxx/">
<soapenv:Header/>
<soapenv:Body>
<ws:recevoirCr_Demande>
<codeCollecteur>JDC</codeCollecteur>
<motDePasse>JDC01</motDePasse>
<versionDadsu>V01X04</versionDadsu>
<crNouveau>OUI</crNouveau>
<crDemandeArray/>
</ws:recevoirCr_Demande>
</soapenv:Body>
</soapenv:Envelope>
• Response :
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:recevoirCr_Reponse xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:ns2="http://xxxxxx/">
<envCrRetourneArray>
<envCrRetourne>
<idEnvDadsu>DAD_JDC_001000000000000000000000000000000006</idEnvDadsu>
<nomEnveloppeCr>CR_DAD_JDC_001000000000000000000000000000000006_001_CR2.zip</nomEnveloppeCr>
<fichier>
<Include href="cid:1998f71c-c8e9-4645-a14c-16ea092bb1dd@example.jaxws.sun.com" xmlns="http://www.w3.org/2004/08/xop/include"/>
</fichier>
</envCrRetourne>
<envCrRetourne>
<idEnvDadsu>DAD_JDC_001000000000000000000000000000000002</idEnvDadsu>
<nomEnveloppeCr>CR_DAD_JDC_001000000000000000000000000000000002_001_CR2.zip</nomEnveloppeCr>
<fichier>
<Include href="cid:fe53e511-3d37-4069-8ddf-51c345a9d7ae@example.jaxws.sun.com" xmlns="http://www.w3.org/2004/08/xop/include"/>
</fichier>
</envCrRetourne>
</envCrRetourneArray>
<crIndisponibleArray/>
<codeRetour>00</codeRetour>
<libelleRetour>Prise en compte correcte</libelleRetour>
</ns2:recevoirCr_Reponse>
</S:Body>
</S:Envelope>
• You can find 1 to x attachments in the response, the attachment is always a .zip file.
• The idea is :
1. Each time I run the testcase or testsuite to create a folder named: “AAAAMMDD HHMMSS”-“name of the testcase”
2. In this folder simply save all the attachments (the filename is the response: “nomEnveloppeCr” propertie).
Could you help me resolve that?
Looking forward to hearing from you
Regards
Pierre
I'm a new SOAPUI PRO user (for some reason I can’t Post or Reply in the dedicated Forum).
I try to save responses (including attachments) to an external folder and unfortunately I can't succeed adapting the "groovy scripts" I found in the Forum, or with the parameters (TestRequestProperties etc…).
• Requirements are:
- Automatically export Xml response in a dedicated Folder (that's work!)
- Automatically export response attachments in a dedicated Folder (that don’t work :/)
• Request :
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://xxxxxxx/">
<soapenv:Header/>
<soapenv:Body>
<ws:recevoirCr_Demande>
<codeCollecteur>JDC</codeCollecteur>
<motDePasse>JDC01</motDePasse>
<versionDadsu>V01X04</versionDadsu>
<crNouveau>OUI</crNouveau>
<crDemandeArray/>
</ws:recevoirCr_Demande>
</soapenv:Body>
</soapenv:Envelope>
• Response :
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:recevoirCr_Reponse xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:ns2="http://xxxxxx/">
<envCrRetourneArray>
<envCrRetourne>
<idEnvDadsu>DAD_JDC_001000000000000000000000000000000006</idEnvDadsu>
<nomEnveloppeCr>CR_DAD_JDC_001000000000000000000000000000000006_001_CR2.zip</nomEnveloppeCr>
<fichier>
<Include href="cid:1998f71c-c8e9-4645-a14c-16ea092bb1dd@example.jaxws.sun.com" xmlns="http://www.w3.org/2004/08/xop/include"/>
</fichier>
</envCrRetourne>
<envCrRetourne>
<idEnvDadsu>DAD_JDC_001000000000000000000000000000000002</idEnvDadsu>
<nomEnveloppeCr>CR_DAD_JDC_001000000000000000000000000000000002_001_CR2.zip</nomEnveloppeCr>
<fichier>
<Include href="cid:fe53e511-3d37-4069-8ddf-51c345a9d7ae@example.jaxws.sun.com" xmlns="http://www.w3.org/2004/08/xop/include"/>
</fichier>
</envCrRetourne>
</envCrRetourneArray>
<crIndisponibleArray/>
<codeRetour>00</codeRetour>
<libelleRetour>Prise en compte correcte</libelleRetour>
</ns2:recevoirCr_Reponse>
</S:Body>
</S:Envelope>
• You can find 1 to x attachments in the response, the attachment is always a .zip file.
• The idea is :
1. Each time I run the testcase or testsuite to create a folder named: “AAAAMMDD HHMMSS”-“name of the testcase”
2. In this folder simply save all the attachments (the filename is the response: “nomEnveloppeCr” propertie).
Could you help me resolve that?
Looking forward to hearing from you
Regards
Pierre
Related Content
- 6 years ago
- 8 years ago
Recent Discussions
- 18 days ago