Uploaded image for project: 'Spring.NET'
  1. Spring.NET
  2. SPRNET-1416

Fixed Spring.ServiceModel.ServiceExporter

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.0, 1.3.1
    • Fix Version/s: 1.3.2
    • Component/s: Spring-NET-SERVICES
    • Labels:
      None

      Description

      The proxy type created in the method GenerateProxy() does not have its __objectFactory field set. This results in a reference null exception when the emitted constructor code is invoked.

      Until the bug is resolved one can circumvent the problem by using a class derived from Spring.ServiceModel.ServiceExporter and overriding the GenerateProxy() method like so:

      protected override void GenerateProxy()
      {
      base.GenerateProxy();
      Type proxyType = typeof(ServiceExporter).GetField("proxyType", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this) as Type;
      proxyType.GetField("__objectFactory", BindingFlags.NonPublic | BindingFlags.Static).SetValue(proxyType, objectFactory);
      }

        Attachments

          Activity

            People

            • Assignee:
              bbaia Bruno Baia
              Reporter:
              hlernbeiss Harald Lernbeiss
            • Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: