2013-07-12 2 views
0

매개 변수를 WCF 서비스와 WCF 서비스에서 저장 프로 시저로 전달하려고 시도하지만 저장 프로 시저에 아무 것도 없습니다. 서비스의 다른 매개 변수에 값이 지정됩니다.jQuery에서 저장 프로 시저로 매개 변수를 전달할 수 없습니다.

function CallWcfService() { 
     // alert("CallWcfServicexxxx"); 
     jQuery.ajax 
     (
     { 

      type: Type, 
      url: Url, 
      data: parameters, 
      contentType: ContentType, // content type sent to server 
      dataType: DataType, //Expected data format from server 
      cache: "false", 
      crossDomain: true, //Same result if i remove this line 
      processdata: ProcessData, //True or False 
      success: function (msg) { 
       ServiceSucceeded(msg); 
      }, 
      error: ServiceFailed// When Service call fails 
     } 
     ); 
} 

function ServiceFailed(result) { 
     alert('Service call failed: ' + result.status + '' + result.statusText); 
     Type = null; Url = null; Data = null; ContentType = null; DataType = null; ProcessData = null; parameters = null; 
} 

function callService() { 
     DataType = "json"; 
     Type = "GET"; 
     var par = 4; 
     parameters = null; 
     Url = "http://192.168.2.42/CWSERVERWCF/bedtypemasterService.svc/GetBedTypeList?callback=?"; 
     parameters = "{'strErrMsg':'1'},{'chrErrFlg':'A'},{'pcompanycode':'0'},{'pdiv':'1'},{'ploc':'1'}"; 
     // alert(parameters); 
     ContentType = "application/json; charset=utf-8"; 
     ProcessData = true; 
     //alert("sssssasasadsds"); 
     CallWcfService(); 
} 
+0

_ _ "서비스에서 다른 매개 변수에 값을 할당 받고있다"- 당신이 값 (또는 값) 이상까지 도달 할 건가요 서버 측 코드로? – nnnnnn

답변

0

당신은 CallWcfService()에 매개 변수를 전달해야

CallWcfService(Type,Url,parameters,...); 
+0

죄송합니다 mrida 내가 – Mayur

+0

매개 변수는 서비스 – Mayur

+0

에서 strErrMsg 및 chrErrFlg를 반환하기 때문에 매개 변수가 wcf 서비스 변수에 할당되도록 가져 오지 못해 죄송합니다. 귀하의 변수가 전역임을 알지 못했습니다. – mrida

관련 문제