Recently I joined a project where web services is the de facto means of communication.
When building web services, the best practice approach is to build the wsdl, and then generate the pojo or session bean skeleton from that. If you require complex objects to be exchanged, then you also need to provide an xsd schema which will define the protocol.
Data objects are generated from the schema. I assume this is a standard practice accross all web service platforms? I know websphere does this.
The problem with this is that typically you already have those same data objects in your code base. So what do you do? Ideally you don't actually want this duplication, but is there an alternative?
One solution is to make a generic mechanism to simply copy between your written data objects and the generated data objects (from the schema).
Another possibility is to refactor your code to use these new generated objects - typically they're not very "nice" however - websphere generates arrays when there are unbounded properties. If you move these new dto's around you'll also need to move the code to marshal and unmarshal, adulterating the code base a little.
Allowing the user to create their own mappings between their data objects and the schema (reusing their data objects), is probably not the way they'll go because then there's no guarantees that the mapping is correct.
Any ideas on this issue?
Michael Wiles
Disclaimer
Sanlam Life Insurance Limited Reg no 1998/021121/06 - Licensed Financial Services Provider
Disclaimer and Directors
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CTJUG Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/CTJUG-Forum
For the ctjug home page see http://www.ctjug.org.za
-~----------~----~----~----~------~----~------~--~---
- [CTJUG Forum] unexpected invocation error with mock object... Jeff Mutonho
- [CTJUG Forum] Re: unexpected invocation error with mo... Carl Woermann
- [CTJUG Forum] Re: unexpected invocation error wit... Jeff Mutonho
- [CTJUG Forum] Web services, schemas and dto's Michael . Wiles
- [CTJUG Forum] Re: Web services, schemas a... Carl Woermann
- [CTJUG Forum] Re: Web services, sche... Michael . Wiles
- [CTJUG Forum] Re: Web services, ... Carl Woermann
