Hi,
I have a CXF REST service with the following method in the implementation class:
@POST
@Path("/batchSubmitTransaction")
@Consumes(MediaType.MULTIPART_FORM_DATA)
@Produces(MediaType.MULTIPART_FORM_DATA)
public MultipartBody batchSubmitTransaction(MultipartBody request) throws
Exception
I need help to create a multipart/form-data response similar to the following:
Response-Code: 200
Content-Type: multipart/form-data;
boundary="uuid:71c6a500-fa87-4f3f-a468-5f7a916f9ec6"
Headers: {Date=[Wed, 30 Apr 2014 16:17:56 GMT]}
Payload: --uuid:71c6a500-fa87-4f3f-a468-5f7a916f9ec6
Content-Disposition: form-data; name="PayloadType"
X12_BatchReceiptConfirmation
--uuid:71c6a500-fa87-4f3f-a468-5f7a916f9ec6
Content-Disposition: form-data; name="ProcessingMode"
Batch
--uuid:71c6a500-fa87-4f3f-a468-5f7a916f9ec6
Content-Disposition: form-data; name="PayloadID"
f81d4fae-7dec-11d0-a765-00a0c91e6bf6
--uuid:71c6a500-fa87-4f3f-a468-5f7a916f9ec6
Content-Disposition: form-data; name="TimeStamp"
2014-04-30T11:29:52Z
--uuid:71c6a500-fa87-4f3f-a468-5f7a916f9ec6
Content-Disposition: form-data; name="SenderID"
PayerB
--uuid:71c6a500-fa87-4f3f-a468-5f7a916f9ec6
Content-Disposition: form-data; name="ReceiverID"
HospitalA
--uuid:71c6a500-fa87-4f3f-a468-5f7a916f9ec6
Content-Disposition: form-data; name="CORERuleVersion"
2.2.0
--uuid:71c6a500-fa87-4f3f-a468-5f7a916f9ec6
Content-Disposition: form-data; name="ErrorCode"
PayloadLengthIllegal
--uuid:71c6a500-fa87-4f3f-a468-5f7a916f9ec6
Content-Disposition: form-data; name="ErrorMessage"
PayloadLength does not match actual payload's length.
--uuid:71c6a500-fa87-4f3f-a468-5f7a916f9ec6
Thanks in advance.
Regards
Paul