You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Olivier Costet <Ol...@zenprise.com> on 2011/11/10 12:43:32 UTC

Re: Child elements in wsdl:documentation

Sorry to nag, but is there any chance this might be implemented?

In addition to that, I would like to be able to specify a WSDL
documentation for a message *part*. Currently, this does not appear to
be possible -- only for the message as a whole.

The @WSDLDocumentation annotation would have to be allowed on parameters
of a @WebMethod. Currently it's:
 @Target({ ElementType.TYPE, ElementType.METHOD })

Olivier.


On Fri, 2011-10-14 at 03:41 -0700, Olivier Costet wrote:
> > Would something like:
> > 
> > @WSDLDocumentation {
> >     String text
> >     Format format = Format.TEXT
> >     Placement placement
> >     Class<?> faultClass
> > 
> >     enum Format {
> >        TEXT, XML
> >     };
> >  }
> > 
> > be easier to write?    If it's Format.XML, we parse the string as XML.
> 
> It certainly would be easier to write. And to code.
> 
> My suggestion was based on the idea that CXF should model the
> documentation in accordance to javax.wsdl.Definition, which uses a DOM
> Element for that. And provide backwards-compatibility by making the
> existing String getDocumentation() a shortcut returning the text
> content of the Element.
> 
> Should the need ever arise to model the WSDL more closely, the
> modification you describe above would have to be undone, hence leading
> to backwards-compatibility problems and general messiness.
> 
> And using that way, you wouldn't be able to handle the WSDL -> Java
> conversion. How would you decide whether it's XML or TEXT? And even if
> you managed to decide that, you couldn't provide programmatic access to
> the documentation structure (via an annotation handler) either.
> 
> Olivier.
> 
> 
> On Thu, 2011-10-13 at 12:49 -0700, Daniel Kulp wrote:
> > 
> > On Thursday, October 13, 2011 10:44:52 AM Olivier Costet wrote:
> > > Hi everyone,
> > > 
> > > First, one word to say I quite appreciate the CXF framework. Powerful,
> > > rather sleek and nice code. Like it.
> > > 
> > > Secondly, I have a request. For the purposes of a tool I'm building, I
> > > need to be able to put child elements inside a wsdl:documentation
> > > element. These children will be parsed and exploited on the other end.
> > > 
> > > I would like to be able to specify these programmatically. Unless I'm
> > > mistaken, this currently isn't possible. @WSDLDocumentation only allows
> > > specifying strings, just as
> > > org.apache.cxf.service.model.AbstractPropertiesHolder holds
> > > documentation only as a string, as opposed to an org.w3c.dom.Element
> > > (note that javax.wsdl.WSDLElement uses an Element for that purpose).
> > > 
> > > What I would like would be something like this:
> > > 
> > > @WSDLDocumentation {
> > >    String text
> > >    Placement placement
> > >    Class<?> faultClass
> > >    WSDLDocumentationChild[] children
> > > }
> > > 
> > > @WSDLDocumentationChild {
> > >    String text
> > >    String namespace
> > >    String elementName
> > >    WSDLDocumentationChildAttribute[] attributes
> > >    WSDLDocumentationChild[] children
> > > }
> > >    
> > > @WSDLDocumentationChildAttribute {
> > >    String name
> > >    String value
> > > }
> > > 
> > > Any chance ? :o)
> > 
> > That looks like it wouldn't be  very fun to actually write in the code.   
> > Would something like:
> > 
> > @WSDLDocumentation {
> >     String text
> >     Format format = Format.TEXT
> >     Placement placement
> >     Class<?> faultClass
> > 
> >     enum Format {
> >        TEXT, XML
> >     };
> >  }
> > 
> > be easier to write?    If it's Format.XML, we parse the string as XML.
> > 
> > Dan
> > 
> > 
> > 
> > > 
> > > 
> > >  Olivier.
> > > 
> 

-- 
In a bottle, the neck is always at the top.