Here is what I did:
Not sure if this is the best way but I don't have time to fight with
it any longer. Any suggestions are appreciated.
I tweaked the code from RPCMessageReceiver as follows
Right after the results are returned (after line 88) I added the
following (specific to XML Beans)
if(inMessage.isDoingREST() && resObject instanceof XmlObject){
SOAPEnvelope envelope = null;
envelope =
toEnvelope(getSOAPFactory(inMessage),(XmlObject)resObject, false);
outMessage.setEnvelope(envelope);
}
else{
//existing RPCMessageReceiver code.
}
I copied toEnvelope() and toOM() from a generated receiver and made
them generic to any XmlObject
My Atom feed now renders in the browser as expected.
On Jan 22, 2008 1:21 PM, Ralph Perko <[EMAIL PROTECTED]> wrote:
> I've tried several things including pulling out the spring but to no
> avail. I've written my own receiver that does what I need. If there
> is a better way please let me know!
>
>
>
> On Jan 21, 2008 11:46 PM, Ralph Perko <[EMAIL PROTECTED]> wrote:
> > Hi, thanks for the response.
> >
> >
> > Yes, it is a POJO and I am using RPCMessageReceiver. It is a Spring
> > based deployment. Spring is deployed within the aar.
> >
> > service.xml:
> > <service name="restService" class=".....spring.SpringInit">
> >
> > <messageReceivers>
> > <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
> > class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
> > <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
> > class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
> > </messageReceivers>
> >
> > <!-- Spring / Axis2 config stuff -->
> > <parameter name="ServiceTCCL">composite</parameter>
> > <parameter
> > name="ServiceObjectSupplier">org.apache.axis2.extensions.spring.receivers.SpringAppContextAwareObjectSupplier</parameter>
> > <parameter name="SpringBeanName">searchService</parameter>
> >
> >
> > <operation name="RestfulService"/>
> >
> > </service>
> >
> > The service interface is defined as follows:
> >
> > public String RestfulService(Integer startIndex, Integer
> > resultsPerPage, String profile, String keywords);
> >
> > Thanks!
> >
> >
> >
> > On Jan 21, 2008 9:47 PM, keith chapman <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > >
> > > Is your service a POJO? Are you using RPCMessageReceiver?
> > >
> > > Thanks,
> > > Keith.
> > >
> > >
> > > On Jan 22, 2008 1:01 AM, Ralph Perko <[EMAIL PROTECTED]> wrote:
> > > > Hi,
> > > >
> > > > Is there any way to configure axis2 to not include the wrapping XML on
> > > > the REST response? My service returns an Atom feed which needs to be
> > > > returned as POX without the extra XML, otherwise it does not render
> > > > correctly.
> > > >
> > > > Thanks!
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Keith Chapman
> > > Software Engineer
> > > WSO2 Inc.
> > > Oxygenating the Web Service Platform.
> > > http://wso2.org/
> > >
> > > blog: http://www.keith-chapman.org
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]