protected void handleInboundHttpHeaders ( final SoapMessage message , final WebServiceEndpointConfiguration endpointConfiguration ) { final TransportContext transportContext = TransportContextHolder . getTransportContext ( ) ; if ( transportContext == null ) { log . warn ( "Unable to get complete set of http request headers - no transport context available" ) ; return ; } final WebServiceConnection connection = transportContext . getConnection ( ) ; if ( connection instanceof HttpServletConnection ) { final UrlPathHelper pathHelper = new UrlPathHelper ( ) ; final HttpServletConnection servletConnection = ( HttpServletConnection ) connection ; final HttpServletRequest httpServletRequest = servletConnection . getHttpServletRequest ( ) ; message . setHeader ( SoapMessageHeaders . HTTP_REQUEST_URI , pathHelper . getRequestUri ( httpServletRequest ) ) ; message . setHeader ( SoapMessageHeaders . HTTP_CONTEXT_PATH , pathHelper . getContextPath ( httpServletRequest ) ) ; final String queryParams = pathHelper . getOriginatingQueryString ( httpServletRequest ) ; message . setHeader ( SoapMessageHeaders . HTTP_QUERY_PARAMS , queryParams != null ? queryParams : "" ) ; message . setHeader ( SoapMessageHeaders . HTTP_REQUEST_METHOD , httpServletRequest . getMethod ( ) ) ; if ( endpointConfiguration . isHandleAttributeHeaders ( ) ) { final Enumeration < String > attributeNames = httpServletRequest . getAttributeNames ( ) ; while ( attributeNames . hasMoreElements ( ) ) { final String attributeName = attributeNames . nextElement ( ) ; final Object attribute = httpServletRequest . getAttribute ( attributeName ) ; message . setHeader ( attributeName , attribute ) ; } } } else { log . warn ( "Unable to get complete set of http request headers" ) ; try { message . setHeader ( SoapMessageHeaders . HTTP_REQUEST_URI , connection . getUri ( ) ) ; } catch ( final URISyntaxException e ) { log . warn ( "Unable to get http request uri from http connection" , e ) ; } } }
Reads information from Http connection and adds them as Http marked headers to internal message representation .