on 11-12-2014 2:09 PM
Hi SDNites,
I have used certain UDF in the past from the google repository . Also I do understand the flow of the code but would like your suggestions in how to,
1. Write a new one.
2. How can I test it standalone.
3. How to debug it in case of error.
4. How to know which standard class / methods can be used to meet my requirement.
Any pointers in this direction would be of great help.
Regards,
Abhi
Thanks for the above inputs.
When sending a file containing special characters to receiver, all the special charcters are transformed,
1. " - Changed to "
2. ' - Changed to '
Also I tried writing an UDF which converts the input value to a string but still it dosen't help.
Small UDF written for testing :
String a = "My ' testing"; (Here apostophe special character has been passed in string)
return a;
Regards,
Abhi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
They are illegal char's in xml.
However your receiver system should be able to handle this right? what is the issue that you are facing?
If you want them as is then you must enclose them within cdata so that they'll be ignored by parser.
http://www.w3schools.com/xml/xml_cdata.asp
Please do not merge multiple questions into one discussion.
Thanks Nabendu - As suggested above, it is working for normal characters but not for special characters. Below are the results,
Try 1 :
___________
ABC'-----
' --------> replaceString() -----> ABC'
"" -----
Try 2 :
___________
ABC'-----
' --------> replaceString() -----> ABC'
"" -----
Here ' can be seen in inbound XML.
@Hareesh - When sending special charcters like ' my output xml has ' into it.
Regards,
Abhi
>>> When sending special charcters like ' my output xml has ' into it.
That is how it behaves.. do you want to remove them? if so replace string function third parameter should be blank.
>>>Try 1 :
___________
ABC'-----
' --------> replaceString() -----> ABC'
"" -----
Try 2 :
___________
ABC'-----
' --------> replaceString() -----> ABC'
"" -----
Here again you are trying to replace it with another illegal char. did you check the w3 school link that i shared in my previous reply?
Hi Abhishek,
Left side of Message Mapping you will find the option to create UDF.
You will have these 3 options to manage your Return values from the Function.
You will like below after creation.
To check the code for any error or typo, run "Check" option.
If you want to test / run locally, use Display Queue option. Before this 'Test' tab (Next to 'Definition') should be filled with proper Source side xml.
Regards,
Nabendu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
All these question are answered in the documentation and there are numerous blogs on the same.
Please search..
User-Defined Functions - Managing Services in the Enterprise Services Repository - SAP Library
http://wiki.scn.sap.com/wiki/display/XI/User+Defined+Function
http://wiki.scn.sap.com/wiki/display/XI/User+Defined+Function
How to run / debug User Defined Function using Testview | Integrace Ltd
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.