on 06-06-2015 9:57 AM
Hi experts
i have a target structure like:
<?xml version="1.0" encoding="UTF-8"?><ns0:Mt_Vinguard_Response xmlns:ns0="http://Sample.ginger.com/Vinguard"><Status></Status></ns0:Mt_Vinguard_Response>
Mt_Vinguard_Response
Status
in java maaping i have use this to get the value in Status field with a variable finalResponse:
String fresult= "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
fresult = fresult.concat("<ns0:Mt_Vinguard_Response xmlns:ns0=\"http://Sample.ginger.com/Vinguard\">");
fresult = fresult.concat("<Status>");
fresult = fresult.concat(finalResponse);
fresult = fresult.concat("</Status>");
//absTraceLog.addDebugMessage("\n FinalResult-" + finalResponse );
fresult = fresult.concat("</ns0:Mt_Vinguard_Response>");
i want to know is the response structure correct??
the issue is when i dnt add logger in it, than it doesnt throw me error
but when have added logger in the java code (in transform fuction and in other fuction ) it throws me error
that the structure us not well formed for the response.
i need to add logger to see in the java code why it's not working.
i m using dom parser
can anybody throw me li8 for this?
You can use these lines in your code to log on different level.
getTrace.addInfo("logging informationhere");
or
getTrace.addDebugMessage("adding debug message");
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nunu,
Yes..
getTrace is a method under AbstractTransformation
And moreover, you write all your coding logic in transform method for executing the Java Mapping.
Hope it helps
Regards,
Azhar
Hi Azhar
what if my code is like:
transform function() {}
xyz (){}
abc {}
documenttostring(){}
than do I need to change it to
transform function() {
xyz (){}
abc {}
documenttostring(){}
}
i.e calling a other function within transform function
or i have to remove all other functions
Thanks aa lot for the valubale info
Hi Nunu,
I mean you can use / call the trace method in our other functions as well (provided its being used/called in transform method)
public class YourClassr extends AbstractTransformation {
public void transform(........) throws.......{
//Your code / logic for as per your requirement
getTrace.addInfo("Inside Transform Method");
YourMethod();
}
public String YourMethod(){
//Further logic for ur Java mapping based on ur requirement
getTrace.addInfo("Inside ur Method");
}
}
Hope it helps
Regards,
Azhar
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
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.