Forum Discussion

Jakob_Villadsen's avatar
Jakob_Villadsen
Contributor
18 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

  • Hi Ole,

    Sounds good. I'm afraid I can't use Skype/Msn at the moment. Our network guys are pretty paranoid since we had someone trying to hack our network last week.

    Can you attach it here or email it to me instead?

    Ohh, and please  send/attach the project file you're using. That way i can see if i have some settings wrong
  • Hi Ole,

    I've just had some succes with the 2.0.3 build sent me some days ago.
    I didn't change anything on the serverside but i think i have figured out what settings to use for the query.

    I basically just said "enable MTOM = false" and then it seemed to work. I'll do some additional testing just to make sure. I backtracked and tried in version 2.0.2 but it doesn't work there sowhatever you did in 2.0.3 worked.

    I'll get back after i test some more

    Regards,

    Jakob
  • Hi Ole,

    With some additional testing I've found that the version 2.0.3 that you sent me is working fine for our tests.

    I've been able to upload all sorts of attachments with succes.

    The only thing not working is that soapui seems unable to handle attachments larger than 3-4 mb in size. It executes the call, but then crashes or locks up.

    Do you have any idea when to official 2.0.3 build will be released?
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi Jakob,

    The next version will finally go beta next week! Sorry to keep you (all) waiting...

    regards,

    /Ole
    eviware.com
  • Hi Ole,

    Thanks a lot for the support in this case. We can close this issue now

    I have another related issue, but I'll make a new forum post about it.


    many regards,

    Jakob
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi Jakob,

    ok, thanks for the follow-up!

    Please hurry with your post, 2.5-beta1 is almost out of the oven :-)

    regards,

    /Ole
    eviware.com