Hi ironpython,

Here's your Daily Digest of new issues for project "IronPython".

In today's digest:ISSUES

1. [New issue] How to access public interface in .NET DLL

----------------------------------------------

ISSUES

1. [New issue] How to access public interface in .NET DLL
http://ironpython.codeplex.com/workitem/31661
User hpweiss has proposed the issue:

"The following interface is defined by the generatedProxy.cs file for my WCS 
Service

[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", 
"4.0.0.0")]
public interface IAssayServiceContractCallback
{
    
    [System.ServiceModel.OperationContractAttribute(IsOneWay=true, 
Action="http://XFEService/IAssayServiceContract/AvailableAssaysChangeNotification";)]
    void AvailableAssaysChangeNotification();
}

When I look in ildasm, I see the following

___[MOD] C:\_CodeElements\XFE\XFEServiceModel.dll
.....
   |
   |___[INT] IAssayServiceContractCallback
   |   |     .class interface public abstract auto ansi 
   |   |     .custom instance void 
[System]System.CodeDom.Compiler.GeneratedCodeAttribute::.ctor(string, ...
   |   |___[MET] AvailableAssaysChangeNotification : void()
   |
 .....

Namely, that IAssayServiceContractCallback is defined publicly in the .DLL 
corresponding to the .NET assembly

Similarly, the Object Browser tells me that IAssayServiceContractCallback is a 
public interface not defined within any Class

In IronPython, when I type from, IAssayServiceContractCallback is displayed in 
the dropdown list, but I unable to import from that symbol

e.g.

from IAssayServiceContractCallback import *

returns 

Unexpected error: (<type 'exceptions.ImportError'>, ImportError('no module 
named IAssayServiceContractCallback',), <traceback object at 
0x000000000000002B>)

and if I try to create a class derived from IAssayServiceContractCallback

   class CallbackHandler(IAssayServiceContractCallback):
        def AvailableAssaysChangeNotification(self):
           pass

IronPython reports: Unexpected error: (<type 'exceptions.NameError'>, 
NameError("global name 'IAssay erviceContractCallback' is not defined",), 
<traceback object at 0x000000000000002C>)

Is there a workaround?"
----------------------------------------------



----------------------------------------------
You are receiving this email because you subscribed to notifications on 
CodePlex.

To report a bug, request a feature, or add a comment, visit IronPython Issue 
Tracker. You can unsubscribe or change your issue notification settings on 
CodePlex.com.
_______________________________________________
Ironpython-users mailing list
Ironpython-users@python.org
http://mail.python.org/mailman/listinfo/ironpython-users

Reply via email to