I have the same as Michele.
From my understanding, if I use signature "ReplyObject fooMethod(RequestObject arg)"  then in the services.xml, I need to specify the message receiver as "org.apache.axis2.rpc.receivers.RPCMessageReceiver ", and in the service implementation class, ReplyObject will be the generated classes from WSDL complexType ReplyObject.
 
If I use the signature "OMElement fooMethod(OMElement arg)", then I specify the message receiver in services.xml as "org.apache.axis2.receivers.RawXMLINOutMessageReceiver". 
 
Can any Axis2 guys tell me what else I need to do? Is there any other databinding issue inside?
Michele, we can also use write our own message receiver to control the data binding.
 
Regards,
Xinjun

 
On 4/28/06, Michele Mazzucco <[EMAIL PROTECTED]> wrote:
And so, at now, it's not possible, is it? If it is, can anybody show me
a very simple example of how to use custom objects as arguments (or
return value) of ws methods?

Thanks,
Michele

Dennis Sosnoski wrote:
> You basically need an interface layer between the JAXB objects and the
> Axis2 code. This interface code can potentially be generated for you
> using the WSDL2Java tool provided by Axis2, but doing this requires a
> JAXB extension for WSDL2Java. This doesn't currently exist, so you'd
> need to do the conversions yourself, and Ajith is suggesting that you
> look at how the code generated for other data binding frameworks is
> structured so you can understand what needs to be done.
>
> I'm planning to add JAXB 2.0 support within the next month or so. It
> should be reasonably easy at this point, since the JAXB issues are very
> similar to those I've dealt with for JiBX data binding. I believe there
> are license issues which will prevent this actually becoming part of the
> Axis2 project, but I'm sure we'll link it from the Axis2 site once the
> JAXB add-on is available.
>
>  - Dennis
>
> Dennis M. Sosnoski
> SOA, Web Services, and XML
> Training and Consulting
> http://www.sosnoski.com - http://www.sosnoski.co.nz
> Seattle, WA +1-425-296-6194 - Wellington, NZ +64-4-298-6117
>
>
>
> Michele Mazzucco wrote:
>
>> Hi Ajith,
>>
>> I'm sorry, but can you be more clear, please? Could you show me a
>> practical example?
>>
>> Thanks,
>> Michele
>>
>> Ajith Ranabahu wrote:
>>
>>
>>> Hi,
>>> yes this is possible :) Axis2 explicitly allows any databinding to be
>>> plugged in and infact if you codegen for different frameworks like
>>> xmlbeans/adb/jaxme you'll see how  the codegenerator generates the
>>> skeletons referring to the generated databinding classes.
>>>
>>> if you are doing it by hand then you'll have to write your custom
>>> message receiver and write the fromOM and toOM conversion methods as
>>> well (the implementation of these methods are dependent on the
>>> databinding framework)
>>> My guess is the best choice for you would be to run the codegen with
>>> XMLbeans and look at the generated code. You can then replace the
>>> necessary classes and rewrite the conversion methods.
>>>
>>>
>>> On 4/25/06, Michele Mazzucco < [EMAIL PROTECTED]> wrote:
>>>
>>>> Hi all,
>>>>
>>>> starting from an xml schema, I generate Java classes with JAXB. Now the
>>>> question is, can I use those objects as return type or method
>>>> argument(s) of my web service methods or I must use exclusively
>>>> OMElement objects?
>>>>
>>>> i.e.
>>>>
>>>> say, for an in-out operation, I generate two classes from the xml
>>>> schema, RequestObject and ReplyObject. Which of the two options is the
>>>> correct one?,
>>>>
>>>> // web service method
>>>> ReplyObject fooMethod(RequestObject arg) {
>>>>        ...
>>>> }
>>>>
>>>> or
>>>>
>>>> OMElement fooMethod(OMElement arg) {
>>>>        ...
>>>> }
>>>>
>>>> Thanks,
>>>> Michele
>>>>
>>>>
>>> --
>>> Ajith Ranabahu
>>>
>>
>>
>>

Reply via email to