[JBossWS] - Dynamic no. of attachments using MTOM
by oskar.carlstedt
Hi!
Has anyone made i possible to implement a web service that can receive or send multiple attachments using MTOM. All examples just have one DataHandler but this is not enough for what I want to do. I want to be able to use a dynamic number of attachments.
XOP has support for several attachments in the xml document but how does JBoss and especially Java EE treat such a data structure. Where can I find my attachments?
If I use the Provider< SOAPMessage > mechanism I have full control, but still the question: Where can I find the send attachments? Do I have to use a Provider< Source > implementation to solve this?
My web service consumers want to send multiple documents to our server in one request. Upon other requests, I will generate a dynamic number of PDF documents on the server and then send them to the client. Is it possible? Of course we can bundle all attachments into a zip file and get one attachment - but this is an ugly work around.
I hope someone can answer this question.
Regards
/Oskar
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4106990#4106990
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4106990
18 years, 8 months
[Beginners Corner] - Can I use aspectj in jboss ?
by umen
Hello all I like to use aspectJ with my application, now I put the aspectjrt.jar into my server -> all -> lib directory
And the application is loaded with no exception but when I execute the class 's I donât get any aspectJ prints ( I used system.out.println with the
@Around annotation) .
Wheni test this with simple class outside the jobss it working great
Do I need to know something else when using aspectJ with jboss ?
this is the code :
code:
|
| @Pointcut("call(* com.aop..*(..) )")
| void callBeforeAndAfterMethod(){}
|
| @Around( "callBeforeAndAfterMethod()" )
| public Object aroundTrace( ProceedingJoinPoint jp ) throws Throwable {
| String methodName = jp.getSignature().getName();
| System.out.println("Method name : " + methodName);
| System.out.println("Before code processed....");
| Object ret = jp.proceed();
| System.out.println("After code processed....");
| return ret;
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4106986#4106986
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4106986
18 years, 8 months
[JBoss Seam] - Re: EntitySecurityListener and MDBs
by kahliburke
I would note that similar issues also affect methods called from asynchronous event handlers.
I had 'read' rules on entities that caused them to be unavailable when loaded in an asynchronous method, because the rules still fire but there is no established session and nothing in the working memory to allow the permissions to be granted.
I thought I could get around this issue by hooking into the 'org.jboss.seam.core.executingAsynchronousCall' variable that is set into the Event context when async methods are called. I added postSet and postRemove observers that would stick something into the working memory and had a rule that allowed all access in such cases. This would assume that any necessary permissions checks had already occurred before the async method was scheduled.
However I then ran into my next issue:
anonymous wrote :
| Caused by: java.lang.IllegalStateException: No active session context
| at org.jboss.seam.security.Identity.instance(Identity.java:157)
| at org.jboss.seam.security.EntitySecurityListener.preUpdate(EntitySecurityListener.java:44)
|
|
It appears that the transaction is committed and the persistence context flushed outside of the methods that begin and end the call using the Lifecycle class. But the EntitySecurityListener is still active so we run into this issue.
I'll workaround this problem for now by extending EntitySecurityListener to check whether an active session context exists, and whether the 'org.jboss.seam.core.executingAsynchronousCall' is in the event context.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4106977#4106977
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4106977
18 years, 8 months