<%@ WebService Language="c#" Codebehind="ConverterService.asmx.cs" Class="WebServiceTests.ConverterService" %>
+/*
+WARNING: This code was generated by a tool.
+Changes to this file will be lost if the code is regenerated
+*/
+
using System;
using System.Collections;
+using System.Xml;
using System.Xml.Serialization;
using System.Web.Services;
using System.Web.Services.Protocols;
static Hashtable conversionTable;
public UserInfo userInfo;
+
+ public SoapHeader unknown1;
+ public SoapHeader[] unknown2;
+ public SoapUnknownHeader unknown3;
+ public SoapUnknownHeader[] unknown4;
static ConverterService ()
{
}
[WebMethod]
- public System.Collections.Specialized.StringCollection TestArrays (string[] info, string lang)
+ public System.Collections.Specialized.StringCollection TestArrays (string[] info, string lang)
{
return null;
}
if (userInfo == null)
throw new SoapException ("User not logged", SoapException.ServerFaultCode);
}
+
+ [WebMethod]
+ [return: XmlElement("retret")]
+ public MyInfo GetTestInfo (string s, out string d)
+ {
+ d = "iii";
+ return new MyInfo();
+ }
+
+ [SoapHeaderAttribute ("unknown1")]
+ [WebMethod]
+ public void TestUnknownHeader1 ()
+ {
+ if (unknown1 == null)
+ throw new Exception ("Header is null");
+
+ if (unknown1.Actor != "hi")
+ throw new Exception ("Invalid actor");
+ }
+
+ [SoapHeaderAttribute ("unknown2")]
+ [WebMethod]
+ public void TestUnknownHeader2 ()
+ {
+ if (unknown2 == null || unknown2.Length != 1)
+ throw new Exception ("Header is null");
+
+ if (unknown2[0].Actor != "hi")
+ throw new Exception ("Invalid actor");
+ }
+
+ [SoapHeaderAttribute ("unknown3")]
+ [WebMethod]
+ public int TestUnknownHeader3 ()
+ {
+ if (unknown3 == null)
+ throw new Exception ("Header is null");
+
+ if (unknown3.Actor != "hi")
+ throw new Exception ("Invalid actor");
+
+ XmlElement child = unknown3.Element ["userId"];
+ return int.Parse (child.InnerText);
+ }
+
+ [SoapHeaderAttribute ("unknown4")]
+ [WebMethod]
+ public int TestUnknownHeader4 ()
+ {
+ if (unknown4 == null || unknown4.Length != 1)
+ throw new Exception ("Header is null");
+
+ if (unknown4[0].Actor != "hi")
+ throw new Exception ("Invalid actor");
+
+ XmlElement child = unknown4[0].Element ["userId"];
+ return int.Parse (child.InnerText);
+ }
+ }
+
+ public class MyInfo
+ {
+ public int a = 4;
+ public string b = "hi";
}
}