Hello I ve got the same problem...
I copy/paste the same code...
But even if the mapping file is putted I always get this error:
org.codehaus.xfire.XFireRuntimeException: Cannot create mapping for
java.util.Collection, unspecified component type for return type of
method giveMailAdress in interface IMyService
at
org.codehaus.xfire.aegis.type.DefaultTypeCreator.createCollectionType(De
faultTypeCreator.java:43)
at
org.codehaus.xfire.aegis.type.java5.Java5TypeCreator.createCollectionTyp
e(Java5TypeCreator.java:139)
at
org.codehaus.xfire.aegis.type.XMLTypeCreator.createCollectionType(XMLTyp
eCreator.java:141)
at
org.codehaus.xfire.aegis.type.AbstractTypeCreator.createTypeForClass(Abs
tractTypeCreator.java:122)
at
org.codehaus.xfire.aegis.type.AbstractTypeCreator.createType(AbstractTyp
eCreator.java:368)
at
org.codehaus.xfire.aegis.AegisBindingProvider.getSuggestedName(AegisBind
ingProvider.java:248)
at
org.codehaus.xfire.service.binding.DefaultServiceConfiguration.getOutPar
ameterName(DefaultServiceConfiguration.java:174)
at
org.codehaus.xfire.service.binding.ObjectServiceFactory.getOutParameterN
ame(ObjectServiceFactory.java:1087)
at
org.codehaus.xfire.service.binding.ObjectServiceFactory.addOperation(Obj
ectServiceFactory.java:844)
at
org.codehaus.xfire.service.binding.ObjectServiceFactory.initializeOperat
ions(ObjectServiceFactory.java:769)
at
org.codehaus.xfire.service.binding.ObjectServiceFactory.create(ObjectSer
viceFactory.java:452)
at
org.codehaus.xfire.service.binding.ObjectServiceFactory.create(ObjectSer
viceFactory.java:378)
at
org.codehaus.xfire.service.binding.ObjectServiceFactory.create(ObjectSer
viceFactory.java:359)
-----Original Message-----
From: Anshumn Sagar [mailto:[EMAIL PROTECTED]
Sent: 04 June 2007 06:40
To: [email protected]
Subject: RE: [xfire-user] Urgent: How to Wrire Aegis.xml file for
Complex Data Type
Dear Hogan,
Thanks. This is quite clear. I am going to try this
out.
Thanks & Regards,
Anshumn
--- "Hogan, Gavin" <[EMAIL PROTECTED]> wrote:
> In the same package as the calls mentioned below
> include User.aegis.xml.
>
> Within that file you must create a property mapping
> like this
>
> <?xml version="1.0" encoding="UTF-8"?>
> <mp:mappings
> xmlns:mp="http://xfire.codehaus.org/aegis/1.0"
>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
xsi:schemaLocation="http://xfire.codehaus.org/aegis/1.0
> http://xfire.codehaus.org/schemas/1.0/mapping.xsd ">
> <mapping>
>
> <property name="customers"
> componentType="your.package.path.Customers" />
> </mapping>
> </mp:mappings>
>
>
> Hope this is clear.
>
>
> Also if the Customer has a collection of, say email
> addresses you would
> have a aegis file for Customer.java
>
> <?xml version="1.0" encoding="UTF-8"?>
> <mp:mappings
> xmlns:mp="http://xfire.codehaus.org/aegis/1.0"
>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
xsi:schemaLocation="http://xfire.codehaus.org/aegis/1.0
> http://xfire.codehaus.org/schemas/1.0/mapping.xsd ">
> <mapping>
>
> <property name="emails"
> componentType="java.lang.String" />
> </mapping>
> </mp:mappings>
>
> Remember that these files must be available at run
> time and be located
> in the package of the class they relate to and the
> name must match the
> class as indicated above.
>
>
> ___________________________________________
>
> Gavin Hogan
> Programmer/Analyst
> The State University of New York
> State University Plaza
> Albany, NY 12246
> Phone 518-443-5481
> fax 518-443-5809
> e-mail [EMAIL PROTECTED]
>
> -----Original Message-----
> From: Anshumn Sagar [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 01, 2007 5:52 AM
> To: [email protected]
> Subject: [xfire-user] Urgent: How to Wrire Aegis.xml
> file for Complex
> Data Type
>
>
> Hi,
>
> I am using JDK1.4 and need to pass a java bean as
> the
> call parameter to the service. The bean has an
> attribute as a list of some other java bean.
> e.g.
>
> public class User implements Serializable {
>
> private String id = "";
>
> private List customers;
>
> /**
> * @return the id
> */
> public String getId() {
> return id;
> }
>
> /**
> * @param id the id to set
> */
> public void setId(String id) {
> this.id = id;
> }
>
>
> /**
> * @return the customers
> */
> public List getCustomers() {
> return customers;
> }
>
> /**
> * @param customers the customers to set
> */
> public void setCustomers(List customers) {
> this.customers = customers;
> }
> }
>
> In the XFire documentation for mapping and
> collections
> link, it is mentioned only about the mappings for
> passing direct Collections of java objects as
> parameters, but I am not able to find the way when
> the collection is an
> attribute of a Java Object itself.
>
> Can someone please guide me with this? It is quite
> urgent.
>
> Thanks in advance!
>
> Regards,
> Anshumn
>
>
>
>
________________________________________________________________________
> ____________Ready for the edge of your seat?
> Check out tonight's top picks on Yahoo! TV.
> http://tv.yahoo.com/
>
>
---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
>
---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
________________________________________________________________________
____________
Bored stiff? Loosen up...
Download and play hundreds of games for free on Yahoo! Games.
http://games.yahoo.com/games/front
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
This email was sent to you by Reuters, the global news and information company.
To find out more about Reuters visit www.about.reuters.com
Any views expressed in this message are those of the individual sender,
except where the sender specifically states them to be the views of Reuters
Limited.
Reuters Limited is part of the Reuters Group of companies, of which Reuters
Group PLC is the ultimate parent company.
Reuters Group PLC - Registered office address: The Reuters Building, South
Colonnade, Canary Wharf, London E14 5EP, United Kingdom
Registered No: 3296375
Registered in England and Wales
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email