headersList.Add(new Header("__Uri", uri));\r
headersList.Add(new Header("__MethodName", soapMessage.MethodName));\r
string typeNamespace, assemblyName;\r
- SoapServices.DecodeXmlNamespaceForClrTypeNamespace(soapMessage.XmlNameSpace, out typeNamespace, out assemblyName);\r
\r
- _serverType = RemotingServices.GetServerTypeForUri(uri);\r
+ if (!SoapServices.DecodeXmlNamespaceForClrTypeNamespace(soapMessage.XmlNameSpace, out typeNamespace, out assemblyName))\r
+ throw new RemotingException ("Could not decode SoapMessage");\r
+\r
+ // Note that we don't need to validate the type in\r
+ // this place because MethodCall will do it anyway.\r
+\r
+ if (assemblyName == null) // corlib\r
+ _serverType = Type.GetType (typeNamespace, true);\r
+ else\r
+ _serverType = Type.GetType (typeNamespace + ", " + assemblyName, true);\r
+\r
headersList.Add(new Header("__TypeName", _serverType.FullName, false));\r
\r
if (soapMessage.Headers != null) {\r
if (signature == null)\r
_methodCallInfo = _serverType.GetMethod(soapMessage.MethodName, bflags); \r
else\r
- _methodCallInfo = _serverType.GetMethod(soapMessage.MethodName, bflags, null, signature, null); \r
+ _methodCallInfo = _serverType.GetMethod(soapMessage.MethodName, bflags, null, signature, null);\r
+ \r
+ if (_methodCallInfo == null && (soapMessage.MethodName == "FieldSetter" || soapMessage.MethodName == "FieldGetter"))\r
+ _methodCallInfo = typeof(object).GetMethod (soapMessage.MethodName, bflags);\r
\r
// the *out* parameters aren't serialized\r
// have to add them here\r
return sf;\r
}\r
\r
- internal void GetInfoFromMethodCallMessage(IMethodCallMessage mcm) {\r
+ internal void GetInfoFromMethodCallMessage (IMethodMessage mcm) {\r
_serverType = Type.GetType(mcm.TypeName, true);\r
- \r
- if (mcm.MethodSignature != null) \r
- _methodCallInfo = _serverType.GetMethod(mcm.MethodName, \r
- BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, \r
- null, (Type []) mcm.MethodSignature, null);\r
- else\r
- _methodCallInfo = _serverType.GetMethod(mcm.MethodName, \r
- BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);\r
-\r
+ _methodCallInfo = RemotingServices.GetMethodBaseFromMethodMessage (mcm) as MethodInfo;\r
_methodCallParameters = _methodCallInfo.GetParameters();\r
} \r
\r