[Logo] OLD FORUM - Use new one: https://www.CaptainCasa.online/forum
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
ClientHttpSender and confusion with & / &  XML
Forum Index -> Development
Author Message
brandt

Power User
[Avatar]

Joined: 12/03/2008 16:37:34
Messages: 45
Location: Bern
Offline

Hello Björn,

we switched from Casabac release 13.04.2010 to the actual release 18.10.2010.

Now we have some problems with äöü, when we are calling a web service via ClientHttpSender.

For instance: We want to transfer the name 'Jörg Möller' in an xml stucture.

With release 13.04.2010 the following xml data are transferred with escaped ö.

<KAHA_NAME>M&#246;ller</KAHA_NAME>
<KAHA_VORNAME>J&#246;rg</KAHA_VORNAME>

In the sample above the ö is escaped in a correct way.

But with release 18.10.2010 the ö is escaped incorrectly.

<KAHA_NAME>M&amp;#246;ller</KAHA_NAME>
<KAHA_VORNAME>J&amp;#246;rg</KAHA_VORNAME>

The & is now transferred as &amp; and the result is that the receiving application displays 'J&#246;rg M&#246;ller' instead of 'Jörg Möller'

With release 04.10.2010 the handling of '&amp;' has changed.

May be this is the cause for the problem of sending äöü via ClientHttpSender.

Can you reproduce my äöü problem, Björn?
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5555
Offline

Hi,

yes, we did some correction in this area (ChangeLog for 20101004). We are just checking your scenario + come back to you.

Björn

Björn Müller, CaptainCasa GmbH
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5555
Offline

Hi,

the behavior has changes in this area but is "more correct" then it was before...

Before a String "ö" was transferred to "ö" when it was sent from the client to the server. Now "ö" is received in the client as "ö". So, there is no "loss of data" anymore.

Who is building the "&#xxx;" in your application - is it something you received from another system? I'll try to call you directly...

Björn

Björn Müller, CaptainCasa GmbH
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5555
Offline

....exactly the same "loss of information" happened with my previous post that we are just talking about...

Before "&#246;" was transfferred to "ö", this is what I wanted to say...

Björn

Björn Müller, CaptainCasa GmbH
brandt

Power User
[Avatar]

Joined: 12/03/2008 16:37:34
Messages: 45
Location: Bern
Offline

Hi Björn,

mea culpa. It was my fault.

My xml was not properly created.

Now i use ValueManager.encodeIntoValidXml (as you suggested) to set the attributes of my xml object.

Now everything is okay with öäü.

Thank you very much for your help!

Joe
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team