[prev in list] [next in list] [prev in thread] [next in thread]
List: rampart-dev
Subject: [jira] [Updated] (AXIS2-5979) Error while printing the SOAP Message Response (In)
From: "kuldeep (Jira)" <jira () apache ! org>
Date: 2020-02-21 20:16:00
Message-ID: JIRA.13286885.1582316065000.102650.1582316160047 () Atlassian ! JIRA
[Download RAW message or body]
[ https://issues.apache.org/jira/browse/AXIS2-5979?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel \
]
kuldeep updated AXIS2-5979:
---------------------------
Description:
I had created a client stub (jar) using the Axis 2. I need to consume this jar into \
my application and like wise print the soap request and response whenever a soap \
service is invoked. How do i do that ? While surfing on internet i only found the \
below approach to print the logs. But it only print the request . While printing the \
response it throws error " java.lang.IllegalStateException: Can't process next node \
because caching is disabled" . Please assist ?
ServiceContext serviceContext = this.proxy._getServiceClient().getServiceContext();
boolean cacheLastOperationContext = true;
serviceContext.setCachingOperationContext(cacheLastOperationContext);
OperationContext lastOperationContext = serviceContext.getLastOperationContext();
lastOperationContext.setComplete(true);
if(null != lastOperationContext) {
MessageContext outMessageContext = lastOperationContext.getMessageContext("Out");
MessageContext inMessageContext = lastOperationContext.getMessageContext("In");
if (outMessageContext != null)
{ System.out.println("OUT SOAP: " + outMessageContext.getEnvelope().toString()); }
if (inMessageContext != null)
{ ** This below line throws the error while printing the response**
System.out.println("IN SOAP: "+ inMessageContext.getEnvelope().toString()); \
proxy.cleanup(); }
}
was:
I had created a client stub (jar) using the Axis 2. I need to consume this jar into \
my application and like wise print the soap request and response whenever a soap \
service is invoked. How do i do that ? While surfing on internet i only found the \
below approach to print the logs. But it only print the request . While printing the \
response it throws error " java.lang.IllegalStateException: Can't process next node \
because caching is disabled" . Please assist ?
ServiceContext serviceContext = this.proxy._getServiceClient().getServiceContext();
boolean cacheLastOperationContext = true;
serviceContext.setCachingOperationContext(cacheLastOperationContext);
OperationContext lastOperationContext = serviceContext.getLastOperationContext();
lastOperationContext.setComplete(true);
if(null != lastOperationContext) {
MessageContext outMessageContext = lastOperationContext.getMessageContext("Out");
MessageContext inMessageContext = lastOperationContext.getMessageContext("In");
if (outMessageContext != null) {
System.out.println("OUT SOAP: " + outMessageContext.getEnvelope().toString());
}
if (inMessageContext != null) {
** This below line throws the error while printing the response**
System.out.println("IN SOAP: "+ inMessageContext.getEnvelope().toString());
proxy.cleanup();
}
}
> Error while printing the SOAP Message Response (In)
> ----------------------------------------------------
>
> Key: AXIS2-5979
> URL: https://issues.apache.org/jira/browse/AXIS2-5979
> Project: Axis2
> Issue Type: Bug
> Reporter: kuldeep
> Priority: Major
> Labels: Axis2
>
> I had created a client stub (jar) using the Axis 2. I need to consume this jar into \
> my application and like wise print the soap request and response whenever a soap \
> service is invoked. How do i do that ? While surfing on internet i only found the \
> below approach to print the logs. But it only print the request . While printing \
> the response it throws error " java.lang.IllegalStateException: Can't process next \
> node because caching is disabled" . Please assist ? ServiceContext serviceContext = \
> this.proxy._getServiceClient().getServiceContext(); boolean \
> cacheLastOperationContext = true; \
> serviceContext.setCachingOperationContext(cacheLastOperationContext); \
> OperationContext lastOperationContext = serviceContext.getLastOperationContext(); \
> lastOperationContext.setComplete(true); if(null != lastOperationContext) {
> MessageContext outMessageContext = lastOperationContext.getMessageContext("Out");
> MessageContext inMessageContext = lastOperationContext.getMessageContext("In");
> if (outMessageContext != null)
> { System.out.println("OUT SOAP: " + outMessageContext.getEnvelope().toString()); }
> if (inMessageContext != null)
> { ** This below line throws the error while printing the response**
> System.out.println("IN SOAP: "+ inMessageContext.getEnvelope().toString()); \
> proxy.cleanup(); } }
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic