on 08-04-2010 9:56 PM
I am writing a program to remove the special chars in NWDS Java mapping. this is for replacing the "&" with "&".. I am able to compile it and import the jar in PI.. but it does not do anything.. please check..
And also let me know where to check for Java mapping executed with trace detail.. to check if any error
try {
int read_data;
while ((read_data = arg0.getInputPayload().getInputStream().read()) != -1) {
if (read_data != '&') {
arg1.getOutputPayload().getOutputStream().write(read_data);
} else {
arg1.getOutputPayload().getOutputStream().write("&".getBytes());
}
}
arg1.getOutputPayload().getOutputStream().flush();
}catch (Exception e) { }
}
}
Dear Gopal,
If i not wrong you need to replace all the charecters "&" with blank ...
if so you can this code for doing that..
String outData = inData.replaceAll("&","");
or
you need to replace any special charecter to blank please clarify..
so that i can help you out to solve this issue using java mapping..
Regards
Vijay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
> arg1.getOutputPayload().getOutputStream().write("&".getBytes());
I suppose when you always get a new outputstream in a while loop, at the end there will be no output.
Do not concatenate method calls. Call each method at the right place.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.