[
https://issues.apache.org/jira/browse/WODEN-65?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12525018
]
John Kaputin commented on WODEN-65:
-----------------------------------
You can get the extension elements and attributes using the methods
getExtensionElements and getExtensionAttributes which all WSDL elements inherit
from WSDLElement..
To serialize an extension element you need to use
ExtensionRegistry.querySerializer to get an ExtensionSerializer object specific
to the extension element. Each extension element will need an implementation
of the ExtensionSerializer interface registered with the ExtensionRegistry (for
the SOAP and HTTP extension, this will need to be done in the ctor of
PopulatedExtensionRegistry). This is similar in concept to the implementation
of ExtensionDeserializer which is also registered in the
PopulatedExtensionRegistry ctor and is invoked in the
BaseWSDLReader.parseExtensionElement method.
The ExtensionDeserializer.unmarshall method is similar to the parseXXXX methods
in the WSDLReader classes which are used for WSDL elements. The
ExtensionSerializer objects have a marshall method which will be similar in
function to the printXXXX methods in your WSDLWriter impl class. See WSDL4J for
examples.
The extension attributes are represented in Woden as XMLAttr objects. XMLAttr
classes used in Woden (SOAP and HTTP) are registered in the
PopulatedExtensionRegistry ctor. XMLAttr has a method toExternalForm() which
returns the string representation of the serialized attribute value as it
appears in the WSDL document. It also has a method getAttributeType which
returns the QName of the attribute, from which you can get the attribute local
name and any prefix value. You will need to put these 3 items (optional prefix,
attribute local name and attribute value) together to reproduce the serialized
attribute.
> 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-prefix.wsdl, 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]