01: /*
02: * BEGIN_HEADER - DO NOT EDIT
03: *
04: * The contents of this file are subject to the terms
05: * of the Common Development and Distribution License
06: * (the "License"). You may not use this file except
07: * in compliance with the License.
08: *
09: * You can obtain a copy of the license at
10: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
11: * See the License for the specific language governing
12: * permissions and limitations under the License.
13: *
14: * When distributing Covered Code, include this CDDL
15: * HEADER in each file and include the License file at
16: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
17: * If applicable add the following below this CDDL HEADER,
18: * with the fields enclosed by brackets "[]" replaced with
19: * your own identifying information: Portions Copyright
20: * [year] [name of copyright owner]
21: */
22:
23: /*
24: * @(#)HelperFactory.java
25: * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
26: *
27: * END_HEADER - DO NOT EDIT
28: */
29: package com.sun.jbi.wsdl11wrapper;
30:
31: import com.sun.jbi.wsdl11wrapper.impl.WrapperParserImpl;
32: import com.sun.jbi.wsdl11wrapper.impl.WrapperBuilderImpl;
33:
34: /**
35: * Factory to help with building and parsing the JBI WSDL 1.1 Wrapper normalized messages
36: * @author aegloff
37: */
38: public class HelperFactory {
39:
40: /**
41: * Temporary switch for the WSDL 1.1 JBI wrapper.
42: * false = use old custom SBYN wrapper.
43: * true = use JBI standard wrapper
44: *
45: * NOTE THAT THIS CONSTANT WILL BE REMOVED once the migratino to the new wrapper is done.
46: */
47: public static final boolean WRAPPER_ENABLED = true;
48:
49: /**
50: * Temporary switch for including the part name element in the WSDL 1.1 JBI
51: * wrapper for message parts defined as "type"
52: *
53: * false = use the "correct" wrapper without the part name element
54: * true = use the "backwards compatible" wrapper which includes the part name element
55: *
56: * NOTE THAT THIS SWITCH WILL BE REMOVED once the migratino to the new wrapper is done.
57: */
58: public static boolean WRAPPER_TYPE_INCLUDE_PARTNAME = false;
59:
60: /** Disallow instantiating this factory */
61: private HelperFactory() {
62: }
63:
64: /**
65: * Factory method,
66: * create a parser to assist in processing a JBI WSDL 1.1 wrapped normalized message
67: *
68: * @return parser
69: * @throws WrapperException if a parser could not be created
70: */
71: public static WrapperParser createParser()
72: throws WrapperProcessingException {
73: return new WrapperParserImpl();
74: }
75:
76: /**
77: * Factory method,
78: * create a builder to assist in building a JBI WSDL 1.1 wrapped normalized message
79: * @return builder
80: * @throws WrapperException if a builder could not be created
81: */
82: public static WrapperBuilder createBuilder()
83: throws WrapperProcessingException {
84: return new WrapperBuilderImpl();
85: }
86: }
|