Click here to Skip to main content
11,415,074 members (62,281 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET Sharepoint Services , +
Hi,
I made dot net(vs2010) solution with web service. now i work on share point 2010 with aspx page call dot net project web service.
dot net project ip address is http://10.200.202.474:54
and
share point project ip address is http://10.200.202.474:84.

i called dot net web service in share point aspx page using javascript & $ajax.


var vChart1;
var vChart2;
var vChart3;
var chart1;
var chart2;
var chart3;
var isChart1Added = false;
var isChart2Added = false;
var isChart3Added = false;

vChart1= new Visifire('../js/SL.Visifire.Charts.xap', "c1", 700, 400);

alert(vChart1);


var configSectionName = "ganu";

$.ajax({
url: "http://10.200.202.474:4545/WebService/CreditorsFormat_OUWise.asmx/dParentGraph",
type: "POST",
dataType: "json",
crossDomain: true,
data: "{configSectionName:'" + configSectionName + "'}",
contentType: "application/json; charset=utf-8",
success: function (msg) {
alert('success');
vChart1.setDataXml(msg['d']['XMLData'].toString());

vChart1.preLoad = function (args) {
chart1 = args[0];
chart1.Series[0].MouseLeftButtonDown = function (e) { drawsbChartOne(e.ToolTipText); }
chart1.Series[1].MouseLeftButtonDown = function (e) { drawsbChartOne(e.ToolTipText); }
chart1.Series[2].MouseLeftButtonDown = function (e) { drawsbChartOne(e.ToolTipText); }
chart1.Series[3].MouseLeftButtonDown = function (e) { drawsbChartOne(e.ToolTipText); }
chart1.Series[4].MouseLeftButtonDown = function (e) { drawsbChartOne(e.ToolTipText); }
};

vChart1.render("ChartDiv");

},
error: function (e) {

alert('error' + e);
// $('#status').innerHTML = "Unavailable";
}
});


my code is given below it is not work.

any one can tell me how to call cross domain web service in share point using javascript, $ajax or jquery.
its posible or not ?


please help.

thanks in advance.
Posted 13-Feb-13 0:20am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 9,200
1 OriginalGriff 7,512
2 Maciej Los 3,710
3 Abhinav S 3,298
4 Peter Leow 3,084


Advertise | Privacy | Mobile
Web04 | 2.8.150427.4 | Last Updated 13 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100