Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-7822

CXF 3.2.x gets Error 400 when communicating with IIS, 2.7.x does not

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.2.5, 3.2.6
    • None
    • Core, Transports
    • None
    • Windows Server 2012

      JDK 8u152 unlimited strength encryption.

    • Unknown

    Description

      On CXF 3.2.x, When calling a .NET webservice  hosted by IIS, using MTOM and chunked transfer encoding, we get "Error 400 : Bad Request". 

      Using 2.7.18, the same code works flawlessly.

      The requests are almost identical except for content-type for the attachments and a CR in the signature.

       

      One thing we noticed was that 2.7.x. sends an empty packet after the SOAP envelope (before the first attachment), where 3.2.6 does not. It is only the first empty packet that is missing.

      From the IIS trace it looks like this (missing packet highlighted)

      102 NOTIFY_MODULE_START

      103 GENERAL_READ_ENTITY_START

      104 GENERAL_READ_ENTITY_END

      105 GENERAL_REQUEST_ENTITY

      106 NOTIFY_MODULE_COMPLETION <------- MISSING ON 3.2.x

      }}{{GENERAL_READ_ENTITY_START

      108 GENERAL_READ_ENTITY_END

      109 GENERAL_REQUEST_ENTITY...

      118 NOTIFY_MODULE_COMPLETION

      119 GENERAL_READ_ENTITY_START

      120 GENERAL_READ_ENTITY_END 0 bytes

       

       

      The client setup is identical between both versions

      BindingProvider bp = ((BindingProvider) port);
      bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "https://somewhere.dk/SomeService.svc");
      SOAPBinding soapBinding = (SOAPBinding) bp.getBinding();
      soapBinding.setMTOMEnabled(true);HTTPConduit http = (HTTPConduit) client.getConduit();
      HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
      httpClientPolicy.setConnectionTimeout(0);
      httpClientPolicy.setReceiveTimeout(0);
      httpClientPolicy.setAllowChunking(true);
      httpClientPolicy.setChunkLength(8192);
      http.setClient(httpClientPolicy);

       

      Code used for sending data:

      DataSource source = new FileDataSource(file);
      DataHandler dh = new DataHandler(source);
      Port.submit(dh);

      Attachments

        Activity

          People

            Unassigned Unassigned
            jinie Jimmy Selgen Nielsen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: