Hello,
I am trying to use XFire with XMLBeans bindings.  (I'm writing a simple 
XSD, running XMLBeans to create Java classes and defining web service 
methods that return Collections of those types.)

I've found that XFire generates WSDL with namespace errors if I define 
types as elements and then define my methods in terms of collections of 
the Document types, i.e.

<xs:element name="Foo">
  <xs:complexType>
    <xs:all>
      <xs:element name="Created" type="xs:dateTime" />
      <xs:element name="Name" type="xs:string"/>
    </xs:all>
  </xs:complexType>
</xs:element>

But XFire generates working WSDL if I define the types like this:

  <xs:complexType name="Foo">
    <xs:all>
      <xs:element name="Created" type="xs:dateTime" />
      <xs:element name="Name" type="xs:string"/>
    </xs:all>
  </xs:complexType>

However in this case, when I actually invoke the web service, I get errors 
about DOM Level 3 Not Implemented. The resulting fault looks like this:

Couldn't get property {http://dom.w3c.org}baseURI from bean 
[EMAIL PROTECTED] Nested 
exception is java.lang.reflect.InvocationTargetException: null

I've tried both with and without the xmlbeans-namespace-hack and it 
doesn't seem to make any difference.

My questions are:

1. Any theories as to what's going wrong? For example, is it possible that 
this combination of tools has only been tested with services that send and 
return single objects rather than collections? Or maybe the tools only 
support sending and receiving element-level types and not complexTypes? Is 
it possible that I've failed to enable the xmlbeans-namespace-hack? I 
added this to my Spring config in my ServiceBean definition:

<property name="properties">
  <map>
 
<entry><key><value>xmlbeans-namespace-hack</value></key><value>true</value></entry>
  </map>
</property>

(I'm not using the XBean syntax because of bug in the handling of 
properties.)

2. If anyone has successfully used XFire + XMLBeans could you post a 
"hello, world" recipe including a sample XSD file, and version numbers for 
XFire, XMLBeans, and any other dependencies? (I'll certainly do it myself 
if I can make this combination of tools work.) 

I'm currently using the following:

                <dependency>
                        <groupId>org.codehaus.xfire</groupId>
                        <artifactId>xfire-xmlbeans</artifactId>
                        <version>1.2.6</version>
                </dependency>
                <dependency>
                        <groupId>org.codehaus.xfire</groupId>
                        <artifactId>xfire-spring</artifactId>
                        <version>1.2.6</version>
                </dependency>
                <dependency>
                        <groupId>org.codehaus.xfire</groupId>
                        <artifactId>xfire-java5</artifactId>
                        <version>1.2.6</version>
                </dependency>
                <dependency>
                        <groupId>xmlbeans</groupId>
                        <artifactId>xbean</artifactId>
                        <version>2.2.0</version>
                </dependency>
                <dependency>
                        <groupId>stax</groupId>
                        <artifactId>stax</artifactId>
                        <version>1.1.1-dev</version>
                        <scope>compile</scope>
                        <exclusions>
                            <exclusion>
 <artifactId>xmlbeans-jsr173-api</artifactId>
                                <groupId>xmlbeans</groupId>
                            </exclusion>
                        </exclusions>
                </dependency>

I've already invested a week trying to get this combination of tools to 
work, and have tried countless variations of XSD definitions, config 
options, and web service client stub generation options. If anyone either 
has information that can point me in the right direction, or can 
definitively tell me that this combination of tools is untested and not 
known to work, I'd very much appreciate it.

-- 
Joe Morrison
Deutsche Bank, 60 Wall Street, 8th floor 
office: +1 (212) 250-8486        mobile: +1 (917) 952-2935


---

This e-mail may contain confidential and/or privileged information. If you 
are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and destroy this e-mail. Any 
unauthorized copying, disclosure or distribution of the material in this 
e-mail is strictly forbidden.

Reply via email to