I would like to use SGD API to access SGD user database but I have the
following error:
Fault code : HTTP
Fault string : (401)Unauthorized
Exception in thread "main" com.tarantella.tta.webservices.TTAException
at
com.tarantella.tta.webservices.client.apis.apache.BaseRequest.setFault(BaseR
equest.java:417)
at
com.tarantella.tta.webservices.client.apis.apache.BaseRequest.callServiceWor
k(BaseRequest.java:376)
at
com.tarantella.tta.webservices.client.apis.apache.BaseRequest.callService(Ba
seRequest.java:254)
at
com.tarantella.tta.webservices.client.apis.apache.BaseRequest.callService(Ba
seRequest.java:246)
at
com.tarantella.tta.webservices.client.apis.apache.ExternalAuthRequest.setSes
sionIdentity(ExternalAuthRequest.java:38)
at test.handleExternalAuth(test.java:269)
at test.main(test.java:313)
it seems it has to be web authenticated before you can query web services,
how about those using java native program? I have the following code:
..
..
IServiceLocator locator = ServiceLocatorHolder.getLocator();
locator.setUsername(ITarantellaExternalAuth.class.getName(),
username);
locator.setPassword(ITarantellaExternalAuth.class.getName(),
password);
ITarantellaExternalAuth req = null;
//req = locator.getExternalAuth();
try{
req = locator.getExternalAuth(new
URL("http://localhost:80/axis/services/document/externalauth"), "pyf",
"12345678");
}catch (Exception e){
e.printStackTrace();
}
if (req instanceof BaseRequest)
{
((BaseRequest)req).setReqType(reqType);
((BaseRequest)req).setRecordRequest(showReq);
}
resp = req.setSessionIdentity(username, password, locale);
String reqXml;
if (req instanceof BaseRequest)
reqXml = ((BaseRequest)req).getRequestXML();
else
reqXml = "Unavailable";
handleResponse(reqXml, resp);
..
..
Which I modified from apitest JSPs.
Am I going the wrong way or is there anyway to overcome the web
authentication? I can't find any clue in apitest since it is web
applications.
_______________________________________________
SGD-Users mailing list
[email protected]
http://www.filibeto.org/mailman/listinfo/sgd-users