Regular Contributor.
Regular Contributor.

I need to upload an image through XMLFile Upload Using SOAP request

I need to upload an image through XML

Able to create a record, however image file is not getting uploaded.

Tried adding the file to extra files and given path in below tag


let me know is there any way to upload the image as well

below is XML

soap_request("StepName=SOAP Request",
"<soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:wsdl=\"http://service.abc.compname.com/2015/10/wsdl\">"


2 Replies
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: I need to upload an image through XMLFile Upload Using SOAP request

@jagadeeswara19k, specify a file name in an XML message is by LR just seen as data that needs to be sent to the server. LR does not analyze the XML for extra activity. Each XML use a different specification.

But check the help on soap_request() in VuGen (Tip: put cursor on function name and press F1).

In the function help a remark is found on Attachments. Examine and experiment with it.

Success, Erik

P.S. I checked the help of LR 2020.0.

Reward community members who take time to respond and help.
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Re: I need to upload an image through XMLFile Upload Using SOAP request

Hi @jagadeeswara19k 

Frist of all, you need to understand how does your soap application upload the the image file.

I mean, it will not only send an xml with SOAPEnvelop, but also send the binary data with MTOM or anyother multipart protocol.

For example, if I send a image with MTOM, the request body may be below


Content-Id: <rootpart*xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx@example.com>
Content-Type: application/xop+xml;charset=utf-8;type="text/xml"
Content-Transfer-Encoding: binary
<?xml version="1.0" ?>
Content-Id: <xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx@example.com>
Content-Type: image/png
Content-Transfer-Encoding: binary
(Binary data here)FFFFFFFFFFFF.............


As @JHF Remmelzwaal  has explained, you only specify a file name in an XML, not really upload the brinay data. That's the root cause.



Wei-Wei Zhang

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.