cancel
Showing results for 
Search instead for 
Did you mean: 

Anonymizer encoding

Former Member
0 Kudos

Hi guys,

Relating to Anonymizer enconding I'm having some trouble in using the ISO-8859-1 encoding.

On the JMS channel I've the CCSID set to 00819 and the anonymizer.encoding property set to ISO-8859-1. Nevertheless I'm getting on the message monitoring the following exception:

Anonimizer: failed to anonymized due to java.io.IOException: com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Unsupported character: 41(:main:, row:23, col:33)(:main:, row=23, col=33) -> com.sap.engine.lib.xml.parser.ParserException: Unsupported character: 41(:main:, row:23, col:33)

This exception is related to a special character which appears on row 23, col 33, namely 'Ç' .

Can you guys help me or have any suggestions?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

As in above post its mentaioned that the Anonymizer encoding can not be used in sender adapter and this possible to use with XI3.0 SP16 or above and PI7.0 or above.

Starting from SAP NetWeaver Exchange Infrastructure 3.0 SP16 you can use this module to change the encoding of an XML document.

The parameter for this purpose is:

anonymizer.encoding = <charset>

You have to define all namespaces and prefixes of the XML document in the

parameter anonymizer.acceptNamespaces to prevent them from being

removed.

More information: SAP Note 880173 - XI 3.0 Adapter Framework XML Anonymizer

Module

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/502991a2-45d9-2910-d99f-8aba5d79...

Please I kindly request you to confirm about it.

It is not possible to use this module in the sender JMS or SOAP adapter as this adapter type does not support any additional modules.

Can I request you to once again confirm about the the parameters of the XMLAnonymizerBean

anonymizer.acceptNamespaces

Enter an alternating list of all allowed namespaces and the corresponding prefixes devided by space. If you want a namespace without prefix, enter '' (two single quotes) as prefix. All namespaces which are not in this list are removed from the XML message.

Example: http://namespace1 '' http://namespace2 ns

anonymizer.quote

Enter the character that should be used for attribute quotes, usually ' or "

anonymizer.encoding

Enter the encoding that should be used in the XML declaration, if you want to change the default UTF-8. The XML file is changed to this encoding

Please refer below link to varify the parameters for module XMLAnonymizerBean

/people/stefan.grube/blog/2007/02/02/remove-namespace-prefix-or-change-xml-encoding-with-the-xmlanonymizerbean

Note : the link is for SOAP adapter , but for JMS also you will have same parameters.

Thanks

Swarup

Edited by: Swarup Sawant on Jan 26, 2008 7:37 PM

Former Member
0 Kudos

Hi Stefan,

Sorry for the late reply but it's been hard to get back to the encoding problem... Thanks for your answer, and the scenario is a JMS sender channel where I use the anonymizer for readapting the namespaces, but that's not the problem. I was using the anonymizer encoding parameter because I'm getting special characters on the payload of the JMS message. I've tried the CCSID but with no results, and since i was using the anonymizer, i tried using the encoding parameter for converting the message to iso-8859-1 instead of utf-8. But with no result, I'm still getting the same error...

Can anyone give a hint on how to work around the special characters?

stefan_grube
Active Contributor
0 Kudos

Check this page, if the CCSID 819 is really correct:

http://www-03.ibm.com/systems/i/software/globalization/codepages.html

Check also this thread:

Regards

Stefan

Former Member
0 Kudos

Hi Stefan,

Thanks for you reply.

I've checked the IBM codepage and the 00819 confirms. Relating to the thread, the problem seems similar but I can't see nothing wrong comparing to the specs that I've placed.

If I test with a JMS message with no special characters, anonymizer is successful and in the MONI I'm able to check ISO-8859-1 as the xml header, meaning the CCSID is working fine.

If I send a JMS message with special characters, anonymizer failed and in the MONI am not able to get a XML payload. This is a result of the anonymizer failure....

It seems the anonymizer is not reading the encoding parameter....Do you have any suggestion?

stefan_grube
Active Contributor
0 Kudos

When you do not use the parameter encoding, what hex code would the Ç have? You have to download the payload and use a hex editor to check this.

Regards

Stefan

Former Member
0 Kudos

Hi Stefan,

I've checked the hex code for 'Ç' and I get 'c7' which is correct. I've deleted the anonymizer call in the communication channel processing sequence, and tried to send a new JMS message with special characters.

The result in MONI was: XI is not able to place the xml header and the mapping from the JMS to the corresponding IDOC gets with the character "#".... Is there another way to specify the JMS encoding?

stefan_grube
Active Contributor
0 Kudos

When you see C7 in moni, that means that the JMS message is not tranferred correctly to UTF-8. It should have the double byte value c3 87.

Please check out not 1086303 question 6, if there is anything useful inside.

Regards

Stefan

Former Member
0 Kudos

Hi Stefan,

Once again, sorry for the late reply but your suggestion was not forgotten.

I've looked to the specified note and it seems to me that the description is really similar to my actual problem.

I'll ask the WebSphere team to run and validate this procedures. As soon as I test the modifications I'll give you the corresponding feedback.

Thanks for you continuous replies, very helpful answer.

shweta_walaskar2
Contributor
0 Kudos

Hi,

I am also facing the same problem but in a different scenario.

I have created an EDI D96A ORDERS to ORDERS05 IDoc scenario.

Hence,I have a file sender and IDoc receiver CC.

Now,the EDI file coming from Czech Republic contains some special characters and I am getting the same error.

I have included AnonymizerBean Module before Seeburger modules in File Sender CC.Still,I am getting the same error.

Module configuration in File sender CC is as follows:

1 AF_Modules/XMLAnonymizerBean Local Enterprise Bean 1

2 localejbs/CallBicXIRaBean Local Enterprise Bean bic

3 localejbs/CallSapAdapter Local Enterprise Bean 0

1 anonymizer.encoding ISO-8859-1

bic destSourceMsg MainDocument

bic destTargetMsg MainDocument

bic logAttID ConverterLog

bic mappingName See_E2X_ORDERS_UN_D96A

bic saveSourceMsg ORIGINAL_EDI

It would be helpful if someone could help as this is quite urgent for us.

Regards,

Shweta

stefan_grube
Active Contributor
0 Kudos

You should not use the XMLAnonymizerBean in a sender file adapter, as the encoding is changed automatically to UTF-8 in mapping.

Regards

Stefan

stefan_grube
Active Contributor
0 Kudos

Is this a sender or receiver channel?

In a sender channel you need not apply the AnonymizerBean, as the XI does the tranformation to UTF-8 by itself.

In a receiver channel the error is related to the message before it is send to the JMS queue. So you have to check in SXMB_MONI, if the message is correct here.

Regards

Stefan