AnsweredAssumed Answered

Content Web Service [URGENT-PLEASE HELP]

Question asked by balajimnp on Feb 15, 2011
Hi

We are trying to access a file i.e. trying to download a file from alfresco. The code gives an exception in the following line. The same code works well from a standalone Java Application executed as a Java Class while breaks when executed from a Web Page on JBOSS Application Server. It works fine with Tomcat Server. Any hints or solution to this problem?

SOURCE CODE
——————

   Content[] readResult = contentService.read(
                    new Predicate(new Reference[]{contentReference}, STORE, null),
                    Constants.READ_CONTENT);


LOG FILE CONTENTS
————————–

2011-02-15 11:36:22,245 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,245 DEBUG - Enter: AxisEngine::init
2011-02-15 11:36:22,245 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,245 DEBUG - Exit: AxisEngine::init
2011-02-15 11:36:22,260 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,260 DEBUG - @b69a99 added parameter >name:       {http://www.alfresco.org/ws/service/content/1.0}items
typeEntry:  null
mode:       IN
position:   0
isReturn:   false
typeQName:  {http://www.alfresco.org/ws/model/content/1.0}Predicate
javaType:   class org.alfresco.webservice.types.Predicate
inHeader:   false
outHeader:  false
@5fcdd8<total parameters:1
2011-02-15 11:36:22,260 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,260 DEBUG - @b69a99 added parameter >name:       {http://www.alfresco.org/ws/service/content/1.0}property
typeEntry:  null
mode:       IN
position:   1
isReturn:   false
typeQName:  {http://www.w3.org/2001/XMLSchema}string
javaType:   class java.lang.String
inHeader:   false
outHeader:  false
@1c340ec<total parameters:2
2011-02-15 11:36:22,260 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,260 DEBUG - @b69a99setReturnType({http://www.alfresco.org/ws/service/content/1.0}Content)
2011-02-15 11:36:22,260 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,260 DEBUG - @16fd602 added parameter >name:       {http://www.alfresco.org/ws/service/content/1.0}node
typeEntry:  null
mode:       IN
position:   0
isReturn:   false
typeQName:  {http://www.alfresco.org/ws/model/content/1.0}Reference
javaType:   class org.alfresco.webservice.types.Reference
inHeader:   false
outHeader:  false
@14b284c<total parameters:1
2011-02-15 11:36:22,260 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,260 DEBUG - @16fd602 added parameter >name:       {http://www.alfresco.org/ws/service/content/1.0}property
typeEntry:  null
mode:       IN
position:   1
isReturn:   false
typeQName:  {http://www.w3.org/2001/XMLSchema}string
javaType:   class java.lang.String
inHeader:   false
outHeader:  false
@142c77b<total parameters:2
2011-02-15 11:36:22,260 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,260 DEBUG - @16fd602 added parameter >name:       {http://www.alfresco.org/ws/service/content/1.0}content
typeEntry:  null
mode:       IN
position:   2
isReturn:   false
typeQName:  {http://www.w3.org/2001/XMLSchema}base64Binary
javaType:   class [B
inHeader:   false
outHeader:  false
@136630a<total parameters:3
2011-02-15 11:36:22,260 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,260 DEBUG - @16fd602 added parameter >name:       {http://www.alfresco.org/ws/service/content/1.0}format
typeEntry:  null
mode:       IN
position:   3
isReturn:   false
typeQName:  {http://www.alfresco.org/ws/model/content/1.0}ContentFormat
javaType:   class org.alfresco.webservice.types.ContentFormat
inHeader:   false
outHeader:  false
@1dda02<total parameters:4
2011-02-15 11:36:22,260 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,260 DEBUG - @16fd602setReturnType({http://www.alfresco.org/ws/service/content/1.0}Content)
2011-02-15 11:36:22,260 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,260 DEBUG - @1d3e786 added parameter >name:       {http://www.alfresco.org/ws/service/content/1.0}node
typeEntry:  null
mode:       IN
position:   0
isReturn:   false
typeQName:  {http://www.alfresco.org/ws/model/content/1.0}Reference
javaType:   class org.alfresco.webservice.types.Reference
inHeader:   false
outHeader:  false
@1053e8a<total parameters:1
2011-02-15 11:36:22,260 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,260 DEBUG - @1d3e786 added parameter >name:       {http://www.alfresco.org/ws/service/content/1.0}property
typeEntry:  null
mode:       IN
position:   1
isReturn:   false
typeQName:  {http://www.w3.org/2001/XMLSchema}string
javaType:   class java.lang.String
inHeader:   false
outHeader:  false
@14cd792<total parameters:2
2011-02-15 11:36:22,260 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,260 DEBUG - @1d3e786 added parameter >name:       {http://www.alfresco.org/ws/service/content/1.0}format
typeEntry:  null
mode:       IN
position:   2
isReturn:   false
typeQName:  {http://www.alfresco.org/ws/model/content/1.0}ContentFormat
javaType:   class org.alfresco.webservice.types.ContentFormat
inHeader:   false
outHeader:  false
@1dcd9e3<total parameters:3
2011-02-15 11:36:22,260 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,260 DEBUG - @1d3e786setReturnType({http://www.alfresco.org/ws/service/content/1.0}Content)
2011-02-15 11:36:22,260 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,260 DEBUG - @64ff75 added parameter >name:       {http://www.alfresco.org/ws/service/content/1.0}items
typeEntry:  null
mode:       IN
position:   0
isReturn:   false
typeQName:  {http://www.alfresco.org/ws/model/content/1.0}Predicate
javaType:   class org.alfresco.webservice.types.Predicate
inHeader:   false
outHeader:  false
@bf60ae<total parameters:1
2011-02-15 11:36:22,260 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,260 DEBUG - @64ff75 added parameter >name:       {http://www.alfresco.org/ws/service/content/1.0}property
typeEntry:  null
mode:       IN
position:   1
isReturn:   false
typeQName:  {http://www.w3.org/2001/XMLSchema}string
javaType:   class java.lang.String
inHeader:   false
outHeader:  false
@645da3<total parameters:2
2011-02-15 11:36:22,260 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,260 DEBUG - @64ff75setReturnType({http://www.alfresco.org/ws/service/content/1.0}Content)
2011-02-15 11:36:22,260 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,260 DEBUG - @13faee6 added parameter >name:       {http://www.alfresco.org/ws/service/content/1.0}source
typeEntry:  null
mode:       IN
position:   0
isReturn:   false
typeQName:  {http://www.alfresco.org/ws/model/content/1.0}Reference
javaType:   class org.alfresco.webservice.types.Reference
inHeader:   false
outHeader:  false
@1f3b0f1<total parameters:1
2011-02-15 11:36:22,260 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,260 DEBUG - @13faee6 added parameter >name:       {http://www.alfresco.org/ws/service/content/1.0}property
typeEntry:  null
mode:       IN
position:   1
isReturn:   false
typeQName:  {http://www.w3.org/2001/XMLSchema}string
javaType:   class java.lang.String
inHeader:   false
outHeader:  false
@1e5d48e<total parameters:2
2011-02-15 11:36:22,260 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,260 DEBUG - @13faee6 added parameter >name:       {http://www.alfresco.org/ws/service/content/1.0}destinationReference
typeEntry:  null
mode:       IN
position:   2
isReturn:   false
typeQName:  {http://www.alfresco.org/ws/model/content/1.0}Reference
javaType:   class org.alfresco.webservice.types.Reference
inHeader:   false
outHeader:  false
@1e5f734<total parameters:3
2011-02-15 11:36:22,260 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,260 DEBUG - @13faee6 added parameter >name:       {http://www.alfresco.org/ws/service/content/1.0}destinationProperty
typeEntry:  null
mode:       IN
position:   3
isReturn:   false
typeQName:  {http://www.w3.org/2001/XMLSchema}string
javaType:   class java.lang.String
inHeader:   false
outHeader:  false
@c8b678<total parameters:4
2011-02-15 11:36:22,260 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,260 DEBUG - @13faee6 added parameter >name:       {http://www.alfresco.org/ws/service/content/1.0}destinationFormat
typeEntry:  null
mode:       IN
position:   4
isReturn:   false
typeQName:  {http://www.alfresco.org/ws/model/content/1.0}ContentFormat
javaType:   class org.alfresco.webservice.types.ContentFormat
inHeader:   false
outHeader:  false
@1439c61<total parameters:5
2011-02-15 11:36:22,260 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,260 DEBUG - @13faee6setReturnType({http://www.alfresco.org/ws/service/content/1.0}Content)
2011-02-15 11:36:22,291 INFO  [STDOUT] (Thread-19) contentServiceContentService
2011-02-15 11:36:22,291 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,291 DEBUG - org.apache.axis.i18n.resource::handleGetObject(transport00)
2011-02-15 11:36:22,291 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,291 DEBUG - Transport is org.apache.axis.transport.http.HTTPTransport@742497
2011-02-15 11:36:22,354 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,354 DEBUG - Enter: Call::invoke(ns, meth, args)
2011-02-15 11:36:22,354 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,354 DEBUG - operation=name:        read
returnQName: {http://www.alfresco.org/ws/service/content/1.0}content
returnType:  {http://www.alfresco.org/ws/service/content/1.0}Content
returnClass: class [Lorg.alfresco.webservice.content.Content;
elementQName:null
soapAction:  null
style:       wrapped
use:         literal
numInParams: 2
method:null
ParameterDesc[0]:
  name:       {http://www.alfresco.org/ws/service/content/1.0}items
  typeEntry:  null
  mode:       IN
  position:   0
  isReturn:   false
  typeQName:  {http://www.alfresco.org/ws/model/content/1.0}Predicate
  javaType:   class org.alfresco.webservice.types.Predicate
  inHeader:   false
  outHeader:  false

ParameterDesc[1]:
  name:       {http://www.alfresco.org/ws/service/content/1.0}property
  typeEntry:  null
  mode:       IN
  position:   1
  isReturn:   false
  typeQName:  {http://www.w3.org/2001/XMLSchema}string
  javaType:   class java.lang.String
  inHeader:   false
  outHeader:  false

FaultDesc[0]:
  name: null
  qname: {http://www.alfresco.org/ws/service/content/1.0}ContentFault
  type: {http://www.alfresco.org/ws/service/content/1.0}ContentFault
  Class: org.alfresco.webservice.content.ContentFault
2011-02-15 11:36:22,354 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,354 DEBUG - operation.getNumParams()=2
2011-02-15 11:36:22,354 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,354 DEBUG - getParamList number of params: 2
2011-02-15 11:36:22,354 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,354 DEBUG - Enter: Call::invoke(RPCElement)
2011-02-15 11:36:22,370 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,354 DEBUG - Enter: SOAPPart ctor(FORM_SOAPENVELOPE)
2011-02-15 11:36:22,370 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,370 DEBUG - org.apache.axis.i18n.resource::handleGetObject(setMsgForm)
2011-02-15 11:36:22,370 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,370 DEBUG - Setting current message form to: FORM_SOAPENVELOPE (currentMessage is now org.apache.axis.message.SOAPEnvelope)
2011-02-15 11:36:22,370 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,370 DEBUG - Exit: SOAPPart ctor()
2011-02-15 11:36:22,370 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,370 DEBUG - org.apache.axis.i18n.resource::handleGetObject(addBody00)
2011-02-15 11:36:22,370 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,370 DEBUG - Adding body element to message…
2011-02-15 11:36:22,370 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,370 DEBUG - Enter: Call::invoke()
2011-02-15 11:36:22,370 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,370 DEBUG - MessageContext: setTargetService(ContentService)
2011-02-15 11:36:22,370 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,370 DEBUG - org.apache.axis.i18n.resource::handleGetObject(noService10)
2011-02-15 11:36:22,370 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,370 DEBUG - Exception:
org.apache.axis.ConfigurationException: No service named ContentService is available
org.apache.axis.ConfigurationException: No service named ContentService is available
   at org.apache.axis.configuration.FileProvider.getService(FileProvider.java:233)
   at org.apache.axis.AxisEngine.getService(AxisEngine.java:311)
   at org.apache.axis.MessageContext.setTargetService(MessageContext.java:756)
   at org.apache.axis.client.Call.invoke(Call.java:2690)
   at org.apache.axis.client.Call.invoke(Call.java:2443)
   at org.apache.axis.client.Call.invoke(Call.java:2366)
   at org.apache.axis.client.Call.invoke(Call.java:1812)
   at org.alfresco.webservice.content.ContentServiceSoapBindingStub.read(ContentServiceSoapBindingStub.java:467)
   at com.esourcing.application.dao.AlfrescoRfxDAO.getRfxUrl(AlfrescoRfxDAO.java:163)
   at com.esourcing.application.service.RfxServiceImpl.getRfxUrl(RfxServiceImpl.java:454)
   at com.esourcing.application.facade.RfxFacade.getRfxUrl(RfxFacade.java:218)
   at com.esourcing.event.delegate.RfxDelegate.getRfxUrl(RfxDelegate.java:331)
   at com.esourcing.event.renderer.MyListener1.download(HomePageRowRenderer.java:73)
   at com.esourcing.event.renderer.MyListener1.onEvent(HomePageRowRenderer.java:65)
   at org.zkoss.zk.ui.impl.EventProcessor.process0(EventProcessor.java:197)
   at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:141)
   at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.process0(EventProcessingThreadImpl.java:519)
   at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.run(EventProcessingThreadImpl.java:446)

   at org.apache.axis.configuration.FileProvider.getService(FileProvider.java:233)
   at org.apache.axis.AxisEngine.getService(AxisEngine.java:311)
   at org.apache.axis.MessageContext.setTargetService(MessageContext.java:756)
   at org.apache.axis.client.Call.invoke(Call.java:2690)
   at org.apache.axis.client.Call.invoke(Call.java:2443)
   at org.apache.axis.client.Call.invoke(Call.java:2366)
   at org.apache.axis.client.Call.invoke(Call.java:1812)
   at org.alfresco.webservice.content.ContentServiceSoapBindingStub.read(ContentServiceSoapBindingStub.java:467)
   at com.esourcing.application.dao.AlfrescoRfxDAO.getRfxUrl(AlfrescoRfxDAO.java:163)
   at com.esourcing.application.service.RfxServiceImpl.getRfxUrl(RfxServiceImpl.java:454)
   at com.esourcing.application.facade.RfxFacade.getRfxUrl(RfxFacade.java:218)
   at com.esourcing.event.delegate.RfxDelegate.getRfxUrl(RfxDelegate.java:331)
   at com.esourcing.event.renderer.MyListener1.download(HomePageRowRenderer.java:73)
   at com.esourcing.event.renderer.MyListener1.onEvent(HomePageRowRenderer.java:65)
   at org.zkoss.zk.ui.impl.EventProcessor.process0(EventProcessor.java:197)
   at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:141)
   at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.process0(EventProcessingThreadImpl.java:519)
   at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.run(EventProcessingThreadImpl.java:446)
2011-02-15 11:36:22,370 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,370 DEBUG - MessageContext: setServiceHandler(null)
2011-02-15 11:36:22,370 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,370 DEBUG - org.apache.axis.i18n.resource::handleGetObject(targetService)
2011-02-15 11:36:22,370 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,370 DEBUG - Target service:  ContentService
2011-02-15 11:36:22,370 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,370 DEBUG - MessageContext: setTargetService(http://www.alfresco.org/ws/service/content/1.0/read)
2011-02-15 11:36:22,370 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,370 DEBUG - org.apache.axis.i18n.resource::handleGetObject(noService10)
2011-02-15 11:36:22,370 INFO  [STDOUT] (Thread-19) 2011-02-15 11:36:22,370 DEBUG - Exception:
org.apache.axis.ConfigurationException: No service named http://www.alfresco.org/ws/service/content/1.0/read is available
org.apache.axis.ConfigurationException: No service named http://www.alfresco.org/ws/service/content/1.0/read is available
   at org.apache.axis.configuration.FileProvider.getService(FileProvider.java:233)
   at org.apache.axis.AxisEngine.getService(AxisEngine.java:311)
   at org.apache.axis.MessageContext.setTargetService(MessageContext.java:756)
   at org.apache.axis.transport.http.HTTPTransport.setupMessageContextImpl(HTTPTransport.java:89)
   at org.apache.axis.client.Transport.setupMessageContext(Transport.java:46)
   at org.apache.axis.client.Call.invoke(Call.java:2738)
   at org.apache.axis.client.Call.invoke(Call.java:2443)
   at org.apache.axis.client.Call.invoke(Call.java:2366)
   at org.apache.axis.client.Call.invoke(Call.java:1812)
   at org.alfresco.webservice.content.ContentServiceSoapBindingStub.read(ContentServiceSoapBindingStub.java:467)
   at com.esourcing.application.dao.AlfrescoRfxDAO.getRfxUrl(AlfrescoRfxDAO.java:163)
   at com.esourcing.application.service.RfxServiceImpl.getRfxUrl(RfxServiceImpl.java:454)
   at com.esourcing.application.facade.RfxFacade.getRfxUrl(RfxFacade.java:218)
   at com.esourcing.event.delegate.RfxDelegate.getRfxUrl(RfxDelegate.java:331)
   at com.esourcing.event.renderer.MyListener1.download(HomePageRowRenderer.java:73)
   at com.esourcing.event.renderer.MyListener1.onEvent(HomePageRowRenderer.java:65)
   at org.zkoss.zk.ui.impl.EventProcessor.process0(EventProcessor.java:197)
   at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:141)
   at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.process0(EventProcessingThreadImpl.java:519)
   at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.run(EventProcessingThreadImpl.java:446)

   at org.apache.axis.configuration.FileProvider.getService(FileProvider.java:233)
   at org.apache.axis.AxisEngine.getService(AxisEngine.java:311)
   at org.apache.axis.MessageContext.setTargetService(MessageContext.java:756)
   at org.apache.axis.transport.http.HTTPTransport.setupMessageContextImpl(HTTPTransport.java:89)
   at org.apache.axis.client.Transport.setupMessageContext(Transport.java:46)
   at org.apache.axis.client.Call.invoke(Call.java:2738)
   at org.apache.axis.client.Call.invoke(Call.java:2443)
   at org.apache.axis.client.Call.invoke(Call.java:2366)
   at org.apache.axis.client.Call.invoke(Call.java:1812)
   at org.alfresco.webservice.content.ContentServiceSoapBindingStub.read(ContentServiceSoapBindingStub.java:467)
   at com.esourcing.application.dao.AlfrescoRfxDAO.getRfxUrl(AlfrescoRfxDAO.java:163)
   at com.esourcing.application.service.RfxServiceImpl.getRfxUrl(RfxServiceImpl.java:454)
   at com.esourcing.application.facade.RfxFacade.getRfxUrl(RfxFacade.java:218)
   at com.esourcing.event.delegate.RfxDelegate.getRfxUrl(RfxDelegate.java:331)
   at com.esourcing.event.renderer.MyListener1.download(HomePageRowRenderer.java:73)
   at com.esourcing.event.renderer.MyListener1.onEvent(HomePageRowRenderer.java:65)
   at org.zkoss.zk.ui.impl.EventProcessor.process0(EventProcessor.java:197)
   at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:141)
   at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.process0(EventProcessingThreadImpl.java:519)
   at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.run(EventProcessingThreadImpl.java:446)

Outcomes