Skip to main content
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  Lotus Domino Document Manager (Domino.Doc) Forum

Lotus Domino Document Manager (Domino.Doc) Forum

developerWorks

  

Sign in to participate PreviousPrevious NextNext


Makgabo Lamola 15.Apr.05 10:31 AM a Web browser
Lotus Domino Document Manager Desktop Enabler 3.5 Windows 2000


How do you use domino.doc api on the replica server to add documents on the replica server using api via an agent or so. I've written code to do that but the code always connect to the master server cabinet/binder even if my library object returns a replica library. Here is a sample code:

'=========='Declare Domino.Doc API objects
Dim objAPI As Variant
Dim objLibrary As Variant
Dim objCabinets As Variant
Dim objCabinet As Variant
Dim objBinders As Variant
Dim objBinder As Variant
Dim objDocument As Variant
Dim sLibURL As String
Dim i As Integer
Dim docCurr As NotesDocument
Dim unid As String
Dim sWebParms List As String

Set dbCurr = sessCurr.CurrentDatabase
Set docCurr = sessCurr.DocumentContext

sQry = docCurr.getItemValue("Query_String")(0)

Call getWebParameterList(sQry, sWebParms)
unid = getWebParameter(sWebParms, "UNID")

Set docExtraSheet = GetNewInstance (unid)
Dim sServer As New NotesName (dbCurr.Server)

If Not ObtainProfileDocument (dbCurr,docProfile,"AngloPlatProfile") Then
Call FormatMSG (objCabinet,"Profile document not found, contact system administrator.")
Exit Sub
End If

Set vwGlobalProfile = dbCurr.GetView("(InternalAdmin)")
Set docGlobalProfile = vwGlobalProfile.GetDocumentByKey("GlobalProfile",True)
Set dbLibrary = sessCurr.GetDatabase(dbCurr.Server,docProfile.VaultFilename(0)) ''Library Database
Set vwReplicaInfo = dbLibrary.GetView("vaReplicaInfo")
Set docReplicaInfo = vwReplicaInfo.GetDocumentByKey(sServer.Canonical)

'Set API
Set objAPI = CreateObject("DominoDoc.API")
Call objAPI.SetHttpLogin (docProfile.SuperUserUserName(0),docProfile.SuperUserPassword(0))
sLibURL = "http://" + docReplicaInfo.HTTPHostName(0) + "/" + docProfile.VaultFilename(0)
Set objLibrary = objAPI.GetLibrary (sLibURL)


Set objCabinet = objLibrary.GetCabinetById (docGlobalProfile.FileCabinetUNID(0)
Set objBinder = objLibrary.GetBinderById (docGlobalProfile.FileCabinetUNID(0) + docExtraSheet.BinderID(0))
The lines above generate an error as the code tries to access the master server instead of accessing the server where the scripts is running. How do I instruct the code to use the replica server. This code is working fine on the master server.






Using API on the replica server (Makgabo Lamola 15.Apr.05)
. . RE: Using API on the replica server... (Red Cardinal 18.Apr.05)





  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search

 Sign In or Register
Sign in
Forgot your password?
Forgot your user name?
Create new registration

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

Resources

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds

Wikis

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums


 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
Notes/Domino 4 and 5
IBM Connections
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
IBM SmartCloud Meetings
IBM Web Content Manager
Lotus Domino Document Manager
Lotus e-learning
Lotus Enterprise Integration
Lotus Expeditor
Lotus Protector
Lotus Quickr
Lotus SmartSuite
Lotus Symphony
Lotus Symphony Developer Toolkit Support
Lotus Workflow