Pārlūkot izejas kodu

2006-11-15 Atsushi Enomoto <[email protected]>

	* WebService.cs: minor API fixes (attributes).

	* ServiceDescriptionImporter.cs : API fix. Now we can use new
	  WebReferenceOptions.

	* DiscoveryReference.cs: FilenameFromUrl() is public.

	* SoapHeaderException.cs, SoapException.cs, SoapFaultSubcode.cs,
	  Soap12FaultCodes.cs : API fixes, mostly for SoapFaultSubCode.

	* MonoWSDL2.cs : 2.0 API fixes (use WebReferenceOptions)


svn path=/trunk/mcs/; revision=67882
Atsushi Eno 19 gadi atpakaļ
vecāks
revīzija
fa773d3e17

+ 5 - 0
mcs/class/System.Web.Services/System.Web.Services.Description/ChangeLog

@@ -1,3 +1,8 @@
+2006-11-15  Atsushi Enomoto  <[email protected]>
+
+	* ServiceDescriptionImporter.cs : API fix. Now we can use new
+	  WebReferenceOptions.
+
 2006-11-14  Atsushi Enomoto  <[email protected]>
 
 	* WebReferenceOptionsSerializer.cs : oops, surrounding #if NET_2_0

+ 4 - 16
mcs/class/System.Web.Services/System.Web.Services.Description/ServiceDescriptionImporter.cs

@@ -170,24 +170,12 @@ namespace System.Web.Services.Description {
 		
 #if NET_2_0
 
+		[MonoTODO] // where to use Verbose and Extensions in options?
 		public static StringCollection GenerateWebReferences (
 			WebReferenceCollection webReferences, 
-			CodeGenerationOptions options, 
-			ServiceDescriptionImportStyle style, 
-			CodeDomProvider codeGenerator)
-		{
-			CodeCompileUnit codeCompileUnit = new CodeCompileUnit ();
-			return GenerateWebReferences (webReferences, options, style, codeGenerator, codeCompileUnit, false);
-		}
-
-		[MonoTODO ("verbose?")]
-		public static StringCollection GenerateWebReferences (
-			WebReferenceCollection webReferences, 
-			CodeGenerationOptions options, 
-			ServiceDescriptionImportStyle style, 
 			CodeDomProvider codeGenerator, 
 			CodeCompileUnit codeCompileUnit, 
-			bool verbose)
+			WebReferenceOptions options)
 		{
 			StringCollection allWarnings = new StringCollection ();
 			ImportContext context = new ImportContext (new CodeIdentifiers(), true);
@@ -196,9 +184,9 @@ namespace System.Web.Services.Description {
 			{
 				ServiceDescriptionImporter importer = new ServiceDescriptionImporter ();
 				importer.CodeGenerator = codeGenerator;
-				importer.CodeGenerationOptions = options;
+				importer.CodeGenerationOptions = options.CodeGenerationOptions;
 				importer.Context = context;
-				importer.Style = style;
+				importer.Style = options.Style;
 				importer.ProtocolName = reference.ProtocolName;
 				
 				importer.AddReference (reference);

+ 4 - 0
mcs/class/System.Web.Services/System.Web.Services.Discovery/ChangeLog

@@ -1,3 +1,7 @@
+2006-11-15  Atsushi Enomotot  <[email protected]>
+
+	* DiscoveryReference.cs: FilenameFromUrl() is public.
+
 2006-10-18  Atsushi Enomotot  <[email protected]>
 
 	* SchemaReference.cs,

+ 1 - 1
mcs/class/System.Web.Services/System.Web.Services.Discovery/DiscoveryReference.cs

@@ -86,7 +86,7 @@ namespace System.Web.Services.Discovery {
 
 		#region Methods
 
-		protected static string FilenameFromUrl (string url)
+		public static string FilenameFromUrl (string url)
 		{
 			if (url.ToLower().EndsWith ("/wsdl"))
 				url = url.Substring (0,url.Length-5);

+ 5 - 0
mcs/class/System.Web.Services/System.Web.Services.Protocols/ChangeLog

@@ -1,3 +1,8 @@
+2006-11-15  Atsushi Enomoto  <[email protected]>
+
+	* SoapHeaderException.cs, SoapException.cs, SoapFaultSubcode.cs,
+	  Soap12FaultCodes.cs : API fixes, mostly for SoapFaultSubCode.
+
 2006-11-14  Atsushi Enomoto  <[email protected]>
 
 	* SoapHttpClientProtocol.cs : 2.0 API fix (WsiClaims -> WsiProfiles).

+ 1 - 1
mcs/class/System.Web.Services/System.Web.Services.Protocols/Soap12FaultCodes.cs

@@ -43,7 +43,7 @@ namespace System.Web.Services.Protocols
 		public static readonly XmlQualifiedName DataEncodingUnknownFaultCode 
 			= new XmlQualifiedName ("DataEncodingUnknown", "http://www.w3.org/2003/05/soap-envelope");
 			
-		public static readonly XmlQualifiedName EncodingMissingIDFaultCode
+		public static readonly XmlQualifiedName EncodingMissingIdFaultCode
 			= new XmlQualifiedName ("MissingID", "http://www.w3.org/2003/05/soap-encoding");
 			
 		public static readonly XmlQualifiedName EncodingUntypedValueFaultCode

+ 5 - 5
mcs/class/System.Web.Services/System.Web.Services.Protocols/SoapException.cs

@@ -53,7 +53,7 @@ namespace System.Web.Services.Protocols
 #if NET_2_0
 		string lang;
 		string role;
-		SoapFaultSubcode subcode;
+		SoapFaultSubCode subcode;
 #endif
 		#endregion
 
@@ -102,14 +102,14 @@ namespace System.Web.Services.Protocols
 		}
 
 #if NET_2_0
-		public SoapException (string message, XmlQualifiedName code, SoapFaultSubcode subcode)
+		public SoapException (string message, XmlQualifiedName code, SoapFaultSubCode subcode)
 			: base (message)
 		{
 			this.code = code;
 			this.subcode = subcode;
 		}
 		
-		public SoapException (string message, XmlQualifiedName code, string actor, string role, XmlNode detail, SoapFaultSubcode subcode, Exception innerException)
+		public SoapException (string message, XmlQualifiedName code, string actor, string role, XmlNode detail, SoapFaultSubCode subcode, Exception innerException)
 			: base (message, innerException)
 		{
 			this.code = code;
@@ -119,7 +119,7 @@ namespace System.Web.Services.Protocols
 			this.role = role;
 		}
 		
-		public SoapException (string message, XmlQualifiedName code, string actor, string role, string lang, XmlNode detail, SoapFaultSubcode subcode, Exception innerException)
+		public SoapException (string message, XmlQualifiedName code, string actor, string role, string lang, XmlNode detail, SoapFaultSubCode subcode, Exception innerException)
 		{
 			this.code = code;
 			this.subcode = subcode;
@@ -187,7 +187,7 @@ namespace System.Web.Services.Protocols
 		}
 		
 		[System.Runtime.InteropServices.ComVisible(false)]
-		public SoapFaultSubcode SubCode {
+		public SoapFaultSubCode SubCode {
 			get { return subcode; }
 		}
 		

+ 6 - 5
mcs/class/System.Web.Services/System.Web.Services.Protocols/SoapFaultSubcode.cs

@@ -34,17 +34,18 @@ using System.Xml;
 
 namespace System.Web.Services.Protocols 
 {
-	public class SoapFaultSubcode
+	[Serializable]
+	public class SoapFaultSubCode
 	{
 		XmlQualifiedName _code;
-		SoapFaultSubcode _subcode;
+		SoapFaultSubCode _subcode;
 		
-		public SoapFaultSubcode (XmlQualifiedName code)
+		public SoapFaultSubCode (XmlQualifiedName code)
 		{
 			_code = code;
 		}
 		
-		public SoapFaultSubcode (XmlQualifiedName code, SoapFaultSubcode subcode)
+		public SoapFaultSubCode (XmlQualifiedName code, SoapFaultSubCode subcode)
 		{
 			_code = code;
 			_subcode = subcode;
@@ -54,7 +55,7 @@ namespace System.Web.Services.Protocols
 			get { return _code; }
 		}
 
-		public SoapFaultSubcode Subcode {
+		public SoapFaultSubCode SubCode {
 			get { return _subcode; }
 		}
 

+ 2 - 2
mcs/class/System.Web.Services/System.Web.Services.Protocols/SoapHeaderException.cs

@@ -67,7 +67,7 @@ namespace System.Web.Services.Protocols
 			string actor, 
 			string role, 
 			string lang, 
-			SoapFaultSubcode subcode, 
+			SoapFaultSubCode subcode, 
 			Exception innerException)
 			
 		: base (message, code, actor, role, lang, null, subcode, innerException)
@@ -80,7 +80,7 @@ namespace System.Web.Services.Protocols
 			XmlQualifiedName code, 
 			string actor, 
 			string role, 
-			SoapFaultSubcode subcode, 
+			SoapFaultSubCode subcode, 
 			Exception innerException)
 			
 		: base (message, code, actor, role, null, subcode, innerException)

+ 4 - 0
mcs/class/System.Web.Services/System.Web.Services/ChangeLog

@@ -1,3 +1,7 @@
+2006-11-15  Atsushi Enomoto  <[email protected]>
+
+	* WebService.cs: minor API fixes (attributes).
+
 2006-11-14  Atsushi Enomoto  <[email protected]>
 
 	* WebServiceBindingAttribute.cs, WebServiceAttribute.cs :

+ 4 - 1
mcs/class/System.Web.Services/System.Web.Services/WebService.cs

@@ -54,6 +54,7 @@ namespace System.Web.Services {
 		#region Properties
 
 		[Browsable (false)]
+		[Description ("The ASP.NET application object for the current request.")]
 		[WebServicesDescription ("The ASP.NET application object for the current request.")]
 		[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
 		public HttpApplicationState Application {
@@ -90,7 +91,9 @@ namespace System.Web.Services {
 
 #if NET_2_0
 		[MonoTODO]
-		public virtual System.Web.Services.Protocols.SoapProtocolVersion SoapVersion {
+		[Browsable (false)]
+		[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
+		public System.Web.Services.Protocols.SoapProtocolVersion SoapVersion {
 			get { throw new NotImplementedException (); }
 		}
 #endif

+ 4 - 0
mcs/tools/wsdl/ChangeLog

@@ -1,3 +1,7 @@
+2006-11-15  Atsushi Enomoto  <[email protected]>
+
+	* MonoWSDL2.cs : 2.0 API fixes (use WebReferenceOptions)
+
 2006-11-14  Atsushi Enomoto  <[email protected]>
 
 	* MonoWSDL2.cs : 2.0 API fixes (WsiClaims -> WsiProfiles)

+ 5 - 1
mcs/tools/wsdl/MonoWSDL2.cs

@@ -174,7 +174,11 @@ namespace Mono.WebServices
 			CodeDomProvider provider = GetProvider();
 				
 			StringCollection validationWarnings;
-			validationWarnings = ServiceDescriptionImporter.GenerateWebReferences (references, options, style, provider, codeUnit, verbose);
+			WebReferenceOptions opts = new WebReferenceOptions ();
+			opts.CodeGenerationOptions = options;
+			opts.Style = style;
+			opts.Verbose = verbose;
+			validationWarnings = ServiceDescriptionImporter.GenerateWebReferences (references, provider, codeUnit, opts);
 			
 			for (int n=0; n<references.Count; n++)
 			{