Hi, RawXMLINOnly/RawXMLINOut MRs work with reflection if only following method signatures present in the service impl,
1. public void foo(OMElement element) [throws SomeExceptions] 2. public OMElement bar(OMElement element) throws SomeExceptions] "element" always gets the first child of the soap body. In your case; you'll have to have a custom message receiver with your mapping tables. In order to dispatching to work properly, you'll have to specify the correct operation name/action mapping in your services.xml. Once dispatched you could do "I.e my operation is sayHello but my actual implementation would need to invoke SAY_HELLO(...) " with your MRS mapping tables and reflection logic. Thank you Saminda On 1/14/07, Angel Todorov <[EMAIL PROTECTED]> wrote:
Hi Eran, I agree about the custom MEPs and using reflection. What I would like to clarify is whether the raw XML message receiver not only uses reflection, but always expect a certain method signature in the reflected classes, is that so? Suppose I have some hashtable with mappings of service operation => actual method signature. I.e my operation is sayHello but my actual implementation would need to invoke SAY_HELLO(...) . Then , as far as i understood from the talk above, the Raw XML Message receiver would fail since the reflection-based search in findOperation() would not succeed. Thanks Regards, Angel On 1/14/07, comain <[EMAIL PROTECTED]> wrote: > > > Yes,it works just as perfect as you said. That is really cool. > > However, if we are using POJO based web services with RPC MR (as the > quickstart example), it works with a lot of reflections indeed. As a > developer, since I konw > little about WSDL, the way I prefer is to write POJOs with my own business > logic first, then deploy it as a ws with a default service.xml. In this > case(maybe > the common case), does Axis2 has no way but using reflections all around? > > If this is a problem, we may work around in the following ways: > > A possible work around is, the developer first write its own > skeleton(dummy), then using java2wsdl to generate wsdl for him, then using > code gen with ADB to generate effective > sevice skeleton, after which developer now adding his business logic. > > Or change the code gen module not using WSDL information, but Service > Classes directly(Since wsdl can generate from service class). In this case, > developer need not to > provide wsdl before write his service, but write the service with his own > will, then using the ADB code gen to generate necessay auxiliary classes > directly. > > If this is not a problem, can you kindly point out how does axis2 elegantly > handle this case? > > Great thanks, Eran. > > > ________________________________ > > comain > 2007-01-14 > ________________________________ > > 发件人: Eran Chinthaka > 发送时间: 2007-01-14 13:17:51 > 收件人: [email protected] > 抄送: > 主题: Re: Custom Message Receiver use cases > > > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Comain Chen wrote: > > Hi, Eran > > > > I am quite interested in your 2nd reason. > > > > However, it seems that you can only avoid using > java reflection during > > operation routing. Before it starts to invoke the > specific operation, it > > has to deserialize the XML document into > corresponding operation > > parameter objetcs, which will use Java > reflection(If you use any binding > > frameworks, such as ADB, JAXB, etc.), and is > more performance critical. > > Well, we do not do that, at least in ADB. > > The ADB data objects, that are code gen'ed directly works > on StAX. What > you have, when you are just about to de-serialize, is > a StAX reader, > from the input stream. ADB is designed to work with > StAX. IIRC, we do > not need reflection in this case. > > > Of course, if you decide to write your own data > binding with RawXMLMR, > > you can still avoid this with a lot of painful work. > > > I totally agree with you. But most people do not want > to get in to the > hazel of writing yet another data binding framework. > We know, from > experience, how difficult it was :). > And 95% of the people, in my guess, like to work with > java objects, than > with raw XML. > > - -- Chinthaka > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.3 (GNU/Linux) > Comment: Using GnuPG with Mozilla - > http://enigmail.mozdev.org > > iD8DBQFFqbzYjON2uBzUhh8RAiptAKCVz+7gviwJzMHbiqF9KobMaO/gzgCfWbIE > KD9WF5amy+NyeqF/MyibAKQ= > =81vD > -----END PGP SIGNATURE----- > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] >
-- Saminda Abeyruwan Software Engineer WSO2 Inc. - www.wso2.org
