on 03-16-2010 7:51 PM
I have followed the Blog here, from Stefan (excellent, by the way!)
/people/stefan.grube/blog/2007/02/02/remove-namespace-prefix-or-change-xml-encoding-with-the-xmlanonymizerbean
i have the following xml.....
<?xml version="1.0" encoding="UTF-8" ?>
<ns0:Message xmlns:ns0="http://www.host.com/aoc">
<ns0:header>
<ns0:trackingId>00237DA659FD1DDF8CA4B49A1800AC7E</ns0:trackingId>
<ns0:msgClass>PUBLISH</ns0:msgClass>
<ns0:msgName>MX001</ns0:msgName>
<ns0:owner>SAPECD</ns0:owner>
<ns0:version>1</ns0:version>
<ns0:timestamp>2010-03-16T17:59:21Z</ns0:timestamp>
</ns0:header>
i am trying to strip out the ns0: from the xml as per the requirement from the target system developers
i added the following config in the JMS Adapter:
number 1
XMLAnonymizerBean
Local Enterprise Bean
0
0
anonymizer.acceptNamespaces
http://www.host.com/aoc "
0
anonymizer.quote
'
and i get the following error:
2010-03-16 19:43:13 Error Adapter Framework caught exception: Object not found in lookup of XMLAnonymizerBean.
2010-03-16 19:43:13 Error Delivering the message to the application using connection JMS_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of XMLAnonymizerBean..
any thoughts on what i have done wrong???
If someone is having the same issue.
For me it was due to copy and past from SAP docu:
Here the module name is mentioned with a space in between like below:
AF_Modules/ XMLAnonymizerBean
If you switch to below it is working:
AF_Modules/XMLAnonymizerBean
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Okay! it was a partial success
the message was actually received as:
<":Message xmlns:"='http://www.host.com/aoc'>
<":header>
<":trackingId>00237DA659FD1DDF8CA4B49A1800AC7E</":trackingId>
<":msgClass>PUBLISH</":msgClass><":msgName>MX001</":msgName>
<":owner>SAPECT</":owner>
<":version>1</":version>
i need to strip out the ": out of the message.... but when i look in the RWB to see the payload, it still has the whole namespace on.
where can i see the message stripped down as i do not have access to the target system???
I have checked the payload on the adapter monitoring and end to end monitoring and it shows the full namespace and not the version the developer sent me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Barry,
Number: 1
Module Name: AF_Modules/XMLAnonymizerBean
Module Type: Local Enterprise Bean
Module Key: 0
and in Module Configuration:
Module Key: 0
Parameter name: anonymizer.acceptNamespaces
Parameter Value: http://www.host.com/aoc ''
The same config is working for me Barry. I hope the payload you have given is the reciever payload after message mapping.
Regards,
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
I don't know which version have you got of PI but have you tried:
localejbs/AF_Modules/XMLAnonymizerBean
instead of AF_Modules/XMLAnonymizerBean
?
also http://www.host.com/aoc "
has one more space at then end - can you try with http://www.host.com/aoc";
?
also check for other typos and trailing spaces
Regards,
Michal Krawczyk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michal
i got it resolved... i missed the AF_Modules off the front.....
that's what you get after a 12 hour shift clearing issues! grrrrrr!
i am on PI7.11
p.s...
apparently you are not allowed any points!
You are about to mark the message "Re: Object not found in lookup of XMLAnonymizerBean.." by Michal_Krawczyk_PIXI as correct which means you found the information in the message to be the right answer to the original question. If you believe this message was only helpful but not correct, please go back and click "Helpful" next to the message. Otherwise, click "Mark Message" to rate the message and return to the message page.
Note, marking a message as helpful or correct can not be undone. If you don't want to do this, click "Cancel" to go back to the question.
An error has occured while assigning points. Please refresh the thread view and try again.
Edited by: Barry Neaves on Mar 16, 2010 8:08 PM
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.