Hi 

I further analyzed the problem and I found out that it derives from a wrong XML 
encoding of accented characters at producer side. In fact 
SimpleNotificationProducer invokes the 'notify' operation using 
SimpleSoapClient which calls String::getBytes() to get the binary 
representation of the request message. The problem is that String::getBytes() 
uses the default coding ISO-8859-1 which is not suitable for handling accented 
characters, in fact replacing String::getBytes() with String::getBytes("UTF-8") 
solves the issue.

The same problem happens if a client invokes an operation on a resource and I 
found out that, in case of Axis2 deployment, replacing String::getBytes() with 
String::getBytes("UTF-8") in 
org.apache.muse.core.platform.axis2.AxisEnvironment::convertToAxiom solves the 
issue.

I hope to have been helpful
Francesco


-----Messaggio originale-----
Da: Scandelli Francesco [mailto:[EMAIL PROTECTED] 
Inviato: mercoledì 16 maggio 2007 18.57
A: [email protected]
Oggetto: problem with XML encoding of characters whose code is outside range 
0...127

Hi all

 

I'm experiencing a problem in the communication between a WSN producer and 
consumer:

 

1)                   the producer emits a notification whose payload contains a 
certain tag whose text value contains the character 'à' (ASCII code 133d)  and 
it correctly traces the messages on the log

2)                   using Ethereal on the consumer host I see that this 
character is wrongly coded into 14d

3)                   the consumer (it extends AbstractCapability and it 
implements ConsumerCapability, NotificationMessageListener), in the ::accepts 
method, receives a NotificationMessage that doesn't contain anymore the tag 
containing the 'à' (to be precise it doesn't contain anymore the grand father 
of the this tag and his previous sibling...sorry for genealogy game!!)

 

I guess it's a problem of encoding at producer side, do you know where and if 
can change the encoding configuration?

 

Many thanks

Francesco 


Internet Email Confidentiality Footer
-----------------------------------------------------------------------------------------------------
La presente comunicazione, con le informazioni in essa contenute e ogni 
documento o file allegato, e' rivolta unicamente alla/e persona/e cui e' 
indirizzata ed alle altre da questa autorizzata/e a riceverla. Se non siete i 
destinatari/autorizzati siete avvisati che qualsiasi azione, copia, 
comunicazione, divulgazione o simili basate sul contenuto di tali informazioni 
e' vietata e potrebbe essere contro la legge (art. 616 C.P., D.Lgs n. 196/2003 
Codice in materia di protezione dei dati personali). Se avete ricevuto questa 
comunicazione per errore, vi preghiamo di darne immediata notizia al mittente e 
di distruggere il messaggio originale e ogni file allegato senza farne copia 
alcuna o riprodurne in alcun modo il contenuto. 

This e-mail and its attachments are intended for the addressee(s) only and are 
confidential and/or may contain legally privileged information. If you have 
received this message by mistake or are not one of the addressees above, you 
may take no action based on it, and you may not copy or show it to anyone; 
please reply to this e-mail and point out the error which has occurred. 
-----------------------------------------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to