[ 
https://issues.apache.org/jira/browse/CXF-2017?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12669523#action_12669523
 ] 

Willem Jiang commented on CXF-2017:
-----------------------------------

Yes, if you can't wait, you can check out the code from 
http://svn.apache.org/repos/asf/cxf/branches/2.1.x-fixes
and run "mvn clean install -Pfastinstall" from the root.



> Fields of deserialized objects are null (No DOCTYPE declaration..)
> ------------------------------------------------------------------
>
>                 Key: CXF-2017
>                 URL: https://issues.apache.org/jira/browse/CXF-2017
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.1.3
>         Environment: java version "1.5.0_16"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-277)
> Java HotSpot(TM) Client VM (build 1.5.0_16-130, mixed mode, sharing)
> Mac OSX 10.5.6
>            Reporter: Valerio Schiavoni
>            Assignee: Daniel Kulp
>             Fix For: 2.2
>
>
> I use the simple front-end to export a java interface and to call it.
> Given this simple java interface:
> public interface ServiceWithWeirdParams {
>       void mapOfMapWithStringAndPojo(Map<String, Map<String, Pojo>> bigParam);
> }
> The implementation simply prints the bigParam argument.
> Pojo is:
> public class Pojo implements Serializable {
>       private static final long serialVersionUID = 1481418882118674796L;
>       int id;
>       String name;
>       Pojo parent;
>       XMLGregorianCalendar date;
>       public final XMLGregorianCalendar getDate() {
>               return date;
>       }
>       public final void setDate(XMLGregorianCalendar date) {
>               this.date = date;
>       }
>       public final int getId() {
>               return id;
>       }
>       public final void setId(int id) {
>               this.id = id;
>       }
>       public final String getName() {
>               return name;
>       }
>       public final void setName(String name) {
>               this.name = name;
>       }
>       public final Pojo getParent() {
>               return parent;
>       }
>       public final void setParent(Pojo parent) {
>               this.parent = parent;
>       }
>       @Override
>       public String toString() {
>               return "Pojo[id:" + id + ",name:" + name + ",date:" + date + 
> "]";
>       }
> }
> CXF on both client and server-side is configured using Aegis, like this:
>               wsServerFactoryBean = new ServerFactoryBean();
>               AegisDatabinding aDB = new AegisDatabinding();
>               final AegisContext aegisContext = new AegisContext();
>               aegisContext.setWriteXsiTypes(true);
>               aDB.setAegisContext(aegisContext);
>               wsServerFactoryBean.getServiceFactory().setDataBinding(aDB);
> The method is invoked like this:
>              
>                Pojo p1 = new Pojo();
>               p1.setName("i am a pojo");
>               p1.setId(666);
>               Map<String, Map<String, Pojo>> mapWithMapOfStringAndPojo = new 
> HashMap<String, Map<String, Pojo>>();
>               Map<String, Pojo> nameAndPojo = new HashMap<String, Pojo>();
>               nameAndPojo.put("firstPojo", p1);
>               mapWithMapOfStringAndPojo.put("keyForFirstPojo", nameAndPojo);
>               ws.mapOfMapWithStringAndPojo(mapWithMapOfStringAndPojo);
> And it prints:
> ***** Server received map of map (with pojo): 
> {keyForFirstPojo={firstPojo=[Document:  No DOCTYPE declaration, Root is 
> [Element: <ns1:value [Namespace: 
> http://weird.connectors.bf.fractal.objectweb.org/]/>]]}}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to