Forum Discussion

zxsoap's avatar
zxsoap
Occasional Contributor
18 years ago

How to attach .xls file into request?

Hi,

How do I attach a *.xls file into one of my soapui request?

Thanks,
zxsoap

6 Replies

  • omatzura's avatar
    omatzura
    Super Contributor
    Hi!

    use the attachments inspector ("Att") at the bottom of the request editor.

    regards!

    /Ole
    eviware.com
  • zxsoap's avatar
    zxsoap
    Occasional Contributor
    Thank for your reply.

    Yes, I did use it. Here's what I got from SOAPUI 2.0.2

    MTOM Attachments Processing Failed: Cannot de-serialize the input MIME Stream; value of the 'type' parameter  of the 'Content-Type' header of the MIME message is not equal to 'application/xop+xml'


    I tried to attached .cvs file to one of three requests. like this:

         
           
               
                  111
                  q111
               

                YES
           

         

     
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi!

    have you enabled MTOM for your request? (bottom left property..). If so, can you show the contents of the http-log containing the request and its response?

    regards!

    /Ole
    eviware.com
  • zxsoap's avatar
    zxsoap
    Occasional Contributor
    I did set those to MTOM/Inline to "TRUE".

    Here's log from response:
    HTTP/1.1 500 Internal Server Error
    Content-Length: 1842
    Set-Cookie: ssnid=489d924036f011dd93c7ab376a150aef; path=/;
    Content-Type: text/xml



     

     
        SOAP-ENV:Client
        [ISS.0088.9134] Exception occurred while processing the body of the message
        http://dfsap28.kinkosdev.com:7777/ws/am ... amServices
        MTOM Attachments Processing Failed: Cannot de-serialize the input MIME Stream; value of the 'start-info'  parameter  of the 'Content-Type' header of the MIME message is not equal to 'application/soap+xml'
     

     


    Here's request:
    MIME-Version: 1.0
    Host: dfsap77.xxxx.com:7777
    Content-Length: 1136
    SOAPAction: "amAccountDataServices_services_amServices_Binder_validateBatchFile"
    User-Agent: Jakarta Commons-HttpClient/3.0.1
    Content-Type: multipart/related; type="application/xop+xml"; start=""; start-info="text/xml"; boundary="----=_Part_4_6999470.1213111352671"

    ------=_Part_4_6999470.1213111352671
    Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
    Content-Transfer-Encoding: 8bit
    Content-ID:


     

     
         
           
               
                  20080610
                  qa123
               

                YES
           

         

     

    ------=_Part_4_6999470.1213111352671
    Content-Type: application/octet-stream
    Content-Transfer-Encoding: binary

    Yes,1,GO Co,GO Co,123 High Street,,Houston,TX,75240,US,J
    XXX, Smith,9725551212,xx.smith@go.com,Yes,Yes,Yes,Yes,Yes,Yes,xxx,Smith,xxx.smith@go.com,Yes,Standard,Yes,Yes,456 Main Street,,Houston,TX,75254,US,John,Smith,2145551212

    ------=_Part_4_6999470.1213111352671--
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi,

    the error message indicates that the server is expecting a SOAP 1.2 compliant MTOM attachment, maybe you have a SOAP 1.2 binding available that you could use instead? Otherwise, try setting the SOAP Version of the interface to 1.2 (bottom left properties when interface is selected) to see if that helps

    regards!

    /Ole
    eviware.com
  • zxsoap's avatar
    zxsoap
    Occasional Contributor
    Hi,

    Can you please show me more detail how to set the property up? I could not able to do it.

    Thanks,
    T