Hi Sergey,
I perform a call to this web method:

        @CxfWSAuthorization(group=PlatUserLevel.GUEST, roles={authRoles.all})
        @GET
        @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
        @Path("/GetPlatUserByPK/{userID}")
        @ApiOperation(value = "Gets the IProxyPlatUser object identified by the
given PK.", notes = "Returns the object identified by the given input", 
                                        response = IProxyPlatUser.class, 
produces
="application/xml,application/json")
        public IProxyPlatUser GetPlatUserByPK( 
                        @ApiParam(value = "userID", required = true) 
@WebParam(name = "userID")
@PathParam("userID") @CxfWSAuthGrain(type=authType.user) int userID);

through an invocation like this

    http://10.0.3.39:8161/PersistenceRest/GetPlatUserByPK/1

When I arrive in the WSKPIMsgSizeInInterceptor interceptor (it is the only
one added in the input-interceptors chain) if I look inside the InputStream
(that is of type org.apache.cxf.transport.http.AbstractHTTPDestination),
val$inMessage field, I can see this:

{org.apache.cxf.continuations.ContinuationProvider=org.apache.cxf.transport.http_jetty.continuations.JettyContinuationProvider@5015440c,
org.apache.cxf.message.Message.PROTOCOL_HEADERS={Accept=[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8],
Accept-Charset=[ISO-8859-1,utf-8;q=0.7,*;q=0.3],
accept-encoding=[gzip,deflate,sdch],
Accept-Language=[it-IT,it;q=0.8,en-US;q=0.6,en;q=0.4],
connection=[keep-alive], Content-Type=[null], Host=[10.0.3.39:8161],
User-Agent=[Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.31 (KHTML,
like Gecko) Chrome/26.0.1410.64 Safari/537.31]},
org.apache.cxf.message.Message.IN_INTERCEPTORS=[org.apache.cxf.transport.https.CertConstraintsInterceptor@26b31cf8],
org.apache.cxf.message.Message.QUERY_STRING=null, HTTP.RESPONSE=HTTP/1.1 200 

, HTTP_CONTEXT_MATCH_STRATEGY=stem,
org.apache.cxf.security.SecurityContext=org.apache.cxf.transport.http.AbstractHTTPDestination$2@6200783b,
org.apache.cxf.request.url=http://10.0.3.39:8161/PersistenceRest/GetPlatUserByPK/1,
org.apache.cxf.configuration.security.AuthorizationPolicy=null,
org.apache.cxf.async.post.response.dispatch=true,
org.apache.cxf.request.method=GET,
org.apache.cxf.request.uri=/PersistenceRest/GetPlatUserByPK/1,
org.apache.cxf.transport.Destination=org.apache.cxf.transport.http_jetty.JettyHTTPDestination@cd59bc1,
org.apache.cxf.message.MessageFIXED_PARAMETER_ORDER=false, HTTP.REQUEST=(GET
/PersistenceRest/GetPlatUserByPK/1)@467968636
org.eclipse.jetty.server.Request@1be4a27c,
http.base.path=http://10.0.3.39:8161,
org.apache.cxf.transport.https.CertConstraints=null, HTTP.CONFIG=null,
Accept=text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8,
[email protected]{,null},
Content-Type=null,
org.apache.cxf.message.Message.BASE_PATH=/PersistenceRest,
org.apache.cxf.message.Message.PATH_INFO=/PersistenceRest/GetPlatUserByPK/1}


So I think there are all the info required but probably I try to perform a
bad operation to obtain the Document.
Unfortunately I see that if I change the header with the operations:

        Map<Object, Object> headers = CastUtils.cast((Map<?,
?>)message.get(Message.PROTOCOL_HEADERS));
        headers.put(messageID, msgID);
        message.put(Message.PROTOCOL_HEADERS, headers);

an exception occurs before to arrive in the web method implementor.
So I think the right way should be to manipulate the Document as I did with
SOAP message.

Andrea





--
View this message in context: 
http://cxf.547215.n5.nabble.com/CXF-Rest-How-the-get-the-Message-Identifier-from-a-XMLMessage-tp5730734p5730767.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to