[JBossWS] - Re: Looking to pass complex types in web service...
by dakk
UPDATE:
=====
I went back and started by reducing the data struct I was passing to just one attribute, then two, then ... etc., until I found the problems.
1) It turns out that one problem I had was that two attrs started with capital letters (my bad)... neither javac or wscompile caught this, but it did cause parsing errors.
2) It also does not like the java.util.Date type. I suppose I can convert this to a string and then back to a date. (I get the same parsing error I got before - something like 'saw START but expected END'...
3) It was having trouble parsing the byte array (that will store up to a 1.5MB image), that at this point only contained a string converted to bytes. I changed that attr to a String and then Base64 encoded the bytes and it works fine.
--> If there is a more efficent way to pass a 1.5MB file back in a response, please let me know.
Thanks!
Norm.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4167150#4167150
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4167150
16 years, 5 months
[JBossWS] - Use of PostCreate in JaxWS WebService implementation class
by adinn
JSR 109 appears (to me at least) to suggest that the @PostCreate and @PreDestroy annotations can be used to annotate lifecycle methods of either an EJB or a POJO, so long as the EJB/POJO is tagged with a WebService annotation. Here is the relevant text from version 1.2
anonymous wrote :
| 5.3.2.4.2.1 The optional @PostConstruct or @PreDestroy annotations
| A Service Implementation Bean may use javax.annotation.PostConstruct or javax.annotation.PreDestroy annotation on methods for lifecycle event callbacks. The methods annotated with javax.annotation.PostConstruct or javax.annotation.PreDestroy annotation allow the web container to notify a Service Implementation Bean instance of impending changes in its state. The bean may use the notification to prepare its internal state for the transition. If the bean implements methods that are annotated with javax.annotation.PostConstruct or javax.annotation.PreDestroy annotations then the container is required to call them in the manner described below.
| . . .
|
This is all subsumed under section 5.3.2.4 'Web container programming model' and is distinct from the case described in section 5.2.3.3 'EJB container programming model' which is why I take it to be referring to use of POJOs annotated with @WebService.
I tried to use this feature in a service implementation class running under JBossWS Native 3.0.2 on AS 5.0.0.CR1 and the life cycle methods were not invoked. Is this because
I am reading JSR 109 wrong
I am reading JSR 109 correct but JBossWS Native 3.0.2 does not (yet) implement lifecycle methods
I am reading JSR 109 correct and JBossWS Native 3.0.2 does implement lifecycle methods but there is a bug
small print may apply
Any clarification would be most gratefully received
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4167118#4167118
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4167118
16 years, 5 months