public SoapTypeStubInfo (LogicalTypeInfo logicalTypeInfo)
: base (logicalTypeInfo)
{
xmlImporter = new XmlReflectionImporter ();
soapImporter = new SoapReflectionImporter ();
if (typeof (SoapHttpClientProtocol).IsAssignableFrom (Type))
{
if (Bindings.Count == 0 || ((BindingInfo)Bindings[0]).WebServiceBindingAttribute == null)
throw new InvalidOperationException ("WebServiceBindingAttribute is required on proxy class '" + Type + "'.");
if (Bindings.Count > 1)
throw new InvalidOperationException ("Only one WebServiceBinding attribute may be specified on type '" + Type + "'.");
}
object [] o = Type.GetCustomAttributes (typeof (SoapDocumentServiceAttribute), false);
if (o.Length == 1){
SoapDocumentServiceAttribute a = (SoapDocumentServiceAttribute) o [0];
ParameterStyle = a.ParameterStyle;
SoapBindingStyle = SoapBindingStyle.Document;
} else {
o = Type.GetCustomAttributes (typeof (SoapRpcServiceAttribute), false);
if (o.Length == 1){
ParameterStyle = SoapParameterStyle.Wrapped;
SoapBindingStyle = SoapBindingStyle.Rpc;
} else {
ParameterStyle = SoapParameterStyle.Wrapped;
SoapBindingStyle = SoapBindingStyle.Document;
}
}
if (ParameterStyle == SoapParameterStyle.Default) ParameterStyle = SoapParameterStyle.Wrapped;
xmlImporter.IncludeTypes (Type);
soapImporter.IncludeTypes (Type);
#if MOBILE || XAMMAC_4_5
SoapExtensions = new SoapExtensionRuntimeConfig [2][];
#else
SoapExtensions = SoapExtension.GetTypeExtensions (Type);
#endif
}