C# 访问WSDL.EXE生成的方法的结果
您好,我已经得到了我使用visualstudio命令promt和这个命令通过WSDL生成的web服务C# 访问WSDL.EXE生成的方法的结果,c#,wsdl,asmx,C#,Wsdl,Asmx,您好,我已经得到了我使用visualstudio命令promt和这个命令通过WSDL生成的web服务 string[] ahoj = new string[] { 28156609.ToString() }; Rozhranice.StatusType[] ahoj2; Rozhranice.InformaceOPlatciType[] ahoj3; Rozhranice.rozhraniCRPDPH srv = new Rozhranice.rozhraniCRPDPH(); Stre
string[] ahoj = new string[] { 28156609.ToString() };
Rozhranice.StatusType[] ahoj2;
Rozhranice.InformaceOPlatciType[] ahoj3;
Rozhranice.rozhraniCRPDPH srv = new Rozhranice.rozhraniCRPDPH();
StreamWriter writer = new StreamWriter(@"C:\Users\marek\Desktop\spol.txt");
string abc = (srv.getStatusNespolehlivyPlatce(ahoj, out ahoj3).bezVypisuUctu.ToString());
textBox1.Text = abc;
我可以把结果称为:
但我怎样才能得到这个结果呢?
我试过这个:
string abc = (srv.getSeznamNespolehlivyPlatce(ahoj, out ahoj3).ToString());
但在……之后,我就离开了。不是从informaceOPlatciType中选择值的选项
请问我在哪里犯错误
当我尝试写srv时。(选项仅为getStatusNespolehlivyPlace和GetSeznAmnesePolehlivyplace)
如果需要提供webservice url,请告诉我
这个问题不是重复的:-这只是创建,但现在我正试图调用WSDL命令提示符生成代码之前的确切原因,请重新打开好吗
在前面提到的文章中,我试图通过SOAP发送它,现在我有了由WSDL命令提示符生成的安静的工作代码(这与前一个问题中所问的方式不同),我一直无法得到它的结果。在我看来,这是一个完全不同的问题。打电话之后
srv.getSeznamNespolehlivyPlatce(ahoj, out ahoj3)
除非方法有问题,否则应设置ahoj3
变量。以后可以像往常一样在代码中访问其属性:
ahoj3.SomeProperty.
ahoj3
是一个由Rozhranice.InformaceOPlatciType
组成的数组。您需要访问数组的每个元素才能获取内容
string[] ahoj = new string[] { "28156609" };
Rozhranice.InformaceOPlatciType[] ahoj3;
Rozhranice.rozhraniCRPDPH srv = new Rozhranice.rozhraniCRPDPH();
StatusType status = srv.getStatusNespolehlivyPlatce(ahoj, out ahoj3);
string abc = status.bezVypisuUctu.ToString(); // If it is already a string, then ToString not needed
for (int i=0; i<ahoj3.Length; i++)
{
Rozhranice.InformaceOPlatciType info = ahoj3[i];
// Do something with info.cisloFu;
// Do something with info.dic;
// etc.
}
string[]ahoj=新字符串[]{“28156609”};
Rozhranice.信息平台类型[]ahoj3;
Rozhranice.rozhraniCRPDPH srv=新的Rozhranice.rozhraniCRPDPH();
StatusType status=srv.getStatusNespolehlivyPlatce(ahoj,out ahoj3);
字符串abc=status.bezVypisuUctu.ToString();//如果已经是字符串,则不需要ToString
对于(int i=0;我非常感谢你,这对我很有帮助,我可以再问一个问题吗?我试图获得info.ZverejnenyUcetType
如下:Rozhranice.ZverejnenyUcetType[]ucet;ucet=info.zverejnenucty;textBox1.Text=ucet.ToString();
但出现以下错误:`无法隐式转换类型Rozhranice.ZverejnenyUcetType[]我相信这是因为
ZverejnenyUcetType`在数组
中。我可以请求帮助将此转换为数组吗?再次感谢。这不是转换。如果是数组,则必须索引到其中。数组具有长度属性,每个数组都有一个数组项。如果长度
为2,则第有[0]
和[1]
。请学习一些C#的基础知识。