chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florian Müller <f...@apache.org>
Subject Re: Apache Chemistry - compatibility with Apache CXF
Date Thu, 23 Aug 2012 18:31:38 GMT
Ashish,

That is strange. A query call is not different to all the other calls.
Would it be possible to record the request and response messages with 
Fiddler or a similar tool? That might give us a hint where we have to look.


Florian


> Florian,
>
> I was able to get past the that hurdle. With the CXF version, I need
> to pass the WSDL URL and include the "?wsdl" part of it. If I do not
> include the ?wsdl in the URL, it fails with the exception I had
> mentioned in the previous thread.
> Anyways, I was able to test most of the Workbench functionality except
> for the Query tab on the work bench.
>
> The Query tab is throwing the below exception - ( I tested this with
> the original 0.7.0 workbench, and the query feature works fine.)
>
>> 13:07:49 DEBUG nt.bindings.spi.webservices.PortProvider: Creating Web
>> Service port object of
>> {http://docs.oasis-open.org/ns/cmis/ws/200908/}DiscoveryService...
>> 13:07:49 ERROR hemistry.opencmis.workbench.ClientHelper:
>> CmisInvalidArgumentException: Repository Id must be set!
> org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException:
>
> Repository Id must be set!
> at
> org.apache.chemistry.opencmis.client.bindings.spi.webservices.AbstractWebServicesService.convertException(AbstractWebServicesService.java:105)
>
>
> at
> org.apache.chemistry.opencmis.client.bindings.spi.webservices.DiscoveryServiceImpl.query(DiscoveryServiceImpl.java:87)
>
>
> at
> org.apache.chemistry.opencmis.client.runtime.SessionImpl$3.fetchPage(SessionImpl.java:557)
>
>
> at
> org.apache.chemistry.opencmis.client.runtime.util.AbstractIterator.getCurrentPage(AbstractIterator.java:132)
>
>
> at
> org.apache.chemistry.opencmis.client.runtime.util.CollectionPageIterator.hasNext(CollectionPageIterator.java:48)
>
>
> at
> org.apache.chemistry.opencmis.workbench.QueryFrame.doQuery(QueryFrame.java:243)
>
>
> at
> org.apache.chemistry.opencmis.workbench.QueryFrame.access$000(QueryFrame.java:59)
>
>
> at
> org.apache.chemistry.opencmis.workbench.QueryFrame$1.actionPerformed(QueryFrame.java:109)
>
>
> at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
> at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
> at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
> at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
> at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown
> Source)
> at java.awt.Component.processMouseEvent(Unknown Source)
>> 13:07:49 ERROR hemistry.opencmis.workbench.ClientHelper: Error code: 0
>> 13:07:49 ERROR hemistry.opencmis.workbench.ClientHelper: Error
>> content:<stacktrace:stacktrace
>> xmlns:stacktrace="http://chemistry.apache.org/opencmis/exception"
>> xmlns="http://chemistry.apache.org/opencmis/exception"
>> xmlns:ns2="http://docs.oasis-open.org/ns/cmis/messaging/200908/">org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException:
>>
>> Repository Id must be set!
> at
> org.apache.chemistry.opencmis.server.support.CmisServiceWrapper.checkId(CmisServiceWrapper.java:148)
>
>
> at
> org.apache.chemistry.opencmis.server.support.CmisServiceWrapper.checkRepositoryId(CmisServiceWrapper.java:185)
>
>
> at
> org.apache.chemistry.opencmis.server.support.CmisServiceWrapper.query(CmisServiceWrapper.java:1021)
>
>
> at
> org.apache.chemistry.opencmis.server.impl.webservices.DiscoveryService.query(DiscoveryService.java:82)
>
>
> at sun.reflect.GeneratedMethodAccessor408.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>
>
> at java.lang.reflect.Method.invoke(Method.java:616)
> at
> com.sun.xml.ws.api.server.InstanceResolver$1.invoke(InstanceResolver.java:246)
>
>
> at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146)
> at
> com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:257)
>
>
> at
> com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:93)
>
>
> at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:598)
> at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:557)
> at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:542)
> at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:439)
> at
> com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243)
> at
> com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:471)
>
>
> at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
> at
> com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)
>
>
> at
> com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet(WSServletDelegate.java:129)
>
>
> at
> com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:160)
>
>
> at
> com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:75)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>
>
> at
> org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>
>
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>
>
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>
>
> at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
>
>
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>
>
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>
>
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>
>
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
>
>
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
>
>
> at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
>
>
> at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
> at java.lang.Thread.run(Thread.java:679)
> </stacktrace:stacktrace>
>
>
> -----Original Message-----
> From: Florian Müller [mailto:fmui@apache.org]
> Sent: Thursday, August 23, 2012 5:18 AM
> To: dev@chemistry.apache.org
> Cc: Desai, Ashish (CGI Federal)
> Subject: RE: Apache Chemistry - compatibility with Apache CXF
>
> Hi Ashish,
>
> That's a really good starting point! The Workbench is a good benchmark.
>
> Unfortunately, the exception doesn't provide any details.
> Could you increase the log level (in the Workbench Log window)? Maybe
> there is more information in CXF debug messages.
> Maybe a CXF library is missing?!?
> You can also try adding a log message in the catch block of the port
> provider.
>
>
> Cheers,
>
> Florian
>
>
>> Florian,
>> Thanks for your response.
>>
>> Today, I successfully recompiled the chemistry source (from tag -
>> 0.7.0)using the CXFPortProvider implementation that was left in there
>> from the past. I mimicked the
>> chemistry-opencmis-client-bindings-websphere POM artifact and created
>> a chemistry-opencmis-client-bindings-cxf POM. I tried the following
>> successfully using the CXF client bindings -
>>
>> Folder creation - (session.getObjectByPath followed by
>> Folder.createFolder)
>> Document creation - (Folder.createDocument)
>> Type tree retrieval - (session.getTypeDescendants)
>>
>> We haven't really used much functionality within Alfresco yet. So I do
>> not have a really strong test suite beyond the above, unless I write
>> more test cases. I thought the opencmis-workbench would be a good
>> benchmark to shake out. Let me know if you agree.
>>
>> Anyways, I tried to test the newly compiled workbench (with the cxf
>> bindings and cxf jars in the classpath, and the jax-ws-rt-2.1.7.jar
>> removed from the workbench\lib folder). However I get the following
>> error during workbench login ( SessionFactoryImpl.getRepositories) -
>>
>>
>>
>>> 17:31:02 DEBUG dings.spi.webservices.CmisWebServicesSpi:
>>> Initializing Web Services SPI...
>>> 17:31:02 DEBUG ngs.spi.webservices.AbstractPortProvider:
>>> Initializing Web Service
>>> org.apache.chemistry.opencmis.binding.webservices.RepositoryService...
>>> 17:31:02 ERROR hemistry.opencmis.workbench.ClientHelper:
>>> CmisConnectionException: Cannot initalize Web Services service object
>>> [org.apache.chemistry.opencmis.binding.webservices.RepositoryService]:
>>> org.apache.cxf.service.factory.ServiceConstructionException: Failed
>>> to create service.
>> org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException:
>>
>>
>> Cannot initalize Web Services service object
>>
>> [org.apache.chemistry.opencmis.binding.webservices.RepositoryService]:
>> org.apache.cxf.service.factory.ServiceConstructionException: Failed to
>> create service.
>> at
>>
>> org.apache.chemistry.opencmis.client.bindings.spi.webservices.AbstractPortProvider.initServiceObject(AbstractPortProvider.java:288)
>>
>>
>> at
>>
>> org.apache.chemistry.opencmis.client.bindings.spi.webservices.AbstractPortProvider.getPortObject(AbstractPortProvider.java:206)
>>
>>
>> at
>>
>> org.apache.chemistry.opencmis.client.bindings.spi.webservices.AbstractPortProvider.getRepositoryServicePort(AbstractPortProvider.java:109)
>>
>>
>> at
>>
>> org.apache.chemistry.opencmis.client.bindings.spi.webservices.RepositoryServiceImpl.getRepositoryInfos(RepositoryServiceImpl.java:57)
>>
>>
>> at
>>
>> org.apache.chemistry.opencmis.client.bindings.impl.RepositoryServiceImpl.getRepositoryInfos(RepositoryServiceImpl.java:85)
>>
>>
>> at
>>
>> org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl.getRepositories(SessionFactoryImpl.java:109)
>>
>>
>> at
>>
>> org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl.getRepositories(SessionFactoryImpl.java:96)
>>
>>
>> at
>>
>> org.apache.chemistry.opencmis.workbench.model.ClientSession.connect(ClientSession.java:184)
>>
>>
>> at
>>
>> org.apache.chemistry.opencmis.workbench.model.ClientSession.<init>(ClientSession.java:103)
>>
>>
>> at
>>
>> org.apache.chemistry.opencmis.workbench.LoginDialog.createClientSession(LoginDialog.java:535)
>>
>>
>> at
>>
>> org.apache.chemistry.opencmis.workbench.LoginDialog$1.actionPerformed(LoginDialog.java:199)
>>
>>
>> at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
>> at javax.swing.AbstractButton$Handler.actionPerformed(Unknown
>> Source)
>> at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown
>> Source)
>>> 17:31:02 ERROR hemistry.opencmis.workbench.ClientHelper: Error code:
>>> 0
>>> 17:51:13 DEBUG dings.spi.webservices.CmisWebServicesSpi:
>>> Initializing Web Services SPI...
>>> 17:51:13 DEBUG ngs.spi.webservices.AbstractPortProvider:
>>> Initializing Web Service
>>> org.apache.chemistry.opencmis.binding.webservices.RepositoryService...
>>> 17:51:13 ERROR hemistry.opencmis.workbench.ClientHelper:
>>> CmisConnectionException: Cannot initalize Web Services service object
>>> [org.apache.chemistry.opencmis.binding.webservices.RepositoryService]:
>>> org.apache.cxf.service.factory.ServiceConstructionException: Failed
>>> to create service.
>> org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException:
>>
>>
>> Cannot initalize Web Services service object
>>
>> [org.apache.chemistry.opencmis.binding.webservices.RepositoryService]:
>> org.apache.cxf.service.factory.ServiceConstructionException: Failed to
>> create service.
>> at
>>
>> org.apache.chemistry.opencmis.client.bindings.spi.webservices.AbstractPortProvider.initServiceObject(AbstractPortProvider.java:288)
>>
>>
>> at
>>
>> org.apache.chemistry.opencmis.client.bindings.spi.webservices.AbstractPortProvider.getPortObject(AbstractPortProvider.java:206)
>>
>>
>> at
>>
>> org.apache.chemistry.opencmis.client.bindings.spi.webservices.AbstractPortProvider.getRepositoryServicePort(AbstractPortProvider.java:109)
>>
>>
>> at
>>
>> org.apache.chemistry.opencmis.client.bindings.spi.webservices.RepositoryServiceImpl.getRepositoryInfos(RepositoryServiceImpl.java:57)
>>
>>
>> at
>>
>> org.apache.chemistry.opencmis.client.bindings.impl.RepositoryServiceImpl.getRepositoryInfos(RepositoryServiceImpl.java:85)
>>
>>
>> at
>>
>> org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl.getRepositories(SessionFactoryImpl.java:109)
>>
>>
>> at
>>
>> org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl.getRepositories(SessionFactoryImpl.java:96)
>>
>>
>> at
>>
>> org.apache.chemistry.opencmis.workbench.model.ClientSession.connect(ClientSession.java:184)
>>
>>
>> at
>>
>> org.apache.chemistry.opencmis.workbench.model.ClientSession.<init>(ClientSession.java:103)
>>
>>
>> at
>>
>> org.apache.chemistry.opencmis.workbench.LoginDialog.createClientSession(LoginDialog.java:535)
>>
>>
>> at
>>
>> org.apache.chemistry.opencmis.workbench.LoginDialog$1.actionPerformed(LoginDialog.java:199)
>>
>>
>> at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
>> at javax.swing.AbstractButton$Handler.actionPerformed(Unknown
>> Source)
>> at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown
>> Source)
>>> 17:51:13 ERROR hemistry.opencmis.workbench.ClientHelper: Error code:
>>> 0
>>
>>
>>
>>
>> -----Original Message-----
>> From: Florian Müller [mailto:fmui@apache.org]
>> Sent: Wednesday, August 22, 2012 7:53 AM
>> To: dev@chemistry.apache.org
>> Cc: Desai, Ashish (CGI Federal)
>> Subject: Re: Apache Chemistry - compatibility with Apache CXF
>>
>> Hi Ashish,
>>
>> Nothing has changed since the conversations you have mentioned.
>> There is code, but it is unfinished and untested. Since there is no
>> driver for the CXF support, I don't expect that is going to change any
>> time soon.
>> If you want to pick it up, I'm happy to assist you. But I don't want
>> to touch a complex feature like this without demand.
>>
>>
>> Florian
>>
>>
>>> Hello,
>>>
>>> We are currently using Apache Chemistry(0.6.0) to communicate with
>>> Alfresco (4.0.1).
>>> Chemistry internally seems to use JAX-WS Reference Implementation
>>> (jax-ws-rt-2.1.7.jar) as the WS service provider.
>>> Our project architecture is using Apache CXF elsewhere in the
>>> architecture. We are starting to run into issues because of this
>>> usage of two different stacks (Apache CXF and jax-ws-rt.2.1.7.jar),
>>> when it comes to using them in the same Java container.
>>>
>>> I was wondering if there was any way to make Apache Chemistry work
>>> with Apache CXF?
>>>
>>> I tried changing the SPI using the system property
>>> -Djavax.xml.ws.spi.Provider=org.apache.cxf.jaxws.spi.ProviderImpl,
>>> but soon found out that the chemistry source code is specifically
>>> looking for Sun implementation classes like -
>>> com.sun.xml.ws.developer.WSBindingProvider
>>>
>>>
>>> I see the following posts from Florian Muller that indicate that some
>>> work has been done, but it looks like a point in time fix that was
>>> provided for that specific scenario.
>>>
>>>
>>>
>>> http://dev.day.com/discussion-groups/content/lists/cmis-chemistry/201
>>> 1 -01/2011-01-14__OpenCMIS_Incompatibility_with_CXF_kmvgejegno.html
>>>
>>>
>>>
>>> http://mail-archives.apache.org/mod_mbox/chemistry-dev/201101.mbox/%3
>>> C
>>> 4D346498.2030706@alfresco.com%3E
>>>
>>>
>>> Please let me know if any further pointers are available that I may
>>> have missed.
>


Mime
View raw message