How do you add an attachment to a SOAP request in Postman?
I have the following settings and have my SOAP xml in the 'raw' text box.
(I can do this in SoapUI, but would like to use Postman.)
You can convert your pdf file to base64, then use that base64 code in your method.
Related
I did some research both in the Postman GUI (auto-completion for request headers which does not offer "Content-Disposition") and in learning.postman.com/docs and there is no mention of "Content-Disposition" request header. I am using this request header in a POST request to upload a PDF file to an existing document. The operation is successful. But this is currently being done in a Jersey REST client Java project. I'm trying to create a similar POST REST request in Postman as part of a test collection.
Any workaround for this or just not supported? The "standard" multipart/form-data example cited everywhere and including Postman docs/examples is not supported by this upload POST API.
The Java/REST client code was based on this SO code: Upload file via streaming using Jersey 2 only difference in my client I am using "application/pdf" as MediaType.
I've defiened a web service in talend and I try to get the soap attachment of the request to this service but I don't know how to do. The file is an XMl.
When I look the request I received in talend I've this :
<ser:createSharePointFileOperationRequest xmlns:ser="http://www.talend.org/service/">
<relativeServerPath>/facturation</relativeServerPath>
<listName>Facture</listName>
<fileName>Structure.xml</fileName>
<content><inc:Include xmlns:inc="http://www.w3.org/2004/08/xop/include" href="cid:Structure.xml"></inc:Include></content>
<!--1 or more repetitions:-->
<metadata Name="titre">TitreTest</metadata>
<metadata Name="code">015</metadata>
</ser:createSharePointFileOperationRequest>
Do you know if there is a way to get this file?
You can try to use tFileFetch component after the soap call. You'll have to extract url field from the response and transmit it to the tFileFetch component.
You won't be able to directly retrieve the file from the soap call itself.
I need to parse a request body as JSON, but how do I check if the request is a JSON request?
Have you tried request.content_type?
But the response could be a plain text and still be a valid JSON, so I think it would be valid to get the contents and try to parse it.
I am able to test the web services by setting Content-Type : "application/json" and passing parameters or composing body, for ex: {"name":"test"}, using fiddler. But, how to compose request for XML content type for a POST method.
Presumably, you'd set the Content-Type to application/xml and use XML to format the request body. e.g. test although the format would depend on what the API expects.
I use the ASIHttpRequest in my ios project, and my workmate use the Tastypie as the server, he told me I must post a String with JSON format as Http body(use application/json), but I can't find this Content-Type besides "application/x-www-form-urlencoded" and "multipart/form-data".
then How can I send a POST request with JSON format in ASIHttpRequest?