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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
Expand all | Collapse all

How to Put a Document

  • 1.  How to Put a Document

    Posted 07/08/03 11:43 PM

    Hello,

    i am using Tamino XML Server 4.1.1.1 and the ActiveX API version 4.5.1.1 with C++.
    I want to put an xml Document into the Database.
    The second parameter of the Method PutDocument is an lpDOMNode. How can i make such one? How can i put a complete xml-Document?

    Marcel


    #API-Management
    #webMethods-Tamino-XML-Server-APIs
    #webMethods


  • 2.  RE: How to Put a Document

    Posted 07/09/03 09:10 AM

    The parameter may be an Element node or a Document node.

    To create a document you want to do the following. Create an instance of IXMLDOMDocument and then either use load or loadXML to populate it.


    #webMethods
    #webMethods-Tamino-XML-Server-APIs
    #API-Management


  • 3.  RE: How to Put a Document

    Posted 07/09/03 10:31 AM

    Hello,

    IXMLDOMDocument is an Interface, so it is an abstract Class. How can i get an instance of it?


    #API-Management
    #webMethods
    #webMethods-Tamino-XML-Server-APIs


  • 4.  RE: How to Put a Document

    Posted 07/09/03 10:56 AM

    How do you instantiate the ActiveX control from C++?

    The low level COM way of instantiating an IXMLDOMDocument (from MSDN) is:

    HRESULT hr;
    IXMLDOMDocument2 * pXMLDoc;
    IXMLDOMNode * pXDN;
    //...
    hr = CoInitialize(NULL); 
    // Check the return value, hr...
    hr = CoCreateInstance(CLSID_DOMDocument40, NULL, CLSCTX_INPROC_SERVER, 
    IID_IXMLDOMDocument2, (void**)&pXMLDoc);
    // Check the return value, hr...
    hr = pXMLDoc->QueryInterface(IID_IXMLDOMNode, (void **)&pXDN);
    // Check the return value.

    #webMethods-Tamino-XML-Server-APIs
    #webMethods
    #API-Management


  • 5.  RE: How to Put a Document

    Posted 07/09/03 11:06 AM

    Yes i’ve seen it too, but the compiler returns error messages.
    He does not know CLSID_DOMDocument40 and IID_IXMLDOMDocument2.


    #webMethods
    #API-Management
    #webMethods-Tamino-XML-Server-APIs


  • 6.  RE: How to Put a Document

    Posted 07/09/03 12:05 PM

    I could find those definitions in MsXml2.h under the Platform SDK [C:\Program Files\Microsoft SDK\include on my PC].


    #webMethods
    #webMethods-Tamino-XML-Server-APIs
    #API-Management


  • 7.  RE: How to Put a Document

    Posted 07/09/03 12:18 PM

    Yes it works. I had #import “msxml4.dll” and used namespace MSXML2 instead of an include of
    msxml2.h!

    Ok and how can i get an Instace of the Tamino Active X. I added the Tamino Active X to my Project and know i have the Class CTaminoX with all methodes of the interface. I created a pointer:

    CTaminoX* pTaminoX = new CTaminoX();

    and then i initialize it:

    pTaminoX->Initalize();

    But i get an Access Violation.

    What is wrong?


    #webMethods-Tamino-XML-Server-APIs
    #API-Management
    #webMethods


  • 8.  RE: How to Put a Document

    Posted 07/09/03 01:25 PM

    What sort of VC++ project are you building?

    Could you provide a copy of the .h/.cpp TaminoX files that are generated for you?


    #webMethods
    #webMethods-Tamino-XML-Server-APIs
    #API-Management


  • 9.  RE: How to Put a Document

    Posted 07/09/03 01:28 PM

    I build a SDI-Application.

    CTaminoActiveX.h/CTaminoActiveX.cpp attached as zip.

    [This message was edited by markk on 09 Jul 2003 at 13:01.]
    CTaminoActiveX.zip (3.82 KB)


    #webMethods
    #webMethods-Tamino-XML-Server-APIs
    #API-Management


  • 10.  RE: How to Put a Document

    Posted 07/09/03 02:32 PM

    Ok i have an idea!

    The class CTaminoActiveX has a superclass CWnd.
    If i debug the program, the handle of the CWnd within the Pointer to the CTaminoActiveX is null.
    Do i have to call the CWnd-Methode Create() first?


    #webMethods
    #API-Management
    #webMethods-Tamino-XML-Server-APIs


  • 11.  RE: How to Put a Document

    Posted 07/09/03 02:34 PM

    I’m no specialist with such stuff but I suspect that there is a missing Create call? The following worked for me without error:

    In default method CMFCAppApp::InitInstance():

    tamx = new CTaminoX();
    tamx->Create(TEXT("TaminoX"), "TaminoX", WS_CHILD | WS_VISIBLE, CRect(0, 0, 20, 20), m_pMainWnd, 1234);
    tamx->Initialize();



    Is there a reason why you want to use C++? You could try using VB first. It is a lot easier to get going and do things (see how small the VB samples are).

    [This message was edited by markk on 09 Jul 2003 at 13:26.]


    #webMethods
    #API-Management
    #webMethods-Tamino-XML-Server-APIs


  • 12.  RE: How to Put a Document

    Posted 07/09/03 03:19 PM