[ https://issues.apache.org/jira/browse/WODEN-65?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521157 ]
John Kaputin commented on WODEN-65: ----------------------------------- > (2) parseXXX () methods of WSDLWriter take XMLElement as a > parameter. Regarding your question about whether or not to use XMLElement in the printXXX methods of WSDLWriter, I think 'no'. What you have done with DOMUtils, following the WSDL4J approach, looks good. XMLElement was introduced as an abstraction of DOM Element and OMElement allow some refactoring of the WSDLReader implementations and reduce duplication in the parsing logic. However, the XMLElement objects for each WSDL element are not preserved in the Woden model and are not available to be passed to the WSDLWriter print methods. For now, the methods you have added to DOMUtils are fine. > > > > Then I came up with 2 ideas for Woden serialization implementation I haven't had time to consider this in detail yet. The main requirement is that both implementations (DOM and Axiom) should support a single API. So the writeWSDL methods, which currently take a java.io.Writer and java.io.OutputStream, may need some type of abstraction to represent a java.io.Writer and a javax.xml.stream.XMLStreamWriter. Perhaps 'org.apache.woden.XMLWriter', with the org.apache.woden.internal.DOMXMLWriter implementation making use of java.io.Writer and org.apache.woden.internal.OMXMLWriter using javax.xml.stream.XMLStreamWriter. Then the WSDLWriter methods would be something like writeWSDL(DescriptionElement, XMLWriter). BTW, I just noticed your writeWSDL methods take a Description object. I think DescriptionElement would be better. The Element API corresponds to the WSDL infoset and as WSDLWriter is about serializing this infoset, we may as well pass in a DescriptionElement object. The client programming model would be to call Description.toElement() and pass this to the writeWSDL method. > Woden elements must have serialize methods > ------------------------------------------ > > Key: WODEN-65 > URL: https://issues.apache.org/jira/browse/WODEN-65 > Project: Woden > Issue Type: Improvement > Components: Parser > Reporter: Eran Chinthaka > Assignee: Sagara Gunathunga > Attachments: BaseWSDLWriter.java.txt, DOMUtils.java.txt, > DOMWSDLFactory.java.txt, DOMWSDLWriter.java.txt, OMWSDLFactory.java.txt, > OMWSDLWriter.java.txt, sample1.java, test.wsdl, WriterFeatures.java.txt, > WSDLFactory.java.txt, WSDLWriter.java.txt > > > When we load a WSDL in to Woden object model, there is no way to serialize > the object model in to an output stream. This is very much useful when some > one wants to make sure Woden can properly spit out what it has read. > And there is a requirement from Axis2 also to make Woden element serializable > to cater for ?wsdl2 requests. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]