Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-7600

CXF request via gateway-http add "Content-Length and Transfer-Encoding:chunked" in response headers.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • None
    • jboss-fuse-6.3
    • Gateway
    • None
    • % %
    • Hide
      • Create a fabric environment.
      • Go to jboss-fuse-6.3.0.redhat-310/quickstarts/cxf/camel-cxf-contract-first/.
      • Build it using mvn fabric8:deploy.
      • Now start deploying in fabric environment using below commands.
        container-list
        container-create-child root gatewayContainer
        container-create-child root serviceContainer
        container-list
        container-add-profile serviceContainer quickstarts-cxf-camel.cxf.contract.first 
        container-add-profile gatewayContainer gateway-http 
        
      • Now using soap-ui, send following request to url: http://localhost:8183/cxf/contract_first_order/
        <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ord="http://order.camelinaction">
           <soapenv:Header/>
           <soapenv:Body>
              <ord:partName>123</ord:partName>
              <ord:amount>234</ord:amount>
              <ord:customerName>csp</ord:customerName>
           </soapenv:Body>
        </soapenv:Envelope>
        
      Show
      Create a fabric environment. Go to jboss-fuse-6.3.0.redhat-310/quickstarts/cxf/camel-cxf-contract-first/. Build it using mvn fabric8:deploy . Now start deploying in fabric environment using below commands. container-list container-create-child root gatewayContainer container-create-child root serviceContainer container-list container-add-profile serviceContainer quickstarts-cxf-camel.cxf.contract.first container-add-profile gatewayContainer gateway-http Now using soap-ui, send following request to url: http://localhost:8183/cxf/contract_first_order/ <soapenv:Envelope xmlns:soapenv= "http: //schemas.xmlsoap.org/soap/envelope/" xmlns:ord= "http://order.camelinaction" > <soapenv:Header/> <soapenv:Body> <ord:partName>123</ord:partName> <ord:amount>234</ord:amount> <ord:customerName>csp</ord:customerName> </soapenv:Body> </soapenv:Envelope> Now send request to gateway-http using url http://localhost:9000/cxf/contract_first_order// In SoapUI's Raw mode check headers.

      • Request goes through gateway-http than in response we get Content-Length and Transfer-Encoding headers. I am testing in 6.3.0 R5.
      • Response via gateway.
        HTTP/1.1 200 OK
        Content-Type: text/xml; charset=UTF-8
        Accept-Encoding: gzip,deflate
        breadcrumbId: ID-cpandey-pnq-csb-34625-1515753822042-0-5
        Host: localhost:9000
        SOAPAction: http://order.camelinaction/Order
        User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
        Content-Length: 171
        Server: Jetty(9.2.21.v20170120)
        Transfer-Encoding: chunked
        
        <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><resultCode xmlns="http://order.camelinaction">OK</resultCode></soap:Body></soap:Envelope>
        
      • Response when invoking service directly.
        HTTP/1.1 200 OK
        Content-Type: text/xml; charset=UTF-8
        Accept-Encoding: gzip,deflate
        breadcrumbId: ID-cpandey-pnq-csb-34625-1515753822042-0-9
        Host: localhost:8183
        SOAPAction: http://order.camelinaction/Order
        User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
        Content-Length: 171
        Server: Jetty(9.2.21.v20170120)
        
        <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><resultCode xmlns="http://order.camelinaction">OK</resultCode></soap:Body></soap:Envelope>
        

      "If a Content-Length header field (Section 14.13) is present, its decimal value in OCTETs represents both the entity-length and the transfer-length. The Content-Length header field must not be sent if these two lengths are different (i.e., if a Transfer-Encoding header field is present). If a message is received with both a Transfer-Encoding header field and a Content-Length header field, the latter must be ignored."

              atarocch@redhat.com Andrea Tarocchi
              rhn-support-cpandey Chandra Shekhar Pandey (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: