on 02-17-2015 9:44 AM
Good morning forum
Have to implement the following solution.
In a Web Dynpro component I am consuming a web service, and reading an XML, it is now functioning properly.
But after the XML data is loaded into context, I must record all xml content in a context field.
I implemented the following logic:
Request_ITF_O_S_CONSULTA_CADASTRO requestMO = wdContext.currentRequestWSElement () modelObject (.);
requestMO.wdSetInvocationLogEnabled (true);
String xml = requestMO.wdGetResponseLog ();
However the variable "XML" is blank.
Does anyone have any tips on how to do this?
Hi Carlos,
have you even executed the the operation of your WS Model? I can't see that from your code. And ofcourse you have to set the LogEnabled to true before you execute the operation.
Here is some sample with explanations:
Request_NumberToWords requestMO = wdContext.currentRequest_NumberToWordsElement().modelObject();
if
(logger.beDebug()) {
requestMO.wdSetInvocationLogEnabled(
true
);
//switch on logging for this model object
}
try
{
requestMO.execute();
wdContext.nodeResponse().invalidate();
//update context from model
}
catch
(Exception ce) {
wdComponentAPI.getMessageManager().reportException(ce.getMessage(),
false
);
}
logger.debugT(requestMO.wdGetRequestLog());
//request log (HTTP header + SOAP request)
logger.debugT(requestMO.wdGetResponseLog());
//response log (HTTP header + SOAP response)
logger.debugT(requestMO.associatedModelClassInfo().getModelInfo().toString());
//model metadata in XML format
logger.debugT(requestMO.toString());
//model object tree in XML format (= model context node content)
Regards,
Tobias
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
not clear what you are doing.....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.