Author Topic: Connecting to an OnDemand Server using ODWEK Java API  (Read 13150 times)

mwan

  • Guest
Connecting to an OnDemand Server using ODWEK Java API
« on: April 16, 2007, 09:44:24 AM »
Hello,

I'm having trouble connecting to an OnDemand server located on my network through TCP/IP. I currently get the following exception while running the sample code from the documentation:
 
      com.ibm.edms.od.ODException: The server failed while attempting to convert data
              at com.ibm.edms.od.ODServer.logon(ODServer.java:333)
 


This is my code:

      odServer = new ODServer( );
      odServer.initialize( argv[3], "odtest.Main.java", 5348 );
     
      odServer.setConnectType(ODConstant.CONNECT_TYPE_TCPIP);
      odServer.setServ er("odsrv1");
      odServer.setPort(1445);


My arswww.ini file is defined as:

      [@SRV@_odsrv1]
      HOST=odsrv1
      PROTOCOL=0
      PORT=1445

Is the code having trouble reading from the specified arswww.ini file? I seem to get the same error when I type gibberish into the setServer() function.

Thanks.

Justin Derrick

  • IBM Content Manager OnDemand Consultant
  • Administrator
  • Hero Member
  • *****
  • Posts: 2138
  • CMOD Guru for hire...
    • View Profile
    • Tenacious Consulting
Re: Connecting to an OnDemand Server using ODWEK Java API
« Reply #1 on: April 18, 2007, 09:06:28 AM »
The error message "The server failed while attempting to convert data" implies (at least, to me) that a document transform/translation failed.  Are you converting the document stored in OnDemand into another format?  Is that portion of the code working properly?

-JD.
IBM CMOD Professional Services: http://TenaciousConsulting.com
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Education & Webinars:  https://CMOD.Training/

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR

mwan

  • Guest
Re: Connecting to an OnDemand Server using ODWEK Java API
« Reply #2 on: April 19, 2007, 10:51:01 AM »
My application now works but I still have no idea what went wrong. The error message appears when I call the logon() function, so I don't think that there's a document transform going on at that time.

I tried running the program through the command prompt and it works! The program still will not run through NetBeans however.

Thanks everyone for their time.

Benny N. Ormson

  • Jr. Member
  • **
  • Posts: 20
    • View Profile
Re: Connecting to an OnDemand Server using ODWEK Java API
« Reply #3 on: April 19, 2007, 01:52:53 PM »
This sounds like a codepage conflict to me. Try removing the codepage parameter in the odServer.initialize() call. Also verify the codepage setting in the arswww.ini file.
Benny N. Ormson
OnDemand Architect