05-18-2009 03:24 AM
05-18-2009 05:38 AM
05-18-2009 05:38 AM
05-18-2009 06:25 AM
05-18-2009 09:07 AM
WebServiceFactory.setEndpointAddress(ALFRESCO_WS_API_URL);
AuthenticationUtils.startSession(ADMIN_USERNAME, ADMIN_PASSWORD);
String mimeType = new MimetypesFileTypeMap().getContentType(file.getNameWithExtension());
ContentFormat contentFormat = new ContentFormat(mimeType,"UTF-8");
Reference reference = new Reference(ConstantsAlfresco.STORE, null, yourFullPathOfTheContent);
NamedValue[] properties = createProperties(yourUploadFormBean); //create all the custom properties for your content from your form
ParentReference parentRef = new ParentReference();
parentRef.setStore(store);
parentRef.setUuid(reference.getUuid());
parentRef.setPath(reference.getPath());
parentRef.setAssociationType(Constants.ASSOC_CONTAINS);
parentRef.setChildName(Constants.ASSOC_CONTAINS);
CMLCreate create = new CMLCreate();
create.setParent(parentRef);
create.setProperty(properties);
create.setType(yourCustomContentType);
CML cml = new CML();
cml.setCreate(new CMLCreate[] {create});
UpdateResult[] result = WebServiceFactory.getRepositoryService().update(cml);
ByteArrayOutputStream stream = new ByteArrayOutputStream();
int c;
while ((c = form.getFile().getStream().read()) != -1) {
stream.write((char) c);
}
Reference contentNode = result[0].getDestination();
Content content = WebServiceFactory.getContentService().write(contentNode,
Constants.PROP_CONTENT, stream.toByteArray(), contentFormat);
if (content == null)
throw new RemoteException("Error during storing file");
05-19-2009 12:20 AM
07-14-2009 03:40 AM
09-03-2009 02:15 AM
09-04-2009 06:59 AM
type Status report"
message /NewAppAlf/StatusMessage.jsp
description The requested resource (/NewAppAlf/StatusMessage.jsp) is not available.
16:46:01,126 INFO [STDOUT] inside try
16:46:01,126 INFO [STDOUT] For Testing Values….
16:46:01,126 INFO [STDOUT] title::Valuebismlillah
16:46:01,126 INFO [STDOUT] title::::::bismlillah
16:46:01,126 INFO [STDOUT] Description:::::desp
16:46:01,126 INFO [STDOUT] file name:::test_file.doc
16:46:01,126 INFO [STDOUT] file name :::test_file.doc
16:46:01,126 INFO [STDOUT] ext name :::doc
16:46:01,126 INFO [STDOUT] inside alfresco part::::::::
16:46:02,486 INFO [STDOUT] Error uploading file:::org.alfresco.webservice.util.WebServiceException: Error starting session.
16:46:02,486 ERROR [STDERR] org.alfresco.webservice.util.WebServiceException: Error starting session.
16:46:02,486 ERROR [STDERR] at org.alfresco.webservice.util.AuthenticationUtils.startSession(AuthenticationUtils.java:94)
16:46:02,486 ERROR [STDERR] at upload.doPost(upload.java:174)
16:46:02,486 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
16:46:02,486 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
16:46:02,486 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
16:46:02,486 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
16:46:02,486 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
16:46:02,486 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
16:46:02,486 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
16:46:02,486 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
16:46:02,486 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
16:46:02,486 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
16:46:02,486 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
16:46:02,486 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
16:46:02,486 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
16:46:02,486 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
16:46:02,486 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
16:46:02,486 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
16:46:02,486 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
16:46:02,486 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
16:46:02,486 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
16:46:02,486 ERROR [STDERR] at java.lang.Thread.run(Thread.java:619)
16:46:02,486 ERROR [STDERR] Caused by: java.net.ConnectException: Connection refused: connect
16:46:02,486 ERROR [STDERR] at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
16:46:02,486 ERROR [STDERR] at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:154)
16:46:02,486 ERROR [STDERR] at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
16:46:02,486 ERROR [STDERR] at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
16:46:02,486 ERROR [STDERR] at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
16:46:02,486 ERROR [STDERR] at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
16:46:02,486 ERROR [STDERR] at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
16:46:02,486 ERROR [STDERR] at org.apache.axis.client.Call.invoke(Call.java:2767)
16:46:02,486 ERROR [STDERR] at org.apache.axis.client.Call.invoke(Call.java:2443)
16:46:02,486 ERROR [STDERR] at org.apache.axis.client.Call.invoke(Call.java:2366)
16:46:02,486 ERROR [STDERR] at org.apache.axis.client.Call.invoke(Call.java:1812)
16:46:02,486 ERROR [STDERR] at org.alfresco.webservice.authentication.AuthenticationServiceSoapBindingStub.startSession(AuthenticationServiceSoapBindingStub.java:187)
16:46:02,486 ERROR [STDERR] at org.alfresco.webservice.util.AuthenticationUtils.startSession(AuthenticationUtils.java:79)
16:46:02,486 ERROR [STDERR] … 21 more
16:46:02,486 ERROR [STDERR] Caused by: java.net.ConnectException: Connection refused: connect
16:46:02,486 ERROR [STDERR] at java.net.PlainSocketImpl.socketConnect(Native Method)
16:46:02,486 ERROR [STDERR] at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
16:46:02,486 ERROR [STDERR] at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
16:46:02,486 ERROR [STDERR] at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
16:46:02,486 ERROR [STDERR] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
16:46:02,486 ERROR [STDERR] at java.net.Socket.connect(Socket.java:519)
16:46:02,486 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
16:46:02,486 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
16:46:02,486 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
16:46:02,486 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
16:46:02,486 ERROR [STDERR] at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:153)
16:46:02,486 ERROR [STDERR] at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:120)
16:46:02,486 ERROR [STDERR] at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
16:46:02,486 ERROR [STDERR] at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)
16:46:02,486 ERROR [STDERR] at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
16:46:02,486 ERROR [STDERR] … 32 more
16:46:02,486 INFO [STDOUT] [Ljava.lang.StackTraceElement;@9882d2
16:46:02,486 INFO [STDOUT] org.alfresco.webservice.util.WebServiceException: Error starting session.
16:46:02,486 INFO [STDOUT] session ending
09-04-2009 08:47 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.