01: package org.objectweb.celtix.tools.extensions.jaxws;
02:
03: import java.io.*;
04:
05: import javax.wsdl.Definition;
06: import javax.wsdl.WSDLException;
07: import javax.wsdl.extensions.ExtensibilityElement;
08: import javax.wsdl.extensions.ExtensionDeserializer;
09: import javax.wsdl.extensions.ExtensionRegistry;
10: import javax.xml.namespace.QName;
11: import org.w3c.dom.*;
12:
13: public class JAXWSBindingDeserializer implements ExtensionDeserializer,
14: Serializable {
15:
16: public ExtensibilityElement unmarshall(Class parentType,
17: QName elementType, Element el, Definition def,
18: ExtensionRegistry extReg) throws WSDLException {
19: JAXWSBinding jaxwsBinding = (JAXWSBinding) extReg
20: .createExtension(parentType, elementType);
21:
22: jaxwsBinding.setElementType(elementType);
23: jaxwsBinding.setElement(el);
24: jaxwsBinding.setDocumentBaseURI(def.getDocumentBaseURI());
25:
26: JAXWSBindingParser parser = new JAXWSBindingParser();
27: parser.parseElement(jaxwsBinding, el);
28:
29: return jaxwsBinding;
30: }
31: }
|