使用ajax调用WSO2 DSS服务? [英] Call WSO2 DSS service using ajax?

查看:28
本文介绍了使用ajax调用WSO2 DSS服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 WSO2 DSS 中有一项数据服务.也可以使用浏览器调用.但是我无法使用 ajax 发出请求来调用此服务.我认为正在发生 CORS 问题.所以我想将 Access-Control-Allow-Origin 参数添加到响应标头中.这是如何实现的在 WSO2 DSS 中是可能的,有什么建议吗?

I have one data service in WSO2 DSS. And also its possible to call using browsers.But i can't make a request using ajax to call this service.I think CORS issue is occurring.So i want to add Access-Control-Allow-Origin parameter to response header.How this is possible in WSO2 DSS ,Any suggestion ?

推荐答案

我认为您可以通过添加axis2 自定义输出流处理程序来放置自定义标题.

I think you can put a custom headers by adding axis2 custom out flow handler.

http://shivendra-tripathi.blogspot.com/2010/04/adding-handler-in-axis2.html?m=1http://shivendra-tripathi.blogspot.com/2010/04/adding-soap-header-in-axiom.html?m=1

这篇关于使用ajax调用WSO2 DSS服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆