cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Mazza <glen.ma...@verizon.net>
Subject Re: Aegis and JAXB-WS
Date Wed, 05 Sep 2007 16:07:45 GMT
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


Mime
View raw message