axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cristian Bullokles" <cristian.bullok...@gmail.com>
Subject Re: JSON + POJO Service
Date Sat, 03 May 2008 19:42:11 GMT
Now looks like the parser is working the response is json format but allways
is a fault. like that:

{"Fault":"<soapenv:Fault
xmlns:soapenv=\"http:\/\/www.w3.org\/2003\/05\/soap-envelope\"><soapenv:Code><soapenv:Value>soapenv:Receiver<\/soapenv:Value><\/soapenv:Code><soapenv:Reason><soapenv:Text
xml:lang=\"en-US\">Mapped formatted JSON with namespaces are not supported
in Axis2. Make sure that your request doesn't include namespaces or use the
Badgerfish convention<\/soapenv:Text><\/soapenv:Reason><soapenv:Detail
\/><\/soapenv:Fault>"}

My request is only a get from a browser:


http://localhost:8080/axis2/services/Version/getVersion?response=application/json




On Sat, May 3, 2008 at 12:43 AM, keith chapman <keithgchapman@gmail.com>
wrote:

> Hi Cristian,
>
> Have you engaged DynamicResponseHandler on the version service? If you
> want to engage this blobally (That will effect all services running on your
> system) you can do so by adding <module ref="DynamicResponseHandler"/> to
> your axis2.xml.
>
> Thanks,
> Keith.
>
>
> On Sat, May 3, 2008 at 1:53 AM, Cristian Bullokles <
> cristian.bullokles@gmail.com> wrote:
>
> > Hi all
> >       I've modified the axis2.xml file adding this lines:
> >
> >     <messageFormatters>
> >           <messageFormatter     contentType="application/json"
> >
> >  class="org.apache.axis2.json.JSONMessageFormatter"/>
> >
> >     <messageBuilders>
> >         <messageBuilder contentType="application/json"
> >                         class="org.apache.axis2.json.JSONOMBuilder"/>
> >
> >     Also as Keith said in a previous thread I've compiled and installed
> > the module dynamic response:
> >
> >
> > http://wso2.org/repos/wso2/trunk/commons/dynamic-response/
> >
> >     Then i've restarted tomcat and all continues working at the same
> > way, when i tried:
> >
> >
> >
> > http://localhost:8080/axis2/services/Version/getVersion?response=application/json
> >
> >      I've received the same XML response:
> >
> >     <ns:getVersionResponse>
> >     <ns:return>
> > Hello I am Axis2 version service , My version is 1.4
> > </ns:return>
> > </ns:getVersionResponse>
> >
> >          I'm using axis2 1.4 in tomcat6.
> >
> > Any idea? I need a JSON response when I invoke using REST with
> > response=application/json
> >
> > Regards
> > Cristian
> >
> >
>
>
> --
> Keith Chapman
> Senior Software Engineer
> WSO2 Inc.
> Oxygenating the Web Service Platform.
> http://wso2.org/
>
> blog: http://www.keith-chapman.org

Mime
View raw message