Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-850

Missing charset=utf-8 in HTTP header

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • jbossws-1.0.0
    • jbossws-1.0.0
    • jbossws-native
    • None

      I am just testing the new jbossws stack interacting with microsoft .net client applications. I was running into some trouble exchanging string parameter with german special characters like "ß" or "ö".

      Before Jira issue JBWS-812 was fixed I got exceptions on the server side which are resolved after that. But the .net client still did not understand these special characters. With the old axis stack the client had no problems understanding these characters.

      The reason for this problem is the Content-Type in the header of the HTTP response.
      The old axis stack returned:
      Content-Type: text/xml;charset=utf-8

      The new jbossws stack returns only:
      Content-Type: text/xml

      I have fixed this problem by adding the following line into the doPost() method of the org.jboss.ws.server.ServiceEndpointServlet:
      Code:
      res.setContentType("text/xml; charset=UTF-8");

      To increase interopability with .net client applications the content type should be modified.

            tdiesler@redhat.com Thomas Diesler
            faxe13_jira Gert Kropiunik (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: