*
The moose likes Web Services and the fly likes problem cxf with Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "problem cxf with "& " caracter" Watch "problem cxf with "& " caracter" New topic
Author

problem cxf with "& " caracter

camilo lopes
Ranch Hand

Joined: Aug 08, 2007
Posts: 202
Hi guys,

I do not understand why I am having this problem when I try to search some data in my api using & as string in field:

In soapui, I have this values:



There is a owner with "&" in string. But when I try to search, my response is:

Mon Jan 30 13:37:52 BRST 2012:ERROR:An error occured [The entity name must immediately follow the '&' in the entity reference.], see error log for details


do someone have passed by this problem? any idea how to fix?

thanks

Brazil - Sun Certified Java Programmer - SCJP 5
http://www.camilolopes.com/ About Java - Update every Week.
Guide SCJP - tips that you need know http://blog.camilolopes.com.br/livrosrevistaspalestras/
g tsuji
Ranch Hand

Joined: Jan 18, 2011
Posts: 499
    
    3
<serviceFilterValue>Admin&strator </serviceFilterValue>

Ampersand in text node should be written in escaped form (no hyphen below):
<serviceFilterValue>Admin&-a-m-p;strator </serviceFilterValue>
Or, in cdata section, it can be in unescaped form.
<serviceFilterValue><![CDATA[Admin&strator ]]></serviceFilterValue>
camilo lopes
Ranch Hand

Joined: Aug 08, 2007
Posts: 202
hi g tsuji
I got it . I used Admin&-a-m-p;strator. Now it is working.

thanks.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem cxf with "& " caracter
 
Similar Threads
PROBLEM WITH DISPLAYING CONTENTS OF HQL QUERY
Hibernate Batch with <join>
orm.xml with JBoss
Hibernate: org.hibernate.AssertionFailure: null id don't flush the Session after an exception occurs
ClassCastException