Thanks you all, it Works !! -----Mensaje original----- De: Florian Müller [mailto:[email protected]] Enviado el: jueves, 24 de marzo de 2011 21:22 Para: [email protected]; [email protected] Asunto: Re: first steps with opencmis for java
Hi, Check the navigation service URL. It is: http:/localhost:8080/alfresco/cmis/NavigationService?wsdl But it should be: http://localhost:8080/alfresco/cmis/NavigationService?wsdl Others WSDL URLs are also wrong. - Florian On 24/03/2011 19:17, [email protected] wrote: > Hi all, > > > > First, sorry for my english. I´m from Spain. Second Im going crazy! > > > > I have the last alfresco community edition and I work with Eclipse and > OpenCmis. I want to list the children of the root folder and I cant > !! I dont know why. I follow the examples codes, but not work. I write : > > > > // default factory implementation > > SessionFactory factory = > SessionFactoryImpl.newInstance(); > > Map<String, String> parameter = new HashMap<String, > String>(); > > > > // user credentials > > parameter.put(SessionParameter.USER, "admin"); > > parameter.put(SessionParameter.PASSWORD, "alfresco"); > > > > // connection settings > > parameter.put(SessionParameter.BINDING_TYPE, > BindingType.WEBSERVICES.value()); > > parameter.put(SessionParameter.WEBSERVICES_ACL_SERVICE, > "http://localhost:8080/alfresco/cmis/ACLService?wsdl"); > > > parameter.put(SessionParameter.WEBSERVICES_DISCOVERY_SERVICE, > "http:/localhost:8080/alfrecso/cmis/DiscoveryService?wsdl"); > > > parameter.put(SessionParameter.WEBSERVICES_MULTIFILING_SERVICE, > "http://localhost:8080/alfresco/cmis/MultiFilingService?wsdl"); > > > parameter.put(SessionParameter.WEBSERVICES_NAVIGATION_SERVICE, > "http:/localhost:8080/alfresco/cmis/NavigationService?wsdl"); > > > parameter.put(SessionParameter.WEBSERVICES_OBJECT_SERVICE, > "http://localhost:8080/alfresco/cmis/ObjectService?wsdl"); > > > parameter.put(SessionParameter.WEBSERVICES_POLICY_SERVICE, > "http://localhost:8080/alfresco/cmis/PolicyService?wsdl"); > > > parameter.put(SessionParameter.WEBSERVICES_RELATIONSHIP_SERVICE, > "http://localhost:8080/alfresco/cmis/RelationshipService?wsdl"); > > > parameter.put(SessionParameter.WEBSERVICES_REPOSITORY_SERVICE, > "http://localhost:8080/alfresco/cmis/RepositoryService?wsdl"); > > > parameter.put(SessionParameter.WEBSERVICES_VERSIONING_SERVICE, > "http:/localhost:8080/alfresco/cmis/VersioningService?wsdl"); > > parameter.put(SessionParameter.REPOSITORY_ID, > "9548ff2a-c0f5-4ddc-ba68-0421d2d1784d"); > > > > // create session > > Session session = factory.createSession(parameter); > > > > Folder root = session.getRootFolder(); > > > > ItemIterable<CmisObject> children = root.getChildren(); > > > > for (CmisObject o : children) { > > System.out.println(o.getName()); > > } > > > > All is ok, the repository_id, the credentials but in this line : for > (CmisObject o : children ){ throws the exception : > > > > Exception in thread "main" > org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException: > Cannot initalize Web Services service object > [org.apache.chemistry.opencmis.binding.webservices.NavigationService]: > null > > at > org.apache.chemistry.opencmis.client.bindings.spi.webservices.PortProv > ider.i > nitServiceObject(PortProvider.java:256) > > at > org.apache.chemistry.opencmis.client.bindings.spi.webservices.PortProv > ider.g > etPortObject(PortProvider.java:205) > > at > org.apache.chemistry.opencmis.client.bindings.spi.webservices.PortProv > ider.g > etNavigationServicePort(PortProvider.java:108) > > at > org.apache.chemistry.opencmis.client.bindings.spi.webservices.Navigati > onServ > iceImpl.getChildren(NavigationServiceImpl.java:75) > > at > org.apache.chemistry.opencmis.client.runtime.FolderImpl$2.fetchPage(Fo > lderIm > pl.java:259) > > at > org.apache.chemistry.opencmis.client.runtime.util.AbstractIterator.get > Curren > tPage(AbstractIterator.java:132) > > at > org.apache.chemistry.opencmis.client.runtime.util.CollectionIterator.h > asNext > (CollectionIterator.java:48) > > at es.upct.pfc.cliente.lanzador.main(lanzador.java:75) > > Caused by: java.lang.NullPointerException > > at sun.net.www.ParseUtil.toURI(ParseUtil.java:261) > > at > sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnec > tion.j > ava:905) > > at > sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection. > java:8 > 36) > > at > sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConn > ection > .java:1172) > > at java.net.URL.openStream(URL.java:1010) > > at > com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.createReader(RuntimeWSDLParser. > java:804) > > at > com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.resolveWSDL(RuntimeWSDLPa > rser.j > ava:262) > > at > com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.j > ava:12 > 9) > > at > com.sun.xml.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.ja > va:265 > ) > > at > com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java: > 228) > > at > com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java: > 176) > > at > com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.jav > a:104) > > at javax.xml.ws.Service.<init>(Service.java:56) > > at > org.apache.chemistry.opencmis.commons.impl.jaxb.NavigationService.<ini > t>(Nav > igationService.java:42) > > at > org.apache.chemistry.opencmis.client.bindings.spi.webservices.PortProv > ider.i > nitServiceObject(PortProvider.java:235) > > ... 7 more > > > > And I am desperate any idea? Thanks you so much in advice. > > > >
