chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastian Danninger <sebastian.dannin...@googlemail.com>
Subject Re: Can't create Session
Date Tue, 26 Apr 2011 07:51:52 GMT
That's how I do it (using Alfresco), please refere to the HOWTO
section http://chemistry.apache.org/java/examples/example-create-session.html

		SessionFactory f = SessionFactoryImpl.newInstance();
		Map<String, String> parameter = new HashMap<String, String>();
		parameter.put(SessionParameter.USER,
CommonTIE.tieProperties.getProperty("repo_usr"));
		parameter.put(SessionParameter.PASSWORD,
CommonTIE.tieProperties.getProperty("repo_pw"));
		parameter.put(SessionParameter.ATOMPUB_URL,
				CommonTIE.tieProperties.getProperty("repo_url"));
		parameter.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB
				.value());
		List<Repository> repos = f.getRepositories(parameter);
		String kt="";
        for(int i=0;i<repos.size();i++)
        {
        	Repository zz;
        	zz=repos.get(i);
        	kt=zz.getName();
        	kt=zz.getId();
        }		
		parameter.put(SessionParameter.REPOSITORY_ID, kt);

		Session s = f.createSession(parameter);

2011/4/26 刘文龙 <liuwenlong62555@126.com>:
> Hi,
> When I created Session using atomPub with opencmis 0.3 version,I can't create failure.
>
> Later I created ObjectId with Webservice,Still failure,So Could you help me checking
the source code,Or you send me how you create the correct code to me?
>
> So I'm come from china member.
>
> Thanks
> Lewis
>

Mime
View raw message