It seems that you want to upload file using attachment does not based on SOAP message. it seems that you don't set the description and contentType of attachment file properly. Could you post some related code?
- <xsd:complexType name="Attachment">
- <xsd:all>
<xsd:element name="ContentId" type="xsd:string" />
<xsd:element name="ContentType" type="xsd:string" />
<xsd:element name="ContentLength" type="xsd:long" minOccurs="0" />
<xsd:element name="ContentEncoding" type="xsd:string" minOccurs="0" />
<xsd:element name="Locale" type="xsd:string" minOccurs="0" />
<xsd:element name="ContentData" type="xsd:base64Binary" minOccurs="0" />
</xsd:all>
I haeve passed all the mandatory properties to the attachment, can you have a look at this
thanks
It seems that you want to upload file using attachment does not based on SOAP message, you can try changing the ContentType to 'text/text', please check the following article. I think you can use WCF REST service or ASP.NET MVC WebApi to upload file to the
server.
rakesh540
0 Points
4 Posts
Invalid Soap Attachment
May 18, 2012 06:39 PM|LINK
Hi
Trying to upload file to the webservice, passing all the parameters still i get Soap Error: Invalid Soap Attachment. Attaching a text file
UploadWebref is an object for upload method
newfilename.Name = args[2]; newfilename.Description = "textfile"; attachobj.ContentId = "test1"; attachobj.ContentType = "text/xml"; upfileobj.NewFile = newfilename; upfileobj.Content = attachobj; uploadWebRef.UploadFileResponse upresponse = uploadobj.uploadFile(upfileobj);
<div>Any Suggestions</div> <div></div> <div>Thanks</div>Peter pi - M...
Star
12871 Points
1786 Posts
Re: Invalid Soap Attachment
May 21, 2012 02:44 AM|LINK
It seems that you want to upload file using attachment does not based on SOAP message. it seems that you don't set the description and contentType of attachment file properly. Could you post some related code?
If you have any feedback about my replies, please contact msdnmg@microsoft.com
Microsoft One Code Framework
rakesh540
0 Points
4 Posts
Re: Invalid Soap Attachment
May 21, 2012 01:26 PM|LINK
Hi Peter
The related WSDL is:
Peter pi - M...
Star
12871 Points
1786 Posts
Re: Invalid Soap Attachment
May 22, 2012 03:12 AM|LINK
It seems that you want to upload file using attachment does not based on SOAP message, you can try changing the ContentType to 'text/text', please check the following article. I think you can use WCF REST service or ASP.NET MVC WebApi to upload file to the server.
http://www.soapui.org/SOAP-and-WSDL/adding-headers-and-attachments.html
If you have any feedback about my replies, please contact msdnmg@microsoft.com
Microsoft One Code Framework