How do you send images from a mobile web app to an existing web service. I considered using the PhoneGap FileTransfer object, but I don't know how to wrap the call in a SOAP packet.
The server where I need to upload the image, expects the image to wrapped in a SOAP packet. From the service description below, one can see that the server expects the file in base64Binary. Has anyone done something like this before, or am I the first (or last) buffalo to cross the river (to get eaten by a crocodile):
POST /Service.asmx HTTP/1.1
Host: 127.0.0.1
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Header>
<AuthHeader xmlns="http://localhost/">
<LogonID>string</LogonID>
<Password>string</Password>
</AuthHeader>
</soap12:Header>
<soap12:Body>
<uploadFile xmlns="http://localhost/">
<FileDetails>
<ReferenceNumber>string</ReferenceNumber>
<FileName>string</FileName>
<FileType>int</FileType>
<FileContents>base64Binary</FileContents>
</FileDetails>
</uploadFile>
</soap12:Body>
</soap12:Envelope>