You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Dave Kallstrom <da...@gmail.com> on 2007/07/24 21:20:56 UTC

Aegis bindings

I have enabled aegis bindings using the following xml configuration snippet.

<jaxws:endpoint id="CollectiveServices" implementor="#serviceBean"
bindingUri="http://apache.org/cxf/binding/http"
address="/cxf/CollectiveServices" >
        <jaxws:serviceFactory>
            <bean class="
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean">
                <property name="wrapped" value="true" />
                <property name="dataBinding" ref="aegisBean"/>
            </bean>

        </jaxws:serviceFactory>
    </jaxws:endpoint>
    <bean id="aegisBean" class="
org.apache.cxf.aegis.databinding.AegisDatabinding"/>

My web service api has an interface named SearchField with three
implementations. The interface is used in a number of different ways.
Sometimes as in incoming list and other times as a returned list.
I am getting the following exception from the AegisDataBinding
java.lang.RuntimeException: Schema for namespace 'urn:search.api' already
contains type 'ArrayOfSearchField
    at org.apache.ws.commons.schema.XmlSchema.addType(XmlSchema.java:229)
    at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(
SchemaBuilder.java:139)
    at org.apache.ws.commons.schema.XmlSchemaCollection.read(
XmlSchemaCollection.java:315)
    at org.apache.cxf.aegis.databinding.AegisDatabinding.createSchemas(
AegisDatabinding.java:291)
    at org.apache.cxf.aegis.databinding.AegisDatabinding.initialize(
AegisDatabinding.java:162)
-- 

Is this a problem with my namespaces? Or is aegis trying to create two
different SearchField complex types when it should be only creating one?
Dave Kallstrom

Re: Aegis bindings

Posted by Dan Diephouse <da...@envoisolutions.com>.
Hi Dave,

Thanks for the bug report. This has actually been fixed in SVN, so if you
download the latest snapshots things should work fine with a mix of lists
and arrays.

Cheers,
- Dan

On 7/25/07, Dave Kallstrom <da...@gmail.com> wrote:
>
> I figured out the problem. Once again stupidity on my part.
> I had one method that took SearchField [] fields and one method that
> returned List<SearchField> aegis was trying to create two different
> complex
> types both named ArrayOfSearchField.
>
> On 7/24/07, Dave Kallstrom <da...@gmail.com> wrote:
> >
> > I have enabled aegis bindings using the following xml configuration
> > snippet.
> >
> > <jaxws:endpoint id="CollectiveServices" implementor="#serviceBean"
> > bindingUri=" http://apache.org/cxf/binding/http"
> > address="/cxf/CollectiveServices" >
> >         <jaxws:serviceFactory>
> >             <bean class="
> > org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean ">
> >                 <property name="wrapped" value="true" />
> >                 <property name="dataBinding" ref="aegisBean"/>
> >             </bean>
> >
> >         </jaxws:serviceFactory>
> >     </jaxws:endpoint>
> >     <bean id="aegisBean" class="
> > org.apache.cxf.aegis.databinding.AegisDatabinding"/>
> >
> > My web service api has an interface named SearchField with three
> > implementations. The interface is used in a number of different ways.
> > Sometimes as in incoming list and other times as a returned list.
> > I am getting the following exception from the AegisDataBinding
> > java.lang.RuntimeException: Schema for namespace 'urn:search.api'
> already
> > contains type 'ArrayOfSearchField
> >     at org.apache.ws.commons.schema.XmlSchema.addType (XmlSchema.java
> :229)
> >     at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement
> (
> > SchemaBuilder.java:139)
> >     at org.apache.ws.commons.schema.XmlSchemaCollection.read(
> > XmlSchemaCollection.java:315)
> >     at org.apache.cxf.aegis.databinding.AegisDatabinding.createSchemas(
> > AegisDatabinding.java:291)
> >     at org.apache.cxf.aegis.databinding.AegisDatabinding.initialize(
> > AegisDatabinding.java:162)
> > --
> >
> > Is this a problem with my namespaces? Or is aegis trying to create two
> > different SearchField complex types when it should be only creating one?
> > Dave Kallstrom
>
>
>
>
> --
> Dave Kallstrom
>



-- 
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog

RE: Aegis bindings

Posted by Benson Margulies <bi...@basistech.com>.
I submitted a JIRA for this, and I think that Dan fixed it.

> -----Original Message-----
> From: Dave Kallstrom [mailto:dave.kallstrom@gmail.com]
> Sent: Wednesday, July 25, 2007 10:20 AM
> To: cxf-user@incubator.apache.org
> Subject: Re: Aegis bindings
> 
> I figured out the problem. Once again stupidity on my part.
> I had one method that took SearchField [] fields and one method that
> returned List<SearchField> aegis was trying to create two different
> complex
> types both named ArrayOfSearchField.
> 
> On 7/24/07, Dave Kallstrom <da...@gmail.com> wrote:
> >
> > I have enabled aegis bindings using the following xml configuration
> > snippet.
> >
> > <jaxws:endpoint id="CollectiveServices" implementor="#serviceBean"
> > bindingUri=" http://apache.org/cxf/binding/http"
> > address="/cxf/CollectiveServices" >
> >         <jaxws:serviceFactory>
> >             <bean class="
> > org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean ">
> >                 <property name="wrapped" value="true" />
> >                 <property name="dataBinding" ref="aegisBean"/>
> >             </bean>
> >
> >         </jaxws:serviceFactory>
> >     </jaxws:endpoint>
> >     <bean id="aegisBean" class="
> > org.apache.cxf.aegis.databinding.AegisDatabinding"/>
> >
> > My web service api has an interface named SearchField with three
> > implementations. The interface is used in a number of different
ways.
> > Sometimes as in incoming list and other times as a returned list.
> > I am getting the following exception from the AegisDataBinding
> > java.lang.RuntimeException: Schema for namespace 'urn:search.api'
> already
> > contains type 'ArrayOfSearchField
> >     at org.apache.ws.commons.schema.XmlSchema.addType
> (XmlSchema.java:229)
> >     at
> org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(
> > SchemaBuilder.java:139)
> >     at org.apache.ws.commons.schema.XmlSchemaCollection.read(
> > XmlSchemaCollection.java:315)
> >     at
org.apache.cxf.aegis.databinding.AegisDatabinding.createSchemas(
> > AegisDatabinding.java:291)
> >     at org.apache.cxf.aegis.databinding.AegisDatabinding.initialize(
> > AegisDatabinding.java:162)
> > --
> >
> > Is this a problem with my namespaces? Or is aegis trying to create
two
> > different SearchField complex types when it should be only creating
one?
> > Dave Kallstrom
> 
> 
> 
> 
> --
> Dave Kallstrom

Re: Aegis bindings

Posted by Dave Kallstrom <da...@gmail.com>.
I figured out the problem. Once again stupidity on my part.
I had one method that took SearchField [] fields and one method that
returned List<SearchField> aegis was trying to create two different complex
types both named ArrayOfSearchField.

On 7/24/07, Dave Kallstrom <da...@gmail.com> wrote:
>
> I have enabled aegis bindings using the following xml configuration
> snippet.
>
> <jaxws:endpoint id="CollectiveServices" implementor="#serviceBean"
> bindingUri=" http://apache.org/cxf/binding/http"
> address="/cxf/CollectiveServices" >
>         <jaxws:serviceFactory>
>             <bean class="
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean ">
>                 <property name="wrapped" value="true" />
>                 <property name="dataBinding" ref="aegisBean"/>
>             </bean>
>
>         </jaxws:serviceFactory>
>     </jaxws:endpoint>
>     <bean id="aegisBean" class="
> org.apache.cxf.aegis.databinding.AegisDatabinding"/>
>
> My web service api has an interface named SearchField with three
> implementations. The interface is used in a number of different ways.
> Sometimes as in incoming list and other times as a returned list.
> I am getting the following exception from the AegisDataBinding
> java.lang.RuntimeException: Schema for namespace 'urn:search.api' already
> contains type 'ArrayOfSearchField
>     at org.apache.ws.commons.schema.XmlSchema.addType (XmlSchema.java:229)
>     at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(
> SchemaBuilder.java:139)
>     at org.apache.ws.commons.schema.XmlSchemaCollection.read(
> XmlSchemaCollection.java:315)
>     at org.apache.cxf.aegis.databinding.AegisDatabinding.createSchemas(
> AegisDatabinding.java:291)
>     at org.apache.cxf.aegis.databinding.AegisDatabinding.initialize(
> AegisDatabinding.java:162)
> --
>
> Is this a problem with my namespaces? Or is aegis trying to create two
> different SearchField complex types when it should be only creating one?
> Dave Kallstrom




-- 
Dave Kallstrom