You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by "Roshan A. Punnoose" <rp...@proteus-technologies.com> on 2007/11/06 21:08:19 UTC
Return direct XML
Hi,
What is the easiest way to return XML directly? For example, in my
function, if I create XML, I want to be able to send that object
directly back to the calling client. Is this possible?
Roshan
Re: Return direct XML
Posted by James Mao <ja...@iona.com>.
XML is not a Java Type before Java7, it'll be at that time.
Not sure what you really mean, do you mean a DOM or something else
James
> Hi,
>
>
>
> What is the easiest way to return XML directly? For example, in my
> function, if I create XML, I want to be able to send that object
> directly back to the calling client. Is this possible?
>
>
>
> Roshan
>
>
>
Re: Return direct XML
Posted by Glen Mazza <gl...@verizon.net>.
I was about to say just return the XML in an xsd:string, it should work
fine. But that raises an interesting question: when are the <'s
escaped so they don't interfere with the rest of the SOAP Message (which
is in XML itself?) I'm guessing they're escaped automatically by the
web services stack.
At any rate, have you thought of just using an xsd:string?
Glen
Am Dienstag, den 06.11.2007, 15:08 -0500 schrieb Roshan A. Punnoose:
> Hi,
>
>
>
> What is the easiest way to return XML directly? For example, in my
> function, if I create XML, I want to be able to send that object
> directly back to the calling client. Is this possible?
>
>
>
> Roshan
>
RE: Return direct XML
Posted by Benson Margulies <bi...@basistech.com>.
Oh, I see. If you are getting Class objects from xjc, Aegis can't do
that.
> -----Original Message-----
> From: Willem Jiang [mailto:ning.jiang@iona.com]
> Sent: Wednesday, November 07, 2007 12:12 PM
> To: cxf-user@incubator.apache.org
> Subject: Re: Return direct XML
>
> Yep, I think the initial thought just wanted it works only by
setting
> the JAXB Context with the WSDL dynamically,
> it may skip the part of JAXB DataBinding.
> Maybe we can get it workable by refactoring the DynamicClientFactory
to
> accept different DataBinding Context ?
> I don't know if Aegis can generate the type class from WSDL just like
XJC.
> Or we do not need do it for Aegis DataBinding.
>
> Any other thought?
>
> Willem.
>
> Benson Margulies wrote:
> > The dynamic client is situated in the source in a place that
surprised
> > me, and this aspect fits with that. Go ahead and give it a try, it
> > should just have a DataBinding instance that could be made settablr.
> >
> >
> >> -----Original Message-----
> >> From: Benjamin Coiffe [mailto:bcoiffe@inforsense.com]
> >> Sent: Wednesday, November 07, 2007 3:45 AM
> >> To: cxf-user@incubator.apache.org
> >> Subject: RE: Return direct XML
> >>
> >> Hi,
> >>
> >> I was trying to use Aegis Binding on the Dynamic client
> >> (DynamicClientFactory.createClient()) but it is hard coded to use
> >>
> > JAXB.
> >
> >> Is there a specific reason for this or could I confidently modify
the
> >> source code of my distribution and expect it to run using Aegis
> >> bindings?
> >>
> >> Thanks,
> >>
> >> Ps: benson, the fix for CXF-1168 works for me in 2.0.1. Thx!
> >>
> >> -----Original Message-----
> >> From: Benson Margulies [mailto:bim2007@basistech.com]
> >> Sent: 07 November 2007 02:38
> >> To: cxf-user@incubator.apache.org
> >> Subject: RE: Return direct XML
> >>
> >> I believe that Aegis allows you to have a return type of
> >> org.w3c.Document or the JDOM equivalent, and XML will appear.
> >>
> >>
> >>> -----Original Message-----
> >>> From: Liu, Jervis [mailto:jliu@iona.com]
> >>> Sent: Tuesday, November 06, 2007 9:32 PM
> >>> To: cxf-user@incubator.apache.org
> >>> Subject: RE: Return direct XML
> >>>
> >>> In your case, looks like the easiest way is to use JAX-WS Provider
> >>>
> > API
> >
> >>> with XML Binding. You will find a bunch of different type of
> >>>
> > Provider
> >
> >>> implementations under system test:
> >>>
> >>>
> >
https://svn.apache.org/repos/asf/incubator/cxf/trunk/systests/src/test/j
> >
> >> av
> >>
> >>> a/org/apache/cxf/systest/provider/. Of course the limitation is
that
> >>>
> >> the
> >>
> >>> input of your function has to be in XML format as well (can be
> >>> Source/SOAPMessage/DataSource, depend on your mode and binding),
in
> >>>
> >> some
> >>
> >>> cases you may find its hard to parse input from XML by yourself.
> >>>
> >>> Cheers,
> >>> Jervis
> >>>
> >>>
> >>>> -----Original Message-----
> >>>> From: Roshan A. Punnoose
> >>>>
> > [mailto:rpunnoose@proteus-technologies.com]
> >
> >>>> Sent: 2007?11?7? 4:08
> >>>> To: cxf-user@incubator.apache.org
> >>>> Subject: Return direct XML
> >>>>
> >>>>
> >>>> Hi,
> >>>>
> >>>>
> >>>>
> >>>> What is the easiest way to return XML directly? For example, in
my
> >>>> function, if I create XML, I want to be able to send that object
> >>>> directly back to the calling client. Is this possible?
> >>>>
> >>>>
> >>>>
> >>>> Roshan
> >>>>
> >>>>
> >>>>
> >>> ----------------------------
> >>> IONA Technologies PLC (registered in Ireland)
> >>> Registered Number: 171387
> >>> Registered Address: The IONA Building, Shelbourne Road, Dublin 4,
> >>>
> >> Ireland
> >>
> >
> >
Re: Return direct XML
Posted by Willem Jiang <ni...@iona.com>.
Yep, I think the initial thought just wanted it works only by setting
the JAXB Context with the WSDL dynamically,
it may skip the part of JAXB DataBinding.
Maybe we can get it workable by refactoring the DynamicClientFactory to
accept different DataBinding Context ?
I don't know if Aegis can generate the type class from WSDL just like XJC.
Or we do not need do it for Aegis DataBinding.
Any other thought?
Willem.
Benson Margulies wrote:
> The dynamic client is situated in the source in a place that surprised
> me, and this aspect fits with that. Go ahead and give it a try, it
> should just have a DataBinding instance that could be made settablr.
>
>
>> -----Original Message-----
>> From: Benjamin Coiffe [mailto:bcoiffe@inforsense.com]
>> Sent: Wednesday, November 07, 2007 3:45 AM
>> To: cxf-user@incubator.apache.org
>> Subject: RE: Return direct XML
>>
>> Hi,
>>
>> I was trying to use Aegis Binding on the Dynamic client
>> (DynamicClientFactory.createClient()) but it is hard coded to use
>>
> JAXB.
>
>> Is there a specific reason for this or could I confidently modify the
>> source code of my distribution and expect it to run using Aegis
>> bindings?
>>
>> Thanks,
>>
>> Ps: benson, the fix for CXF-1168 works for me in 2.0.1. Thx!
>>
>> -----Original Message-----
>> From: Benson Margulies [mailto:bim2007@basistech.com]
>> Sent: 07 November 2007 02:38
>> To: cxf-user@incubator.apache.org
>> Subject: RE: Return direct XML
>>
>> I believe that Aegis allows you to have a return type of
>> org.w3c.Document or the JDOM equivalent, and XML will appear.
>>
>>
>>> -----Original Message-----
>>> From: Liu, Jervis [mailto:jliu@iona.com]
>>> Sent: Tuesday, November 06, 2007 9:32 PM
>>> To: cxf-user@incubator.apache.org
>>> Subject: RE: Return direct XML
>>>
>>> In your case, looks like the easiest way is to use JAX-WS Provider
>>>
> API
>
>>> with XML Binding. You will find a bunch of different type of
>>>
> Provider
>
>>> implementations under system test:
>>>
>>>
> https://svn.apache.org/repos/asf/incubator/cxf/trunk/systests/src/test/j
>
>> av
>>
>>> a/org/apache/cxf/systest/provider/. Of course the limitation is that
>>>
>> the
>>
>>> input of your function has to be in XML format as well (can be
>>> Source/SOAPMessage/DataSource, depend on your mode and binding), in
>>>
>> some
>>
>>> cases you may find its hard to parse input from XML by yourself.
>>>
>>> Cheers,
>>> Jervis
>>>
>>>
>>>> -----Original Message-----
>>>> From: Roshan A. Punnoose
>>>>
> [mailto:rpunnoose@proteus-technologies.com]
>
>>>> Sent: 2007?11?7? 4:08
>>>> To: cxf-user@incubator.apache.org
>>>> Subject: Return direct XML
>>>>
>>>>
>>>> Hi,
>>>>
>>>>
>>>>
>>>> What is the easiest way to return XML directly? For example, in my
>>>> function, if I create XML, I want to be able to send that object
>>>> directly back to the calling client. Is this possible?
>>>>
>>>>
>>>>
>>>> Roshan
>>>>
>>>>
>>>>
>>> ----------------------------
>>> IONA Technologies PLC (registered in Ireland)
>>> Registered Number: 171387
>>> Registered Address: The IONA Building, Shelbourne Road, Dublin 4,
>>>
>> Ireland
>>
>
>
RE: Return direct XML
Posted by Benson Margulies <bi...@basistech.com>.
The dynamic client is situated in the source in a place that surprised
me, and this aspect fits with that. Go ahead and give it a try, it
should just have a DataBinding instance that could be made settablr.
> -----Original Message-----
> From: Benjamin Coiffe [mailto:bcoiffe@inforsense.com]
> Sent: Wednesday, November 07, 2007 3:45 AM
> To: cxf-user@incubator.apache.org
> Subject: RE: Return direct XML
>
> Hi,
>
> I was trying to use Aegis Binding on the Dynamic client
> (DynamicClientFactory.createClient()) but it is hard coded to use
JAXB.
> Is there a specific reason for this or could I confidently modify the
> source code of my distribution and expect it to run using Aegis
> bindings?
>
> Thanks,
>
> Ps: benson, the fix for CXF-1168 works for me in 2.0.1. Thx!
>
> -----Original Message-----
> From: Benson Margulies [mailto:bim2007@basistech.com]
> Sent: 07 November 2007 02:38
> To: cxf-user@incubator.apache.org
> Subject: RE: Return direct XML
>
> I believe that Aegis allows you to have a return type of
> org.w3c.Document or the JDOM equivalent, and XML will appear.
>
> > -----Original Message-----
> > From: Liu, Jervis [mailto:jliu@iona.com]
> > Sent: Tuesday, November 06, 2007 9:32 PM
> > To: cxf-user@incubator.apache.org
> > Subject: RE: Return direct XML
> >
> > In your case, looks like the easiest way is to use JAX-WS Provider
API
> > with XML Binding. You will find a bunch of different type of
Provider
> > implementations under system test:
> >
>
https://svn.apache.org/repos/asf/incubator/cxf/trunk/systests/src/test/j
> av
> > a/org/apache/cxf/systest/provider/. Of course the limitation is that
> the
> > input of your function has to be in XML format as well (can be
> > Source/SOAPMessage/DataSource, depend on your mode and binding), in
> some
> > cases you may find its hard to parse input from XML by yourself.
> >
> > Cheers,
> > Jervis
> >
> > > -----Original Message-----
> > > From: Roshan A. Punnoose
[mailto:rpunnoose@proteus-technologies.com]
> > > Sent: 2007?11?7? 4:08
> > > To: cxf-user@incubator.apache.org
> > > Subject: Return direct XML
> > >
> > >
> > > Hi,
> > >
> > >
> > >
> > > What is the easiest way to return XML directly? For example, in my
> > > function, if I create XML, I want to be able to send that object
> > > directly back to the calling client. Is this possible?
> > >
> > >
> > >
> > > Roshan
> > >
> > >
> >
> > ----------------------------
> > IONA Technologies PLC (registered in Ireland)
> > Registered Number: 171387
> > Registered Address: The IONA Building, Shelbourne Road, Dublin 4,
> Ireland
Re: Return direct XML
Posted by Willem Jiang <ni...@iona.com>.
Hi,
You can try it. I am also looking forward that the DynamicClientFactory
can work with Aegis Binding.
And the patch of it is welcome :)
Willem.
Benjamin Coiffe wrote:
> Hi,
>
> I was trying to use Aegis Binding on the Dynamic client
> (DynamicClientFactory.createClient()) but it is hard coded to use JAXB.
> Is there a specific reason for this or could I confidently modify the
> source code of my distribution and expect it to run using Aegis
> bindings?
>
> Thanks,
>
> Ps: benson, the fix for CXF-1168 works for me in 2.0.1. Thx!
>
> -----Original Message-----
> From: Benson Margulies [mailto:bim2007@basistech.com]
> Sent: 07 November 2007 02:38
> To: cxf-user@incubator.apache.org
> Subject: RE: Return direct XML
>
> I believe that Aegis allows you to have a return type of
> org.w3c.Document or the JDOM equivalent, and XML will appear.
>
>
>> -----Original Message-----
>> From: Liu, Jervis [mailto:jliu@iona.com]
>> Sent: Tuesday, November 06, 2007 9:32 PM
>> To: cxf-user@incubator.apache.org
>> Subject: RE: Return direct XML
>>
>> In your case, looks like the easiest way is to use JAX-WS Provider API
>> with XML Binding. You will find a bunch of different type of Provider
>> implementations under system test:
>>
>>
> https://svn.apache.org/repos/asf/incubator/cxf/trunk/systests/src/test/j
> av
>
>> a/org/apache/cxf/systest/provider/. Of course the limitation is that
>>
> the
>
>> input of your function has to be in XML format as well (can be
>> Source/SOAPMessage/DataSource, depend on your mode and binding), in
>>
> some
>
>> cases you may find its hard to parse input from XML by yourself.
>>
>> Cheers,
>> Jervis
>>
>>
>>> -----Original Message-----
>>> From: Roshan A. Punnoose [mailto:rpunnoose@proteus-technologies.com]
>>> Sent: 2007?11?7? 4:08
>>> To: cxf-user@incubator.apache.org
>>> Subject: Return direct XML
>>>
>>>
>>> Hi,
>>>
>>>
>>>
>>> What is the easiest way to return XML directly? For example, in my
>>> function, if I create XML, I want to be able to send that object
>>> directly back to the calling client. Is this possible?
>>>
>>>
>>>
>>> Roshan
>>>
>>>
>>>
>> ----------------------------
>> IONA Technologies PLC (registered in Ireland)
>> Registered Number: 171387
>> Registered Address: The IONA Building, Shelbourne Road, Dublin 4,
>>
> Ireland
>
>
RE: Return direct XML
Posted by Benjamin Coiffe <bc...@inforsense.com>.
Hi,
I was trying to use Aegis Binding on the Dynamic client
(DynamicClientFactory.createClient()) but it is hard coded to use JAXB.
Is there a specific reason for this or could I confidently modify the
source code of my distribution and expect it to run using Aegis
bindings?
Thanks,
Ps: benson, the fix for CXF-1168 works for me in 2.0.1. Thx!
-----Original Message-----
From: Benson Margulies [mailto:bim2007@basistech.com]
Sent: 07 November 2007 02:38
To: cxf-user@incubator.apache.org
Subject: RE: Return direct XML
I believe that Aegis allows you to have a return type of
org.w3c.Document or the JDOM equivalent, and XML will appear.
> -----Original Message-----
> From: Liu, Jervis [mailto:jliu@iona.com]
> Sent: Tuesday, November 06, 2007 9:32 PM
> To: cxf-user@incubator.apache.org
> Subject: RE: Return direct XML
>
> In your case, looks like the easiest way is to use JAX-WS Provider API
> with XML Binding. You will find a bunch of different type of Provider
> implementations under system test:
>
https://svn.apache.org/repos/asf/incubator/cxf/trunk/systests/src/test/j
av
> a/org/apache/cxf/systest/provider/. Of course the limitation is that
the
> input of your function has to be in XML format as well (can be
> Source/SOAPMessage/DataSource, depend on your mode and binding), in
some
> cases you may find its hard to parse input from XML by yourself.
>
> Cheers,
> Jervis
>
> > -----Original Message-----
> > From: Roshan A. Punnoose [mailto:rpunnoose@proteus-technologies.com]
> > Sent: 2007?11?7? 4:08
> > To: cxf-user@incubator.apache.org
> > Subject: Return direct XML
> >
> >
> > Hi,
> >
> >
> >
> > What is the easiest way to return XML directly? For example, in my
> > function, if I create XML, I want to be able to send that object
> > directly back to the calling client. Is this possible?
> >
> >
> >
> > Roshan
> >
> >
>
> ----------------------------
> IONA Technologies PLC (registered in Ireland)
> Registered Number: 171387
> Registered Address: The IONA Building, Shelbourne Road, Dublin 4,
Ireland
RE: Return direct XML
Posted by Benson Margulies <bi...@basistech.com>.
I believe that Aegis allows you to have a return type of
org.w3c.Document or the JDOM equivalent, and XML will appear.
> -----Original Message-----
> From: Liu, Jervis [mailto:jliu@iona.com]
> Sent: Tuesday, November 06, 2007 9:32 PM
> To: cxf-user@incubator.apache.org
> Subject: RE: Return direct XML
>
> In your case, looks like the easiest way is to use JAX-WS Provider API
> with XML Binding. You will find a bunch of different type of Provider
> implementations under system test:
>
https://svn.apache.org/repos/asf/incubator/cxf/trunk/systests/src/test/j
av
> a/org/apache/cxf/systest/provider/. Of course the limitation is that
the
> input of your function has to be in XML format as well (can be
> Source/SOAPMessage/DataSource, depend on your mode and binding), in
some
> cases you may find its hard to parse input from XML by yourself.
>
> Cheers,
> Jervis
>
> > -----Original Message-----
> > From: Roshan A. Punnoose [mailto:rpunnoose@proteus-technologies.com]
> > Sent: 2007?11?7? 4:08
> > To: cxf-user@incubator.apache.org
> > Subject: Return direct XML
> >
> >
> > Hi,
> >
> >
> >
> > What is the easiest way to return XML directly? For example, in my
> > function, if I create XML, I want to be able to send that object
> > directly back to the calling client. Is this possible?
> >
> >
> >
> > Roshan
> >
> >
>
> ----------------------------
> IONA Technologies PLC (registered in Ireland)
> Registered Number: 171387
> Registered Address: The IONA Building, Shelbourne Road, Dublin 4,
Ireland
RE: Return direct XML
Posted by "Roshan A. Punnoose" <rp...@proteus-technologies.com>.
Cool I'll look into this and the Aegis bindings.
Roshan
-----Original Message-----
From: Liu, Jervis [mailto:jliu@iona.com]
Sent: Tue 11/6/2007 9:32 PM
To: cxf-user@incubator.apache.org
Subject: RE: Return direct XML
In your case, looks like the easiest way is to use JAX-WS Provider API with XML Binding. You will find a bunch of different type of Provider implementations under system test: https://svn.apache.org/repos/asf/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/. Of course the limitation is that the input of your function has to be in XML format as well (can be Source/SOAPMessage/DataSource, depend on your mode and binding), in some cases you may find its hard to parse input from XML by yourself.
Cheers,
Jervis
> -----Original Message-----
> From: Roshan A. Punnoose [mailto:rpunnoose@proteus-technologies.com]
> Sent: 2007?11?7? 4:08
> To: cxf-user@incubator.apache.org
> Subject: Return direct XML
>
>
> Hi,
>
>
>
> What is the easiest way to return XML directly? For example, in my
> function, if I create XML, I want to be able to send that object
> directly back to the calling client. Is this possible?
>
>
>
> Roshan
>
>
----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
RE: Return direct XML
Posted by "Liu, Jervis" <jl...@iona.com>.
In your case, looks like the easiest way is to use JAX-WS Provider API with XML Binding. You will find a bunch of different type of Provider implementations under system test: https://svn.apache.org/repos/asf/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/. Of course the limitation is that the input of your function has to be in XML format as well (can be Source/SOAPMessage/DataSource, depend on your mode and binding), in some cases you may find its hard to parse input from XML by yourself.
Cheers,
Jervis
> -----Original Message-----
> From: Roshan A. Punnoose [mailto:rpunnoose@proteus-technologies.com]
> Sent: 2007?11?7? 4:08
> To: cxf-user@incubator.apache.org
> Subject: Return direct XML
>
>
> Hi,
>
>
>
> What is the easiest way to return XML directly? For example, in my
> function, if I create XML, I want to be able to send that object
> directly back to the calling client. Is this possible?
>
>
>
> Roshan
>
>
----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland