Re: RSFB events and annotations....
Hi Daniel, Daniel Kulp wrote: OK. I have the WSDLDocumentation stuff working. http://cwiki.apache.org/CXF20DOC/annotations.html and documentation stuff can be added to a BUNCH of places now. Definitely a really cool addition for the java-first use cases. Cool :-) Alessio, since you had a very good idea on how the documentation stuff should look, do you have a good idea for the policy stuff?:-) Well, the idea for the documentation stuff was actually coming from a similar idea for policies attachment, ie. a @PolicyAttachments acting as a collection of @PolicyAttachment with the latter having an attribute for setting the scope for the policy. Perhaps this need further analysis tough... Cheers Alessio -- Alessio Soldano Web Service Lead, JBoss
Re: RSFB events and annotations....
OK. I have the WSDLDocumentation stuff working. http://cwiki.apache.org/CXF20DOC/annotations.html and documentation stuff can be added to a BUNCH of places now. Definitely a really cool addition for the java-first use cases. Alessio, since you had a very good idea on how the documentation stuff should look, do you have a good idea for the policy stuff?:-) Dan On Fri August 7 2009 12:48:53 pm Daniel Kulp wrote: > Last night, I committed a bunch of changes that added an event listener to > the FactoryBeans and added a bunch of "events" out of the beans to the > listener. There are a couple of purposes for this: > > 1) I'm hoping to simplify some of the stuff in RSFB. I'm planning on > allowing the databinding to be a listener so much of the JAXB stuff in > there can be pulled completely out into the jaxb databinding. Likewise, > some of the stuff that JAX-WS does could be simplified. > > 2) Custom annotations on the SEI - this is the major one. Previously, > adding a new annotation (like the @Features stuff), required updating the > RSFB which is a non-trivial thing to do. I wanted something MUCH simpler. > > Toward #2, I've added two new annotations: > @SchemaValidation - this has the same affect of setting the > schema-validation- enabled flag on the endpoint via config, just simpler. > > @WSDLDocumentation - this is a START of being able to add some > documentation nodes to the generated wsdl. It's not really working well > yet, but it at least is a starting point. Most likely, I'll need to break > this into a couple annotations since there are a LOT of places in a wsdl > that documentation can be added. If people have thoughts on how this > should look, please let me know. (this requires a lot of updates to > ServiceWSDLBuilder as well to copy docs from the service model into the > generated wsdl.) > > I plan on adding a couple more: > @Logging - various settings for controlling logging. > @Policy/SecurityThings - couple security related annotations to wire > security policy things in. > > I'll probably also rewire the custom annotations we already have > (@Features) into the new stuff as well mostly to simplify the code a bit. > > What other things would people be interested in accomplishing via > annotations? > > I've wired events into the various WS related factories, but haven't > touched the JAX-RS factories yet. That could also be looked at. -- Daniel Kulp dk...@apache.org http://www.dankulp.com/blog
Re: RSFB events and annotations....
On Fri August 7 2009 1:44:12 pm Alessio Soldano wrote: > Daniel Kulp wrote: > > On Fri August 7 2009 1:20:23 pm Alessio Soldano wrote: > >> Daniel Kulp wrote: > > Now, @WSDLDocumentation on a method does that document the portType > > operation, the binding operation, the "response" message, the "return" > > part in the response message? How about docs for the request message? > > > > That's kind of why I've marked this as a "starting point" that I need to > > think about some more. It's probably going to be a collection of > > annotations for various places. Kind of @WSDLRequestDocumentation, > > @WSDLOperationDocumentation, etc Not really sure though. requires > > a bit more thought.There's just too many places to stick docs in the > > wsdl. :-( > > Yes, I agree, there're probably just two ways, providing all those > annotations (@WSDLDocumentation, @WSDLPortDocumentation, > @WSDLOperationDocumentation, @WSDLRequestDocumentation, etc.) or having > something like a parent @WSDLDocumentationCollection annotation defined as: > > @Target(ElementType.TYPE) > @Retention(RetentionPolicy.RUNTIME) > public @interface @WSDLDocumentationCollection { >@WSDLDocumentation[] value(); > } > > with @WSDLDocumentation having an attribute for setting the right position. Oh. Good idea. I like this idea. Thanks! -- Daniel Kulp dk...@apache.org http://www.dankulp.com/blog
Re: RSFB events and annotations....
Daniel Kulp wrote: On Fri August 7 2009 1:20:23 pm Alessio Soldano wrote: Daniel Kulp wrote: @WSDLDocumentation - this is a START of being able to add some documentation nodes to the generated wsdl. It's not really working well yet, but it at least is a starting point. Most likely, I'll need to break this into a couple annotations since there are a LOT of places in a wsdl that documentation can be added. If people have thoughts on how this should look, please let me know. (this requires a lot of updates to ServiceWSDLBuilder as well to copy docs from the service model into the generated wsdl.) A starting point might be to use the annotated target to decide where to add the documentation element; I did something similar in JBossWS some time ago; it basically generates the documentation element in the generated wsdl on portType (annotation on the SEI class) or on operation (annotation on a method in the SEI). Yea. Right now I have @WSDLDocumentation on the SEI -> portType and on the IMPL -> wsdl:service. However, there needs to be a way to add "top level" (very top of wsdl:definition) documentation. Not sure "where" that goes. Maybe make the annotation on the impl go there instead of wsdl:service Maybe separate attribute in @WSDLDocumentation Not really sure. Now, @WSDLDocumentation on a method does that document the portType operation, the binding operation, the "response" message, the "return" part in the response message? How about docs for the request message? That's kind of why I've marked this as a "starting point" that I need to think about some more. It's probably going to be a collection of annotations for various places. Kind of @WSDLRequestDocumentation, @WSDLOperationDocumentation, etc Not really sure though. requires a bit more thought.There's just too many places to stick docs in the wsdl. :-( Yes, I agree, there're probably just two ways, providing all those annotations (@WSDLDocumentation, @WSDLPortDocumentation, @WSDLOperationDocumentation, @WSDLRequestDocumentation, etc.) or having something like a parent @WSDLDocumentationCollection annotation defined as: @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) public @interface @WSDLDocumentationCollection { @WSDLDocumentation[] value(); } with @WSDLDocumentation having an attribute for setting the right position. What other things would people be interested in accomplishing via annotations? What about annotations (2 would probably be enough) for providing (a link to) policy fragments? Another way of setting policies when doing code first development. Yea, that falls into the security stuff more or less since I'm thinking the security stuff is the security-policy stuff. Thus, you need to attach a policy. OK, good :-) Cheers Alessio -- Alessio Soldano Web Service Lead, JBoss
Re: RSFB events and annotations....
On Fri August 7 2009 1:20:23 pm Alessio Soldano wrote: > Daniel Kulp wrote: > > @WSDLDocumentation - this is a START of being able to add some > > documentation nodes to the generated wsdl. It's not really working well > > yet, but it at least is a starting point. Most likely, I'll need to > > break this into a couple annotations since there are a LOT of places in > > a wsdl that documentation can be added. If people have thoughts on how > > this should look, please let me know. (this requires a lot of updates to > > ServiceWSDLBuilder as well to copy docs from the service model into the > > generated wsdl.) > > A starting point might be to use the annotated target to decide where to > add the documentation element; I did something similar in JBossWS some > time ago; it basically generates the documentation element in the > generated wsdl on portType (annotation on the SEI class) or on operation > (annotation on a method in the SEI). Yea. Right now I have @WSDLDocumentation on the SEI -> portType and on the IMPL -> wsdl:service. However, there needs to be a way to add "top level" (very top of wsdl:definition) documentation. Not sure "where" that goes. Maybe make the annotation on the impl go there instead of wsdl:service Maybe separate attribute in @WSDLDocumentation Not really sure. Now, @WSDLDocumentation on a method does that document the portType operation, the binding operation, the "response" message, the "return" part in the response message? How about docs for the request message? That's kind of why I've marked this as a "starting point" that I need to think about some more. It's probably going to be a collection of annotations for various places. Kind of @WSDLRequestDocumentation, @WSDLOperationDocumentation, etc Not really sure though. requires a bit more thought.There's just too many places to stick docs in the wsdl. :-( > > What other things would people be interested in accomplishing via > > annotations? > > What about annotations (2 would probably be enough) for providing (a > link to) policy fragments? Another way of setting policies when doing > code first development. Yea, that falls into the security stuff more or less since I'm thinking the security stuff is the security-policy stuff. Thus, you need to attach a policy. -- Daniel Kulp dk...@apache.org http://www.dankulp.com/blog
Re: RSFB events and annotations....
Hi Dan, given that I still need to look at the code... here are 2 things that come to my mind... Daniel Kulp wrote: @WSDLDocumentation - this is a START of being able to add some documentation nodes to the generated wsdl. It's not really working well yet, but it at least is a starting point. Most likely, I'll need to break this into a couple annotations since there are a LOT of places in a wsdl that documentation can be added. If people have thoughts on how this should look, please let me know. (this requires a lot of updates to ServiceWSDLBuilder as well to copy docs from the service model into the generated wsdl.) A starting point might be to use the annotated target to decide where to add the documentation element; I did something similar in JBossWS some time ago; it basically generates the documentation element in the generated wsdl on portType (annotation on the SEI class) or on operation (annotation on a method in the SEI). What other things would people be interested in accomplishing via annotations? What about annotations (2 would probably be enough) for providing (a link to) policy fragments? Another way of setting policies when doing code first development. Cheers Alessio -- Alessio Soldano Web Service Lead, JBoss
RSFB events and annotations....
Last night, I committed a bunch of changes that added an event listener to the FactoryBeans and added a bunch of "events" out of the beans to the listener. There are a couple of purposes for this: 1) I'm hoping to simplify some of the stuff in RSFB. I'm planning on allowing the databinding to be a listener so much of the JAXB stuff in there can be pulled completely out into the jaxb databinding. Likewise, some of the stuff that JAX-WS does could be simplified. 2) Custom annotations on the SEI - this is the major one. Previously, adding a new annotation (like the @Features stuff), required updating the RSFB which is a non-trivial thing to do. I wanted something MUCH simpler. Toward #2, I've added two new annotations: @SchemaValidation - this has the same affect of setting the schema-validation- enabled flag on the endpoint via config, just simpler. @WSDLDocumentation - this is a START of being able to add some documentation nodes to the generated wsdl. It's not really working well yet, but it at least is a starting point. Most likely, I'll need to break this into a couple annotations since there are a LOT of places in a wsdl that documentation can be added. If people have thoughts on how this should look, please let me know. (this requires a lot of updates to ServiceWSDLBuilder as well to copy docs from the service model into the generated wsdl.) I plan on adding a couple more: @Logging - various settings for controlling logging. @Policy/SecurityThings - couple security related annotations to wire security policy things in. I'll probably also rewire the custom annotations we already have (@Features) into the new stuff as well mostly to simplify the code a bit. What other things would people be interested in accomplishing via annotations? I've wired events into the various WS related factories, but haven't touched the JAX-RS factories yet. That could also be looked at. -- Daniel Kulp dk...@apache.org http://www.dankulp.com/blog