Axiom
  1. Axiom
  2. AXIOM-389

TURKISH Locale Problem - [AxisFault:] Part content ID cannot be blank for non root MIME parts

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.8
    • Fix Version/s: 1.2.13
    • Component/s: None
    • Labels:
      None

      Description

      Hi,

      There was a LOCALE problem while using Axis2. Therefore we sent the issue to the AXIS2 user list. Issue and the answer are given below.

      ISSUE ANSWER
      ----------------------------------------------------------------------------

      My guess is that this is caused by the problem described here:

      http://java.sys-con.com/node/46241

      A workaround would be to switch the default locale to English.

      If you need a proper fix that works with the Turkish locale, please
      open a bug report in the Axiom project:

      https://issues.apache.org/jira/browse/AXIOM

      ISSUE CONTENT
      ----------------------------------------------------------------------------
      We have a Axis2 WS client that is produced from WSDL. In our test environment it works well but when it goes into our production server it throws "org.apache.axis2.AxisFault: Part content ID cannot be blank for non root MIME parts".

      Information about our environments are shown below

      HTTP Connection Type

      ---------------------------------
      WS Client communicated with server via HTTPS/443

      Information About TEST Env.

      ---------------------------------

      • Axis 1.6
      • Windows 7 Home Edition with Locale English
      • Java 1.6.0_23-b05, Java HotSpot(TM) 64-Bit Server VM (build 19.0-b09, mixed mode)

      Information About PRODUCT Env.

      ----------------------------------------

      • Axis 1.6
      • Windows 7 Professional with Locale Turkey
      • Java 1.6.0_27-b07, Java HotSpot(TM) Client VM (build 20.2-b06, mixed mode, sharing)

      Exception Message in Production
      ----------------------------------------------
      Caused by: org.apache.axis2.AxisFault: Part content ID cannot be blank for non root MIME parts
      at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:531)
      at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:375)
      at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:421)
      at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
      at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)

      LOG Content
      ----------------------------------------------
      2011-09-07 16:37:08,481 - DEBUG -
      Attachments contentLength=38559, contentTypeString=multipart/related;
      boundary="MIMEBoundary_e616a43fc9c0c1331912493e054fdf9f504df1cc6e621042";
      type="application/xop+xml"; start="<0.d616a43fc9c0c1331912493e054fdf9f504df1cc6e621042@apache.org>";
      start-info="text/xml"
      2011-09-07 16:37:08,485 - DEBUG -
      boundary=--MIMEBoundary_e616a43fc9c0c1331912493e054fdf9f504df1cc6e621042
      2011-09-07 16:37:08,487 - DEBUG - getSOAPPartContentID
      rootContentID=<0.d616a43fc9c0c1331912493e054fdf9f504df1cc6e621042@apache.org>
      2011-09-07 16:37:08,497 - DEBUG - Start createPart()
      2011-09-07 16:37:08,497 - DEBUG -
      isSOAPPart=true
      2011-09-07 16:37:08,497 - DEBUG -
      thresholdSize= 0
      2011-09-07 16:37:08,497 - DEBUG -
      attachmentDir=null
      2011-09-07 16:37:08,497 - DEBUG -
      messageContentLength 38559
      2011-09-07 16:37:08,497 - DEBUG - initHeaders
      2011-09-07 16:37:08,498 - DEBUG - addHeader:
      (Content-Type) value=(application/xop+xml; charset=UTF-8;
      type="text/xml")
      2011-09-07 16:37:08,499 - DEBUG - addHeader:
      (Content-Transfer-Encoding) value=(binary)
      2011-09-07 16:37:08,499 - DEBUG - addHeader: (Content-ID)
      value=(<0.d616a43fc9c0c1331912493e054fdf9f504df1cc6e621042@apache.org>)
      2011-09-07 16:37:08,499 - DEBUG - End initHeaders
      2011-09-07 16:37:08,500 - DEBUG - getHeader
      name=(content-id) value=(null)
      2011-09-07 16:37:08,501 - DEBUG - Start createPart()
      2011-09-07 16:37:08,501 - DEBUG -
      isSOAPPart=false
      2011-09-07 16:37:08,501 - DEBUG -
      thresholdSize= 0
      2011-09-07 16:37:08,501 - DEBUG -
      attachmentDir=null
      2011-09-07 16:37:08,501 - DEBUG -
      messageContentLength 38559
      2011-09-07 16:37:08,501 - DEBUG - initHeaders
      2011-09-07 16:37:08,501 - DEBUG - addHeader:
      (Content-Type) value=(application/octet-stream)
      2011-09-07 16:37:08,501 - DEBUG - addHeader:
      (Content-Transfer-Encoding) value=(binary)
      2011-09-07 16:37:08,501 - DEBUG - addHeader: (Content-ID)
      value=(<1.c616a43fc9c0c1331912493e054fdf9f504df1cc6e621042@apache.org>)
      2011-09-07 16:37:08,501 - DEBUG - End initHeaders
      2011-09-07 16:37:08,502 - DEBUG - getHeader
      name=(content-id) value=(null)

      Thanks,

      Gurkan

        Activity

        Hide
        Hudson added a comment -

        Integrated in ws-axiom-trunk #614 (See https://builds.apache.org/job/ws-axiom-trunk/614/)
        Use a simple List instead of a Hashtable to store MIME part headers. A typical MIME part has 3 headers, so that a List may actually be more efficient than a Hashtable, especially if we normalize keys to lower case. This also solves AXIOM-389 because String#equalsIgnoreCase is not locale aware (in contrast to String#toLowerCase).

        veithen :
        Files :

        • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/Header.java
        • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/MIMEMessage.java
        • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartImpl.java
        • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/attachments/AttachmentsTest.java
        Show
        Hudson added a comment - Integrated in ws-axiom-trunk #614 (See https://builds.apache.org/job/ws-axiom-trunk/614/ ) Use a simple List instead of a Hashtable to store MIME part headers. A typical MIME part has 3 headers, so that a List may actually be more efficient than a Hashtable, especially if we normalize keys to lower case. This also solves AXIOM-389 because String#equalsIgnoreCase is not locale aware (in contrast to String#toLowerCase). veithen : Files : /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/Header.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/MIMEMessage.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartImpl.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/attachments/AttachmentsTest.java
        Hide
        Hudson added a comment -

        Integrated in ws-axiom-trunk #612 (See https://builds.apache.org/job/ws-axiom-trunk/612/)
        Designed test cases for AXIOM-389.

        veithen :
        Files :

        • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/attachments/AttachmentsTest.java
        Show
        Hudson added a comment - Integrated in ws-axiom-trunk #612 (See https://builds.apache.org/job/ws-axiom-trunk/612/ ) Designed test cases for AXIOM-389 . veithen : Files : /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/attachments/AttachmentsTest.java

          People

          • Assignee:
            Andreas Veithen
            Reporter:
            Gurkan Erdogdu
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development