How to use Attachment? [message #20471] |
Mon, 02 February 2009 00:32  |
Eclipse User |
|
|
|
I am not able to successfully pass a file attachment to server. This is
what I did:
1. I derived my class from Attachment.
2. My attachment is file-based.
The method on the interface is: log(Usage usage)
I get this exception after server is invoked from client.
javax.servlet.ServletException: org.blackt.udc.Usage:null
at
org.eclipse.riena.communication.publisher.hessian.RienaHessi anDispatcherServlet.service(RienaHessianDispatcherServlet.ja va:155)
at
org.eclipse.equinox.http.registry.internal.ServletManager$Se rvletWrapper.service(ServletManager.java:180)
at
org.eclipse.equinox.http.servlet.internal.ServletRegistratio n.handleRequest(ServletRegistration.java:90)
at
org.eclipse.equinox.http.servlet.internal.ProxyServlet.proce ssAlias(ProxyServlet.java:111)
I also want to know if it is acceptable to pass null for properties when
registering a service.
regAttachmentService =
context.registerService(IAttachmentService.class.getName(), new
AttachmentService(),
null);
Publish.service(IAttachmentService.class.getName()).usingPat h( "/AttachmentService").withProtocol("hessian")
//$NON-NLS-1$ //$NON-NLS-2$
.andStart(context);
What is the impact if I pass one protocol through properties and another
value using "withProtocol" method? Is the latter overridden?
|
|
|
Re: How to use Attachment? [message #20495 is a reply to message #20471] |
Tue, 03 February 2009 07:04  |
Eclipse User |
|
|
|
The Attachment is not meant to be subclassed. So the intention is that you instantiate an Attachment object in your
code, fill it with the data from the source you choose and pass it as parameter or return value.
There is an Integration JUnit Test that shows you how to use that. Its called AttachmentClientITest and it runs against
AttachmentService. Can be found in org.eclipse.riena.tests.
christian
Velganesh Subramanian schrieb:
> I am not able to successfully pass a file attachment to server. This is
> what I did:
>
> 1. I derived my class from Attachment.
> 2. My attachment is file-based.
>
> The method on the interface is: log(Usage usage)
>
> I get this exception after server is invoked from client.
>
> javax.servlet.ServletException: org.blackt.udc.Usage:null
> at
> org.eclipse.riena.communication.publisher.hessian.RienaHessi anDispatcherServlet.service(RienaHessianDispatcherServlet.ja va:155)
>
> at
> org.eclipse.equinox.http.registry.internal.ServletManager$Se rvletWrapper.service(ServletManager.java:180)
>
> at
> org.eclipse.equinox.http.servlet.internal.ServletRegistratio n.handleRequest(ServletRegistration.java:90)
>
> at
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.proce ssAlias(ProxyServlet.java:111)
>
>
> I also want to know if it is acceptable to pass null for properties when
> registering a service.
>
> regAttachmentService =
> context.registerService(IAttachmentService.class.getName(), new
> AttachmentService(),
> null);
> Publish.service(IAttachmentService.class.getName()).usingPat h( "/AttachmentService").withProtocol("hessian")
> //$NON-NLS-1$ //$NON-NLS-2$
> .andStart(context);
>
> What is the impact if I pass one protocol through properties and another
> value using "withProtocol" method? Is the latter overridden?
>
|
|
|
Re: How to use Attachment? [message #578513 is a reply to message #20471] |
Tue, 03 February 2009 07:04  |
Eclipse User |
|
|
|
The Attachment is not meant to be subclassed. So the intention is that you instantiate an Attachment object in your
code, fill it with the data from the source you choose and pass it as parameter or return value.
There is an Integration JUnit Test that shows you how to use that. Its called AttachmentClientITest and it runs against
AttachmentService. Can be found in org.eclipse.riena.tests.
christian
Velganesh Subramanian schrieb:
> I am not able to successfully pass a file attachment to server. This is
> what I did:
>
> 1. I derived my class from Attachment.
> 2. My attachment is file-based.
>
> The method on the interface is: log(Usage usage)
>
> I get this exception after server is invoked from client.
>
> javax.servlet.ServletException: org.blackt.udc.Usage:null
> at
> org.eclipse.riena.communication.publisher.hessian.RienaHessi anDispatcherServlet.service(RienaHessianDispatcherServlet.ja va:155)
>
> at
> org.eclipse.equinox.http.registry.internal.ServletManager$Se rvletWrapper.service(ServletManager.java:180)
>
> at
> org.eclipse.equinox.http.servlet.internal.ServletRegistratio n.handleRequest(ServletRegistration.java:90)
>
> at
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.proce ssAlias(ProxyServlet.java:111)
>
>
> I also want to know if it is acceptable to pass null for properties when
> registering a service.
>
> regAttachmentService =
> context.registerService(IAttachmentService.class.getName(), new
> AttachmentService(),
> null);
> Publish.service(IAttachmentService.class.getName()).usingPat h( "/AttachmentService").withProtocol("hessian")
> //$NON-NLS-1$ //$NON-NLS-2$
> .andStart(context);
>
> What is the impact if I pass one protocol through properties and another
> value using "withProtocol" method? Is the latter overridden?
>
|
|
|
Powered by
FUDForum. Page generated in 0.04033 seconds