내 웹 응용 프로그램에서 'BL_Customer'클래스의 클래스 객체 'obj'를 내 웹 서비스 (ASMX)의 'Insert()'함수에 전달한 다음 해당 속성에 액세스 할 수 있습니까? 웹 서비스의 객체? 원격 웹 서비스를 'Add WebReference'기능에 포함 시켰습니다. 나는 'WebRererence 사용하기'를 포함 시켰습니다. 네임 스페이스도. 어떤 도움을 주시면 감사하겠습니다.클래스 객체를 WebService에 전달하는 방법
이다 비즈니스 계층에서 내 BL_Customer 클래스 : 데이비드
public class Service : System.Web.Services.WebService
{
public Service() {
}
[WebMethod]
public string insert(**What should be here?**)
{
-----
-----
}
}
안부, : 이것은 내 웹 서비스입니다
public class DAL_Customer
{
public SqlConnection con = new SqlConnection();
WebReference.Service objWEB = new WebReference.Service(); //objWEB -> Webservice object
Connection c = new Connection();
public DAL_Customer()
{
}
public int Customer_Insert(BL_Customer obj)
{
---------
---------
return objWEB.Insert(obj); // Insert() is a function in my remote webservice
}
}
:
public class BL_Customer
{
public BL_Customer()
{
}
string c_Cust_Name = string.Empty;
string c_Mobile_no = string.Empty;
public string Cust_Name
{
get { return c_Cust_Name; }
set { c_Cust_Name = value; }
}
public string Mobile_no
{
get { return c_Mobile_no; }
set { c_Mobile_no = value; }
}
}
이 내 데이터 액세스 레이어입니다
ASMX 웹 서비스 또는 WCF? – Damith
@UnhandledException asmx –