05-19-2009 03:04 AM
WebServiceFactory.setEndpointAddress("http://127.0.0.1:8080/alfresco/api");
// Start the session
AuthenticationUtils.startSession(getUser(), getPassword());
//AuthenticationUtils.startSession("admin", "admin");
try {
// Create a reference to the parent where we want to look for content
Store storeRef = new Store(Constants.WORKSPACE_STORE, "SpacesStore");
// Get a reference to the respository web service
RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory.getRepositoryService();
// Create a query object, looking for all items of a particular type
Query query = new Query(Constants.QUERY_LANG_LUCENE, "TYPE:\"" + Constants.createQNameString(SomeCoModel.NAMESPACE_SOMECO_CONTENT_MODEL, SomeCoModel.TYPE_SC_DOC) + "\"");
and this is the error what i haveException in thread "main" org.alfresco.webservice.util.WebServiceException: Error starting session.i use eclipse JEE
at org.alfresco.webservice.util.AuthenticationUtils.startSession(AuthenticationUtils.java:94)
at com.someco.examples.SomeCoDataCleaner.clean(SomeCoDataCleaner.java:42)
at com.someco.examples.SomeCoDataCleaner.main(SomeCoDataCleaner.java:35)
Caused by: (400)Mauvaise Requ�te
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
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 org.alfresco.webservice.authentication.AuthenticationServiceSoapBindingStub.startSession(AuthenticationServiceSoapBindingStub.java:187)
at org.alfresco.webservice.util.AuthenticationUtils.startSession(AuthenticationUtils.java:79)
… 2 more
06-19-2009 05:13 PM
#
# Set the following property to reference the Alfresco server that you would like web service client
# to communicate with
repository.location=http://localhost:8080/alfresco/api
08-16-2009 04:52 AM
AuthenticationUtils.startSession(”admin”, “admin”);
but it throws an axis exception that translates to 400 bad http request.08-18-2009 08:47 AM
curl "http://localhost:8080/alfresco/service/api/login?u=admin&pw=admin"
Is this a custom class, one of the SDK examples, or one of the Someco examples?04-01-2016 05:53 AM
04-06-2016 08:27 AM
curl "http://localhost:8080/alfresco/service/api/login?u=admin&pw=Password123"
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.