You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by "Vespa, Anthony J" <aj...@cbs.com> on 2007/11/05 19:38:27 UTC

Help! Aegis not mapping Java.Util.Collection properly

Hello,

I am having a problem trying to return a 'complex object' that contains
a java.util.collection as one of the properties.  I've written a SOAP
service using Aegis binding and I want to pass in a generic return type
from the various data accessing functions I have written.  I am getting
this error in my SOAPUI:

Mon Nov 05 13:17:48 EST 2007:WARN: error: src-resolve: type
'ArrayOfAnyType@http://www.w3.org/2001/XMLSchema' not found.

I have defined the class as such:

@XmlType(name = "wsResponse", namespace = "http://soap.ws.test.com/")
public class wsResponse<T>  {

    protected Collection<T> response;
    protected String sName;
    protected String sessionId;

    public wsResponse(Collection<T> os) {
        this.response = os;
    }

    public wsResponse() {

    }

    public void setResponse(Collection<T> response) {
        this.response = response;
    }

   public Collection<T> getResponse() {
       return response;
    }


... (other setters//getters)
}

Please help, I have been held up for 2 days!

Though there are no real examples out there, the Xfire/CXF docs 'claim'
this should be automatic with Java 1.5

Thanks!

-Tony



Re: Help! Aegis not mapping Java.Util.Collection properly

Posted by Kaleb Walton <kd...@us.ibm.com>.
After reviewing this thread it seems like this problem is similar to the
one I just submitted titled 'Aegis databinding and Java 5 Generic List
creating extra "anyType" field'. Looking forward to trying out the next
snapshot!

Regards,
Kaleb


|------------>
| From:      |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |Daniel Kulp <dk...@apache.org>                                                                                                                    |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| To:        |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |cxf-user@incubator.apache.org                                                                                                                     |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Cc:        |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |"Vespa, Anthony J" <aj...@cbs.com>                                                                                                              |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Date:      |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |11/05/2007 06:28 PM                                                                                                                               |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Subject:   |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |Re: Help! Aegis not mapping Java.Util.Collection properly                                                                                         |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|





On Monday 05 November 2007, Vespa, Anthony J wrote:
> Thank you so much!
>
> So to clarify a couple things (apologies if this is redundant I just
> want to make sure I understand)
>
> -Once this issue is fixed, will the any-type resolve to being the
> actual types on my collection, or will it still be any type and this
> just fixes the breakage in the SoapUI tool?

This just fixes the breakage in SoapUI tool.   It will still be anyType
in the wsdl.

> -Will this then be going into 2.0.3, and if so, when will 2.0.3 be
> fully released as a finished item?  I didn't see any dates for it in
> my inspection of the docs and sites.

It will be in 2.0.3.   I was GOING to build the 2.0.3 builds this
afternoon, but you and David Sica side tracked me on fixing a couple
issues before I did the build.   Thus, it's likely to be later tonight
or tomorrow morning.

Dan



>
> Thanks again!!
>
> -Tony
>
> ________________________________
>
> From: Daniel Kulp [mailto:dkulp@apache.org]
> Sent: Mon 11/5/2007 4:56 PM
> To: cxf-user@incubator.apache.org
> Cc: Vespa, Anthony J
> Subject: Re: Help! Aegis not mapping Java.Util.Collection properly
>
> On Monday 05 November 2007, Vespa, Anthony J wrote:
> > Okie, so what is the next step?  Do I need to log a bug for this?
> > I'm not really 100% on why the mapping is broken.
>
> I have it fixed.  :-)     Running the test suite now.
>
> There were two issues:
> 1) We were generating the "ArrayOfAnyType" into the
> http://www.w3.org/2001/XMLSchema namespace which is really wrong as
> thats a standard namespace that we shouldn't be generating anything
> into.
>
> 2) Because that namespace is a standard one, we don't create an
> <xsd:import> element for it.    Thus, the SOAPui parser/validator
> cannot find it.   Fixing (1) actually fixes this.
>
>
> Dan
>
> > -T
> >
> > -----Original Message-----
> > From: Daniel Kulp [mailto:dkulp@apache.org]
> > Sent: Monday, November 05, 2007 4:32 PM
> > To: cxf-user@incubator.apache.org
> > Cc: Vespa, Anthony J
> > Subject: Re: Help! Aegis not mapping Java.Util.Collection properly
> >
> >
> > I'm not an aegis expert at all, but I believe the "claim" is that
> > the generics work on the Collections, but not on other classes.
> > Thus, List<Integer> will map to int in the schema, but Foo<Integer>
> > is not mapped.    Basically, we only look at the generics if its an
> > instance of
> >
> > a collection and at that point, we ONLY look at that collection.
> > We don't going searching up all the declarations to figure out where
> > the generics expansion came from.
> >
> > That said, mapping to the anyType should have worked.  Generating an
> > invalid wsdl is definitely a bug.
> >
> > Dan
> >
> > On Monday 05 November 2007, Vespa, Anthony J wrote:
> > > Hello,
> > >
> > > I am having a problem trying to return a 'complex object' that
> > > contains a java.util.collection as one of the properties.  I've
> > > written a SOAP service using Aegis binding and I want to pass in a
> > > generic return type from the various data accessing functions I
> > > have written.  I am getting this error in my SOAPUI:
> > >
> > > Mon Nov 05 13:17:48 EST 2007:WARN: error: src-resolve: type
> > > 'ArrayOfAnyType@http://www.w3.org/2001/XMLSchema' not found.
> > >
> > > I have defined the class as such:
> > >
> > > @XmlType(name = "wsResponse", namespace =
> > > "http://soap.ws.test.com/") public class wsResponse<T>  {
> > >
> > >     protected Collection<T> response;
> > >     protected String sName;
> > >     protected String sessionId;
> > >
> > >     public wsResponse(Collection<T> os) {
> > >         this.response = os;
> > >     }
> > >
> > >     public wsResponse() {
> > >
> > >     }
> > >
> > >     public void setResponse(Collection<T> response) {
> > >         this.response = response;
> > >     }
> > >
> > >    public Collection<T> getResponse() {
> > >        return response;
> > >     }
> > >
> > >
> > > ... (other setters//getters)
> > > }
> > >
> > > Please help, I have been held up for 2 days!
> > >
> > > Though there are no real examples out there, the Xfire/CXF docs
> > > 'claim' this should be automatic with Java 1.5
> > >
> > > Thanks!
> > >
> > > -Tony
>
> --
> 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: Help! Aegis not mapping Java.Util.Collection properly

Posted by Daniel Kulp <dk...@apache.org>.
On Monday 05 November 2007, Vespa, Anthony J wrote:
> Thank you so much!
>
> So to clarify a couple things (apologies if this is redundant I just
> want to make sure I understand)
>
> -Once this issue is fixed, will the any-type resolve to being the
> actual types on my collection, or will it still be any type and this
> just fixes the breakage in the SoapUI tool?

This just fixes the breakage in SoapUI tool.   It will still be anyType 
in the wsdl.

> -Will this then be going into 2.0.3, and if so, when will 2.0.3 be
> fully released as a finished item?  I didn't see any dates for it in
> my inspection of the docs and sites.

It will be in 2.0.3.   I was GOING to build the 2.0.3 builds this 
afternoon, but you and David Sica side tracked me on fixing a couple 
issues before I did the build.   Thus, it's likely to be later tonight 
or tomorrow morning.

Dan



>
> Thanks again!!
>
> -Tony
>
> ________________________________
>
> From: Daniel Kulp [mailto:dkulp@apache.org]
> Sent: Mon 11/5/2007 4:56 PM
> To: cxf-user@incubator.apache.org
> Cc: Vespa, Anthony J
> Subject: Re: Help! Aegis not mapping Java.Util.Collection properly
>
> On Monday 05 November 2007, Vespa, Anthony J wrote:
> > Okie, so what is the next step?  Do I need to log a bug for this? 
> > I'm not really 100% on why the mapping is broken.
>
> I have it fixed.  :-)     Running the test suite now.
>
> There were two issues:
> 1) We were generating the "ArrayOfAnyType" into the
> http://www.w3.org/2001/XMLSchema namespace which is really wrong as
> thats a standard namespace that we shouldn't be generating anything
> into.
>
> 2) Because that namespace is a standard one, we don't create an
> <xsd:import> element for it.    Thus, the SOAPui parser/validator
> cannot find it.   Fixing (1) actually fixes this.
>
>
> Dan
>
> > -T
> >
> > -----Original Message-----
> > From: Daniel Kulp [mailto:dkulp@apache.org]
> > Sent: Monday, November 05, 2007 4:32 PM
> > To: cxf-user@incubator.apache.org
> > Cc: Vespa, Anthony J
> > Subject: Re: Help! Aegis not mapping Java.Util.Collection properly
> >
> >
> > I'm not an aegis expert at all, but I believe the "claim" is that
> > the generics work on the Collections, but not on other classes.   
> > Thus, List<Integer> will map to int in the schema, but Foo<Integer>
> > is not mapped.    Basically, we only look at the generics if its an
> > instance of
> >
> > a collection and at that point, we ONLY look at that collection.  
> > We don't going searching up all the declarations to figure out where
> > the generics expansion came from.
> >
> > That said, mapping to the anyType should have worked.  Generating an
> > invalid wsdl is definitely a bug.
> >
> > Dan
> >
> > On Monday 05 November 2007, Vespa, Anthony J wrote:
> > > Hello,
> > >
> > > I am having a problem trying to return a 'complex object' that
> > > contains a java.util.collection as one of the properties.  I've
> > > written a SOAP service using Aegis binding and I want to pass in a
> > > generic return type from the various data accessing functions I
> > > have written.  I am getting this error in my SOAPUI:
> > >
> > > Mon Nov 05 13:17:48 EST 2007:WARN: error: src-resolve: type
> > > 'ArrayOfAnyType@http://www.w3.org/2001/XMLSchema' not found.
> > >
> > > I have defined the class as such:
> > >
> > > @XmlType(name = "wsResponse", namespace =
> > > "http://soap.ws.test.com/") public class wsResponse<T>  {
> > >
> > >     protected Collection<T> response;
> > >     protected String sName;
> > >     protected String sessionId;
> > >
> > >     public wsResponse(Collection<T> os) {
> > >         this.response = os;
> > >     }
> > >
> > >     public wsResponse() {
> > >
> > >     }
> > >
> > >     public void setResponse(Collection<T> response) {
> > >         this.response = response;
> > >     }
> > >
> > >    public Collection<T> getResponse() {
> > >        return response;
> > >     }
> > >
> > >
> > > ... (other setters//getters)
> > > }
> > >
> > > Please help, I have been held up for 2 days!
> > >
> > > Though there are no real examples out there, the Xfire/CXF docs
> > > 'claim' this should be automatic with Java 1.5
> > >
> > > Thanks!
> > >
> > > -Tony
>
> --
> 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: Help! Aegis not mapping Java.Util.Collection properly

Posted by Daniel Kulp <dk...@apache.org>.
Hmm...  my testcases (albiet simple ones) are looking OK.  

Any chance you could send me a testcase?  (private to 
dan at dankulp dot com to avoid spam filters that tend to eat them would 
be best.) 

Dan



On Tuesday 06 November 2007, Vespa, Anthony J wrote:
> I downloaded the current 2.0.3 build and I am still getting this error
> in SoapUI 1.7.6 - I took it from this location:
>
>
>
> http://people.apache.org/~dkulp/stage_cxf/2.0.3-incubator-take1/
>
>
>
> Please advise.
>
>
>
> From: Vespa, Anthony J
> Sent: Monday, November 05, 2007 6:19 PM
> To: Daniel Kulp; cxf-user@incubator.apache.org
> Subject: RE: Help! Aegis not mapping Java.Util.Collection properly
>
>
>
> Thank you so much!
>
>
>
> So to clarify a couple things (apologies if this is redundant I just
> want to make sure I understand)
>
>
>
> -Once this issue is fixed, will the any-type resolve to being the
> actual types on my collection, or will it still be any type and this
> just fixes the breakage in the SoapUI tool?
>
>
>
> -Will this then be going into 2.0.3, and if so, when will 2.0.3 be
> fully released as a finished item?  I didn't see any dates for it in
> my inspection of the docs and sites.
>
>
>
> Thanks again!!
>
>
>
> -Tony
>
>
>
> ________________________________
>
> From: Daniel Kulp [mailto:dkulp@apache.org]
> Sent: Mon 11/5/2007 4:56 PM
> To: cxf-user@incubator.apache.org
> Cc: Vespa, Anthony J
> Subject: Re: Help! Aegis not mapping Java.Util.Collection properly
>
> On Monday 05 November 2007, Vespa, Anthony J wrote:
> > Okie, so what is the next step?  Do I need to log a bug for this? 
> > I'm not really 100% on why the mapping is broken.
>
> I have it fixed.  :-)     Running the test suite now.
>
> There were two issues:
> 1) We were generating the "ArrayOfAnyType" into the
> http://www.w3.org/2001/XMLSchema namespace which is really wrong as
> thats a standard namespace that we shouldn't be generating anything
> into.
>
> 2) Because that namespace is a standard one, we don't create an
> <xsd:import> element for it.    Thus, the SOAPui parser/validator
> cannot find it.   Fixing (1) actually fixes this.
>
>
> Dan
>
> > -T
> >
> > -----Original Message-----
> > From: Daniel Kulp [mailto:dkulp@apache.org]
> > Sent: Monday, November 05, 2007 4:32 PM
> > To: cxf-user@incubator.apache.org
> > Cc: Vespa, Anthony J
> > Subject: Re: Help! Aegis not mapping Java.Util.Collection properly
> >
> >
> > I'm not an aegis expert at all, but I believe the "claim" is that
> > the generics work on the Collections, but not on other classes.   
> > Thus, List<Integer> will map to int in the schema, but Foo<Integer>
> > is not mapped.    Basically, we only look at the generics if its an
> > instance of
> >
> > a collection and at that point, we ONLY look at that collection.  
> > We don't going searching up all the declarations to figure out where
> > the generics expansion came from.
> >
> > That said, mapping to the anyType should have worked.  Generating an
> > invalid wsdl is definitely a bug.
> >
> > Dan
> >
> > On Monday 05 November 2007, Vespa, Anthony J wrote:
> > > Hello,
> > >
> > > I am having a problem trying to return a 'complex object' that
> > > contains a java.util.collection as one of the properties.  I've
> > > written a SOAP service using Aegis binding and I want to pass in a
> > > generic return type from the various data accessing functions I
> > > have written.  I am getting this error in my SOAPUI:
> > >
> > > Mon Nov 05 13:17:48 EST 2007:WARN: error: src-resolve: type
> > > 'ArrayOfAnyType@http://www.w3.org/2001/XMLSchema' not found.
> > >
> > > I have defined the class as such:
> > >
> > > @XmlType(name = "wsResponse", namespace =
> > > "http://soap.ws.test.com/") public class wsResponse<T>  {
> > >
> > >     protected Collection<T> response;
> > >     protected String sName;
> > >     protected String sessionId;
> > >
> > >     public wsResponse(Collection<T> os) {
> > >         this.response = os;
> > >     }
> > >
> > >     public wsResponse() {
> > >
> > >     }
> > >
> > >     public void setResponse(Collection<T> response) {
> > >         this.response = response;
> > >     }
> > >
> > >    public Collection<T> getResponse() {
> > >        return response;
> > >     }
> > >
> > >
> > > ... (other setters//getters)
> > > }
> > >
> > > Please help, I have been held up for 2 days!
> > >
> > > Though there are no real examples out there, the Xfire/CXF docs
> > > 'claim' this should be automatic with Java 1.5
> > >
> > > Thanks!
> > >
> > > -Tony
>
> --
> 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: Help! Aegis not mapping Java.Util.Collection properly

Posted by "Vespa, Anthony J" <aj...@cbs.com>.
I downloaded the current 2.0.3 build and I am still getting this error
in SoapUI 1.7.6 - I took it from this location:

 

http://people.apache.org/~dkulp/stage_cxf/2.0.3-incubator-take1/

 

Please advise.

 

From: Vespa, Anthony J 
Sent: Monday, November 05, 2007 6:19 PM
To: Daniel Kulp; cxf-user@incubator.apache.org
Subject: RE: Help! Aegis not mapping Java.Util.Collection properly

 

Thank you so much!

 

So to clarify a couple things (apologies if this is redundant I just
want to make sure I understand)

 

-Once this issue is fixed, will the any-type resolve to being the actual
types on my collection, or will it still be any type and this just fixes
the breakage in the SoapUI tool?

 

-Will this then be going into 2.0.3, and if so, when will 2.0.3 be fully
released as a finished item?  I didn't see any dates for it in my
inspection of the docs and sites.

 

Thanks again!!

 

-Tony

 

________________________________

From: Daniel Kulp [mailto:dkulp@apache.org]
Sent: Mon 11/5/2007 4:56 PM
To: cxf-user@incubator.apache.org
Cc: Vespa, Anthony J
Subject: Re: Help! Aegis not mapping Java.Util.Collection properly

On Monday 05 November 2007, Vespa, Anthony J wrote:
> Okie, so what is the next step?  Do I need to log a bug for this?  I'm
> not really 100% on why the mapping is broken.

I have it fixed.  :-)     Running the test suite now.

There were two issues:
1) We were generating the "ArrayOfAnyType" into the
http://www.w3.org/2001/XMLSchema namespace which is really wrong as
thats a standard namespace that we shouldn't be generating anything
into.

2) Because that namespace is a standard one, we don't create an
<xsd:import> element for it.    Thus, the SOAPui parser/validator cannot
find it.   Fixing (1) actually fixes this.


Dan



> -T
>
> -----Original Message-----
> From: Daniel Kulp [mailto:dkulp@apache.org]
> Sent: Monday, November 05, 2007 4:32 PM
> To: cxf-user@incubator.apache.org
> Cc: Vespa, Anthony J
> Subject: Re: Help! Aegis not mapping Java.Util.Collection properly
>
>
> I'm not an aegis expert at all, but I believe the "claim" is that the
> generics work on the Collections, but not on other classes.    Thus,
> List<Integer> will map to int in the schema, but Foo<Integer> is not
> mapped.    Basically, we only look at the generics if its an instance
> of
>
> a collection and at that point, we ONLY look at that collection.   We
> don't going searching up all the declarations to figure out where the
> generics expansion came from.
>
> That said, mapping to the anyType should have worked.  Generating an
> invalid wsdl is definitely a bug.
>
> Dan
>
> On Monday 05 November 2007, Vespa, Anthony J wrote:
> > Hello,
> >
> > I am having a problem trying to return a 'complex object' that
> > contains a java.util.collection as one of the properties.  I've
> > written a SOAP service using Aegis binding and I want to pass in a
> > generic return type from the various data accessing functions I have
> > written.  I am getting this error in my SOAPUI:
> >
> > Mon Nov 05 13:17:48 EST 2007:WARN: error: src-resolve: type
> > 'ArrayOfAnyType@http://www.w3.org/2001/XMLSchema' not found.
> >
> > I have defined the class as such:
> >
> > @XmlType(name = "wsResponse", namespace =
> > "http://soap.ws.test.com/") public class wsResponse<T>  {
> >
> >     protected Collection<T> response;
> >     protected String sName;
> >     protected String sessionId;
> >
> >     public wsResponse(Collection<T> os) {
> >         this.response = os;
> >     }
> >
> >     public wsResponse() {
> >
> >     }
> >
> >     public void setResponse(Collection<T> response) {
> >         this.response = response;
> >     }
> >
> >    public Collection<T> getResponse() {
> >        return response;
> >     }
> >
> >
> > ... (other setters//getters)
> > }
> >
> > Please help, I have been held up for 2 days!
> >
> > Though there are no real examples out there, the Xfire/CXF docs
> > 'claim' this should be automatic with Java 1.5
> >
> > Thanks!
> >
> > -Tony



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


RE: Help! Aegis not mapping Java.Util.Collection properly

Posted by "Vespa, Anthony J" <aj...@cbs.com>.
Thank you so much!
 
So to clarify a couple things (apologies if this is redundant I just want to make sure I understand)
 
-Once this issue is fixed, will the any-type resolve to being the actual types on my collection, or will it still be any type and this just fixes the breakage in the SoapUI tool?
 
-Will this then be going into 2.0.3, and if so, when will 2.0.3 be fully released as a finished item?  I didn't see any dates for it in my inspection of the docs and sites.
 
Thanks again!!
 
-Tony

________________________________

From: Daniel Kulp [mailto:dkulp@apache.org]
Sent: Mon 11/5/2007 4:56 PM
To: cxf-user@incubator.apache.org
Cc: Vespa, Anthony J
Subject: Re: Help! Aegis not mapping Java.Util.Collection properly



On Monday 05 November 2007, Vespa, Anthony J wrote:
> Okie, so what is the next step?  Do I need to log a bug for this?  I'm
> not really 100% on why the mapping is broken.

I have it fixed.  :-)     Running the test suite now.

There were two issues:
1) We were generating the "ArrayOfAnyType" into the
http://www.w3.org/2001/XMLSchema namespace which is really wrong as
thats a standard namespace that we shouldn't be generating anything
into.

2) Because that namespace is a standard one, we don't create an
<xsd:import> element for it.    Thus, the SOAPui parser/validator cannot
find it.   Fixing (1) actually fixes this.


Dan



> -T
>
> -----Original Message-----
> From: Daniel Kulp [mailto:dkulp@apache.org]
> Sent: Monday, November 05, 2007 4:32 PM
> To: cxf-user@incubator.apache.org
> Cc: Vespa, Anthony J
> Subject: Re: Help! Aegis not mapping Java.Util.Collection properly
>
>
> I'm not an aegis expert at all, but I believe the "claim" is that the
> generics work on the Collections, but not on other classes.    Thus,
> List<Integer> will map to int in the schema, but Foo<Integer> is not
> mapped.    Basically, we only look at the generics if its an instance
> of
>
> a collection and at that point, we ONLY look at that collection.   We
> don't going searching up all the declarations to figure out where the
> generics expansion came from.
>
> That said, mapping to the anyType should have worked.  Generating an
> invalid wsdl is definitely a bug.
>
> Dan
>
> On Monday 05 November 2007, Vespa, Anthony J wrote:
> > Hello,
> >
> > I am having a problem trying to return a 'complex object' that
> > contains a java.util.collection as one of the properties.  I've
> > written a SOAP service using Aegis binding and I want to pass in a
> > generic return type from the various data accessing functions I have
> > written.  I am getting this error in my SOAPUI:
> >
> > Mon Nov 05 13:17:48 EST 2007:WARN: error: src-resolve: type
> > 'ArrayOfAnyType@http://www.w3.org/2001/XMLSchema' not found.
> >
> > I have defined the class as such:
> >
> > @XmlType(name = "wsResponse", namespace =
> > "http://soap.ws.test.com/") public class wsResponse<T>  {
> >
> >     protected Collection<T> response;
> >     protected String sName;
> >     protected String sessionId;
> >
> >     public wsResponse(Collection<T> os) {
> >         this.response = os;
> >     }
> >
> >     public wsResponse() {
> >
> >     }
> >
> >     public void setResponse(Collection<T> response) {
> >         this.response = response;
> >     }
> >
> >    public Collection<T> getResponse() {
> >        return response;
> >     }
> >
> >
> > ... (other setters//getters)
> > }
> >
> > Please help, I have been held up for 2 days!
> >
> > Though there are no real examples out there, the Xfire/CXF docs
> > 'claim' this should be automatic with Java 1.5
> >
> > Thanks!
> >
> > -Tony



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



Re: Help! Aegis not mapping Java.Util.Collection properly

Posted by Daniel Kulp <dk...@apache.org>.
On Monday 05 November 2007, Vespa, Anthony J wrote:
> Okie, so what is the next step?  Do I need to log a bug for this?  I'm
> not really 100% on why the mapping is broken.

I have it fixed.  :-)     Running the test suite now.

There were two issues:
1) We were generating the "ArrayOfAnyType" into the 
http://www.w3.org/2001/XMLSchema namespace which is really wrong as 
thats a standard namespace that we shouldn't be generating anything 
into.

2) Because that namespace is a standard one, we don't create an 
<xsd:import> element for it.    Thus, the SOAPui parser/validator cannot 
find it.   Fixing (1) actually fixes this. 


Dan



> -T
>
> -----Original Message-----
> From: Daniel Kulp [mailto:dkulp@apache.org]
> Sent: Monday, November 05, 2007 4:32 PM
> To: cxf-user@incubator.apache.org
> Cc: Vespa, Anthony J
> Subject: Re: Help! Aegis not mapping Java.Util.Collection properly
>
>
> I'm not an aegis expert at all, but I believe the "claim" is that the
> generics work on the Collections, but not on other classes.    Thus,
> List<Integer> will map to int in the schema, but Foo<Integer> is not
> mapped.    Basically, we only look at the generics if its an instance
> of
>
> a collection and at that point, we ONLY look at that collection.   We
> don't going searching up all the declarations to figure out where the
> generics expansion came from.
>
> That said, mapping to the anyType should have worked.  Generating an
> invalid wsdl is definitely a bug.
>
> Dan
>
> On Monday 05 November 2007, Vespa, Anthony J wrote:
> > Hello,
> >
> > I am having a problem trying to return a 'complex object' that
> > contains a java.util.collection as one of the properties.  I've
> > written a SOAP service using Aegis binding and I want to pass in a
> > generic return type from the various data accessing functions I have
> > written.  I am getting this error in my SOAPUI:
> >
> > Mon Nov 05 13:17:48 EST 2007:WARN: error: src-resolve: type
> > 'ArrayOfAnyType@http://www.w3.org/2001/XMLSchema' not found.
> >
> > I have defined the class as such:
> >
> > @XmlType(name = "wsResponse", namespace =
> > "http://soap.ws.test.com/") public class wsResponse<T>  {
> >
> >     protected Collection<T> response;
> >     protected String sName;
> >     protected String sessionId;
> >
> >     public wsResponse(Collection<T> os) {
> >         this.response = os;
> >     }
> >
> >     public wsResponse() {
> >
> >     }
> >
> >     public void setResponse(Collection<T> response) {
> >         this.response = response;
> >     }
> >
> >    public Collection<T> getResponse() {
> >        return response;
> >     }
> >
> >
> > ... (other setters//getters)
> > }
> >
> > Please help, I have been held up for 2 days!
> >
> > Though there are no real examples out there, the Xfire/CXF docs
> > 'claim' this should be automatic with Java 1.5
> >
> > Thanks!
> >
> > -Tony



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

RE: Help! Aegis not mapping Java.Util.Collection properly

Posted by Benson Margulies <bi...@basistech.com>.
A jira would be most helpful.

> -----Original Message-----
> From: Vespa, Anthony J [mailto:ajvespa@cbs.com]
> Sent: Monday, November 05, 2007 4:46 PM
> To: Daniel Kulp; cxf-user@incubator.apache.org
> Subject: RE: Help! Aegis not mapping Java.Util.Collection properly
> 
> Okie, so what is the next step?  Do I need to log a bug for this?  I'm
> not really 100% on why the mapping is broken.
> 
> -T
> 
> -----Original Message-----
> From: Daniel Kulp [mailto:dkulp@apache.org]
> Sent: Monday, November 05, 2007 4:32 PM
> To: cxf-user@incubator.apache.org
> Cc: Vespa, Anthony J
> Subject: Re: Help! Aegis not mapping Java.Util.Collection properly
> 
> 
> I'm not an aegis expert at all, but I believe the "claim" is that the
> generics work on the Collections, but not on other classes.    Thus,
> List<Integer> will map to int in the schema, but Foo<Integer> is not
> mapped.    Basically, we only look at the generics if its an instance
of
> 
> a collection and at that point, we ONLY look at that collection.   We
> don't going searching up all the declarations to figure out where the
> generics expansion came from.
> 
> That said, mapping to the anyType should have worked.  Generating an
> invalid wsdl is definitely a bug.
> 
> Dan
> 
> 
> 
> 
> 
> 
> On Monday 05 November 2007, Vespa, Anthony J wrote:
> > Hello,
> >
> > I am having a problem trying to return a 'complex object' that
> > contains a java.util.collection as one of the properties.  I've
> > written a SOAP service using Aegis binding and I want to pass in a
> > generic return type from the various data accessing functions I have
> > written.  I am getting this error in my SOAPUI:
> >
> > Mon Nov 05 13:17:48 EST 2007:WARN: error: src-resolve: type
> > 'ArrayOfAnyType@http://www.w3.org/2001/XMLSchema' not found.
> >
> > I have defined the class as such:
> >
> > @XmlType(name = "wsResponse", namespace =
"http://soap.ws.test.com/")
> > public class wsResponse<T>  {
> >
> >     protected Collection<T> response;
> >     protected String sName;
> >     protected String sessionId;
> >
> >     public wsResponse(Collection<T> os) {
> >         this.response = os;
> >     }
> >
> >     public wsResponse() {
> >
> >     }
> >
> >     public void setResponse(Collection<T> response) {
> >         this.response = response;
> >     }
> >
> >    public Collection<T> getResponse() {
> >        return response;
> >     }
> >
> >
> > ... (other setters//getters)
> > }
> >
> > Please help, I have been held up for 2 days!
> >
> > Though there are no real examples out there, the Xfire/CXF docs
> > 'claim' this should be automatic with Java 1.5
> >
> > Thanks!
> >
> > -Tony
> 
> 
> 
> --
> J. Daniel Kulp
> Principal Engineer
> IONA
> P: 781-902-8727    C: 508-380-7194
> daniel.kulp@iona.com
> http://www.dankulp.com/blog

RE: Help! Aegis not mapping Java.Util.Collection properly

Posted by "Vespa, Anthony J" <aj...@cbs.com>.
Okie, so what is the next step?  Do I need to log a bug for this?  I'm
not really 100% on why the mapping is broken.

-T

-----Original Message-----
From: Daniel Kulp [mailto:dkulp@apache.org] 
Sent: Monday, November 05, 2007 4:32 PM
To: cxf-user@incubator.apache.org
Cc: Vespa, Anthony J
Subject: Re: Help! Aegis not mapping Java.Util.Collection properly


I'm not an aegis expert at all, but I believe the "claim" is that the 
generics work on the Collections, but not on other classes.    Thus, 
List<Integer> will map to int in the schema, but Foo<Integer> is not 
mapped.    Basically, we only look at the generics if its an instance of

a collection and at that point, we ONLY look at that collection.   We 
don't going searching up all the declarations to figure out where the 
generics expansion came from.   

That said, mapping to the anyType should have worked.  Generating an 
invalid wsdl is definitely a bug.

Dan






On Monday 05 November 2007, Vespa, Anthony J wrote:
> Hello,
>
> I am having a problem trying to return a 'complex object' that
> contains a java.util.collection as one of the properties.  I've
> written a SOAP service using Aegis binding and I want to pass in a
> generic return type from the various data accessing functions I have
> written.  I am getting this error in my SOAPUI:
>
> Mon Nov 05 13:17:48 EST 2007:WARN: error: src-resolve: type
> 'ArrayOfAnyType@http://www.w3.org/2001/XMLSchema' not found.
>
> I have defined the class as such:
>
> @XmlType(name = "wsResponse", namespace = "http://soap.ws.test.com/")
> public class wsResponse<T>  {
>
>     protected Collection<T> response;
>     protected String sName;
>     protected String sessionId;
>
>     public wsResponse(Collection<T> os) {
>         this.response = os;
>     }
>
>     public wsResponse() {
>
>     }
>
>     public void setResponse(Collection<T> response) {
>         this.response = response;
>     }
>
>    public Collection<T> getResponse() {
>        return response;
>     }
>
>
> ... (other setters//getters)
> }
>
> Please help, I have been held up for 2 days!
>
> Though there are no real examples out there, the Xfire/CXF docs
> 'claim' this should be automatic with Java 1.5
>
> Thanks!
>
> -Tony



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

Re: Help! Aegis not mapping Java.Util.Collection properly

Posted by Daniel Kulp <dk...@apache.org>.
I'm not an aegis expert at all, but I believe the "claim" is that the 
generics work on the Collections, but not on other classes.    Thus, 
List<Integer> will map to int in the schema, but Foo<Integer> is not 
mapped.    Basically, we only look at the generics if its an instance of 
a collection and at that point, we ONLY look at that collection.   We 
don't going searching up all the declarations to figure out where the 
generics expansion came from.   

That said, mapping to the anyType should have worked.  Generating an 
invalid wsdl is definitely a bug.

Dan






On Monday 05 November 2007, Vespa, Anthony J wrote:
> Hello,
>
> I am having a problem trying to return a 'complex object' that
> contains a java.util.collection as one of the properties.  I've
> written a SOAP service using Aegis binding and I want to pass in a
> generic return type from the various data accessing functions I have
> written.  I am getting this error in my SOAPUI:
>
> Mon Nov 05 13:17:48 EST 2007:WARN: error: src-resolve: type
> 'ArrayOfAnyType@http://www.w3.org/2001/XMLSchema' not found.
>
> I have defined the class as such:
>
> @XmlType(name = "wsResponse", namespace = "http://soap.ws.test.com/")
> public class wsResponse<T>  {
>
>     protected Collection<T> response;
>     protected String sName;
>     protected String sessionId;
>
>     public wsResponse(Collection<T> os) {
>         this.response = os;
>     }
>
>     public wsResponse() {
>
>     }
>
>     public void setResponse(Collection<T> response) {
>         this.response = response;
>     }
>
>    public Collection<T> getResponse() {
>        return response;
>     }
>
>
> ... (other setters//getters)
> }
>
> Please help, I have been held up for 2 days!
>
> Though there are no real examples out there, the Xfire/CXF docs
> 'claim' this should be automatic with Java 1.5
>
> Thanks!
>
> -Tony



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