public static bool GenerateXmlMappings(Type type, ArrayList mappings) { if (!typeof(SoapHttpClientProtocol).IsAssignableFrom(type)) { return(false); } WebServiceBindingAttribute attribute = WebServiceBindingReflector.GetAttribute(type); if (attribute == null) { throw new InvalidOperationException(Res.GetString("WebClientBindingAttributeRequired")); } string serviceNamespace = attribute.Namespace; bool serviceDefaultIsEncoded = SoapReflector.ServiceDefaultIsEncoded(type); ArrayList soapMethodList = new ArrayList(); SoapClientType.GenerateXmlMappings(type, soapMethodList, serviceNamespace, serviceDefaultIsEncoded, mappings); return(true); }
/// <include file='doc\ClientProtocol.uex' path='docs/doc[@for="HttpWebClientProtocol.GenerateXmlMappings"]/*' /> /// <devdoc> /// <para>[To be supplied.]</para> /// </devdoc> public static bool GenerateXmlMappings(Type type, ArrayList mappings) { if (typeof(SoapHttpClientProtocol).IsAssignableFrom(type)) { WebServiceBindingAttribute binding = WebServiceBindingReflector.GetAttribute(type); if (binding == null) { throw new InvalidOperationException(Res.GetString(Res.WebClientBindingAttributeRequired)); } // Note: Service namespace is taken from WebserviceBindingAttribute and not WebserviceAttribute because // the generated proxy does not have a WebServiceAttribute; however all have a WebServiceBindingAttribute. string serviceNamespace = binding.Namespace; bool serviceDefaultIsEncoded = SoapReflector.ServiceDefaultIsEncoded(type); ArrayList soapMethodList = new ArrayList(); SoapClientType.GenerateXmlMappings(type, soapMethodList, serviceNamespace, serviceDefaultIsEncoded, mappings); return(true); } return(false); }