01: /*
02: * ChainBuilder ESB
03: * Visual Enterprise Integration
04: *
05: * Copyright (C) 2006 Bostech Corporation
06: *
07: * This program is free software; you can redistribute it and/or modify
08: * it under the terms of the GNU General Public License as published by
09: * the Free Software Foundation; either version 2 of the License, or
10: * (at your option) any later version.
11: *
12: * This program is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * General Public License for more details.
16: *
17: * You should have received a copy of the GNU General Public License
18: * along with this program; if not, write to the Free Software
19: * Foundation, Inc.,59 Temple Place, Suite 330, Boston, MA 02111-1307
20: * USA
21: *
22: *
23: * $Id: XsltConfigDeserializer.java 11986 2008-02-16 13:43:54Z jzhang $
24: */
25: package com.bostechcorp.cbesb.runtime.component.xslt.wsdl;
26:
27: import javax.wsdl.Definition;
28: import javax.wsdl.WSDLException;
29: import javax.wsdl.extensions.ExtensibilityElement;
30: import javax.wsdl.extensions.ExtensionDeserializer;
31: import javax.wsdl.extensions.ExtensionRegistry;
32: import javax.xml.namespace.QName;
33:
34: import org.w3c.dom.Element;
35:
36: import com.bostechcorp.cbesb.common.util.macro.MacroUtil;
37: import com.bostechcorp.cbesb.runtime.component.util.wsdl.BaseCommonAttributeDeserializer;
38: import com.ibm.wsdl.util.xml.DOMUtils;
39:
40: /**
41: *
42: */
43: public class XsltConfigDeserializer extends
44: BaseCommonAttributeDeserializer implements
45: ExtensionDeserializer {
46:
47: /* (non-Javadoc)
48: * @see com.bostechcorp.cbesb.runtime.component.util.wsdl.BaseCommonAttributeDeserializer#unmarshall(java.lang.Class, javax.xml.namespace.QName, org.w3c.dom.Element, javax.wsdl.Definition, javax.wsdl.extensions.ExtensionRegistry)
49: */
50: public ExtensibilityElement unmarshall(Class parentType,
51: QName elementType, Element el, Definition def,
52: ExtensionRegistry extReg) throws WSDLException {
53: XsltConfig xsltConfig = (XsltConfig) super.unmarshall(
54: parentType, elementType, el, def, extReg);
55: xsltConfig.setXslLocation(MacroUtil.resolveUserMacro(DOMUtils
56: .getAttribute(el, XsltExtension.XSL_LOCATION)));
57: return xsltConfig;
58: }
59: }
|