You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by tog <gu...@gmail.com> on 2007/09/05 17:10:44 UTC

Aegis and JAXB-WS

Hiya

I have a server based on the Aegis binding. I connect to that server using
the dynamic client (JAXB). I get the following exception during the
compilation phase of the schema.

Is that a problem already known and similar to the one reported by Benson ?

I also attached the wsdl.

Cheers
Guillaume

java.lang.RuntimeException: Error compiling schema from WSDL at {
http://localhost:6981/BookService?wsdl}: undefined simple or complex type
'ns1:Book'
        at
org.apache.cxf.endpoint.dynamic.DynamicClientFactory$InnerErrorListener.error
(DynamicClientFactory.java:409)
        at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error(
SchemaCompilerImpl.java:264)
        at com.sun.tools.xjc.util.ErrorReceiverFilter.error(
ErrorReceiverFilter.java:61)
        at com.sun.xml.xsom.impl.parser.ParserContext$2.error(
ParserContext.java:156)
        at com.sun.xml.xsom.impl.parser.ParserContext$1.reportError(
ParserContext.java:134)
        at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.reportError(
NGCCRuntimeEx.java:131)
        at com.sun.xml.xsom.impl.parser.DelayedRef.resolve(DelayedRef.java
:90)
        at com.sun.xml.xsom.impl.parser.DelayedRef.run(DelayedRef.java:65)
        at com.sun.xml.xsom.impl.parser.ParserContext.getResult(
ParserContext.java:94)
        at com.sun.xml.xsom.parser.XSOMParser.getResult(XSOMParser.java:190)
        at com.sun.tools.xjc.ModelLoader.createXSOM(ModelLoader.java:500)
        at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(
SchemaCompilerImpl.java:216)
        at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(
SchemaCompilerImpl.java:69)
        at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient
(DynamicClientFactory.java:166)
        at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient
(DynamicClientFactory.java:137)


-- 

Best Regards
Guillaume

RE: Aegis and JAXB-WS

Posted by Benson Margulies <bi...@basistech.com>.
I'll do it, and I promise to run the tests :-)

> -----Original Message-----
> From: Daniel Kulp [mailto:dkulp@apache.org]
> Sent: Wednesday, September 05, 2007 5:51 PM
> To: cxf-user@incubator.apache.org
> Subject: Re: Aegis and JAXB-WS
> 
> 
> This actually wouldn't be hard to do if someone wants to pick it up.
> There are only three places that we create XmlSchema objects:
> 
> 1) AegisDatabinding.java - around line 268 add a
> e.addNamespaceDeclaration(...) call
> 
> 2) ReflectionServiceFactoryBean - in getOrCreateSchema add a tns to
the
> nsMap.
> 
> 3) JAXBSchemaInitializer - in createBridgeXsElement and
> buildExceptionType, add tns to the nsMap.
> 
> There are probably a BUNCH of unit tests that would then also need to
be
> updated.   Tests that do xpath asserts will need to be adjusted,
etc....
> 
> Dan
> 
> 
> On Wednesday 05 September 2007, Glen Mazza wrote:
> > OK, I would agree then, "tns" is indeed more readable than "ns1" for
> > the target namespace.
> >
> > Glen
> >
> > Am Mittwoch, den 05.09.2007, 13:18 -0400 schrieb Benson Margulies:
> > > I'm changing the subject, sorry. I happened to notice yesterday
that
> > > when it *is* CXF that generates, it lets targetNamespace items
fall
> > > into ns1.
> > >
> 
> 
> 
> 
> --
> J. Daniel Kulp
> Principal Engineer
> IONA
> P: 781-902-8727    C: 508-380-7194
> daniel.kulp@iona.com
> http://www.dankulp.com/blog

Re: Aegis and JAXB-WS

Posted by Daniel Kulp <dk...@apache.org>.
This actually wouldn't be hard to do if someone wants to pick it up.  
There are only three places that we create XmlSchema objects:

1) AegisDatabinding.java - around line 268 add a 
e.addNamespaceDeclaration(...) call

2) ReflectionServiceFactoryBean - in getOrCreateSchema add a tns to the 
nsMap.

3) JAXBSchemaInitializer - in createBridgeXsElement and 
buildExceptionType, add tns to the nsMap.

There are probably a BUNCH of unit tests that would then also need to be 
updated.   Tests that do xpath asserts will need to be adjusted, etc....   

Dan


On Wednesday 05 September 2007, Glen Mazza wrote:
> OK, I would agree then, "tns" is indeed more readable than "ns1" for
> the target namespace.
>
> Glen
>
> Am Mittwoch, den 05.09.2007, 13:18 -0400 schrieb Benson Margulies:
> > I'm changing the subject, sorry. I happened to notice yesterday that
> > when it *is* CXF that generates, it lets targetNamespace items fall
> > into ns1.
> >




-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog

RE: Aegis and JAXB-WS

Posted by Glen Mazza <gl...@verizon.net>.
OK, I would agree then, "tns" is indeed more readable than "ns1" for the
target namespace.

Glen

Am Mittwoch, den 05.09.2007, 13:18 -0400 schrieb Benson Margulies:
> I'm changing the subject, sorry. I happened to notice yesterday that
> when it *is* CXF that generates, it lets targetNamespace items fall into
> ns1.
> 
> > -----Original Message-----
> > From: Glen Mazza [mailto:glen.mazza@verizon.net]
> > Sent: Wednesday, September 05, 2007 1:16 PM
> > To: cxf-user@incubator.apache.org
> > Subject: RE: Aegis and JAXB-WS
> > 
> > I don't think so; AFAICT this is a WSDL that *he* created manually,
> no?
> > 
> > Glen
> > 
> > Am Mittwoch, den 05.09.2007, 13:01 -0400 schrieb Benson Margulies:
> > > Let's open a JIRA that CXF should create a TNS prefix and use it.
> > >
> > > > -----Original Message-----
> > > > From: Glen Mazza [mailto:glen.mazza@verizon.net]
> > > > Sent: Wednesday, September 05, 2007 12:08 PM
> > > > To: cxf-user@incubator.apache.org
> > > > Subject: Re: Aegis and JAXB-WS
> > > >
> > > > I'm not sure, but:
> > > >
> > > > 1.) If you reverse the order of "ArrayOfBook" and "Book" in your
> WSDL
> > > > (see below), that might fix the problem, because the former is
> > > > referencing the latter, so the latter would need to be listed
> first I
> > > > believe.
> > > >
> > > > 2.) I think that ArrayOfBook is meant to reference the book type
> below
> > > > it, so your prefix is wrong--"ns1" refers to your
> "DefaultNamespace"
> > > URI
> > > > you have listed, but the tns of the schema is "type.acme.com".
> > > >
> > > > 3.) I think your top-level prefix of "ns1" should be "tns" for
> > > > readability, because ns1's URI is the WSDL's target namespace.
> > > >
> > > > HTH,
> > > > Glen
> > > >
> > > > <schema xmlns="http://www.w3.org/2001/XMLSchema"
> > > > attributeFormDefault="qualified" elementFormDefault="qualified"
> > > > targetNamespace="http://type.acme.com">
> > > >
> > > > <complexType name="ArrayOfBook">
> > > > <sequence>
> > > > <element maxOccurs="unbounded" minOccurs="0" name="Book"
> > > nillable="true"
> > > > type="ns1:Book"/>
> > > > </sequence>
> > > > </complexType>
> > > >
> > > > <complexType name="Book">
> > > > <sequence>
> > > > <element minOccurs="0" name="author" nillable="true"
> type="string"/>
> > > > <element minOccurs="0" name="isbn" nillable="true" type="string"/>
> > > > <element minOccurs="0" name="title" nillable="true"
> type="string"/>
> > > > </sequence>
> > > > </complexType>
> > > >
> > > > </schema>
> > > >
> > > >
> > > > Am Mittwoch, den 05.09.2007, 17:10 +0200 schrieb tog:
> > > > > Hiya
> > > > >
> > > > > I have a server based on the Aegis binding. I connect to that
> server
> > > > > using the dynamic client (JAXB). I get the following exception
> > > during
> > > > > the compilation phase of the schema.
> > > > >
> > > > > Is that a problem already known and similar to the one reported
> by
> > > > > Benson ?
> > > > >
> > > > > I also attached the wsdl.
> > > > >
> > > > > Cheers
> > > > > Guillaume
> > > > >
> > > > > java.lang.RuntimeException: Error compiling schema from WSDL at
> > > > > {http://localhost:6981/BookService?wsdl}: undefined simple or
> > > complex
> > > > > type 'ns1:Book'
> > > > >         at org.apache.cxf.endpoint.dynamic.DynamicClientFactory
> > > > > $InnerErrorListener.error(DynamicClientFactory.java:409)
> > > > >         at
> com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error
> > > > > (SchemaCompilerImpl.java:264)
> > > > >         at
> > > > >
> > > >
> > >
> com.sun.tools.xjc.util.ErrorReceiverFilter.error(ErrorReceiverFilter.jav
> > > a:
> > > > 61)
> > > > >         at com.sun.xml.xsom.impl.parser.ParserContext
> > > > > $2.error(ParserContext.java:156)
> > > > >         at com.sun.xml.xsom.impl.parser.ParserContext
> > > > > $1.reportError(ParserContext.java:134)
> > > > >         at
> > > > >
> > > >
> > >
> com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.reportError(NGCCRuntimeEx.jav
> > > a:
> > > > 131)
> > > > >         at com.sun.xml.xsom.impl.parser.DelayedRef.resolve
> > > > > (DelayedRef.java:90)
> > > > >         at
> > > > > com.sun.xml.xsom.impl.parser.DelayedRef.run(DelayedRef.java:65)
> > > > >         at
> > > > >
> > > >
> > >
> com.sun.xml.xsom.impl.parser.ParserContext.getResult(ParserContext.java:
> > > 94)
> > > > >         at com.sun.xml.xsom.parser.XSOMParser.getResult
> > > > > (XSOMParser.java:190)
> > > > >         at
> > > > > com.sun.tools.xjc.ModelLoader.createXSOM(ModelLoader.java:500)
> > > > >         at
> > > > >
> > > >
> > >
> com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImp
> > > l.
> > > > java:216)
> > > > >         at
> com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind
> > > > > (SchemaCompilerImpl.java:69)
> > > > >         at
> > > > >
> > > >
> > >
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(Dynami
> > > cC
> > > > lientFactory.java:166)
> > > > >         at
> > > > >
> > > >
> > >
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(Dynami
> > > cC
> > > > lientFactory.java :137)
> > > > >
> > > > >
> > > > > --
> > > > >
> > > > > Best Regards
> > > > > Guillaume
> > >
> 


RE: Aegis and JAXB-WS

Posted by Benson Margulies <bi...@basistech.com>.
I'm changing the subject, sorry. I happened to notice yesterday that
when it *is* CXF that generates, it lets targetNamespace items fall into
ns1.

> -----Original Message-----
> From: Glen Mazza [mailto:glen.mazza@verizon.net]
> Sent: Wednesday, September 05, 2007 1:16 PM
> To: cxf-user@incubator.apache.org
> Subject: RE: Aegis and JAXB-WS
> 
> I don't think so; AFAICT this is a WSDL that *he* created manually,
no?
> 
> Glen
> 
> Am Mittwoch, den 05.09.2007, 13:01 -0400 schrieb Benson Margulies:
> > Let's open a JIRA that CXF should create a TNS prefix and use it.
> >
> > > -----Original Message-----
> > > From: Glen Mazza [mailto:glen.mazza@verizon.net]
> > > Sent: Wednesday, September 05, 2007 12:08 PM
> > > To: cxf-user@incubator.apache.org
> > > Subject: Re: Aegis and JAXB-WS
> > >
> > > I'm not sure, but:
> > >
> > > 1.) If you reverse the order of "ArrayOfBook" and "Book" in your
WSDL
> > > (see below), that might fix the problem, because the former is
> > > referencing the latter, so the latter would need to be listed
first I
> > > believe.
> > >
> > > 2.) I think that ArrayOfBook is meant to reference the book type
below
> > > it, so your prefix is wrong--"ns1" refers to your
"DefaultNamespace"
> > URI
> > > you have listed, but the tns of the schema is "type.acme.com".
> > >
> > > 3.) I think your top-level prefix of "ns1" should be "tns" for
> > > readability, because ns1's URI is the WSDL's target namespace.
> > >
> > > HTH,
> > > Glen
> > >
> > > <schema xmlns="http://www.w3.org/2001/XMLSchema"
> > > attributeFormDefault="qualified" elementFormDefault="qualified"
> > > targetNamespace="http://type.acme.com">
> > >
> > > <complexType name="ArrayOfBook">
> > > <sequence>
> > > <element maxOccurs="unbounded" minOccurs="0" name="Book"
> > nillable="true"
> > > type="ns1:Book"/>
> > > </sequence>
> > > </complexType>
> > >
> > > <complexType name="Book">
> > > <sequence>
> > > <element minOccurs="0" name="author" nillable="true"
type="string"/>
> > > <element minOccurs="0" name="isbn" nillable="true" type="string"/>
> > > <element minOccurs="0" name="title" nillable="true"
type="string"/>
> > > </sequence>
> > > </complexType>
> > >
> > > </schema>
> > >
> > >
> > > Am Mittwoch, den 05.09.2007, 17:10 +0200 schrieb tog:
> > > > Hiya
> > > >
> > > > I have a server based on the Aegis binding. I connect to that
server
> > > > using the dynamic client (JAXB). I get the following exception
> > during
> > > > the compilation phase of the schema.
> > > >
> > > > Is that a problem already known and similar to the one reported
by
> > > > Benson ?
> > > >
> > > > I also attached the wsdl.
> > > >
> > > > Cheers
> > > > Guillaume
> > > >
> > > > java.lang.RuntimeException: Error compiling schema from WSDL at
> > > > {http://localhost:6981/BookService?wsdl}: undefined simple or
> > complex
> > > > type 'ns1:Book'
> > > >         at org.apache.cxf.endpoint.dynamic.DynamicClientFactory
> > > > $InnerErrorListener.error(DynamicClientFactory.java:409)
> > > >         at
com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error
> > > > (SchemaCompilerImpl.java:264)
> > > >         at
> > > >
> > >
> >
com.sun.tools.xjc.util.ErrorReceiverFilter.error(ErrorReceiverFilter.jav
> > a:
> > > 61)
> > > >         at com.sun.xml.xsom.impl.parser.ParserContext
> > > > $2.error(ParserContext.java:156)
> > > >         at com.sun.xml.xsom.impl.parser.ParserContext
> > > > $1.reportError(ParserContext.java:134)
> > > >         at
> > > >
> > >
> >
com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.reportError(NGCCRuntimeEx.jav
> > a:
> > > 131)
> > > >         at com.sun.xml.xsom.impl.parser.DelayedRef.resolve
> > > > (DelayedRef.java:90)
> > > >         at
> > > > com.sun.xml.xsom.impl.parser.DelayedRef.run(DelayedRef.java:65)
> > > >         at
> > > >
> > >
> >
com.sun.xml.xsom.impl.parser.ParserContext.getResult(ParserContext.java:
> > 94)
> > > >         at com.sun.xml.xsom.parser.XSOMParser.getResult
> > > > (XSOMParser.java:190)
> > > >         at
> > > > com.sun.tools.xjc.ModelLoader.createXSOM(ModelLoader.java:500)
> > > >         at
> > > >
> > >
> >
com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImp
> > l.
> > > java:216)
> > > >         at
com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind
> > > > (SchemaCompilerImpl.java:69)
> > > >         at
> > > >
> > >
> >
org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(Dynami
> > cC
> > > lientFactory.java:166)
> > > >         at
> > > >
> > >
> >
org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(Dynami
> > cC
> > > lientFactory.java :137)
> > > >
> > > >
> > > > --
> > > >
> > > > Best Regards
> > > > Guillaume
> >


RE: Aegis and JAXB-WS

Posted by Glen Mazza <gl...@verizon.net>.
I don't think so; AFAICT this is a WSDL that *he* created manually, no?

Glen

Am Mittwoch, den 05.09.2007, 13:01 -0400 schrieb Benson Margulies:
> Let's open a JIRA that CXF should create a TNS prefix and use it.
> 
> > -----Original Message-----
> > From: Glen Mazza [mailto:glen.mazza@verizon.net]
> > Sent: Wednesday, September 05, 2007 12:08 PM
> > To: cxf-user@incubator.apache.org
> > Subject: Re: Aegis and JAXB-WS
> > 
> > I'm not sure, but:
> > 
> > 1.) If you reverse the order of "ArrayOfBook" and "Book" in your WSDL
> > (see below), that might fix the problem, because the former is
> > referencing the latter, so the latter would need to be listed first I
> > believe.
> > 
> > 2.) I think that ArrayOfBook is meant to reference the book type below
> > it, so your prefix is wrong--"ns1" refers to your "DefaultNamespace"
> URI
> > you have listed, but the tns of the schema is "type.acme.com".
> > 
> > 3.) I think your top-level prefix of "ns1" should be "tns" for
> > readability, because ns1's URI is the WSDL's target namespace.
> > 
> > HTH,
> > Glen
> > 
> > <schema xmlns="http://www.w3.org/2001/XMLSchema"
> > attributeFormDefault="qualified" elementFormDefault="qualified"
> > targetNamespace="http://type.acme.com">
> > 
> > <complexType name="ArrayOfBook">
> > <sequence>
> > <element maxOccurs="unbounded" minOccurs="0" name="Book"
> nillable="true"
> > type="ns1:Book"/>
> > </sequence>
> > </complexType>
> > 
> > <complexType name="Book">
> > <sequence>
> > <element minOccurs="0" name="author" nillable="true" type="string"/>
> > <element minOccurs="0" name="isbn" nillable="true" type="string"/>
> > <element minOccurs="0" name="title" nillable="true" type="string"/>
> > </sequence>
> > </complexType>
> > 
> > </schema>
> > 
> > 
> > Am Mittwoch, den 05.09.2007, 17:10 +0200 schrieb tog:
> > > Hiya
> > >
> > > I have a server based on the Aegis binding. I connect to that server
> > > using the dynamic client (JAXB). I get the following exception
> during
> > > the compilation phase of the schema.
> > >
> > > Is that a problem already known and similar to the one reported by
> > > Benson ?
> > >
> > > I also attached the wsdl.
> > >
> > > Cheers
> > > Guillaume
> > >
> > > java.lang.RuntimeException: Error compiling schema from WSDL at
> > > {http://localhost:6981/BookService?wsdl}: undefined simple or
> complex
> > > type 'ns1:Book'
> > >         at org.apache.cxf.endpoint.dynamic.DynamicClientFactory
> > > $InnerErrorListener.error(DynamicClientFactory.java:409)
> > >         at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error
> > > (SchemaCompilerImpl.java:264)
> > >         at
> > >
> >
> com.sun.tools.xjc.util.ErrorReceiverFilter.error(ErrorReceiverFilter.jav
> a:
> > 61)
> > >         at com.sun.xml.xsom.impl.parser.ParserContext
> > > $2.error(ParserContext.java:156)
> > >         at com.sun.xml.xsom.impl.parser.ParserContext
> > > $1.reportError(ParserContext.java:134)
> > >         at
> > >
> >
> com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.reportError(NGCCRuntimeEx.jav
> a:
> > 131)
> > >         at com.sun.xml.xsom.impl.parser.DelayedRef.resolve
> > > (DelayedRef.java:90)
> > >         at
> > > com.sun.xml.xsom.impl.parser.DelayedRef.run(DelayedRef.java:65)
> > >         at
> > >
> >
> com.sun.xml.xsom.impl.parser.ParserContext.getResult(ParserContext.java:
> 94)
> > >         at com.sun.xml.xsom.parser.XSOMParser.getResult
> > > (XSOMParser.java:190)
> > >         at
> > > com.sun.tools.xjc.ModelLoader.createXSOM(ModelLoader.java:500)
> > >         at
> > >
> >
> com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImp
> l.
> > java:216)
> > >         at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind
> > > (SchemaCompilerImpl.java:69)
> > >         at
> > >
> >
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(Dynami
> cC
> > lientFactory.java:166)
> > >         at
> > >
> >
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(Dynami
> cC
> > lientFactory.java :137)
> > >
> > >
> > > --
> > >
> > > Best Regards
> > > Guillaume
> 


RE: Aegis and JAXB-WS

Posted by Benson Margulies <bi...@basistech.com>.
Let's open a JIRA that CXF should create a TNS prefix and use it.

> -----Original Message-----
> From: Glen Mazza [mailto:glen.mazza@verizon.net]
> Sent: Wednesday, September 05, 2007 12:08 PM
> To: cxf-user@incubator.apache.org
> Subject: Re: Aegis and JAXB-WS
> 
> I'm not sure, but:
> 
> 1.) If you reverse the order of "ArrayOfBook" and "Book" in your WSDL
> (see below), that might fix the problem, because the former is
> referencing the latter, so the latter would need to be listed first I
> believe.
> 
> 2.) I think that ArrayOfBook is meant to reference the book type below
> it, so your prefix is wrong--"ns1" refers to your "DefaultNamespace"
URI
> you have listed, but the tns of the schema is "type.acme.com".
> 
> 3.) I think your top-level prefix of "ns1" should be "tns" for
> readability, because ns1's URI is the WSDL's target namespace.
> 
> HTH,
> Glen
> 
> <schema xmlns="http://www.w3.org/2001/XMLSchema"
> attributeFormDefault="qualified" elementFormDefault="qualified"
> targetNamespace="http://type.acme.com">
> 
> <complexType name="ArrayOfBook">
> <sequence>
> <element maxOccurs="unbounded" minOccurs="0" name="Book"
nillable="true"
> type="ns1:Book"/>
> </sequence>
> </complexType>
> 
> <complexType name="Book">
> <sequence>
> <element minOccurs="0" name="author" nillable="true" type="string"/>
> <element minOccurs="0" name="isbn" nillable="true" type="string"/>
> <element minOccurs="0" name="title" nillable="true" type="string"/>
> </sequence>
> </complexType>
> 
> </schema>
> 
> 
> Am Mittwoch, den 05.09.2007, 17:10 +0200 schrieb tog:
> > Hiya
> >
> > I have a server based on the Aegis binding. I connect to that server
> > using the dynamic client (JAXB). I get the following exception
during
> > the compilation phase of the schema.
> >
> > Is that a problem already known and similar to the one reported by
> > Benson ?
> >
> > I also attached the wsdl.
> >
> > Cheers
> > Guillaume
> >
> > java.lang.RuntimeException: Error compiling schema from WSDL at
> > {http://localhost:6981/BookService?wsdl}: undefined simple or
complex
> > type 'ns1:Book'
> >         at org.apache.cxf.endpoint.dynamic.DynamicClientFactory
> > $InnerErrorListener.error(DynamicClientFactory.java:409)
> >         at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error
> > (SchemaCompilerImpl.java:264)
> >         at
> >
>
com.sun.tools.xjc.util.ErrorReceiverFilter.error(ErrorReceiverFilter.jav
a:
> 61)
> >         at com.sun.xml.xsom.impl.parser.ParserContext
> > $2.error(ParserContext.java:156)
> >         at com.sun.xml.xsom.impl.parser.ParserContext
> > $1.reportError(ParserContext.java:134)
> >         at
> >
>
com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.reportError(NGCCRuntimeEx.jav
a:
> 131)
> >         at com.sun.xml.xsom.impl.parser.DelayedRef.resolve
> > (DelayedRef.java:90)
> >         at
> > com.sun.xml.xsom.impl.parser.DelayedRef.run(DelayedRef.java:65)
> >         at
> >
>
com.sun.xml.xsom.impl.parser.ParserContext.getResult(ParserContext.java:
94)
> >         at com.sun.xml.xsom.parser.XSOMParser.getResult
> > (XSOMParser.java:190)
> >         at
> > com.sun.tools.xjc.ModelLoader.createXSOM(ModelLoader.java:500)
> >         at
> >
>
com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImp
l.
> java:216)
> >         at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind
> > (SchemaCompilerImpl.java:69)
> >         at
> >
>
org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(Dynami
cC
> lientFactory.java:166)
> >         at
> >
>
org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(Dynami
cC
> lientFactory.java :137)
> >
> >
> > --
> >
> > Best Regards
> > Guillaume


Re: Aegis and JAXB-WS

Posted by Glen Mazza <gl...@verizon.net>.
I'm not sure, but:

1.) If you reverse the order of "ArrayOfBook" and "Book" in your WSDL
(see below), that might fix the problem, because the former is
referencing the latter, so the latter would need to be listed first I
believe.

2.) I think that ArrayOfBook is meant to reference the book type below
it, so your prefix is wrong--"ns1" refers to your "DefaultNamespace" URI
you have listed, but the tns of the schema is "type.acme.com".

3.) I think your top-level prefix of "ns1" should be "tns" for
readability, because ns1's URI is the WSDL's target namespace.

HTH,
Glen

<schema xmlns="http://www.w3.org/2001/XMLSchema"
attributeFormDefault="qualified" elementFormDefault="qualified"
targetNamespace="http://type.acme.com">

<complexType name="ArrayOfBook">
<sequence>
<element maxOccurs="unbounded" minOccurs="0" name="Book" nillable="true"
type="ns1:Book"/>
</sequence>
</complexType>

<complexType name="Book">
<sequence>
<element minOccurs="0" name="author" nillable="true" type="string"/>
<element minOccurs="0" name="isbn" nillable="true" type="string"/>
<element minOccurs="0" name="title" nillable="true" type="string"/>
</sequence>
</complexType>

</schema>


Am Mittwoch, den 05.09.2007, 17:10 +0200 schrieb tog:
> Hiya 
> 
> I have a server based on the Aegis binding. I connect to that server
> using the dynamic client (JAXB). I get the following exception during
> the compilation phase of the schema.
> 
> Is that a problem already known and similar to the one reported by
> Benson ?
> 
> I also attached the wsdl.
> 
> Cheers
> Guillaume
> 
> java.lang.RuntimeException: Error compiling schema from WSDL at
> {http://localhost:6981/BookService?wsdl}: undefined simple or complex
> type 'ns1:Book'
>         at org.apache.cxf.endpoint.dynamic.DynamicClientFactory
> $InnerErrorListener.error(DynamicClientFactory.java:409)
>         at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error
> (SchemaCompilerImpl.java:264)
>         at
> com.sun.tools.xjc.util.ErrorReceiverFilter.error(ErrorReceiverFilter.java:61)
>         at com.sun.xml.xsom.impl.parser.ParserContext
> $2.error(ParserContext.java:156)
>         at com.sun.xml.xsom.impl.parser.ParserContext
> $1.reportError(ParserContext.java:134)
>         at
> com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.reportError(NGCCRuntimeEx.java:131)
>         at com.sun.xml.xsom.impl.parser.DelayedRef.resolve
> (DelayedRef.java:90)
>         at
> com.sun.xml.xsom.impl.parser.DelayedRef.run(DelayedRef.java:65)
>         at
> com.sun.xml.xsom.impl.parser.ParserContext.getResult(ParserContext.java:94)
>         at com.sun.xml.xsom.parser.XSOMParser.getResult
> (XSOMParser.java:190)
>         at
> com.sun.tools.xjc.ModelLoader.createXSOM(ModelLoader.java:500)
>         at
> com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:216)
>         at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind
> (SchemaCompilerImpl.java:69)
>         at
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:166)
>         at
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java :137)
> 
> 
> -- 
> 
> Best Regards
> Guillaume


Re: Aegis and JAXB-WS

Posted by Daniel Kulp <da...@iona.com>.
Looks like you hit a JDK6 bug:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6553734

The workaround is to compile the application with Java 5.  It should then 
work on both 5 and 6.   Compiling with 6, even with the -target 1.5 
flag, doesn't seem to allow it to run on 5.

Dan


On Thursday 06 September 2007, tog wrote:
> Hi Daniel,
>
> Thanks for the quick answer. I have to mention that the wsdl is
> automatically generated by cxf so I won't change it ;-)
>
> The good news is that it is working with the latest snapshot you
> published.
>
> Nevertheless by error, I tried it with java 6 and got this error:
>
> Any idea why it happened ?
>
> Thanks
> Guillaume
>
> 6 sept. 2007 06:02:48
> org.apache.cxf.endpoint.dynamic.DynamicClientFactoryoutputDebug
> INFO: Created classes: com.acme.type.ArrayOfBook, com.acme.type.Book,
> com.acme.type.ObjectFactory, defaultnamespace.AddBook,
> defaultnamespace.AddBookResponse, defaultnamespace.FindBook,
> defaultnamespace.FindBookResponse, defaultnamespace.GetBooks,
> defaultnamespace.GetBooksResponse, defaultnamespace.ObjectFactory
> Caught: java.lang.ClassFormatError: Illegal class modifiers in class
> com/acme/type/package-info: 0x1600
> java.lang.ClassFormatError: Illegal class modifiers in class
> com/acme/type/package-info: 0x1600
>         at java.lang.ClassLoader.defineClass1(Native Method)
>         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>         at java.security.SecureClassLoader.defineClass(
> SecureClassLoader.java:124)
>         at
> java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at
> java.net.URLClassLoader.access$100(URLClassLoader.java:56) at
> java.net.URLClassLoader$1.run(URLClassLoader.java:195) at
> java.security.AccessController.doPrivileged(Native Method) at
> java.net.URLClassLoader.findClass(URLClassLoader.java:188) at
> java.lang.ClassLoader.loadClass(ClassLoader.java:306) at
> java.lang.ClassLoader.loadClass(ClassLoader.java:251) at
> java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at
> java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:242)
>         at java.lang.Package.getPackageInfo(Package.java:350)
>         at java.lang.Package.getAnnotation(Package.java:361)
>         at
> com.sun.xml.bind.v2.model.annotation.RuntimeInlineAnnotationReader.get
>PackageAnnotation (RuntimeInlineAnnotationReader.java:89)
>         at
> com.sun.xml.bind.v2.model.annotation.RuntimeInlineAnnotationReader.get
>PackageAnnotation (RuntimeInlineAnnotationReader.java:17)
>         at com.sun.xml.bind.v2.model.impl.TypeInfoImpl.parseTypeName(
> TypeInfoImpl.java:130)
>         at com.sun.xml.bind.v2.model.impl.ClassInfoImpl.<init>(
> ClassInfoImpl.java:132)
>         at com.sun.xml.bind.v2.model.impl.RuntimeClassInfoImpl.<init>(
> RuntimeClassInfoImpl.java:53)
>         at
> com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.createClassInfo(
> RuntimeModelBuilder.java:70)
>         at
> com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.createClassInfo(
> RuntimeModelBuilder.java:42)
>         at com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(
> ModelBuilder.java:185)
>         at
> com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(
> RuntimeModelBuilder.java:60)
>         at
> com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(
> RuntimeModelBuilder.java:42)
>         at com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(
> ModelBuilder.java:155)
>         at
> com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(
> RuntimeModelBuilder.java:55)
>         at
> com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(
> RuntimeModelBuilder.java:42)
>         at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(
> ModelBuilder.java:261)
>         at com.sun.xml.bind.v2.model.impl.RegistryInfoImpl.<init>(
> RegistryInfoImpl.java:63)
>         at com.sun.xml.bind.v2.model.impl.ModelBuilder.addRegistry(
> ModelBuilder.java:303)
>         at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(
> ModelBuilder.java:273)
>         at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(
> JAXBContextImpl.java:399)
>         at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(
> JAXBContextImpl.java:253)
>         at com.sun.xml.bind.v2.ContextFactory.createContext(
> ContextFactory.java:84)
>         at com.sun.xml.bind.v2.ContextFactory.createContext(
> ContextFactory.java:66)
>         at com.sun.xml.bind.v2.ContextFactory.createContext(
> ContextFactory.java:132)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
> javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:132) at
> javax.xml.bind.ContextFinder.find(ContextFinder.java:285) at
> javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372) at
> javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337) at
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient
> (DynamicClientFactory.java:232)
>         at
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient
> (DynamicClientFactory.java:137)
>
> On 9/5/07, Daniel Kulp <da...@iona.com> wrote:
> > Guillaume,
> >
> > I THINK this is the same error I fixed yesterday: (or more
> > specifically, Benson fixed, but I applied the patch)
> >
> > https://issues.apache.org/jira/browse/CXF-959
> >
> > I deployed a new snapshot last night, could you give that a try?
> >
> >
> > Dan
> >
> > On Wednesday 05 September 2007, tog wrote:
> > > Hiya
> > >
> > > I have a server based on the Aegis binding. I connect to that
> > > server using the dynamic client (JAXB). I get the following
> > > exception during the compilation phase of the schema.
> > >
> > > Is that a problem already known and similar to the one reported by
> > > Benson ?
> > >
> > > I also attached the wsdl.
> > >
> > > Cheers
> > > Guillaume
> > >
> > > java.lang.RuntimeException: Error compiling schema from WSDL at {
> > > http://localhost:6981/BookService?wsdl}: undefined simple or
> > > complex type 'ns1:Book'
> > >         at
> > > org.apache.cxf.endpoint.dynamic.DynamicClientFactory$InnerErrorLis
> > >tene r.error (DynamicClientFactory.java:409)
> > >         at
> > > com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error(
> > > SchemaCompilerImpl.java:264)
> > >         at com.sun.tools.xjc.util.ErrorReceiverFilter.error(
> > > ErrorReceiverFilter.java:61)
> > >         at com.sun.xml.xsom.impl.parser.ParserContext$2.error(
> > > ParserContext.java:156)
> > >         at
> > > com.sun.xml.xsom.impl.parser.ParserContext$1.reportError(
> > > ParserContext.java:134)
> > >         at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.reportError(
> > > NGCCRuntimeEx.java:131)
> > >         at
> > > com.sun.xml.xsom.impl.parser.DelayedRef.resolve(DelayedRef.java
> > >
> > > :90)
> > >
> > >         at
> > > com.sun.xml.xsom.impl.parser.DelayedRef.run(DelayedRef.java:65) at
> > > com.sun.xml.xsom.impl.parser.ParserContext.getResult(
> > > ParserContext.java:94)
> > >         at
> > > com.sun.xml.xsom.parser.XSOMParser.getResult(XSOMParser.java:190)
> > > at com.sun.tools.xjc.ModelLoader.createXSOM(ModelLoader.java:500)
> > > at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(
> > > SchemaCompilerImpl.java:216)
> > >         at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(
> > > SchemaCompilerImpl.java:69)
> > >         at
> > > org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient
> > > (DynamicClientFactory.java:166)
> > >         at
> > > org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient
> > > (DynamicClientFactory.java:137)
> >
> > --
> > J. Daniel Kulp
> > Principal Engineer
> > IONA
> > P: 781-902-8727    C: 508-380-7194
> > daniel.kulp@iona.com
> > http://www.dankulp.com/blog



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog

Re: Aegis and JAXB-WS

Posted by tog <gu...@gmail.com>.
Hi Daniel,

Thanks for the quick answer. I have to mention that the wsdl is
automatically generated by cxf so I won't change it ;-)

The good news is that it is working with the latest snapshot you published.

Nevertheless by error, I tried it with java 6 and got this error:

Any idea why it happened ?

Thanks
Guillaume

6 sept. 2007 06:02:48
org.apache.cxf.endpoint.dynamic.DynamicClientFactoryoutputDebug
INFO: Created classes: com.acme.type.ArrayOfBook, com.acme.type.Book,
com.acme.type.ObjectFactory, defaultnamespace.AddBook,
defaultnamespace.AddBookResponse, defaultnamespace.FindBook,
defaultnamespace.FindBookResponse, defaultnamespace.GetBooks,
defaultnamespace.GetBooksResponse, defaultnamespace.ObjectFactory
Caught: java.lang.ClassFormatError: Illegal class modifiers in class
com/acme/type/package-info: 0x1600
java.lang.ClassFormatError: Illegal class modifiers in class
com/acme/type/package-info: 0x1600
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
        at java.security.SecureClassLoader.defineClass(
SecureClassLoader.java:124)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:242)
        at java.lang.Package.getPackageInfo(Package.java:350)
        at java.lang.Package.getAnnotation(Package.java:361)
        at
com.sun.xml.bind.v2.model.annotation.RuntimeInlineAnnotationReader.getPackageAnnotation
(RuntimeInlineAnnotationReader.java:89)
        at
com.sun.xml.bind.v2.model.annotation.RuntimeInlineAnnotationReader.getPackageAnnotation
(RuntimeInlineAnnotationReader.java:17)
        at com.sun.xml.bind.v2.model.impl.TypeInfoImpl.parseTypeName(
TypeInfoImpl.java:130)
        at com.sun.xml.bind.v2.model.impl.ClassInfoImpl.<init>(
ClassInfoImpl.java:132)
        at com.sun.xml.bind.v2.model.impl.RuntimeClassInfoImpl.<init>(
RuntimeClassInfoImpl.java:53)
        at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.createClassInfo(
RuntimeModelBuilder.java:70)
        at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.createClassInfo(
RuntimeModelBuilder.java:42)
        at com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(
ModelBuilder.java:185)
        at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(
RuntimeModelBuilder.java:60)
        at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(
RuntimeModelBuilder.java:42)
        at com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(
ModelBuilder.java:155)
        at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(
RuntimeModelBuilder.java:55)
        at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(
RuntimeModelBuilder.java:42)
        at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(
ModelBuilder.java:261)
        at com.sun.xml.bind.v2.model.impl.RegistryInfoImpl.<init>(
RegistryInfoImpl.java:63)
        at com.sun.xml.bind.v2.model.impl.ModelBuilder.addRegistry(
ModelBuilder.java:303)
        at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(
ModelBuilder.java:273)
        at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(
JAXBContextImpl.java:399)
        at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(
JAXBContextImpl.java:253)
        at com.sun.xml.bind.v2.ContextFactory.createContext(
ContextFactory.java:84)
        at com.sun.xml.bind.v2.ContextFactory.createContext(
ContextFactory.java:66)
        at com.sun.xml.bind.v2.ContextFactory.createContext(
ContextFactory.java:132)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:132)
        at javax.xml.bind.ContextFinder.find(ContextFinder.java:285)
        at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372)
        at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
        at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient
(DynamicClientFactory.java:232)
        at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient
(DynamicClientFactory.java:137)


On 9/5/07, Daniel Kulp <da...@iona.com> wrote:
>
>
> Guillaume,
>
> I THINK this is the same error I fixed yesterday: (or more specifically,
> Benson fixed, but I applied the patch)
>
> https://issues.apache.org/jira/browse/CXF-959
>
> I deployed a new snapshot last night, could you give that a try?
>
>
> Dan
>
>
>
>
> On Wednesday 05 September 2007, tog wrote:
> > Hiya
> >
> > I have a server based on the Aegis binding. I connect to that server
> > using the dynamic client (JAXB). I get the following exception during
> > the compilation phase of the schema.
> >
> > Is that a problem already known and similar to the one reported by
> > Benson ?
> >
> > I also attached the wsdl.
> >
> > Cheers
> > Guillaume
> >
> > java.lang.RuntimeException: Error compiling schema from WSDL at {
> > http://localhost:6981/BookService?wsdl}: undefined simple or complex
> > type 'ns1:Book'
> >         at
> > org.apache.cxf.endpoint.dynamic.DynamicClientFactory$InnerErrorListene
> >r.error (DynamicClientFactory.java:409)
> >         at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error(
> > SchemaCompilerImpl.java:264)
> >         at com.sun.tools.xjc.util.ErrorReceiverFilter.error(
> > ErrorReceiverFilter.java:61)
> >         at com.sun.xml.xsom.impl.parser.ParserContext$2.error(
> > ParserContext.java:156)
> >         at com.sun.xml.xsom.impl.parser.ParserContext$1.reportError(
> > ParserContext.java:134)
> >         at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.reportError(
> > NGCCRuntimeEx.java:131)
> >         at
> > com.sun.xml.xsom.impl.parser.DelayedRef.resolve(DelayedRef.java
> >
> > :90)
> >
> >         at
> > com.sun.xml.xsom.impl.parser.DelayedRef.run(DelayedRef.java:65) at
> > com.sun.xml.xsom.impl.parser.ParserContext.getResult(
> > ParserContext.java:94)
> >         at
> > com.sun.xml.xsom.parser.XSOMParser.getResult(XSOMParser.java:190) at
> > com.sun.tools.xjc.ModelLoader.createXSOM(ModelLoader.java:500) at
> > com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(
> > SchemaCompilerImpl.java:216)
> >         at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(
> > SchemaCompilerImpl.java:69)
> >         at
> > org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient
> > (DynamicClientFactory.java:166)
> >         at
> > org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient
> > (DynamicClientFactory.java:137)
>
>
>
> --
> J. Daniel Kulp
> Principal Engineer
> IONA
> P: 781-902-8727    C: 508-380-7194
> daniel.kulp@iona.com
> http://www.dankulp.com/blog
>



-- 

Best Regards
Guillaume
http://cheztog.blogspot.com

Re: Aegis and JAXB-WS

Posted by Daniel Kulp <da...@iona.com>.
Guillaume,

I THINK this is the same error I fixed yesterday: (or more specifically, 
Benson fixed, but I applied the patch)

https://issues.apache.org/jira/browse/CXF-959

I deployed a new snapshot last night, could you give that a try?


Dan




On Wednesday 05 September 2007, tog wrote:
> Hiya
>
> I have a server based on the Aegis binding. I connect to that server
> using the dynamic client (JAXB). I get the following exception during
> the compilation phase of the schema.
>
> Is that a problem already known and similar to the one reported by
> Benson ?
>
> I also attached the wsdl.
>
> Cheers
> Guillaume
>
> java.lang.RuntimeException: Error compiling schema from WSDL at {
> http://localhost:6981/BookService?wsdl}: undefined simple or complex
> type 'ns1:Book'
>         at
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory$InnerErrorListene
>r.error (DynamicClientFactory.java:409)
>         at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error(
> SchemaCompilerImpl.java:264)
>         at com.sun.tools.xjc.util.ErrorReceiverFilter.error(
> ErrorReceiverFilter.java:61)
>         at com.sun.xml.xsom.impl.parser.ParserContext$2.error(
> ParserContext.java:156)
>         at com.sun.xml.xsom.impl.parser.ParserContext$1.reportError(
> ParserContext.java:134)
>         at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.reportError(
> NGCCRuntimeEx.java:131)
>         at
> com.sun.xml.xsom.impl.parser.DelayedRef.resolve(DelayedRef.java
>
> :90)
>
>         at
> com.sun.xml.xsom.impl.parser.DelayedRef.run(DelayedRef.java:65) at
> com.sun.xml.xsom.impl.parser.ParserContext.getResult(
> ParserContext.java:94)
>         at
> com.sun.xml.xsom.parser.XSOMParser.getResult(XSOMParser.java:190) at
> com.sun.tools.xjc.ModelLoader.createXSOM(ModelLoader.java:500) at
> com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(
> SchemaCompilerImpl.java:216)
>         at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(
> SchemaCompilerImpl.java:69)
>         at
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient
> (DynamicClientFactory.java:166)
>         at
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient
> (DynamicClientFactory.java:137)



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog