parameter.put(SessionParameter.WEBSERVICES_REPOSITORY_SERVICE, repositoryService);
parameter.put(SessionParameter.WEBSERVICES_VERSIONING_SERVICE, versioningService);
parameter.put(SessionParameter.REPOSITORY_ID, repositoryId);
SessionFactoryImpl factory = SessionFactoryImpl.newInstance();
session = factory.createSession(parameter, null, new StandardAuthenticationProvider() {
private static final long serialVersionUID = 1L;
@Override
public Element getSOAPHeaders( Object portObject ) {
// Place headers here