Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-466

MultipartOutput appears not to be creating the correct MIME multipart/mixed output

XMLWordPrintable

    • Hide

      Fire up the ESB server from soa-5.0.2.GA.zip and deploy the RESTEasy project from the attached zip file to the server. Open the REST Client for Firefox and set it up exactly as the simple project except use the XML from the file "response.1.line.txt". Set the method to POST and use the following URL:

      http://localhost:8280/simple/rest-services/notifications

      You will see the mime multipart output in the Response Body tab in he REST Client for Firefox. Note that this is just a text box but the output is not HTML source. This is the problem. The rest of the MIME related things, the boundary marker and so on look ok, but there should be HTML source in one of the parts and there isn't, as shown above

      Show
      Fire up the ESB server from soa-5.0.2.GA.zip and deploy the RESTEasy project from the attached zip file to the server. Open the REST Client for Firefox and set it up exactly as the simple project except use the XML from the file "response.1.line.txt". Set the method to POST and use the following URL: http://localhost:8280/simple/rest-services/notifications You will see the mime multipart output in the Response Body tab in he REST Client for Firefox. Note that this is just a text box but the output is not HTML source. This is the problem. The rest of the MIME related things, the boundary marker and so on look ok, but there should be HTML source in one of the parts and there isn't, as shown above

      I added another resource / service class to the simple RESTEasy project and am using the MultipartOutput class to create MIME multipart/mixed content using an HTML and a plain text part. The problem seems to be that the HTML part is not being returned as HTML, but rather as plain text. I have included the dist as a zip file which is attached. The output of the MultipartOutput class looks like this:

      --6d8492aa-8b1f-4cb2-ab08-451198c950d0

      Content-Type: text/html

      Welcome jackalista@gmail.com!Your email: jackalista@gmail.com and login: jackalista@gmail.com are now registered as a defaultUser.Enjoy your shopping experience!(etc)

      --6d8492aa-8b1f-4cb2-ab08-451198c950d0

      Content-Type: text/plain

      You are now registered as a text defaultUser

      -6d8492aa-8b1f-4cb2-ab08-451198c950d0-

      I am using the REST Client for firefox as shown in the Sinmple RESTEasy project in JBDS and on an article on the JBoss site. The link for that article is here:

      http://community.jboss.org/wiki/UsingtheRESTEasySimpleProjectExampleinJBDS3

      The attached zip file contains the project, and there is a file in the zip file called "response.1.line.txt" that contains the XML to be inserted into the REST Client for firefox just as the simple project uses the "customer" XML doc in the simple project page. Note that you can't have any line breaks in the input, also similar to the simple project. It is possible this is driver error as well on my part, my apologies if that was the case, but it doesn't look like there's any HTML source being produced.

              patriot1burke@gmail.com Bill Burke (Inactive)
              jackalista_jira jack lista (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: