Forum Discussion

Jakob_Villadsen's avatar
Jakob_Villadsen
Contributor
16 years ago

Problem with adding documents/attachments

I tried to add different attachments, e.g. simple txt files, pdf files, word documents etc., but I am not able to get a valid soap response (=the document is not added as expected). And the functionality works from the UI of my application.

I have tried with/without caching of the document. I get a warning about an unexpected content type.
Do you have any ideas of what I am doing wrong?
I have added my raw soap request and soap response.

1. create a soap request, where I add a simple txt file.
The raw request looks like this:
MIME-Version: 1.0
Host: cap-test-esb.ementor.dk
Content-Length: 1686
User-Agent: Jakarta Commons-HttpClient/3.0.1
Content-Type: multipart/related; type="text/xml"; start=""; boundary="----=_Part_0_3493708.1212482567781"

------=_Part_0_3493708.1212482567781
Content-Type: text/xml; charset=UTF-8
Content-Transfer-Encoding: 8bit
Content-ID:


 

 
     
       
       
            test
            cid:test.txt
           
             
             
           

            001
            create
            test
            111111111111000000000000119
       

     

 

------=_Part_0_3493708.1212482567781
Content-Type: text/plain; charset=Cp1252
Content-Transfer-Encoding: base64

dGVzdNjFxvjl5g==
------=_Part_0_3493708.1212482567781
Content-Type: text/plain; charset=Cp1252
Content-Transfer-Encoding: base64
Content-ID:

dGVzdNjFxvjl5g==
------=_Part_0_3493708.1212482567781--


2. I don't get a response.
The raw response contains the following error:
HTTP/1.1 415 Cannot process the message because the content type 'multipart/related; type="text/xml"; start=""; boundary="----=_Part_0_3493708.1212482567781"' was not the expected type 'text/xml; charset=utf-8'.
X-AspNet-Version: 2.0.50727
Date: Tue, 03 Jun 2008 08:41:32 GMT
Content-Length: 0
MicrosoftOfficeWebServer: 5.0_Pub
X-Powered-By: ASP.NET
Server: Microsoft-IIS/6.0
Cache-Control: private

37 Replies