问题描述
这是我的Imathservice代码
This is my Imathservice code
[ServiceContract]
public interface IMathService
{
[OperationContract]
void DoWork();
[OperationContract]
int add(int x, int y);
[OperationContract]
int mul(int x, int y);
}
-------------------------------------------------- -
这是我的隐式接口函数
----------------------------------------------------
This is my implimented interface functions
public class MathService : IMathService
{
public void DoWork()\\system defined function
{
}
public int add(int x, int y)
{
return (x + y);
} \\these two function are my own function
public int mul(int x, int y)
{
return (x * y);
}
}
-------------------------------------------------- ---
我将服务参考添加到了我的cilent项目中,并创建了所需的文件
在我的客户项目中,例如(Reference.svcmap,.svcinfo,.svcinfo,.disco,.wsdl,.xsd)
并在我的项目中完美创建了这些文件.
然后我在client.cs文件中创建对象,直到一切正常....
我只能访问系统定义的文件"DoWork",而我不能访问定义的两个函数[add(),mull()]....
谁能帮我一个忙..怎么办.....
感谢®ards
mahesh
-----------------------------------------------------
I added service reference into my cilent project and required files are created
in my client proj like(Reference.svcmap,.svcinfo,.svcinfo,.disco,.wsdl,.xsd)
and these files perfectly created in my project.
And i created object in client.cs file untill it is okay....
i am able to access only system defined files that is "DoWork" and i not able to access those two function which i defined that is [add() ,mull()]....
Can any one help me out....How it can be done.....
thanks®ards
mahesh
推荐答案
这篇关于我无法访问客户端网页中的[operationcontract]服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!