470,815 Members | 1,290 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,815 developers. It's quick & easy.

Have Problem while invoking a method in C# Web Services ... Urgen

Hi all,

I create a Web Service project called 'eSelectService' and another Class
Library project called 'MonerisVO', and a Windows Form project called 'maps'
as well.

The reason why I need the Class Library project is because I don't want to
pass more than 30 parameters when I try to invoke the Web Method. I used the
class in Class Library as a value object to contain all the information I

Here is the problem:

When I debug the Web Service project, I add the Class Library project's
output (Trans.dll) as a reference. Everything works fine.
But when I want to invoke the Web Service via my Windows Form project the
compiler says "cannot convert the MonerisVO.ValueObject from
eSelectService.ValueObject." So I remove the Trans.dll from the Windows Form
project's references. But the new problem is I cannot see the methods in
Trans.dll, even the overloaded constructor.

My guess is maybe I get some configuration options wrong.

Here are the codes:
Here is the source code:

//Web Services
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Web;
using System.Web.Services;
using MonerisVO;

namespace eSelectService
public class GateWay : System.Web.Services.WebService
public GateWay()

public string test(string host, Trans tr)
//Can invoke the method here in the Web Services.
return "host=" + host
+ ", order_id=" + tr.OrderID
+ ", amount=" + tr.TotalAmount;

//Web Forms
using eSelectService;


private void btStart_Click(object sender, System.EventArgs e)
eSelectService.GateWay gt = new eSelectService.GateWay();
eSelectService.Trans = new eSelectService.Trans();
trans.Init("order_id_test", "4.01");
MessageBox.Show(" result=" + gt.process);

//Class Library: Trans.class


public class Trans
private string order_id;
private string amt;

public TransactionVO(){}

public string OrderID
return order_id;
order_id = OrderID;

public string TotalAmount
return amt;
amt = OrderID;
public Init(string id, string amt)
this.orderID = id;
this.TotalAmount = amt;

Is there anybody has the same problem like me? Or is there any good ideas?
Please help me out.

Thanks a lot.


Nov 23 '05 #1
0 1230

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Java Web Services | last post: by
5 posts views Thread by mahesh.nimbalkar | last post: by
3 posts views Thread by Rotsey | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.