[ http://jira.codehaus.org/browse/XFIRE-1070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_104162 ]
Michael Mattox commented on XFIRE-1070: --------------------------------------- I've debugged this and I see where in the code there is the problem. I still feel I must be missing something because I cannot be the only one using xmlbeans bindings with xfire! Look at this method: /** * Gets the "listB" element */ public org.example.test14.B getListB() { synchronized (monitor()) { check_orphaned(); org.example.test14.B target = null; target = (org.example.test14.B)get_store().find_element_user(LISTB$0, 0); if (target == null) { return null; } return target; } } the problem is with the call to find_element_user(): public TypeStoreUser find_element_user ( QName name, int i ) { for ( Xobj x = _firstChild ; x != null ; x = x._nextSibling ) if (x.isElem() && x._name.equals( name ) && --i < 0) return x.getUser(); return null; } Here is the SOAP request: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tes="http://www.example.org/Test14/"> <soapenv:Header/> <soapenv:Body> <tes:foo> <a> <listB> <!--Zero or more repetitions:--> <id>5</id> <id>5</id> <id>5</id> <id>5</id> </listB> </a> </tes:foo> </soapenv:Body> </soapenv:Envelope> Here is the problem: for ( Xobj x = _firstChild ; x != null ; x = x._nextSibling ) _firstChild is "a". The for loop goes through the siblings of a, which in this case there are none. The listB that I'm trying to recover is a child of A, not a sibling. I'm not sure if this is a bug with xmlbeans or a problem with the SOAP request I'm sending (automatically generated by SoapUI). I think I'm the only one seeing this because it's related to the structure of the WSDL. > Unmarshalling problem with xmlbeans - list ends up null > ------------------------------------------------------- > > Key: XFIRE-1070 > URL: http://jira.codehaus.org/browse/XFIRE-1070 > Project: XFire > Issue Type: Bug > Components: XMLBeans > Affects Versions: 1.2.6 > Environment: xfire 1.2.6, xmlbeans 2.3.0, jdk 1.5 > Reporter: Michael Mattox > Assignee: Dan Diephouse > Priority: Critical > Attachments: Test14.wsdl > > > Using document literal wrapped. > Our method takes a single object which has a list: > public String foo(A a) { > System.out.println("A.toString() = " + a); > System.out.println("a.getListB()" + a.getListB()); > return "true"; > } > <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:tes="http://www.example.org/Test14/"> > <soapenv:Header/> > <soapenv:Body> > <tes:foo> > <a> > <listB> > <!--Zero or more repetitions:--> > <id>5</id> > </listB> > </a> > </tes:foo> > </soapenv:Body> > </soapenv:Envelope> > The .toString on the object shows the list exists: > A.toString() = <a xmlns:tes="http://www.example.org/Test14/" > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> > <listB> > <id>5</id> > </listB> > </a> > But the system.out.println shows that the list is null: > a.getListB()null > I attached the WSDL which shows this problem. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email