Type casting for properties accessed in COM Object

I have a com object that I need to access which provides my a
list of addresses in an Array. The object give me a property that
has a count for the number of addresses and then I have a loop that
calls the property which contains the address details to get each
individual address each time passing to the property the INDEX
value on the loop.
This errors out each time.
The error I get is
Error casting an object of type to an incompatible type.
This usually indicates a programming error in Java, although it
could also mean you have tried to use a foreign object in a
different way than it was designed.
It appears the the variable type of the index is not
compatible with the property of the component(which is an int).
IS there some way to type cast the variable used as the index
for CFLOOP to that of an INT?

You can try to use the JavaCast("int", myValue) function. It
works great for Java objects, but I'm not sure how well it will
work for COM. Worth a try, I guess.
In your case it would be something like:
<cfobject type="COM" context="INPROC" action="create"
name="MR" class="DLLNAME">
<cfloop from="1" to="#AddressCount#" index="i">
<cfset VDname = mr.vdsname(JavaCast("int", i))>
<cfset VDaddress = mr.vdsaddress(JavaCast("int", i))#>
<cfset VDXML = mr.VDSXML(JavaCast("int", i))>
</cfloop>

Similar Messages

  • How to use jacob to access a com object with coldfusion7

    i want to use jacob to access a com objcet with coldfsuion7(i
    just want to do a test)
    how to do?
    Thank a lot!

    Flashcqxg wrote:
    > i want to use jacob to access a com objcet with
    coldfsuion7(i just want to do a test)
    > how to do?
    you don't. use createObject():
    mailer=createObject("COM","CDONTS.NewMail");
    http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=cfobject_08.html

  • Using VI server from DIAdem script :: Syntax (documenta​tion) for properties and methods of VI Server objects (for non-labvie​w programmer​s)

    Hello all,
    I am using DIAdem 10.0 Advanced, LabVIEW 8.0 PDS. I would like to start a LabVIEW IHM from a VBS script. I use VI Server to call my VI from DIAdem.
    Here is the script and the VI I use (VI attached):
    Dim lvapp, vi, viPath, paramName(1), paramVal(1)
    Set lvapp = CreateObject("LabVIEW.Application")
    viPath = "C:\TEST\test.vi"
    Set vi = lvapp.GetVIReference(viPath)
    vi.FPWinOpen = True
    paramName(0) = "Input"
    paramVal(0) = 10
    paramName(1) = "Output"
    paramVal(1) = 0
    Call vi.Call(paramName, paramVal)
    Call lvapp.Quit()
    I found a similar example on your web site.
    Question 1:
    I need to know the syntax for all the other properties and methods of a VI object (method like Get or Set Control Value for example).
    Is a documentation (other than the LabVIEW help which is dedicated for LV programmers) exist in order to be able to use all the features of VI Server from another environment (CVI, VB, ...)?
    Question 2:
    Is it possible to call a VI with VI Server with the parameter "Wait until done" to FALSE? (run a VI asynchronuously from DIAdem)
    Thanks for your answer.
    MatthieuG
    Eurilogic
    Attachments:
    Test.vi ‏9 KB

    Hello,
    I finally found a way to get the documentation of VI Server. I can view the "LabVIEW.TLB" type library file with a OLE/COM Object Viewer (a utility from the Windows SDK).

  • How can I use a COM object that does not have a type library?

    Hello,
    I've created a com server in python for which I do not have a type library. I am able to call functions for this application in Python, TCL, I'm sure VB, etc. without the type library.
    Must I have a type library registered to use this COM object with Labview? I was hoping I could simply supply the name to the refnum (or the GUID) then call functions by passings strings to the invoke node. This does not seem to be possible - am I missing something?
    In the event that I cannot use a com server without a type library. Any recommendataions on how to create one? I'm wondering if I can use the same GUID and create a shell in LabWindows which generates the IDL/TBD file I need for Labview to see my
    com server.
    Any help is greatly appreciated.
    73,
    Timothy

    Timothy Toroni wrote:
    > Thanks for the info, however their example is labview server and
    > python client. I'm going the other way. It's good to know about
    > LabPython though...
    >
    > As of now, it seems to be there is no way to use a COM object without
    > a type library from inside LabView.
    Yes that is true. LabVIEW needs that to configure the Property and
    Methode Nodes correctly. Otherwise it would need to have a special
    Property and Method Node with a configuration dialog similar to the Call
    Library Node, but a LOT more complicated. Not sure many people could
    make use of that, and it would be a very tiring experience trying to get
    things setup in that way, by going through the edit, test, and crash
    cycle over and over again.
    Rolf Kalberm
    atter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Call MS com object via SOAP from WLS 6.1

    I generated a WSDL file for a Microsoft com object and can easily write a WL
    web service that calls it using Workshop 7.0. But I need to deploy it on a
    WLS 6.1 server. (I was hoping that Workshop would simply generate the source
    code required for accessing the com object via soap, which I could then cut
    and paste into my own source, but it doesn't do that.)
    Does anyone have an example of how to do this?

    Hi Mel,
    You said that you want to "deploy it on WLS 6.1", but I think what you really
    meant is that you want a J2EE component (i.e. JSP, Servlet, EJB, etc.) running
    in WLS 6.1 to consume the WSDL you created from the COM object, right?
    If so, the web services package in WLS 6.1 can be used to do this :-) If you tell
    me what type of J2EE component (i.e. JSP, Servlet, EJB, etc.) you want to be the
    client, I'll provide you with some sample code. Also, be sure you attach the WSDL
    that was generated, because WLS 6.1's WSDL processor isn't as complete as the
    one in WLS 7.0 and Workshop :-)
    Regards,
    Mike Wooten
    "Mel Werbow" <[email protected]> wrote:
    I generated a WSDL file for a Microsoft com object and can easily write
    a WL
    web service that calls it using Workshop 7.0. But I need to deploy it
    on a
    WLS 6.1 server. (I was hoping that Workshop would simply generate the
    source
    code required for accessing the com object via soap, which I could then
    cut
    and paste into my own source, but it doesn't do that.)
    Does anyone have an example of how to do this?

  • Passing SAFEARRAY of UDTs to a COM object

    Hi there,
    I am trying to interface with a legacy COM application from a Java client using
    jCOM. One of the methods of the COM program takes an input which is a VARIANT
    containg a SAFEARRAY of a custom type. The custom type is a simple structure
    consisting of two 'doubles'.
    The relevant bits of the IDL file looks like this (reverse engineered using OLEView):
    uuid(19CFAB24-06AC-11D7-9C30-0050DA7B5DE3),
    version(1.0),
    helpstring("XXX 1.0 Type Library")
    library XxxLib
    // TLib : // TLib : OLE Automation : {00020430-0000-0000-C000-000000000046}
    importlib("stdole2.tlb");
    // Forward declare all types defined in this typelib
    interface IXxx;
    typedef [uuid(2EC68D72-0780-11D7-9C31-0050DA7B5DE3), helpstring("UNNAMED_POINT
    struct")]
    struct tagUNNAMED_POINT {
    double latitude;
    double longitude;
    } UNNAMED_POINT;
    uuid(19CFAB31-06AC-11D7-9C30-0050DA7B5DE3),
    helpstring("Xxx Class")
    coclass Xxx {
    [default] interface IXxx;
    odl,
    uuid(19CFAB30-06AC-11D7-9C30-0050DA7B5DE3),
    helpstring("IXxx Interface")
    interface IXxx : IUnknown {
    [helpstring("Set the points for a line symbol on the named overlay")]
    HRESULT _stdcall SetLineSymbol(
    [in] BSTR display_name,
    [in] BSTR line_type,
    [in] BSTR overlay_name,
    [in] VARIANT points);
    The parameter 'VARIANT points' is a SAFEARRAY containing an array of UNNAMED_POINTs.
    The problem I am having is that the COM client returns COM error 0x80070057 -
    Invalid arguments. Unfortunately I do not have access to the COM source code.
    I have, however, tried creating a test utility with the same function prototype
    so that I can debug it in Visual Studio. This shows that the VARIANT is being
    sent correctly as a SAFEARRAY with the correct number of elements but the contents
    of it are rubbish.
    Has anyone else had this problem, or is there a way round it? We have accessed
    the COM object successfully from a C++ client.
    Thanks in advance,
    Tim

    Assuming you have the pieces of information that need to go into the array, convert each one into a variant using the built-in LV function. Next, combine all the resulting variants into an array using an array builder. Finally wire the array of variants to the com object terminal where you need it.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Calling COM objects

    I have client HTML forms sending info to the middle tier. On the middle tier are Microsoft COM objects that have the business logic. The middle tier is Windows NT.
    Previously, Microsoft IIS was the applications server and ASP was used to access the COM objects.
    How can I use Oracle9i Application Server to call the COM objects? I suppose that I could receive the client input in a java servlet and make CORBA calls via a CORBA-COM bridge to the COM objects. Is there a better solution? If I have to do the CORBA-COM, anything I should look out for? I suppose the performance can't be very good over that many layers.
    null

    Hi John,
    Thanks for the reply.
    I have already looked into those topics which talks about Jintegra( com2java tool) and EZ Jcom .Basically these generate the java proxy classes, which is tedious to manage.
    In asp we have something like Server.createObject(...). Is there anything similar to this in jspx?
    Regards,
    Asha

  • DataNavigator: numeric type cast

    I have a simple data form of jTextField1, jTextField2 and TextField3.
         jTextField1's document = nBCachedRowSet1: id (integer, primary key)
         jTextField2's document = nBCachedRowSet1: name (string type)
         jTextField3's document = nBCachedRowSet1: price (numeric type)
    I'm using DataNavigator to manipulate all records.
    The problem occured when I edit jTextField2 (name) and update it.
    The error message is ...
    ERROR: Unable to identify an operator '=' for types 'numeric' and 'double precision'
    You will have to retype this query using an explicit cast
    java.sql.SQLException: acceptChanges Failed
    at sun.jdbc.rowset.CachedRowSet.acceptChanges(CachedRowSet.java:791)
    at org.netbeans.lib.sql.NBCachedRowSet.acceptChangesInternal(NBCachedRowSet.java:712)
    This message told me to cast NUMERIC type BUT I have no idea.
    HOW to cast
    WHERE to code
    WHAT type to cast to ?

    private void initComponents() {
    connectionSource1 = new org.netbeans.lib.sql.ConnectionSource();
    try {
    nBCachedRowSet1 = new org.netbeans.lib.sql.NBCachedRowSet();
    } catch (java.sql.SQLException e1) {
    e1.printStackTrace();
    dataNavigator1 = new org.netbeans.lib.sql.DataNavigator();
    jScrollPane1 = new javax.swing.JScrollPane();
    jTable1 = new javax.swing.JTable();
    connectionSource1.setDatabase("jdbc:postgresql://localhost/drugstore004");
    connectionSource1.setDriver("org.postgresql.Driver");
    connectionSource1.setPassword("028a061f882763ad48ddbc977f45e2eca7c8cc685ab9", true);
    connectionSource1.setUsername("Sup");
    nBCachedRowSet1.setCommand("select * from trade");
    nBCachedRowSet1.setConnectionSource(connectionSource1);
    try {
    nBCachedRowSet1.setTableName("trade");
    } catch (java.sql.SQLException e1) {
    e1.printStackTrace();
    nBCachedRowSet1.addInsertRowListener(new org.netbeans.lib.sql.InsertRowListener() {
    public void rowInserted(javax.sql.RowSetEvent evt) {
    nBCachedRowSet1RowInserted(evt);
    addWindowListener(new java.awt.event.WindowAdapter() {
    public void windowClosing(java.awt.event.WindowEvent evt) {
    exitForm(evt);
    dataNavigator1.setRowSet(nBCachedRowSet1);
    getContentPane().add(dataNavigator1, java.awt.BorderLayout.NORTH);
    jTable1.setModel(new org.netbeans.lib.sql.models.TableModel(nBCachedRowSet1, new org.netbeans.lib.sql.models.TableModel.Column[] {
    new org.netbeans.lib.sql.models.TableModel.Column("id", "Id", false),
    new org.netbeans.lib.sql.models.TableModel.Column("name", "Name", true),
    new org.netbeans.lib.sql.models.TableModel.Column("admin", "Admin", true),
    new org.netbeans.lib.sql.models.TableModel.Column("formular", "Formular", true),
    new org.netbeans.lib.sql.models.TableModel.Column("company", "Company", true),
    new org.netbeans.lib.sql.models.TableModel.Column("price", "Price", true),
    new org.netbeans.lib.sql.models.TableModel.Column("addiction", "Addiction", true),
    new org.netbeans.lib.sql.models.TableModel.Column("minimum", "Minimum", true),
    new org.netbeans.lib.sql.models.TableModel.Column("min_unit", "Min unit", true),
    new org.netbeans.lib.sql.models.TableModel.Column("unit_size", "Unit size", true),
    new org.netbeans.lib.sql.models.TableModel.Column("measure_unit", "Measure unit", true),
    new org.netbeans.lib.sql.models.TableModel.Column("form", "Form", true),
    new org.netbeans.lib.sql.models.TableModel.Column("shape", "Shape", true),
    new org.netbeans.lib.sql.models.TableModel.Column("life_span", "Life span", true),
    new org.netbeans.lib.sql.models.TableModel.Column("priority", "Priority", true),
    new org.netbeans.lib.sql.models.TableModel.Column("picture", "Picture", true),
    new org.netbeans.lib.sql.models.TableModel.Column("register", "Register", true),
    new org.netbeans.lib.sql.models.TableModel.Column("barcode", "Barcode", true),
    new org.netbeans.lib.sql.models.TableModel.Column("verifydate", "Verifydate", true),
    new org.netbeans.lib.sql.models.TableModel.Column("remark_ds", "Remark ds", true),
    new org.netbeans.lib.sql.models.TableModel.Column("remark_mk", "Remark mk", true),
    new org.netbeans.lib.sql.models.TableModel.Column("remark_db", "Remark db", true)
    jTable1.setSelectionModel(new org.netbeans.lib.sql.models.SQLListSelectionModel (nBCachedRowSet1));
    jScrollPane1.setViewportView(jTable1);
    getContentPane().add(jScrollPane1, java.awt.BorderLayout.CENTER);
    pack();
    All code are created by "JDBC Application Wizard" (Sun One Studio 4 Community Edition).
    This is table "trade" structure (PostGreSQL)
    drugstore004=# \d trade
    Table "trade"
    Column | Type | Modifiers
    id | integer | not null default nextval('"trade_id_seq"'::text)
    name | character varying(255) | not null
    admin | integer | not null default 1
    formular | integer | not null default 1
    company | integer | not null default 1
    price | numeric(7,2) |
    addiction | smallint |
    minimum | smallint |
    min_unit | integer | not null default 1
    unit_size | smallint |
    measure_unit | integer | not null default 1
    form | integer | not null default 1
    shape | integer | not null default 1
    life_span | smallint |
    priority | integer | not null default 1
    picture | character varying(100) |
    register | character varying(50) |
    barcode | character varying(50) |
    verifydate | date |
    remark_ds | character varying(255) |
    remark_mk | character varying(255) |
    remark_db | character varying(255) |
    Primary key: trade_pkey
    Unique keys: trade_name_key
    Triggers: RI_ConstraintTrigger_113874,
    RI_ConstraintTrigger_113880,
    RI_ConstraintTrigger_113886,
    RI_ConstraintTrigger_113892,
    RI_ConstraintTrigger_113898,
    RI_ConstraintTrigger_113904,
    RI_ConstraintTrigger_113910,
    RI_ConstraintTrigger_113921,
    RI_ConstraintTrigger_113923,
    RI_ConstraintTrigger_113942,
    RI_ConstraintTrigger_113944,
    RI_ConstraintTrigger_113957,
    RI_ConstraintTrigger_113959,
    RI_ConstraintTrigger_113966,
    RI_ConstraintTrigger_113968
    drugstore004=#
    When I edit column "name" (some record where column "price" is null), their is not error.
    But when I edit column "name" where "price" have some price data in it, .... the same error as shown above has come.
    (No Trigger involved in this test because I just add some characters in column "name")
    Some code should be add in "RowChanged" to do some type casting for column "price" but....how?

  • Is it possible to make a type cast in TestStand?

    I've got the following problem.
    I use a receive function which waits for an undefined package. (struct package).
    The problem is i can't specify the module with the exaxt package.
    Generally in C i define a Pointer and create enough buffer for it. Is it the same in TestStand?
    Is it possible to make a type cast?
    for example:
    i've got these packages
    struct packet;
    struct  data;
    the function does not know which structure to receive.
    err = receive(buffer,maxlen);
    how do i specify the buffer variable?
    can i create a type "void" with a String to have enough buffer.
    and then to make a type cast, for example "Locals.dataobject = ((data)Locals.buffer)"
    any ideas?
    thx for help

    Unfortunately there is no way to do type-casts in TestStand. What you could do is write a wrapper-dll in C, that has for example two parameters for both possible structs. The dll then takes one of the parameters, does the typecast and passes it on to your original dll.
    From TestStand you can pass the struct(or better container in the "TestStand language") you want to use to the accoridng parameter of the wrapper-dll, leaving the other parameter empty or with some default-value.
    Hope this helps!
    André

  • How register COM object from java?

    Hi!
    In my user home directory I have myCOM.dll. My sign applet use this myCOM.dll. But before use this dll I must register it (by use regsvr32).When myCOM.dll will be success register my applet can work. The problem is that I can not get answer from regsvr3 (is myCOM.dll are successed registered or not, or is user has a grants to register COM object and so on.)
    Again, my java applet can work ONLY when myCOM.dll is registered.
    How I can register myCOM.dll from java applet and if registered is not success exit from java applet?

    I must not have been clear. I am not asking how to access a COM object using Java, we already have tools to do that.
    The question is whether there is a way to define a COM interface using Java. I want to code my COM object in Java. Right now we are using PowerBuilder to code COM objects. I would rather use Java.

  • Production Order Error: "Unable to cast COM object of type 'System.__ComObj

    Hi all,
    I have the following code:
    Dim oProdOrders As SAPbobsCOM.Documents
    oProdOrders = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oProductionOrders)
    after the second line I get a system exception: {"Unable to cast COM object of type 'System.__ComObject' to interface type 'SAPbobsCOM.Documents'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{A6DA575B-E105-4585-9F4B-50CC4044EEDD}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))."}     
    If I change document to eg oQuotations it proceeds normally.
    Any Idea?
    Thanks in advance,
    Vangelis

    try it as
    Dim oProdOrders As SAPbobsCOM.ProductionOrders
    oProdOrders = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oProductionOrders)

  • The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception. InnerException: Requested registry access is not allowed.

    I have read some of the other posts for people that got this error, but none seem to apply to me.
    My program has been working for weeks.  I made some minor changes, and started getting the error (full details below).
    I did a TFS "undo pending changes" and still getting the same error, even after logging off.  The one odd thing is that I did change my Windows password this week. The connection string is using a SQL user id and password that has no issues.
    I'm an Admin own my own box (running WIn XP SP3).  I even tried "Run as Admin" on Visual Studio.
    I'm doing a Debug-Start, running a Console-Test-Program that calls a WCF service, which on local machine is hosted by "ASP.NET Development Server".
    We have two other developers, one has the same problem, one does not.  In theory, we have all done "get latest" and are running the same code.
    The SQL Connection is related to a trace database; we are using this library http://ukadcdiagnostics.codeplex.com which has worked fine for months.
    When I do "Start Run" in Visual Studio, I get this error:
    {"The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception. "}
    with InnerException: {"The type initializer for 'System.Data.SqlClient.SqlConnectionFactory' threw an exception."}
    and it has InnerException: {"Requested registry access is not allowed. "}
    Outmost StackTrace:
       at System.Data.SqlClient.SqlConnection..ctor()
       at System.Data.SqlClient.SqlConnection..ctor(String connectionString)
       at FRB.Diagnostics.Listeners.SqlDataAccessCommand..ctor(String connectionString, String commandText, CommandType commandType)
       at FRB.Diagnostics.Listeners.SqlDataAccessAdapter.CreateCommand()
       at FRB.Diagnostics.Listeners.SqlTraceListener.TraceEventCore(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, String message)
       at FRB.Diagnostics.Listeners.CustomTraceListener.FilterTraceEventCore(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, String message)
       at FRB.Diagnostics.Listeners.CustomTraceListener.TraceEvent(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, String format, Object[] args)
       at System.Diagnostics.TraceSource.TraceEvent(TraceEventType eventType, Int32 id, String format, Object[] args)
       at System.Diagnostics.TraceSource.TraceInformation(String message)
       at FRB.EC.AdminService.AdminService.TestHelloWorldWithTrace(String name)
       at SyncInvokeTestHelloWorldWithTrace(Object , Object[] , Object[] )
       at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
       at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
    Second Inner StackTrace:
       at System.Data.SqlClient.SqlConnection..cctor()
    Third Inner StackTrace:
          at System.Data.SqlClient.SqlConnectionFactory..cctor()
    When I do "Run as Admin", I get this error:
    {"Could not load file or assembly 'FRB.EFDataAccess, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Access is denied. "}
    Server stack trace:
       at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
       at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
       at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at FRB.EC.AdminService.ConsoleTester.svcRef.IAdminService.GetDispositionStatusTypeList()
       at FRB.EC.AdminService.ConsoleTester.svcRef.AdminServiceClient.GetDispositionStatusTypeList() in C:\SourceEagleConnect\EagleConnect\Dev\WCFServices\FRB.EC.AdminService.ConsoleTester\Service References\svcRef\Reference.cs:line 2459
       at FRB.EC.AdminService.ConsoleTester.ConsoleProgram.GetDispositionStatusTypeList() in C:\SourceEagleConnect\EagleConnect\Dev\WCFServices\FRB.EC.AdminService.ConsoleTester\ConsoleProgram.cs:line 565
       at FRB.EC.AdminService.ConsoleTester.ConsoleProgram.ExecuteNewRelease103QueryMethods() in C:\SourceEagleConnect\EagleConnect\Dev\WCFServices\FRB.EC.AdminService.ConsoleTester\ConsoleProgram.cs:line 189
       at FRB.EC.AdminService.ConsoleTester.ConsoleProgram.Main(String[] args) in C:\SourceEagleConnect\EagleConnect\Dev\WCFServices\FRB.EC.AdminService.ConsoleTester\ConsoleProgram.cs:line 76
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
    I am also posting the web.config/app.config, but I would rather not focus on that since there were absolutely no changes to it between the time it was working and the time it began failing. 
    Client app.config
    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
      <connectionStrings>
      </connectionStrings>
      <system.serviceModel>
        <behaviors>
          <serviceBehaviors>
            <behavior name="ServiceBehavior">
              <serviceMetadata httpGetEnabled="true"/>
              <serviceDebug includeExceptionDetailInFaults="false"/>
              <serviceAuthorization impersonateCallerForAllOperations="true"/>
            </behavior>
          </serviceBehaviors>
          <endpointBehaviors>
            <behavior name="FRB.AllowImpersonate">
              <clientCredentials>
                <windows allowedImpersonationLevel="Impersonation"/>
              </clientCredentials>
            </behavior>
          </endpointBehaviors>
        </behaviors>
        <bindings>
          <wsHttpBinding>
            <binding name="WSHttpBinding_IAdminService" closeTimeout="00:01:00"
              openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
              bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
              maxBufferPoolSize="524288" maxReceivedMessageSize="5565536"
              messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
              allowCookies="false">
              <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                maxBytesPerRead="4096" maxNameTableCharCount="16384" />
              <reliableSession ordered="true" inactivityTimeout="00:10:00"
                enabled="false" />
              <security mode="Message">
                <transport clientCredentialType="Windows" proxyCredentialType="None"
                  realm="" />
                <message clientCredentialType="Windows" negotiateServiceCredential="true"
                  algorithmSuite="Default" />
              </security>
            </binding>
          </wsHttpBinding>
        </bindings>
            <client>
                  <endpoint address="http://localhost:3588/AdminService.svc" binding="wsHttpBinding"
                        bindingConfiguration="WSHttpBinding_IAdminService" contract="svcRef.IAdminService"
                        name="WSHttpBinding_IAdminService">
                        <identity>
                              <dns value="localhost" />
                        </identity>
                  </endpoint>
            </client>
        </system.serviceModel>
    </configuration>
    web.config of WCF service:
      <?xml version="1.0"?>
    <configuration>
        <configSections>
        <section name="FRB.Diagnostics" type="FRB.Diagnostics.Configuration.UkadcDiagnosticsSection, FRB.Diagnostics"/>
      </configSections>
        <appSettings>
           <!-- whatever goes here -->
        </appSettings>
        <!-- connection string section -->
      <connectionStrings>
        <add name="log" connectionString="Data Source=myserver;Initial Catalog=ECWCFLOG_SharedDev;User ID=myuser;Password=mypass;MultipleActiveResultSets=True" providerName="System.Data.SqlClient"/>
        <add name="DBConn" connectionString="Data Source=myserver;Initial Catalog=ECData_SharedDev;User ID=myuser;Password=mypass;MultipleActiveResultSets=True" providerName="System.Data.SqlClient"/>
        <add name="EagleConnectEntities" connectionString="metadata=res://*/EagleConnect.csdl|res://*/EagleConnect.ssdl|res://*/EagleConnect.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=myserver;Initial
    Catalog=ECData_SharedDev;User ID=myuser;Password=mypass;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient"/>
      </connectionStrings>
        <!-- FRB.Diagnostics logging section -->
        <FRB.Diagnostics>
            <sqlTraceListeners>
                <sqlTraceListener name="sqlTraceListenerSettings"
                            connectionStringName="log"
                            commandText="INSERT INTO LogStore VALUES(@Source, @ActivityId, @ProcessId, @ThreadId, @EventType, @Message, @Timestamp)"
                            commandType="Text">
                    <parameters>
                        <parameter name="@Source" propertyToken="{Source}"/>
                        <parameter name="@ActivityId" propertyToken="{ActivityId}"/>
                        <parameter name="@ProcessId" propertyToken="{ProcessId}"/>
                        <parameter name="@ThreadId" propertyToken="{ThreadId}"/>
                        <parameter name="@EventType" propertyToken="{EventType}" callToString="true"/>
                        <parameter name="@Message" propertyToken="{Message}"/>
                        <parameter name="@Timestamp" propertyToken="{DateTime}"/>
              <!-- <parameter name="@UserId" propertyToken="{WindowsIdentity}"/> -->
            </parameters>
                </sqlTraceListener>
            </sqlTraceListeners>
            <smtpTraceListeners>
                <smtpTraceListener name="smtpTraceListenerSettings"
                             host="vssmtp"
                             port="25"
                             from="[email protected]"
                             to="[email protected]"
                             subject="AdminService Logging Event: {EventType}, {MachineName}"
                             body="{Message}&#xA;=======&#xA;Process={ProcessId},&#xA;Thread={ThreadId},&#xA;ActivityId={ActivityId}"/>
            </smtpTraceListeners>
        </FRB.Diagnostics>
        <!-- System.Diagnostics logging section -->
        <system.diagnostics>
            <sources>
                <source name="FRB.EC.AdminService" switchValue="All">
                    <listeners>
                        <clear/>
                        <add name="ods"/>
                        <add name="smtp"/>
                        <add name="sql"/>
                    </listeners>
                </source>
                <source name="System.ServiceModel" switchValue="Off" propagateActivity="true">
                    <listeners>
                        <add name="ignored" type="System.Diagnostics.ConsoleTraceListener"/>
                    </listeners>
                </source>
            </sources>
            <sharedListeners>
                <!-- OutputDebugStringTraceListener -->
                <add name="ods"
               type="FRB.Diagnostics.Listeners.OutputDebugStringTraceListener, FRB.Diagnostics"
               initializeData="{ActivityId}|{EventType}: {Message} - {DateTime}, Process={ProcessId}, Thread={ThreadId}"/>
                <!-- SqlTraceListener -->
                <add name="sql"
               type="FRB.Diagnostics.Listeners.SqlTraceListener, FRB.Diagnostics"
               initializeData="sqlTraceListenerSettings"
               traceOutputOptions="Timestamp"/>
                <!-- SmtpTraceListener -->
                <add name="smtp"
               type="FRB.Diagnostics.Listeners.SmtpTraceListener, FRB.Diagnostics"
               initializeData="smtpTraceListenerSettings">
                       <filter type="System.Diagnostics.EventTypeFilter"
                       initializeData="Error"/>
                </add>
            </sharedListeners>
            <trace autoflush="true"/>
        </system.diagnostics>
        <system.web>
        <compilation debug="true" targetFramework="4.0">
        </compilation>
            <roleManager enabled="true" defaultProvider="AspNetWindowsTokenRoleProvider"/>
        </system.web>
        <system.serviceModel>
            <services>
                <service name="FRB.EC.AdminService.AdminService"
                   behaviorConfiguration="FRB.EC.AdminService.AdminServiceBehavior">
                    <!-- Service Endpoints -->
                    <endpoint address="" binding="wsHttpBinding"
                      bindingConfiguration="wsHttpEndpointBinding"
                      contract="FRB.EC.AdminService.IAdminService">
                        <!--
                  Upon deployment, the following identity element should be removed or replaced to reflect the
                  identity under which the deployed service runs. 
                  If removed, WCF will infer an appropriate identity automatically.
              -->
                        <identity>
                            <dns value="localhost"/>
                        </identity>
                    </endpoint>
                    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
                </service>
            </services>
            <bindings>
                <wsHttpBinding>
                    <binding name="wsHttpEndpointBinding"
                     maxBufferPoolSize="2147483647"
                     maxReceivedMessageSize="500000000">
                        <readerQuotas maxDepth="2147483647"
                            maxStringContentLength="2147483647"
                            maxArrayLength="2147483647"
                            maxBytesPerRead="2147483647"
                            maxNameTableCharCount="2147483647"/>
                        <security>
                            <message clientCredentialType="Windows"/>
                        </security>
                    </binding>
                </wsHttpBinding>
            </bindings>
            <behaviors>
                <serviceBehaviors>
                    <behavior name="FRB.EC.AdminService.AdminServiceBehavior">
                        <!-- To avoid disclosing metadata information, set the value below to false and
                   remove the metadata endpoint above before deployment -->
                        <serviceMetadata httpGetEnabled="true"/>
                        <!-- To receive exception details in faults for debugging purposes, set the value below to true. 
                   Set to false before deployment to avoid disclosing exception information -->
                        <serviceDebug includeExceptionDetailInFaults="true"/>
                        <serviceCredentials>
                        </serviceCredentials>
                        <!--<serviceAuthorization principalPermissionMode="UseAspNetRoles"
                    roleProviderName="AspNetWindowsTokenRoleProvider"/>-->
                        <serviceAuthorization principalPermissionMode="UseWindowsGroups"
                                    impersonateCallerForAllOperations="true"/>
                    </behavior>
                    <behavior name="FRB.EC.AdminService.IAdminServiceTransportBehavior">
                        <!-- To avoid disclosing metadata information, set the value below to false and
                   remove the metadata endpoint above before deployment -->
                        <serviceMetadata httpGetEnabled="true"/>
                        <!-- To receive exception details in faults for debugging purposes, set the value below to true. 
                   Set to false before deployment to avoid disclosing exception information -->
                        <serviceDebug includeExceptionDetailInFaults="false"/>
                        <serviceCredentials>
                            <clientCertificate>
                                <authentication certificateValidationMode="PeerTrust"/>
                                <!--<authentication certificateValidationMode="Custom" customCertificateValidatorType="DataFactionServices.FRBX509CertificateValidator"/>-->
                            </clientCertificate>
                            <serviceCertificate findValue="WCfServer"
                                    storeLocation="LocalMachine"
                                    storeName="My" x509FindType="FindBySubjectName"/>
                        </serviceCredentials>
                    </behavior>
                </serviceBehaviors>
            </behaviors>
            <serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
        </system.serviceModel>
        <system.webServer>
            <modules runAllManagedModulesForAllRequests="true"/>
        </system.webServer>
    </configuration>
    Thanks for any help.
    Neal

    I think I found it... this is sure a strange error for what is really happening.
    Apparently it had happened to me before, and fortuantely, I actually added the following comment:
                // Above is related to the WCFLOG SQL Diagnostics Trace 
                // If you get error here an inner exception "requested registry access is not allowed"
                // inside exception "type initializer for System.Data.SqlClient.SqlConnection"
                // then make sure you have impersonation enabled in your client.
                // See AdminConsole web.config or FRB.EC.AdminService.ConsoleTester.app.config for examples
    Now I think I will do a try catch and spit out the same text.
    Still testing to assure that this really was the issue.
          <endpointBehaviors>
            <behavior name="FRB.AllowImpersonate ">
              <clientCredentials>
                <windows allowedImpersonationLevel="Impersonation"/>
              </clientCredentials>
            </behavior>
          </endpointBehaviors>
    The line below in BOLD below is what somehow seemed to disappear from my app.config - probably due to a TFS human error - still checking that also:
            <client>
                  <endpoint address="http://localhost:4998/AdminService.svc"
                                  behaviorConfiguration="FRB.AllowImpersonate"
                                  binding="wsHttpBinding"
                                  bindingConfiguration="WSHttpBinding_IAdminService"
                                 contract="svcRef.IAdminService"
                            name="WSHttpBinding_IAdminService">
                        <identity>
                              <dns value="localhost" />
                        </identity>
                  </endpoint>
            </client>
    Here's how I "idiot-proofed" this error for now, to give an error that actually at least points to a solution:
            public SqlDataAccessCommand(string connectionString, string commandText, CommandType commandType)
                try
                    _connection = new SqlConnection(connectionString);
                    // Above is related to the WCFLOG SQL Diagnostics Trace  
                    // If you get error here an inner exception "requested registry access is not allowed"
                    // inside exception "type initializer for System.Data.SqlClient.SqlConnection"
                    // then make sure you have impersonation enabled in your client.
                    // See AdminConsole web.config or FRB.EC.AdminService.ConsoleTester.app.config for examples
                catch (Exception ex)
                    if (ex.ToString().Contains("The type initializer for"))
                    throw new System.ApplicationException(@"
                    Your client app <endpoint> must be cofigured have a
                  'behaviorConfiguration' attribute like this:
                    behaviorConfiguration='FRB.AllowImpersonate'
                   that points back to a behavior that has this syntax:         
              <behavior name='FRB.AllowImpersonate'>
                 <clientCredentials>
                     <windows allowedImpersonationLevel='Impersonation'/>
                 </clientCredentials>
              </behavior>
              ", ex);
                   else
                        throw ex;
                _command = _connection.CreateCommand();
                _command.CommandText = commandText;
                _command.CommandType = commandType;
                // TODO _command.CommandTimeout = ;
    Neal

  • Object array type casting?

    Hi. I still can't get the hang of array type casting. Is it possible to type caste an array of objects? I tried the following
    LabelledPanel[] comp = (LabelledPanel[])(content.getComponents());
    in my program and I got the ClassCastException.
    Exception occurred during event dispatching:
    java.lang.ClassCastException: [Ljava.awt.Component;
    LabelledPanel is a descendent of JPanel and getComponents() supposed to return Component[]

    java does support casting with arrays. The following code will work:
    String [] strings = new String[] { "1", "2" };
    Comparable [] comps = (Comparable[])strings;
    Object [] objects = (Object [])strings;That is, you can cast following the normal rules of assignment. You are having problems because your casting violates the normal rules of assignment- you're trying to cast a type into a differnt type that it does not extend or implement.
    the toArray() in the Collections API really has nothing to do with casting. That method converts the current Collection into an array of the same type. Since all arrays extend java.lang.Object, it returns the new array as an Object, which you then cast into the specific type.
    You may want to read the language guidlines on casting if you are having problems with it:
    http://java.sun.com/docs/books/jls/second_edition/html/jIX.fm.html
    you can also look at the documenation for Class.isAssignableFrom , which explains casting more briefly.

  • Get COM object type to supply to type input of Variant to Data.vi

    I'm interfacing a custom ActiveX control. One of the methods returns a reference to another COM object. However in LabView the reference is returned as a Variant, so I need to convert that to a properly typed refnum so I can access its properties. The ActiveX control is registered so LabView knows all about its TLB. I just need a way to create a type constant in which I can specify the COM class (which will be something like "FooCtl.IFooData"), so I can wire it to the type input of Variant to Data and get the reference.
    Thank you!

    Never mind. Got it. Create a dummy refnum of the proper type and wire it to the type input. I'm sure there's a description of this somewhere in the docs...

  • S/A bridge problem: No object type found for the message

    Hi all,
    I've been spending days looking into the following problem. I have a RFCXIFile scenario. The R3 system sends data via an RFC to XI and XI post the data as a flat file on a certain server using FTP.
    This scenario worked just fine for 1 exception. I could only run this scenario once. The second time I got timeouts when checking the data sent to my RFC destination using SM58. When I reactivated my RFC communcation channel I could again send 1 RFC to the system. All subsequent tries would fail.
    I guess this is due to the fact that I use a synchonous call (RFC) to an asynchronous one. Thus the adapter is still waiting for the response from the XI system and will not accept any further new calls from R3.
    So I figure let's use this pattern called the S/A bridge. So I designed everything according to guides and examples and I'm quite certain everything is configured right but when I run the scenario I get the following message:
    <i> <!--  Call Adapter
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>XIAdapter</SAP:Category>
      <SAP:Code area="BPE_ADAPTER">UNKNOWN_MESSAGE</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>No object type found for the message. Check that the corresponding process is activated</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error></i>
    It seems that the adapter cannot find any integration process to send the message into!?
    I've looked at numerous threads on sdn and tried all kinds of stuff (looked at the cache==> code 0 = OK , tried to reactivate my integration process, checked the interface determination,...), but to no avail. Does anybody has an idea what could be wrong ?
    Any help would be greatly appreciated for I'm all out of clues....
    Bob

    First of all, Thank you for trying to help me out here.
    Some answer to your suggestions/questions:
    The IP has return code 0 in SXI_CACHE. so that doesn't seem to be the problem.
    I've checked the BPM for syntax errors. I doesn't have any.
    I've reimported the BPM into the integration directory.
    And did a full cache refresh in SXI_CACHE. Return code is (stays) zero, so that's OK.
    I've already included the error message from SXI_MONI. It is in the last step ("Call Adater") that the error occurs.
    The other steps execute just fine...
    The RFC communcation channel accepts the incoming RFC call and puts into the pipeline, so no problems with the communication channel either. the problem is actually when the pipeline is trying to forward the message into an IP trhough the BPE_ADAPTER (according to SXMB_MONI).
    Therefore I'm not able to go to into PE, because the workflow is never started. the BPE_ADAPTER does not find any active process for the interface determination i've entered.
    So i can not debug the IP in the PE and check container variables, like some of you mentioned.
    Maybe some more information about the scenario:
    The RFC is called from an R3 system to XI over the interface "CONTROL_RECIPE_DOWNLOAD", which is an imported RFC, with a request and response message type.
    Then I got a receiver and interface determination with lead the incoming RFC message to the IP, into interface "XI_ERP_MF_MD_CONTROL_RECIPE_REQ_AI_MI".
    This is an abstract synchronous interface based on the request and response types of the "CONTROL_RECIPE_DOWNLOAD" imported RFC.
    This interface is used the first step (receive) of my BPM as the synchronous interface to open the S/A bridge.
    The message (container var)  used in this step is
    name: CORREQ
    Category: Abstract interface
    type: "XI_ERP_MF_MD_CONTROL_RECIPE_REQ_AI_MI"
    The interface "XI_ERP_MF_MD_CONTROL_RECIPE_REQ_AI_MI" is an abstract, asynchronous interface based on the request type of the "CONTROL_RECIPE_DOWNLOAD".
    Then there are 2 send steps for putting the flat files into place and finally i close the the S/A bridge using message:
    name: CORRES
    Category: Abstract interface
    type: "XI_ERP_MF_MD_CONTROL_RECIPE_RES_AI_MI"
    The interface "XI_ERP_MF_MD_CONTROL_RECIPE_RES_AI_MI" is an abstract, asynchronous interface based on the response type of the "CONTROL_RECIPE_DOWNLOAD".
    I hope this information gives you guys a better understanding of hte problem.
    Really looking forward to see more suggestions and to solve this nasty problem ...
    Regards,
    Bob

Maybe you are looking for

  • I got  software update for ios 6 on my iphone 5 and now my phone is broken

    The update was for ios 6.0.2. I got this phone two days ago and now it's stuck on a black screen with the apple icon. I can turn it off but when I turn it on it just freeezes ther again. Please help.

  • How do i install mysql on windows server 2012 r2 using powershell(automate)??

    i have a requirement of installing the mysql server with one click deployment using power shell by passing the parameters needed into the mysql console. can i achieve that ? can  anyone help me in doing that? thanks in advance. Suresh Gaddam

  • Upgrade Software from v4 to v5

    Hi All         I owne BB Curve 8520 and I had alot of problems with software so I dowengrede it from v5 to v4 It works good. Now am tryong to Upgreade it agin to v5 from Desktop softwaer I had this Masseage: '' This BlackBerry® Device Software upgrad

  • Help on query : How to produce columns based on rows?

    Hi All, I have a table table1 with below structure and data Item     State          Value A1      MS          100 A1      GOA          3 A1      UP          4 B2      MS          34 B2      GOA          55 B2      PB          3 B2      DL          4

  • Restart session from Failover point

    Hi, ODI process loading 10 million rows from Oracle to Oracle (same instance). Process failed half way after 2 hour. Anyone build any framework to restart from failed point? Can we save 2 hours? Regards