As for why this change fixed your problem, XMLBeans has a problem with some of the StAX parsers (including the one used with Axis2 1.0). You can view the discussion from the axis-dev list in the archive: http://marc.theaimsgroup.com/?t=114756956600001&r=1&w=2 (though the response from Tatu Saloranta, the developer of the StAX implementation used by Axis2, doesn't appear in the thread - he said the latest consensus on the StAX side is that this method should return null for the empty namespace). I suspect this means that until XMLBeans is fixed it will only work with Axis2 when the schema definition has elementFormDefault="qualified", though I haven't tried any tests to verify this.

 - Dennis

Dennis M. Sosnoski
SOA, Web Services, and XML
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-296-6194 - Wellington, NZ +64-4-298-6117



Anne Thomas Manes wrote:
The elementFormDefault attribute specifies the default namespace qualification setting for local elements within a schema. A local element is an element that is defined within another construct (e.g., a type) -- as opposed to a global element, which is an element definition that is a direct child of the <schema> element. If you specify elementFormDefault="qualified", then all local elements are in the targetNamespace. If you specify elementFormDefault="unqualified", then all local elements are in no namespace.

For example:

<x:schema
   xmlns:x="http://www.w3.org/2001/XMLSchema";
   xmlns:tns="urn:foo.bar"
   targetNamespace="urn:foo.bar "
   elementFormDefault="unqualified"/>
<x:element name="foo" type="x:string"/>
<x:complexType name="barType">
  <x:sequence>
    <x:element name="bar" type="x:string/>
  </x:sequence>
</x:complexType>
</x:schema>

In this example, "foo" is in the "urn: foo.bar" namespace, but "bar" is no namespace.
But if the schema specifies "qualified":

<x:schema
   xmlns:x="http://www.w3.org/2001/XMLSchema";
   xmlns:tns="urn:foo.bar"
   targetNamespace="urn:foo.bar"
   elementFormDefault="qualified"/>
<x:element name="foo" type="x:string"/>
<x:complexType name="barType">
  <x:sequence>
    <x:element name="bar" type="x:string/>
  </x:sequence>
</x:complexType>
</x:schema>

then both "foo" and "bar" are in the "urn:foo.bar" namespace.

Anne

On 5/31/06, *Sebastian J. Schultheiss * <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Hi there!

    Thanks a lot for your help! It does indeed work when we set it to
    qualified.
    This is a really good step forward, I'm very grateful to you, Ali,
    for finding
    this problem.

    I never imagined it to be something from the WSDL... Can any of
    you WSDL gurus
    tell me what exactly this attribute does? Why did it cause such
    problems with
    Axis? Is this intended?

    Thanks again, Ali!

    -- Sebastian

    Ali Sadik Kumlali wrote:
    > Hi Sebastian,
    >
    > Don't know why but, mystery is changing
    > elementFormDefault="unqualified" to
    elementFormDefault="qualified". I
    > could manage to successfully run the code against the given WSDL
    with
    > this change.
    >
    > I added my comments and test files to the
    > http://issues.apache.org/jira/browse/AXIS2-720
    >
    > Hope this helps.
    >
    > Ali Sadik Kumlali
    >
    > --- "Sebastian J. Schultheiss" < [EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>> wrote:
    >
    >> Hi there,
    >>
    >> Even after *days* of testing and trying different things, we still
    >> arrive at the
    >> same error with the current nightly (May 30th).
    >> We are using Eclipse to build and run our project under Windows XP.
    >> Did you ever
    >> try to run a client with xmlbeans under windows? How does the
    >> classpath have to
    >> look like? We always get a class not found exception whenever we
    >> DON'T include
    >> the xbeans-packaged.jar from the lib directory of the created
    client.
    >> We also
    >> have all the jars from the axis2/lib dir in the classpath. Is there
    >> anything we
    >> shouldn't do?
    >>
    >> The problem is logged as a JIRA:
    >> http://issues.apache.org/jira/browse/AXIS2-720
    >>
    >> This is part of the stack trace:
    >>
    >> org.apache.axis2.AxisFault: Data binding error
    >>     at
    >>
    >
    
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:287)
    >>     at
    >>
    >
    
org.apache.axis2.TextLocServiceStub.predictLocalization(TextLocServiceStub.java:133)
    >>     at org.apache.axis2.runLoc.main(runLoc.java:26)
    >> Caused by: java.lang.Exception: org.apache.axis2.AxisFault : Data
    >> binding
    >> error; nested exception is:
    >>     java.lang.RuntimeException: Data binding error
    >>     at org.apache.axis2.AxisFault.makeFault(AxisFault.java:318)
    >>     at
    >>     ... 21 more
    >>
    >>     at org.apache.axis2.AxisFault.<init>(AxisFault.java:159)
    >>     ... 3 more
    >>
    >> Any thoughts or experiences would be greatly appreciated. Out of
    >> desparation we
    >> now tried to use ADB instead, but found another bug there, see
    >> separate email.
    >>
    >> -- Sebastian
    >>
    >>
    ---------------------------------------------------------------------
    >> To unsubscribe, e-mail: [EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>
    >> For additional commands, e-mail: [EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>
    >>
    >>
    >
    >
    > __________________________________________________
    > Do You Yahoo!?
    > Tired of spam?  Yahoo! Mail has the best spam protection around
    > http://mail.yahoo.com
    >
    >
    ---------------------------------------------------------------------
    > To unsubscribe, e-mail: [EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>
    > For additional commands, e-mail: [EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>
    >

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>
    For additional commands, e-mail: [EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to