Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-5817

org.apache.axis2.builder.UnknownContentBuilderTest error

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Invalid
    • Affects Version/s: 1.5.6
    • Fix Version/s: None
    • Component/s: Integration
    • Labels:
      None
    • Environment:
      jdk 1.8
    • Flags:
      Important

      Description

      org.apache.axis2.builder.UnknownContentBuilderTest testNoBuilder test

      File file = getTestResourceFile("mime_message.txt");
      MIMEBuilder mimeBuilder = new MIMEBuilder();
      FileInputStream fis = new FileInputStream(file);
      ConfigurationContext configContext = null;
      try

      { String path=file.getAbsolutePath(); configContext=ConfigurationContextFactory.createDefaultConfigurationContext(path); }

      catch(Exception excp)

      { System.out.println("UnknownContentBuilderTest::testNoBuilder LINE 81 throws Exception mssage="+excp.getMessage()); }

      where mime-message.txt contains:

      ----MIMEBoundary258DE2D105298B756D
      content-type:text/plain; charset=ISO-8859-1; format=flowed
      content-transfer-encoding:binary
      content-id:<0.15B50EF49317518B01@apache.org>

      <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Header><wsa:To xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://localhost:8070/axis2/services/MTOMService/mtomSample</wsa:To></soapenv:Header><soapenv:Body><x:EchoTest xmlns:x="http://example.org/mtom/data"><x:Data><xop:Include href="cid:1.BBFC8D48A21258EBBD@apache.org" xmlns:xop="http://www.w3.org/2004/08/xop/include"></xop:Include></x:Data><x:Data><xop:Include href="cid:2.CB365E36E21BD6491A@apache.org" xmlns:xop="http://www.w3.org/2004/08/xop/include"></xop:Include></x:Data></x:EchoTest></soapenv:Body></soapenv:Envelope>
      ----MIMEBoundary258DE2D105298B756D
      content-id:<11.BBFC8D48A21258EBBD@apache.org>
      content-type:text/csv;name="test.csv"
      content-transfer-encoding:binary

      saminda saminda saminda saminda saminda saminda saminda saminda saminda saminda saminda saminda saminda saminda saminda saminda saminda saminda saminda saminda

      there is no axisconfig element inside message.txt so Exception is thrown:

      <error message="The system was looking for the 'axisconfig' element,
      but it found '%AXIS2_HOME%\modules\integration\test-resources\mime_message.txt'"
      type="org.apache.axis2.deployment.DeploymentException">org.apache.axis2.deployment.DeploymentException:
      The system was looking for the 'axisconfig' element,
      but it found 'C:\Axis\axis-2.1.5\modules\integration\test-resources\mime_message.txt'
      at org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:177)
      at org.apache.axis2.context.ConfigurationContextFactory.createBasicConfigurationContext(ConfigurationContextFactory.java:427)
      at org.apache.axis2.context.ConfigurationContextFactory.createDefaultConfigurationContext(ConfigurationContextFactory.java:409)
      at org.apache.axis2.builder.UnknownContentBuilderTest.testNoBuilder(UnknownContentBuilderTest.java:77)

      disable testNoBuilder test to stop UnknownContentBuilderTest from failing
      OR sub in axis2.xml that contains <axisconfig name="AxisJava2.0"> element

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mgainty@hotmail.com Martin Gainty
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 24h
                24h
                Remaining:
                Remaining Estimate - 24h
                24h
                Logged:
                Time Spent - Not Specified
                Not Specified