Re: Another issue
Alternately, you could code your own Serializer/Deserializer taking help from existing SimpleSerializer and Deserializer Factories that are present in org.apache.axis.encoding.ser package and later use typeMapping ... in your WSDD. For more informationtake a look athttp://ws.apache.org/axis/java/user-guide.html#WhenBeansAreNotEnoughCustomSerialization Regards Jayachandra On 9/5/05, Jeff Greif [EMAIL PROTECTED] wrote: Look into message-style services (see the Axis user guide, Service Stylessection,and the Wiki).A few signatures are possible, and one of these might be what you're looking for:Element[] your-method-name(Element[] requestBodyElements);Document your-method-name(Document requestBody);The client calling the service would supply DOM Elements or Documents.The server would determine the type of document in order to decide what toreturn.The client would know what to do with whatever XML is returned.Jeff- Original Message -From: FabrícioTo: axis-user@ws.apache.orgSent: Monday, September 05, 2005 6:43 AMSubject: Another issueHello all,As I said in previous messages, I want to create a web service that couldreceive any types and dynamically extracts the contents of those types. Thus, I saw in java Object a solution for my problem. Hence, I created theweb service that receives and returns the java Object:public Object myMethod(Object o) throws Exception{ .} Now, my problem is: How can I create, in WSDD and in the client, the Mappingto serialize my object, once I don't know specifically what type I'mreceiving and returning?Some times I can receive a bean for a person (name, age, weight), other times I can receive a bean about address (street, state, country), or a beanabout cars (color, model, vendor). I don't know previously the type that myweb service will receives. If I knew I could mount my WSDD with no problems (passing the specific beanMapping) and in my client too (mounting mycall.registerTypeMapping(specif class information and (De)BeanSerializerFactory).My doubt is how I must construct my WSDD and my client to make my web service works. Or anyone could see another solution for my problem? Insteadof java Objects. Or this is an unreachable web service?Thanks a lot for any help,Fabrício. -- -- Jaya
Another issue
Hello all, As I said in previous messages, I want to create a web service that could receive any types and dynamically extracts the contents of those types. Thus, I saw in java Object a solution for my problem. Hence, I created the web service that receives and returns the java Object: public Object myMethod(Object o) throws Exception{ } Now, my problem is: How can I create, in WSDD and in the client, the Mapping to serialize my object, once I dont know specifically what type Im receiving and returning? Some times I can receive a bean for a person (name, age, weight), other times I can receive a bean about address (street, state, country), or a bean about cars (color, model, vendor) I dont know previously the type that my web service will receives. If I knew I could mount my WSDD with no problems (passing the specific beanMapping) and in my client too (mounting my call.registerTypeMapping(specif class information and (De) BeanSerializerFactory). My doubt is how I must construct my WSDD and my client to make my web service works. Or anyone could see another solution for my problem? Instead of java Objects. Or this is an unreachable web service? Thanks a lot for any help, Fabrício.
Re: Another issue
Look into message-style services (see the Axis user guide, Service Styles section, and the Wiki). A few signatures are possible, and one of these might be what you're looking for: Element[] your-method-name(Element[] requestBodyElements); Document your-method-name(Document requestBody); The client calling the service would supply DOM Elements or Documents. The server would determine the type of document in order to decide what to return. The client would know what to do with whatever XML is returned. Jeff - Original Message - From: Fabrício To: axis-user@ws.apache.org Sent: Monday, September 05, 2005 6:43 AM Subject: Another issue Hello all, As I said in previous messages, I want to create a web service that could receive any types and dynamically extracts the contents of those types. Thus, I saw in java Object a solution for my problem. Hence, I created the web service that receives and returns the java Object: public Object myMethod(Object o) throws Exception{ . } Now, my problem is: How can I create, in WSDD and in the client, the Mapping to serialize my object, once I don't know specifically what type I'm receiving and returning? Some times I can receive a bean for a person (name, age, weight), other times I can receive a bean about address (street, state, country), or a bean about cars (color, model, vendor). I don't know previously the type that my web service will receives. If I knew I could mount my WSDD with no problems (passing the specific beanMapping) and in my client too (mounting my call.registerTypeMapping(specif class information and (De) BeanSerializerFactory). My doubt is how I must construct my WSDD and my client to make my web service works. Or anyone could see another solution for my problem? Instead of java Objects. Or this is an unreachable web service? Thanks a lot for any help, Fabrício.