IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

How to invoke the Com object using SAP BC

  • 1.  How to invoke the Com object using SAP BC

    Posted Mon December 30, 2002 02:25 PM

    I tried to invoke a com dll as described in SAP BC PDF manual
    in 2 methods given by webMethods.

    1. Using InvokeLate but itshow error
      java.lang.NoclassDefFoundError.

    When i tried to use it using CreateObject and Invoke
    then it show Error “Could not run the service ‘createObject’.java.lang.reflect.InvocationTargetException: Link Error: no webMethods (webMethods.dll) in java.library.path”

    What is the cause of the error


    #Adapters-and-E-Standards
    #webMethods
    #Integration-Server-and-ESB


  • 2.  RE: How to invoke the Com object using SAP BC

    Posted Mon December 30, 2002 03:18 PM

    Please make sure the Business Connector is working properly. After that check the classpath of the system. Make sure the dll file that you are trying to invoke the methods on is in the classpath.
    Thanks
    VR


    #Integration-Server-and-ESB
    #Adapters-and-E-Standards
    #webMethods


  • 3.  RE: How to invoke the Com object using SAP BC

    Posted Thu January 02, 2003 06:45 AM

    hi vinodh

    thanks for the reply

    i have n’t understood the “check the classpath of the system”
    and Make sure the dll file that you are trying to invoke the methods on is in the classpath" Can u explain me in detail about this?

    I am trying to invoke the COM in following way.

    1)In my system (192.168.0.78) only SAP BC Developer is installed and i am able to connect to SAP BC server properly in another system(192.168.0.22.)

    2)I have the compiled dll in my system which has method helloWorld.

    3)Now how to set the parameters in CreateObject and Invoke this method.

    My doubts

    1. How to set the parameters and where to put the dll in the SAP BC server or in my system itself?

    2. did the SAP BC server is to be installed in my system as only SAP Developer in installed in my system?


    #Adapters-and-E-Standards
    #webMethods
    #Integration-Server-and-ESB


  • 4.  RE: How to invoke the Com object using SAP BC

    Posted Thu January 02, 2003 04:52 PM

    Hi,

    Answer to your questions.

    1. You have to put the dll in your machine. The parameters can be set using the win32.COM.dispatch:invoke step in the WmWin32 package

    2. You dont have to install the SAP BC server on your machine. Developer is enough.

    Thanks
    Vinod


    #Adapters-and-E-Standards
    #webMethods
    #Integration-Server-and-ESB


  • 5.  RE: How to invoke the Com object using SAP BC

    Posted Fri January 03, 2003 05:26 AM

    You posted by giving

    "Please make sure the Business Connector is working properly. After that check the classpath of the system. Make sure the dll file that you are trying to invoke the methods on is in the classpath. "

    Thanks i have n’t understood the following in your response

    1. check the classpath of the system
    2. Make sure the dll file that you are trying to invoke the methods on is in the classpath

    my doubt

    1. How to check the classpath of the system?
      2)Where is the location to put the dll in my system as we normally put in system32 folder.Does that is enough?

    #Integration-Server-and-ESB
    #Adapters-and-E-Standards
    #webMethods


  • 6.  RE: How to invoke the Com object using SAP BC

    Posted Fri January 03, 2003 02:10 PM

    You can check the classpath by opening a command prompt and typing in “set classpath”. Another way to do this is go to the Start - Settings - Control Panel and open the “System” icon. Then click on the “Advanced” tab and select the “Environment Variables”. In the system variables you can see the classpath.

    Did you register the dll in your box?
    Thanks
    VR


    #Adapters-and-E-Standards
    #webMethods
    #Integration-Server-and-ESB


  • 7.  RE: How to invoke the Com object using SAP BC

    Posted Sat January 04, 2003 10:26 AM

    thanks

    i have checked the environment in Winnt there is path variable not system variable set c:\winnt\system32 i have put my dll in that path and registered the dll but still is showing the same errors as above

    Does it is because of setting of the parameters in invoke service?
    Can u specify how set the parameters for this as i specifying
    PROGID wmVBDemo.Services,METHOD as helloWorld and CONTEXT as INPROC,and giving method instead of GET only for DCOM as specified in PDF file does i want to specify any others parameters as server,domain,user,password etc?


    #webMethods
    #Integration-Server-and-ESB
    #Adapters-and-E-Standards


  • 8.  RE: How to invoke the Com object using SAP BC

    Posted Mon January 06, 2003 02:40 PM

    Hi,
    You said that you put the dll in that path. Why dont you go ahead and create the classpath variable?
    The classpath variable can be created by

    Start - Settings - Control Panel and open the “System” icon. Then click on the “Advanced” tab and select the “Environment Variables”. In the system variables you click “New” and then type in the classpath variable with value as the directory where the dll is.

    In the mean time I will look into the document that you are referring to.


    #webMethods
    #Integration-Server-and-ESB
    #Adapters-and-E-Standards


  • 9.  RE: How to invoke the Com object using SAP BC

    Posted Tue January 07, 2003 06:21 AM

    Thanks

    I created a ClassPath variable set to C:\winnt\system32 in Environment(System Variable) and put the dll in that path.Now when i run with InvokeLate service is shows the error “java.lang.NoclassDefFoundError”.I even put webMethods.dll in path to system32 folder and registerd.Still it shows the error.I am trying this using the example given in PDF file given along with SAP BC(Invoking Com Using SAP BC).

    Regards
    SA


    #Integration-Server-and-ESB
    #webMethods
    #Adapters-and-E-Standards


  • 10.  RE: How to invoke the Com object using SAP BC

    Posted Tue January 28, 2003 10:55 AM

    Hello,

    Since my experience with the bc is at a minimal level but I want to use it to connect to the ms message queue, I used google to find some info on how to address a dll in java.
    To use the dll in java, you need a “wrapper”. The one I found and started to play with is bridge2java. The tool comes with a few java examples and does what I expected. Also there is a readme file included which shows the settings and dos syntax needed to make the examples work.
    I know that this is not a direct answer, but some of the errors mentioned earlier already passed my screen and are already fixed by reading and compiling the example of bridge2java.

    Hope this helps:-)


    #Adapters-and-E-Standards
    #Integration-Server-and-ESB
    #webMethods


  • 11.  RE: How to invoke the Com object using SAP BC

    Posted Mon February 03, 2003 02:11 PM

    Hi rudd

    thanks for the replay.Using the wrapper class you can use it in webMethods,that is early binding ,but if u want to invoke already existing com using latebinding we will use the dll directly without using the wrapper.I am trying to use
    it without wrapper as i am specialising in Microsoft technologies.I don’t want to use java technologies.When I am trying to use i am getting this error?I am searching for solution but i am not getting anywhere?If u could find replay


    #Adapters-and-E-Standards
    #Integration-Server-and-ESB
    #webMethods


  • 12.  RE: How to invoke the Com object using SAP BC

    Posted Mon February 03, 2003 02:24 PM

    Hi Subramoni,
    I wish I could help you since we have done that numerous times here.
    Whats the error that you are getting now? With webMethods you dont have to use a wrapper. You can just use the services provided by webMethods to invoke the com object.
    Best of Luck!


    #webMethods
    #Integration-Server-and-ESB
    #Adapters-and-E-Standards


  • 13.  RE: How to invoke the Com object using SAP BC

    Posted Tue February 04, 2003 06:38 AM

    Hi VR
    I couldn’t solve the problem as i am getting the error
    in 2 methods given by webMethods.

    1. Using InvokeLate but itshow error
      java.lang.NoclassDefFoundError.

    When i tried to use it using CreateObject and Invoke
    then it show Error “Could not run the service ‘createObject’.java.lang.reflect.InvocationTargetException: Link Error: no webMethods (webMethods.dll) in java.library.path”

    i have set the class path as u said through reply dated jan 3.
    But still i am getting the error.In SAP BC Developers Manual PDF page 9-20 they says requirements fo invoke com.In it lastly they says a step which i couldn’t understand.That is

    make sure to add <sapbc/Developer/lib/client.zip to your class path,i couldn’t find this client.zip file in my system.

    i don’t know whether error is caused by it as only step i haven’t done till now is that.Could u please explain
    1)how to do it?
    2) steps by which u invoked the com?

    Regards
    Sa


    #Integration-Server-and-ESB
    #webMethods
    #Adapters-and-E-Standards


  • 14.  RE: How to invoke the Com object using SAP BC

    Posted Tue February 04, 2003 01:29 PM

    It seems like you dont have the webMethods.dll registered. Normally this happens when you install the bc. Can you please search your system for the file webMethods.dll? It is normally in the directory %bc/support/win32%.
    If you find it you can try to register it and we will take it from there.
    Good Luck!


    #webMethods
    #Adapters-and-E-Standards
    #Integration-Server-and-ESB


  • 15.  RE: How to invoke the Com object using SAP BC

    Posted Wed February 05, 2003 07:12 AM

    Hi VR
    Thanks now the error

    1. “Could not run the service ‘createObject’ java.lang.reflect.InvocationTargetException: Link Error: no webMethods (webMethods.dll) in java.library.path” is not comming error which is comming is java.lang.invocationTargetException when i read the PDF file they says jview must be 5.00.3177 or latest.I am using version 3802 in my system and in SAP BC Sever i am using 3229,which is latest than 3177 but they are different in my system and SAP BC Server.does it because of it?

    2)Using InvokeLate but itshow error
    java.lang.NoclassDefFoundError is still comming.


    #Integration-Server-and-ESB
    #webMethods
    #Adapters-and-E-Standards


  • 16.  RE: How to invoke the Com object using SAP BC

    Posted Tue February 11, 2003 11:22 AM

    Hi VR
    Thanks now the error

    1. “Could not run the service ‘createObject’ java.lang.reflect.InvocationTargetException: Link Error: no webMethods (webMethods.dll) in java.library.path” is not comming error which is comming is java.lang.invocationTargetException when i read the PDF file they says jview must be 5.00.3177 or latest.I am using version 3802 in my system and in SAP BC Sever i am using 3229,which is latest than 3177 but they are different in my system and SAP BC Server.does it because of it?

    2)Using InvokeLate but itshow error
    java.lang.NoclassDefFoundError is still comming.


    #Integration-Server-and-ESB
    #Adapters-and-E-Standards
    #webMethods


  • 17.  RE: How to invoke the Com object using SAP BC

    Posted Tue February 11, 2003 03:39 PM

    Hi,
    The java.lang.InvocationTargetException is thrown when the compiler cannot find the class.
    I will send you a sample package which does create an instance of a com object, invokes a function and then releases it from memory. Please try to execute it and let me know. Please provide me with your email address.
    Thanks


    #Adapters-and-E-Standards
    #webMethods
    #Integration-Server-and-ESB


  • 18.  RE: How to invoke the Com object using SAP BC

    Posted Mon February 17, 2003 11:07 AM


  • 19.  RE: How to invoke the Com object using SAP BC

    Posted Tue February 25, 2003 10:34 AM

    Hi VR

        can u please send me the sample package to create instance of COM .I am sending my email id  
    

    sapas@indiatimes.com


    #Adapters-and-E-Standards
    #webMethods
    #Integration-Server-and-ESB


  • 20.  RE: How to invoke the Com object using SAP BC

    Posted Tue February 25, 2003 01:57 PM

    Sure,
    I will send you that by COB today.


    #webMethods
    #Adapters-and-E-Standards
    #Integration-Server-and-ESB


  • 21.  RE: How to invoke the Com object using SAP BC

    Posted Fri July 30, 2004 04:01 AM

    Has anyone, done DCOM server invoking webMethods? I am trying to create a DCOM Server component invoking webMethods.

    Appreciate some input on this matter.


    #Adapters-and-E-Standards
    #webMethods
    #Integration-Server-and-ESB