You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Nick Kolosov <de...@mail.ru> on 2012/01/22 17:46:10 UTC
AXIS2 JSONP support without Content-Type
Hello.
I need my webservice to accept GET requests in jsonp format and answer
it as jsonp too. Thus jsonp requests are the same as json ones with
callback= parameter added, i've set it up in axis2.xml this way:
<messageFormatters>
...
<messageFormatter contentType="application/jsonp"
class="org.apache.axis2.json.JsonpMessageFormatter"/>
</messageFormatters>
<messageBuilders>
...
<messageBuilder contentType="application/jsonp"
class="org.apache.axis2.json.JSONOMBuilder"/>
</messageBuilders>
And all is working fine while client specifies
Content-Type=application/jsonp header. But the problem is that our
jscript programmer says he cant add Content-Type header in his ajax
requests - the browser skips it by some security reason. So, the
question is - how can i instruct axis2 to apply JSONOMBuilder on
incoming requests when no Content-Type is specified ?
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org