Forum Discussion

joe_sydney's avatar
joe_sydney
Occasional Contributor
4 years ago

SOAPUI - How to Force POST Request from SOAPUI to send an MTOM style message with Attachment parts?

As per the Title, I've set `enabled MTOM = true` and `force MTOM=true` and I read all the info in this page 

https://www.soapui.org/docs/soap-and-wsdl/attachments/

 

But when I look at the raw message in SoapUI, it looks like SOAPUI is NOT generating the section that starts with 

------=_Part_7_163289738.1476693003095 
Content-Type: application/zip; name=etc...etc

 The target service is an Oracle Fusion service, sample payload looks like this:

 

 

<soapenv:Body>
	<ucm:GenericRequest webKey="cs">
		<ucm:Service IdcService="CHECKIN_UNIVERSAL">
			<ucm:User/>
			<ucm:Document>
				<ucm:Field name="dDocTitle">Department Load File</ucm:Field>
				<ucm:Field name="dDocType">Document</ucm:Field>
				<ucm:Field name="dDocAuthor">HCM_IMPL</ucm:Field>
				<ucm:Field name="dSecurityGroup">FAFusionImportExport</ucm:Field>
				<ucm:Field name="dDocAccount">hcm$/dataloader$/import$</ucm:Field>
				<ucm:Field name="primaryFile">YourZipFile.zip</ucm:Field>
				<ucm:File href="YourZipFile.zip" name="primaryFile">
					<ucm:Contents>
						<inc:Include href="cid:YourZipFile.zip" xmlns:inc="http://www.w3.org/2004/08/xop/include" />
					</ucm:Contents>
				</ucm:File>
			</ucm:Document>
		</ucm:Service>
	</ucm:GenericRequest>
</soapenv:Body>			

 

 

taken from here:

https://docs.oracle.com/en/solutions/load-data-into-hcm-cloud/use-native-java-apis-upload-hcm-data-loader-zip-files-hcm-webcenter-content-server.html

 

  • ZDGN's avatar
    ZDGN
    Contributor

    Hi joe_sydney,

     

    May be you could try to change this line:

     

    <inc:Include href="cid:YourZipFile.zip" xmlns:inc="http://www.w3.org/2004/08/xop/include" />

     

    To something like this: 

     

    <inc:Include href="cid:xxxxxxx.zip" xmlns:inc="http://www.w3.org/2004/08/xop/include" />

     

    Where xxxxxxx is a unique identifier.

     

    To specify the place for the attachment contents in message payload, use the cid:nnnn syntax.

    nnnn is an arbitrary identifier that you use to indicate the message part for the attachment.

    In the Part column, select the cid identifier that your request body specifies.

     

    Hope this can help.

     

    David.