-----Original Message----- From: Ross Hall [mailto:[EMAIL PROTECTED] Sent: Thursday, December 23, 2004 3:21 AM To: Chad Brandon Cc: 'Andromda-User' Subject: Re: [Andromda-user] ValueObjects and WebServices
Thanks Chad, I'll check these points out. So far I have sucessfully returned a String and simple class with two string attributes to the .NET world, but no luck so far with a String[] - nothing gets returned. I decided that I should test Java to Java first before .NET and had lots of fun today :-( . [CB] Hmm, I remember trying it out and it seemed to work for me. I set the namespace property axis-tests in the mda project.xml, it created the test OK but I needed the classes that are created by the wsdl2java axis compiler. I'm not that familiar with maven, so after reading the guides, and looking at the Axis examples I ended up creating a maven.xml in the webservice directory with a bit of a hacked ant task wrapped in a maven goal - very ugly. I had to explicitly set the classpath in the taskdef so it could find the ant task, and then I hard coded the wsdl name in the wsdl2java task - need to work out how to pass in multiple names - jelly script?. [CB] Yep, jelly will work. It creates the stubs but the package naming is mucked up. The test case looks for stubs in package xxx.yyy.test, and the wsdl2Java compiler seems to reverse the namespace and create the stubs with package yyy.xxx. Clearly I need to do some more reading! Any pointers would be most appreciated. [CB] Axis WSDL2Java will create the namespace reversed, there's actually a property can you set to make the AndroMDA reverse the namespace in the actual WSDL so that WSDL2Java creates the packages normal: http://team.andromda.org/docs/andromda-webservice-cartridge/namespace.html (look for reverseNamespace) By the way, showed my boss what could be done with AndroMDA in creating web services, the best response I've gotten so far for the concept of MDA - nothing like a practical example even if simple. [CB] awesome! The down side, I spent 3-4 hrs trying to get Java unit tests going - I suppose if things were that simple, monkeys could write Shakespear and we wouldn't need AndroMDA! Have a great Xmas and New Year everyone Regards Ross. Chad Brandon wrote: >Hi Ross, > >One thing to watch out for: Make sure you are not using the java cartridge >generated value objects, the WebService cartridge will generate the complex >types for you (based on the value object stereotype), the main difference >being that when you model associations with other value objects, the >associations will be generated as arrays instead of collections. > >I'm not sure why only the getters would be generated if the attributes were >private, the only way it should generate only getters is if your attributes >were set to frozen in their changeability specification. Also since the >default WSDL style generated is document/wrapped (as well as the fact that >the cartridge will not let you return collections from your web services) I >think it should be able to interoperate with .NET ok. > >Another thing you might not have known: you can expose only certain >operations of a <<Service>> as a part of web service if you want, just use >the <<WebServiceOperation>> stereotype for operations that should be exposed >(instead of stereotyping the entire class as <<WebService>>). > >Chad > >-----Original Message----- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] On Behalf Of Ross Hall >Sent: Wednesday, December 22, 2004 3:52 AM >To: Andromda-User >Subject: [Andromda-user] ValueObjects and WebServices > >Hullo all, > >I have found that a class stereotyped as ValueObject whose attributes >are private will create a class that only has getters. If this is used >in conjunction with a WebService operation the WSDL created by Axis will >not provide the attributes. The ValueObject's attributes need to be set >as public and the java cartridge will generate both getters and setters >and all seems to be OK. > >As the server-config.wsdd defines a BeanSerializer for the class, I >suspect it needs to find both getters and setters. Does this make sense? >I have just started using the WebService cartridge and I am checking the >interoperability of Axis with .NET. > >I am aware of some of the issues re Axis and .NET, but does anyone have >any advice on this, modelling, and using the WebService cartridge so I >can avoid some of the traps and pitfalls. In many situations, the >advice is to create wrapper classes for problem areas, i.e to handle the >issue of null dates - any other suggestions for modelling? > >Regards Ross. > > >------------------------------------------------------- >SF email is sponsored by - The IT Product Guide >Read honest & candid reviews on hundreds of IT Products from real users. >Discover which products truly live up to the hype. Start reading now. >http://productguide.itmanagersjournal.com/ >_______________________________________________ >Andromda-user mailing list >[email protected] >https://lists.sourceforge.net/lists/listinfo/andromda-user > > > > ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ Andromda-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/andromda-user
