Forum Discussion

depeche's avatar
depeche
Contributor
16 years ago

Re: Problem while sending 2nd attachment through SoapUI

Hi!
    I am getting the following error while making a request to public repositry wsdl (wsdl location--> http://ihexds.nist.gov:9080/tf6/service ... toryb?wsdl). I am sending two attachments (i.e. two text documents as an attachment):


 

      urn:ihe:iti:2007:ProvideAndRegisterDocumentSet-bResponse
      urn:uuid:9DC4328C7B287FECCC1260537348425
 

 
     
       
           
       

     

 


Following is the request (part of it) sent by SoapUI and captured at tcpmon:

------=_Part_19_24858609.1260774435390
Content-Type: multipart/mixed;
boundary="----=_Part_20_12417754.1260774435390"
Content-Transfer-Encoding: binary
Content-ID: <1.urn:uuid:6B65C97F7FAF3C4F741260772316055@apache.org>

------=_Part_20_12417754.1260774435390
Content-ID: <1.urn:uuid:6B65C97F7FAF3C4F741260772316055@apache.org>

This is depeche's document.

It is great!


------=_Part_20_12417754.1260774435390
Content-ID: <2.urn:uuid:6B65C97F7FAF3C4F741260772316056@apache.org>

This is depeche's 2nd document.

It is great!


------=_Part_20_12417754.1260774435390--

------=_Part_19_24858609.1260774435390--

Following is the request (part of it) sent by xdstool and captured at tcpmon:

205

--MIMEBoundaryurn_uuid_6B65C97F7FAF3C4F741260772315973
Content-Type: text/plain
Content-Transfer-Encoding: binary
Content-ID: <1.urn:uuid:6B65C97F7FAF3C4F741260772316053@apache.org>

This is my second document.

It is great!


--MIMEBoundaryurn_uuid_6B65C97F7FAF3C4F741260772315973
Content-Type: text/plain
Content-Transfer-Encoding: binary
Content-ID: <2.urn:uuid:6B65C97F7FAF3C4F741260772316054@apache.org>

This is my document.

It is great!


--MIMEBoundaryurn_uuid_6B65C97F7FAF3C4F741260772315973--
0




There might be problem in the request formed by soapUI.

Thanks & regards!
depeche
  • Hi!

    it looks like you have given the two attachments the same content-id, was that intended? You could try disabling multipart attachments also..

    is it possible for me to run this request against the service?

    regards!

    /Ole
    eviware.com
  • Hi!
    The two attachments have been given the different contentId. By disabling multiparts = "false" solves the issue.
         
        But one issue still remains:
     
    Why Content-Transfer-Encoding is always 7bit? Can we change it to binary? Due to this, the document looks something like this at the url (by SoapUI):

    http://129.6.24.109:9080/Repository/9.8.7.6.5.4.870.txt
    http://129.6.24.109:9080/Repository/9.8.7.6.5.4.871.txt

    By xdstool:
    http://129.6.24.109:9080/Repository/9.8.7.6.5.4.381.txt
    http://129.6.24.109:9080/Repository/9.8.7.6.5.4.382.txt



    ------=_Part_27_21642478.1260780425859
    Content-Type: text/plain; charset=us-ascii
    Content-Transfer-Encoding: 7bit
    Content-ID: <2.urn:uuid:6B65C97F7FAF3C4F741260772316056@apache.org>

    This is depeche's 2nd document.

    It is great!


    ------=_Part_27_21642478.1260780425859
    Content-Type: text/plain; charset=us-ascii
    Content-Transfer-Encoding: 7bit
    Content-ID: <1.urn:uuid:6B65C97F7FAF3C4F741260772316055@apache.org>

    This is depeche's document.

    It is great!


    ------=_Part_27_21642478.1260780425859--


    I think the problem persist due to Content-Transfer-Encoding. Is there any way to change in SoapUI?

    Thanks & regards!

    depeche
  • Hi!

    hmm.. the only way to force binary encoding is to set a content-type for your attachment that does not start with "text/".. is that possible for you or does the webservice require text/plain?

    regards!

    /Ole
    eviware.com
  • Hi!
       I think that the web service requires "text/plain". You can have a look at the request (made by xdstool):

    Ones marked in red:

    POST /tf6/services/xdsrepositoryb HTTP/1.1
    Content-Type: multipart/related; boundary=MIMEBoundaryurn_uuid_6B65C97F7FAF3C4F741260772315973; type="application/xop+xml"; start="<0.urn:uuid:6B65C97F7FAF3C4F741260772315974@apache.org>"; start-info="application/soap+xml"; action="urn:ihe:iti:2007:ProvideAndRegisterDocumentSet-b"
    User-Agent: Axis2
    Host: ihexds.nist.gov:9080
    Transfer-Encoding: chunked

    20f1
    --MIMEBoundaryurn_uuid_6B65C97F7FAF3C4F741260772315973
    Content-Type: application/xop+xml; charset=UTF-8; type="application/soap+xml"
    Content-Transfer-Encoding: binary
    Content-ID: <0.urn:uuid:6B65C97F7FAF3C4F741260772315974@apache.org>


    .....................
    .....................
    .....................

    205

    --MIMEBoundaryurn_uuid_6B65C97F7FAF3C4F741260772315973
    Content-Type: text/plain
    Content-Transfer-Encoding: binary

    Content-ID: <1.urn:uuid:6B65C97F7FAF3C4F741260772316053@apache.org>

    This is my second document.

    It is great!


    --MIMEBoundaryurn_uuid_6B65C97F7FAF3C4F741260772315973
    Content-Type: text/plain
    Content-Transfer-Encoding: binary

    Content-ID: <2.urn:uuid:6B65C97F7FAF3C4F741260772316054@apache.org>

    This is my document.

    It is great!


    --MIMEBoundaryurn_uuid_6B65C97F7FAF3C4F741260772315973--
    0


    I had even tried by changing Content type from "text/plain" to say "application/octet-stream" through SoapUI. Even though it changed Content-Transfer-Encoding to binary but the end result is same.
       Does it something have to do with http header accept-encoding : gzip,deflate ?


    For your reference, i am attaching the test request in the attachment which can be sent through SoapUI.
    You need to attach two text documents and give them the contentId as 
    2.urn:uuid:6B65C97F7FAF3C4F741260772316056@apache.org
    1.urn:uuid:6B65C97F7FAF3C4F741260772316055@apache.org
    wsdl location--> http://ihexds.nist.gov:9080/tf6/service ... toryb?wsdl

    After making successful request you can look for:


    http://129.6.24.109:9080/Repository/9.8.7.6.5.4.882.txt
    http://129.6.24.109:9080/Repository/9.8.7.6.5.4.883.txt

    If you want to make another request then you have to search for 9.8.7.6.5.4.882, 9.8.7.6.5.4.883, 9.8.7.6.5.4.884  in the "NewRequest.xml" and do corresponding changes to 9.8.7.6.5.4.885, 9.8.7.6.5.4.886 and 9.8.7.6.5.4.887 respectively.

    After successful request you can look for:
    http://129.6.24.109:9080/Repository/9.8.7.6.5.4.885.txt
    http://129.6.24.109:9080/Repository/9.8.7.6.5.4.886.txt


    You can even look at the ihexds.nist.gov log browser

    http://129.6.24.109:9080/LogReader/

    Thanks for the help!

    Thanks & regards!
    depeche
  • Hi depeche,

    I am having the similar problem, and wondering if you have the solution yet?
    I am even unable to send one attachment!

    Regards,
    Naite
  • harisadu43's avatar
    harisadu43
    New Contributor
    Hello,

    Welcome to the blog of Craig Holme. We are using the power of the internet to really make a difference, check us out today.

    Thank You
    Craig Holme