+ "...");
}
try {
if (service instanceof RepositoryService) {
portObject = ((RepositoryService) service).getRepositoryServicePort(new MTOMFeature());
} else if (service instanceof NavigationService) {
portObject = ((NavigationService) service).getNavigationServicePort(new MTOMFeature());
} else if (service instanceof ObjectService) {
int threshold = 4 * 1024 * 1024;
try {
threshold = Integer.parseInt((String) session.get(SessionParameter.WEBSERVICES_MEMORY_THRESHOLD));
} catch (Exception e) {
}
portObject = ((ObjectService) service).getObjectServicePort(new MTOMFeature(),
new StreamingAttachmentFeature(null, true, threshold));
((BindingProvider) portObject).getRequestContext().put(
JAXWSProperties.HTTP_CLIENT_STREAMING_CHUNK_SIZE, CHUNK_SIZE);
} else if (service instanceof VersioningService) {
portObject = ((VersioningService) service).getVersioningServicePort(new MTOMFeature());
} else if (service instanceof DiscoveryService) {
portObject = ((DiscoveryService) service).getDiscoveryServicePort(new MTOMFeature());
} else if (service instanceof MultiFilingService) {
portObject = ((MultiFilingService) service).getMultiFilingServicePort(new MTOMFeature());
} else if (service instanceof RelationshipService) {
portObject = ((RelationshipService) service).getRelationshipServicePort(new MTOMFeature());
} else if (service instanceof PolicyService) {
portObject = ((PolicyService) service).getPolicyServicePort(new MTOMFeature());
} else if (service instanceof ACLService) {
portObject = ((ACLService) service).getACLServicePort(new MTOMFeature());
} else {
throw new CmisRuntimeException("Cannot find Web Services service object!");
}
// add SOAP and HTTP authentication headers