* roottypes.cs: Rename from tree.cs.
[mono.git] / mcs / class / System.Web.Services / Test / standalone / server / ConvDocLitWra.asmx
index 8c5dadf59cbc68311be9069097f9a874e822290c..ac17f8f2aa01f939de79b2d500ffbc5bb8654212 100644 (file)
@@ -1,7 +1,13 @@
 <%@ 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;
@@ -43,6 +49,11 @@ namespace WebServiceTests
                static Hashtable conversionTable;
                
                public UserInfo userInfo;
+               
+               public SoapHeader unknown1;
+               public SoapHeader[] unknown2;
+               public SoapUnknownHeader unknown3;
+               public SoapUnknownHeader[] unknown4;
 
                static ConverterService ()
                {
@@ -136,7 +147,7 @@ namespace WebServiceTests
                }
                
                [WebMethod]
-               public  System.Collections.Specialized.StringCollection TestArrays (string[] info, string lang)
+               public System.Collections.Specialized.StringCollection TestArrays (string[] info, string lang)
                {
                        return null;
                }
@@ -146,5 +157,69 @@ namespace WebServiceTests
                        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";
        }
 }