IBM Tivoli Enablement Tools


Error while testing connection to ITIM Web Services v1.32


Greeting,
I am getting the below error when I try connecting to ITIMWebServices v 1.32. I picked the TestClient.java file and updated it (hardcoded values). I built and ran it using the jar files packaged with ITIMWebServices v 1.32. Tried from Eclipse IDE as well and I get the same error. Server side logs show the login was successful. Can someone help?
Insufficient number of args passed in:
java -jar testClient1.2 serverAddress userId password
where serverAddress is the URL of the web services server e.g. http://itimServer:9080
userId is a valid ITIM user name, and password is the password for the ITIM user
Trying connection to ITIMWebServices
Apr 11, 2014 8:04:08 PM org.apache.axis.utils.JavaUtils isAttachmentSupported
WARNING: Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled.
Communication successful, the ITIM Web Services Wrapper version is 1.32
The ITIM version is 5.1
Trying authentication for user test user
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.lang.reflect.InvocationTargetException
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:<hostname removed>
java.lang.reflect.InvocationTargetException
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.ibm.itim.ws.services.WSSessionServiceSoapBindingStub.login(WSSessionServiceSoapBindingStub.java:952)
at com.ibm.xxx.itim.webservicesclient.HelloITIM1.main(HelloITIM1.java:64)
The server side logs show the connection was successful.
[2014-04-11 20:04:14,404:WebContainer : 0]<INFO:com.ibm.itim.ws.services.WSSessionService>com.ibm.itim.ws.services.WSSessionService.createSubject() () Processed log in for: test user
Here is the code:
/*
******************************************************************************
*
* This source code is furnished on an AS IS basis. No guarantees, express or
* implied, are furnished for any purpose. Any user of this code assumes
* all responsibility fot it.
*
* The source code for this program is published as is. You are free to modify
* it as long as you know what you are doing.
*
* #author gverma
*
******************************************************************************
*/
package com.ibm.xxx.itim.webservicesclient;
import java.net.MalformedURLException;
import java.rmi.RemoteException;
import javax.xml.rpc.ServiceException;
import com.ibm.itim.ws.exceptions.WSInvalidLoginException;
import com.ibm.itim.ws.exceptions.WSLoginServiceException;
import com.ibm.itim.ws.model.WSAccount;
import com.ibm.itim.ws.model.WSPerson;
import com.ibm.itim.ws.model.WSSession;
import com.ibm.itim.ws.services.WSPersonService;
import com.ibm.itim.ws.services.WSSessionService;
import com.ibm.itim.ws.services.facade.ITIMWebServiceFactory;
/**
* Establishes a test connection to Web Services Wrapper for ITIM API.
*
*/
public class HelloITIM1 {
private static final String SYNTAX = "java -jar testClient1.2 serverAddress userId password\n" +
" where serverAddress is the URL of the web services server e.g. http://itimServer:9080\n" +
" userId is a valid ITIM user name, and password is the password for the ITIM user";
/**
* #param args String array. Element 0 is the URL of ITIM Web Services, element 2 is user name, element 3 is the password.
*/
public static void main(String[] args) {
if (args.length < 3) {
System.out.println("Insufficient number of args passed in: \n" + SYNTAX );
}
String serverAddress = "http://<ip>:<port>"; //removed the IP/Port
String userid = "test user";
String password = "xxxx";
try {
System.out.println("Trying connection to ITIMWebServices");
ITIMWebServiceFactory webServiceFactory = new ITIMWebServiceFactory(serverAddress);
WSSessionService manager = webServiceFactory.getWSSessionService();
try {
float wsVersion = manager.getWebServicesVersion();
System.out.println("Communication successful, the ITIM Web Services Wrapper version is " + manager.getWebServicesVersion());
} catch (Exception e) {
System.out.println("Please edit the webservice.properties file and change the webServices.version from 1.2.1 to 1.21, then restart Websphere");
System.out.println("See IBM Tivoli Enablement Tools Forum thread at http://www-128.ibm.com/developerworks/forums/thread.jspa?threadID=232419&tstart=0 for details");
}
System.out.println("The ITIM version is " + manager.getItimVersion());
System.out.println("Trying authentication for user " + userid);
WSSession session = manager.login(userid, password);
System.out.println("User id " + userid + " logged in succesfully to " + serverAddress);
WSPersonService personService = webServiceFactory.getWSPersonService();
WSPerson person = personService.getPrincipalPerson(session);
System.out.println("User name from ITIM is " + person.getName());
System.out.println("Trying to get list of accounts owned by " + person.getName());
WSAccount[] accounts = personService.getAccountsByOwner(session, person.getItimDN());
if (accounts != null) {
System.out.println("Found " + accounts.length + " accounts for " + person.getName());
for (int i = 0; i < accounts.length; i++) {
WSAccount account = accounts[i];
System.out.println(" "+ account.getName() + " on service " + account.getServiceName());
}
} else {
System.out.println("No accounts retrieved");
}
System.out.println("End of test");
} catch (WSInvalidLoginException e) {
e.printStackTrace();
} catch (WSLoginServiceException e) {
e.printStackTrace();
} catch (RemoteException e) {
e.printStackTrace();
} catch (IllegalArgumentException e) {
e.printStackTrace();
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (ServiceException e) {
e.printStackTrace();
}
}
}

Related Links

Out of memory while running ITIMDocTool_HTML.sh
Webservice call from TDI via isim
ITIM- Java client not able to get the PlatformContext object using new InitialPlatformContext(env)
ITIM WS SOAP Response fails Validation
Custom adapter Test connection AL Error CTGIMT603E for webservice connection
Web Services Wrappers for ITIM API- New Application
Thread safety of client API
Webservices exception
Error while testing connection to ITIM Web Services v1.32
ISIM 6.0 webservice date issue
Web Services call to trigger Recon in TIM
Two loops in ITIM workflow are not working one by one
Anyone have ADT 5.1.2.4 working?
Session Timeout - Lost API Requests.
Accessinfo/CreateAccess TIM API\'s
New Thread Requests

Categories

DW
IBM Connections Cloud
Cast Iron Community
test
Brazil
Weblogs
Information Management
i2 Software
Linux on Power Community
IBM Connections Cloud ...
IBM SmartCloud Notes
IBM OS Pattern Kit
IBM FileNet IDM Deskto...
eDiscovery
IBM Kenexa LMS
IBM Kenexa Onboard on ...
IBM Kenexa CompAnalyst...
IBM Security Identity ...
Interact
IBM SmartCloud Applica...
IBM TRIRIGA CAD Integr...
Jazz for Service Manag...
Labs (BigFix Labs)
Customizations
Collaboration Network
Education
IBM ILOG Optimization
Báo cáo về các nội dun...
Cognos BI 10
Cognos Enterprise BI
Reportar contenido ina...
Linux
IBM Rational Asset Ana...
IBM Rational Rhapsody
Rational Performance T...
Серверы IBM System x
wireless
tivoli
websphere
lotus
db2
Test for Aparna
Test tivoli forum
Lotus Brasil
Brazil - Java`s Forum
Telecommunications
Retail
Fabrication and Assembly
On Demand
XML
Web services
Report abuse
Blockchain Technology
Part 3 - Challenge #08...
Migrating to WebSphere...
IBM Monitoring and Dia...
WebSphere Enterprise S...
AppScan Enterprise
AppScan Standard
IBM Cloud Identity
DSM Extensions, Custom...
News & Announcements
API
Mobile Store Channel
Performance / Scaling
Mapping / Translation
Business Process Modeling
Gentran Server for Win...
Managed File Transfer
Industry
Customer Order Managem...
Comments on the OMS Co...
Business Process Modeling
Gentran Server for AS/400
Gentran Integration Su...
Connect:Express Windows
Connect:Direct for HP ...
Connect:Direct for UNIX
Your Selling System So...
Driving Usage
Platform
**Announcements & Ster...
Web Services, Messagin...
Platform Issues
Release 6.0
Release 5.6
App Servers
WebSphere
Business/IT challenges...
Mathematical Programming
ILOG Customer Experts
Questions and Best Pra...
JRules Trial Support -...
Форумы Lotus
Scripting Tools for SA...
IBM Image Construction...
IBM MapReduce Tools fo...
Visual Performance Ana...
Programming Contest Ce...
Netcool OMNIbus
IBM Tivoli Asset Disco...
Tivoli Application Dep...
OMEGAMON Performance M...
IBM i
HPC Central Technical ...
IBM BladeCenter Forum
System z Hardware Mana...
ibmpub.java.aix

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile