Unsolved
This post is more than 5 years old
1 Message
0
671
January 20th, 2012 05:00
Place login code in a web service and make it work
Hi,
I have this code, can I place it in a web service, deploy this webservice on tomcat and make it work?
public Boolean BuscarDocumento(String name) throws Exception{
try{
IDfClientX clientX = new DfClientX();
IDfClient localClient = clientX.getLocalClient();
IDfLoginInfo li = clientX.getLoginInfo();
li.setUser("userp");
li.setPassword("userp");
IDfSession session = localClient.newSession("LAEPSV", li);
IDfQuery query = clientX.getQuery();
query.setDQL("select * from dm_sysobject where object_name = '" + name + "'");
IDfCollection col = query.execute(session,DfQuery.DF_READ_QUERY);
if (col.next()) {
return true;
}else{
return false;
}
}catch(Exception ex){
throw ex;
}
I can access the web service, but when I try to consume this web service (which has been deployed in other machine) I always get the same error:
AxisFault
faultCode: { http://schemas.xmlsoap.org/soap/envelope/}Server
faultSubcode:
faultString: com/documentum/fc/client/DfAuthenticationException
faultActor:
faultNode:
faultDetail:
{ http://xml.apache.org/axis/}stackTrace:com/documentum/fc/client/DfAuthenticationException
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
This code works fine when I try it in composer on my local machine.


