You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2007/02/25 20:57:05 UTC
svn commit: r511585 [3/10] - in /webservices/axis2/trunk/java/modules/kernel:
src/org/apache/axis2/addressing/ src/org/apache/axis2/addressing/wsdl/
src/org/apache/axis2/builder/ src/org/apache/axis2/cluster/
src/org/apache/axis2/context/ src/org/apach...
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/DataRetrievalUtil.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/DataRetrievalUtil.java?view=diff&rev=511585&r1=511584&r2=511585
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/DataRetrievalUtil.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/DataRetrievalUtil.java Sun Feb 25 11:56:59 2007
@@ -1,102 +1,102 @@
-/*
- * Copyright 2007 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.axis2.dataretrieval;
-
-import java.io.InputStream;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import org.apache.axiom.om.OMAbstractFactory;
-import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMFactory;
-import org.apache.axiom.om.impl.builder.StAXOMBuilder;
-import org.apache.axiom.om.util.StAXUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-public class DataRetrievalUtil {
- private static final Log log = LogFactory.getLog(DataRetrievalUtil.class);
-
- private static DataRetrievalUtil instance = null;
-
- public static DataRetrievalUtil getInstance() {
- if (instance == null) {
- instance = new DataRetrievalUtil();
- }
- return instance;
- }
-
- /**
- * Loading xml file content and convert to OMElement.
- * @param file - file path relative to the Service Repository
- * @return OMElement format of the xml file content
- * @throws DataRetrievalException
- *
- */
-
- public OMElement buildOM(ClassLoader classLoader, String file)
- throws DataRetrievalException {
- OMElement element = null;
- InputStream servicexmlStream = null;
- try {
- servicexmlStream = getInputStream(classLoader, file);
-
- element = convertToOMElement(servicexmlStream);
- } catch (XMLStreamException e) {
- throw new DataRetrievalException(e);
- }
-
- return element;
- }
-
- /**
- * Convert servicexmlStream to OMElement
- * @param servicexmlStream InputStream contain xml content
- * @return OMElement format of the xml content
- * @throws XMLStreamException
- */
-
- public static OMElement convertToOMElement(InputStream servicexmlStream)
- throws XMLStreamException {
- OMElement element = null;
-
- XMLStreamReader xmlReader = StAXUtils
- .createXMLStreamReader(servicexmlStream);
- OMFactory fac = OMAbstractFactory.getOMFactory();
- StAXOMBuilder staxOMBuilder = new StAXOMBuilder(fac, xmlReader);
- element = staxOMBuilder.getDocumentElement();
- element.build();
- return element;
- }
-
- private static InputStream getInputStream(ClassLoader classLoader,
- String file) throws XMLStreamException {
-
- InputStream servicexmlStream = classLoader.getResourceAsStream(file);
-
- if (servicexmlStream == null) {
- String message = "File does not exist in the Service Repository! File="
- + file;
- if(log.isDebugEnabled()) {
- log.debug(message);
- }
- throw new XMLStreamException(message);
- }
- return servicexmlStream;
-
- }
-
+/*
+ * Copyright 2007 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis2.dataretrieval;
+
+import java.io.InputStream;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.impl.builder.StAXOMBuilder;
+import org.apache.axiom.om.util.StAXUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public class DataRetrievalUtil {
+ private static final Log log = LogFactory.getLog(DataRetrievalUtil.class);
+
+ private static DataRetrievalUtil instance = null;
+
+ public static DataRetrievalUtil getInstance() {
+ if (instance == null) {
+ instance = new DataRetrievalUtil();
+ }
+ return instance;
+ }
+
+ /**
+ * Loading xml file content and convert to OMElement.
+ * @param file - file path relative to the Service Repository
+ * @return OMElement format of the xml file content
+ * @throws DataRetrievalException
+ *
+ */
+
+ public OMElement buildOM(ClassLoader classLoader, String file)
+ throws DataRetrievalException {
+ OMElement element = null;
+ InputStream servicexmlStream = null;
+ try {
+ servicexmlStream = getInputStream(classLoader, file);
+
+ element = convertToOMElement(servicexmlStream);
+ } catch (XMLStreamException e) {
+ throw new DataRetrievalException(e);
+ }
+
+ return element;
+ }
+
+ /**
+ * Convert servicexmlStream to OMElement
+ * @param servicexmlStream InputStream contain xml content
+ * @return OMElement format of the xml content
+ * @throws XMLStreamException
+ */
+
+ public static OMElement convertToOMElement(InputStream servicexmlStream)
+ throws XMLStreamException {
+ OMElement element = null;
+
+ XMLStreamReader xmlReader = StAXUtils
+ .createXMLStreamReader(servicexmlStream);
+ OMFactory fac = OMAbstractFactory.getOMFactory();
+ StAXOMBuilder staxOMBuilder = new StAXOMBuilder(fac, xmlReader);
+ element = staxOMBuilder.getDocumentElement();
+ element.build();
+ return element;
+ }
+
+ private static InputStream getInputStream(ClassLoader classLoader,
+ String file) throws XMLStreamException {
+
+ InputStream servicexmlStream = classLoader.getResourceAsStream(file);
+
+ if (servicexmlStream == null) {
+ String message = "File does not exist in the Service Repository! File="
+ + file;
+ if(log.isDebugEnabled()) {
+ log.debug(message);
+ }
+ throw new XMLStreamException(message);
+ }
+ return servicexmlStream;
+
+ }
+
}
Propchange: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/DataRetrievalUtil.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/LocatorType.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/LocatorType.java?view=diff&rev=511585&r1=511584&r2=511585
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/LocatorType.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/LocatorType.java Sun Feb 25 11:56:59 2007
@@ -1,52 +1,52 @@
-/*
-* Copyright 2007 The Apache Software Foundation.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-package org.apache.axis2.dataretrieval;
-
-/**
- *
- * Defines Data Locator types as described below:
- * DEFAULT_AXIS - Default Axis2 data locator
- * GLOBAL_LEVEL - Global level data locator i.e.,plug-in data locator registered
- * using <dataLocator> element in axis2.xml.
- * GLOBAL_DIALECT - Global level dialect specfic data locator i.e.,plug-in
- * data locator registered using <dialectLocator> element in axis2.xml.
- * SERVICE_LEVEL - Service level data locator i.e. plug-in data locator registered
- * using <dataLocator> element in services.xml.
- * SERVICE_DIALECT - Service level dialect specific data locator i.e. plug-in data locator registered
- * using <dialectLocator> element in services.xml.
- *
- */
-
-public class LocatorType {
- int type;
- public final static LocatorType DEFAULT_AXIS = new LocatorType(0);
- public final static LocatorType GLOBAL_LEVEL = new LocatorType(1);
- public final static LocatorType GLOBAL_DIALECT = new LocatorType(2);
- public final static LocatorType SERVICE_LEVEL = new LocatorType(3);
- public final static LocatorType SERVICE_DIALECT = new LocatorType(4);
-
-
- protected LocatorType (int intype) {
- this.type= intype;
- }
-
- public int getType() {
- return type;
- }
-
-
-}
+/*
+* Copyright 2007 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package org.apache.axis2.dataretrieval;
+
+/**
+ *
+ * Defines Data Locator types as described below:
+ * DEFAULT_AXIS - Default Axis2 data locator
+ * GLOBAL_LEVEL - Global level data locator i.e.,plug-in data locator registered
+ * using <dataLocator> element in axis2.xml.
+ * GLOBAL_DIALECT - Global level dialect specfic data locator i.e.,plug-in
+ * data locator registered using <dialectLocator> element in axis2.xml.
+ * SERVICE_LEVEL - Service level data locator i.e. plug-in data locator registered
+ * using <dataLocator> element in services.xml.
+ * SERVICE_DIALECT - Service level dialect specific data locator i.e. plug-in data locator registered
+ * using <dialectLocator> element in services.xml.
+ *
+ */
+
+public class LocatorType {
+ int type;
+ public final static LocatorType DEFAULT_AXIS = new LocatorType(0);
+ public final static LocatorType GLOBAL_LEVEL = new LocatorType(1);
+ public final static LocatorType GLOBAL_DIALECT = new LocatorType(2);
+ public final static LocatorType SERVICE_LEVEL = new LocatorType(3);
+ public final static LocatorType SERVICE_DIALECT = new LocatorType(4);
+
+
+ protected LocatorType (int intype) {
+ this.type= intype;
+ }
+
+ public int getType() {
+ return type;
+ }
+
+
+}
Propchange: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/LocatorType.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/OutputForm.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/OutputForm.java?view=diff&rev=511585&r1=511584&r2=511585
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/OutputForm.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/OutputForm.java Sun Feb 25 11:56:59 2007
@@ -1,40 +1,40 @@
-/*
-* Copyright 2007 The Apache Software Foundation.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-package org.apache.axis2.dataretrieval;
-
-public class OutputForm {
- String type;
-
- /**
- * Possible Output formats as stated in <xs:choice> of <MetadataSection>
- * in the WS-MEX specification.
- */
-
- public final static OutputForm INLINE_FORM = new OutputForm("INLINE_FORM");
- public final static OutputForm LOCATION_FORM = new OutputForm("LOCATION_FORM");
- public final static OutputForm REFERENCE_FORM = new OutputForm("REFERENCE_FORM");
-
- protected OutputForm (String intype) {
- this.type= intype;
- }
-
- public String getType() {
- return type;
- }
-
-
-}
+/*
+* Copyright 2007 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package org.apache.axis2.dataretrieval;
+
+public class OutputForm {
+ String type;
+
+ /**
+ * Possible Output formats as stated in <xs:choice> of <MetadataSection>
+ * in the WS-MEX specification.
+ */
+
+ public final static OutputForm INLINE_FORM = new OutputForm("INLINE_FORM");
+ public final static OutputForm LOCATION_FORM = new OutputForm("LOCATION_FORM");
+ public final static OutputForm REFERENCE_FORM = new OutputForm("REFERENCE_FORM");
+
+ protected OutputForm (String intype) {
+ this.type= intype;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+
+}
Propchange: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/OutputForm.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/PolicyDataLocator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/PolicyDataLocator.java?view=diff&rev=511585&r1=511584&r2=511585
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/PolicyDataLocator.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/PolicyDataLocator.java Sun Feb 25 11:56:59 2007
@@ -1,39 +1,39 @@
-/*
-* Copyright 2007 The Apache Software Foundation.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-package org.apache.axis2.dataretrieval;
-
-/**
- *
- * Axis 2 Data Locator responsibles for retrieving Policy metadata.
- * The class is created as model for policy specific data locator; and also
- * easier for any future implementation policy specific data retrieval logic.
- *
- */
-public class PolicyDataLocator extends BaseAxisDataLocator implements AxisDataLocator {
-
- protected PolicyDataLocator() {
-
- }
-
- /**
- * Constructor
- */
- protected PolicyDataLocator(ServiceData[] data) {
- dataList = data;
- }
-
-}
+/*
+* Copyright 2007 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package org.apache.axis2.dataretrieval;
+
+/**
+ *
+ * Axis 2 Data Locator responsibles for retrieving Policy metadata.
+ * The class is created as model for policy specific data locator; and also
+ * easier for any future implementation policy specific data retrieval logic.
+ *
+ */
+public class PolicyDataLocator extends BaseAxisDataLocator implements AxisDataLocator {
+
+ protected PolicyDataLocator() {
+
+ }
+
+ /**
+ * Constructor
+ */
+ protected PolicyDataLocator(ServiceData[] data) {
+ dataList = data;
+ }
+
+}
Propchange: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/PolicyDataLocator.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/SchemaDataLocator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/SchemaDataLocator.java?view=diff&rev=511585&r1=511584&r2=511585
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/SchemaDataLocator.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/SchemaDataLocator.java Sun Feb 25 11:56:59 2007
@@ -1,39 +1,39 @@
-/*
-* Copyright 2007 The Apache Software Foundation.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-package org.apache.axis2.dataretrieval;
-
-/**
- * Axis 2 Data Locator responsibles for retrieving Schema metadata.
- * The class is created as model for schema specific data locator; and also
- * easier for any future implementation schema specific data retrieval logic.
- *
- */
-
-public class SchemaDataLocator extends BaseAxisDataLocator implements AxisDataLocator {
-
- protected SchemaDataLocator() {
-
- }
-
- /**
- * Constructor
- */
- protected SchemaDataLocator(ServiceData[] data) {
- dataList = data;
- }
-
-}
+/*
+* Copyright 2007 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package org.apache.axis2.dataretrieval;
+
+/**
+ * Axis 2 Data Locator responsibles for retrieving Schema metadata.
+ * The class is created as model for schema specific data locator; and also
+ * easier for any future implementation schema specific data retrieval logic.
+ *
+ */
+
+public class SchemaDataLocator extends BaseAxisDataLocator implements AxisDataLocator {
+
+ protected SchemaDataLocator() {
+
+ }
+
+ /**
+ * Constructor
+ */
+ protected SchemaDataLocator(ServiceData[] data) {
+ dataList = data;
+ }
+
+}
Propchange: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/SchemaDataLocator.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/ServiceData.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/ServiceData.java?view=diff&rev=511585&r1=511584&r2=511585
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/ServiceData.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/ServiceData.java Sun Feb 25 11:56:59 2007
@@ -1,114 +1,114 @@
-/*
-* Copyright 2007 The Apache Software Foundation.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-package org.apache.axis2.dataretrieval;
-
-import javax.xml.namespace.QName;
-
-import org.apache.axiom.om.OMAttribute;
-import org.apache.axiom.om.OMElement;
-
-/**
- *
- * This represents the service data for a dialect and identifier if specified.
- * Basically, the Data element defined in the ServiceData.xml packaged in
- * a Web Service's achieve file.
- *
- */
-
-public class ServiceData {
- OMElement data;
-
- String identifier;
-
- String dialect;
-
- String fileName;
-
- /**
- * Constructor
- * @param in_data an Data element in the ServiceData.
- *
- */
-
- protected ServiceData(OMElement in_data) {
- data = in_data;
- identifier = getAttributeValue(DRConstants.SERVICE_DATA.IDENTIFIER);
- dialect = getAttributeValue(DRConstants.SERVICE_DATA.DIALECT);
- fileName = getAttributeValue(DRConstants.SERVICE_DATA.FILE);
- }
-
- protected String getAttributeValue(String qName) {
-
- String value = null;
- OMAttribute attribute = data.getAttribute(new QName(qName));
- if (attribute != null)
- value = attribute.getAttributeValue();
-
- return value;
-
- }
-
- // return identifier for this Data element
- protected String getIdentifier() {
- return identifier;
- }
-
- // return dialect for this Data element
- protected String getDialect() {
- return dialect;
- }
-
- // return the Data ELement
- protected OMElement getOMData() {
- return data;
- }
-
-
-
- // Get URL from data Element
- protected String getURL() {
-
- String urlValue = null;
- OMElement url = data.getFirstChildWithName(new QName(
- DRConstants.SERVICE_DATA.URL));
- if (url != null)
- urlValue = url.getText();
-
- return urlValue;
- }
-
- // Get ENDPOINT_REFERENCE from Data Element
- protected OMElement getEndpointReference() {
- OMElement epr = data.getFirstChildWithName(new QName(
- DRConstants.SERVICE_DATA.ENDPOINT_REFERENCE));
- return epr;
- }
-
- // Load the file content of the file specified in the file attribute
- // in the data element.
- protected OMElement getFileContent(ClassLoader classloader)
- throws DataRetrievalException {
-
- OMElement metaElement = null;
- if (fileName != null) {
- DataRetrievalUtil util = DataRetrievalUtil.getInstance();
-
- metaElement = util.buildOM(classloader, fileName);
- }
- return metaElement;
- }
-}
+/*
+* Copyright 2007 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package org.apache.axis2.dataretrieval;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axiom.om.OMAttribute;
+import org.apache.axiom.om.OMElement;
+
+/**
+ *
+ * This represents the service data for a dialect and identifier if specified.
+ * Basically, the Data element defined in the ServiceData.xml packaged in
+ * a Web Service's achieve file.
+ *
+ */
+
+public class ServiceData {
+ OMElement data;
+
+ String identifier;
+
+ String dialect;
+
+ String fileName;
+
+ /**
+ * Constructor
+ * @param in_data an Data element in the ServiceData.
+ *
+ */
+
+ protected ServiceData(OMElement in_data) {
+ data = in_data;
+ identifier = getAttributeValue(DRConstants.SERVICE_DATA.IDENTIFIER);
+ dialect = getAttributeValue(DRConstants.SERVICE_DATA.DIALECT);
+ fileName = getAttributeValue(DRConstants.SERVICE_DATA.FILE);
+ }
+
+ protected String getAttributeValue(String qName) {
+
+ String value = null;
+ OMAttribute attribute = data.getAttribute(new QName(qName));
+ if (attribute != null)
+ value = attribute.getAttributeValue();
+
+ return value;
+
+ }
+
+ // return identifier for this Data element
+ protected String getIdentifier() {
+ return identifier;
+ }
+
+ // return dialect for this Data element
+ protected String getDialect() {
+ return dialect;
+ }
+
+ // return the Data ELement
+ protected OMElement getOMData() {
+ return data;
+ }
+
+
+
+ // Get URL from data Element
+ protected String getURL() {
+
+ String urlValue = null;
+ OMElement url = data.getFirstChildWithName(new QName(
+ DRConstants.SERVICE_DATA.URL));
+ if (url != null)
+ urlValue = url.getText();
+
+ return urlValue;
+ }
+
+ // Get ENDPOINT_REFERENCE from Data Element
+ protected OMElement getEndpointReference() {
+ OMElement epr = data.getFirstChildWithName(new QName(
+ DRConstants.SERVICE_DATA.ENDPOINT_REFERENCE));
+ return epr;
+ }
+
+ // Load the file content of the file specified in the file attribute
+ // in the data element.
+ protected OMElement getFileContent(ClassLoader classloader)
+ throws DataRetrievalException {
+
+ OMElement metaElement = null;
+ if (fileName != null) {
+ DataRetrievalUtil util = DataRetrievalUtil.getInstance();
+
+ metaElement = util.buildOM(classloader, fileName);
+ }
+ return metaElement;
+ }
+}
Propchange: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/ServiceData.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/WSDLDataLocator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/WSDLDataLocator.java?view=diff&rev=511585&r1=511584&r2=511585
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/WSDLDataLocator.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/WSDLDataLocator.java Sun Feb 25 11:56:59 2007
@@ -1,168 +1,168 @@
-/*
-* Copyright 2007 The Apache Software Foundation.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-package org.apache.axis2.dataretrieval;
-
-import org.apache.axiom.om.OMElement;
-import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.context.MessageContext;
-import org.apache.axis2.description.AxisService;
-import org.apache.axis2.description.AxisService2OM;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-/**
- * Axis 2 Data Locator responsibles for retrieving WSDL metadata.
- *
- */
-public class WSDLDataLocator extends BaseAxisDataLocator implements AxisDataLocator {
- private static final Log log = LogFactory.getLog(WSDLDataLocator.class);
- String serviceURL=null;
- AxisService theService=null;
- String request_Identifier=null;
-
-
- protected WSDLDataLocator(){
-
- }
-
- /**
- * Constructor
- * @param data an array of ServiceData instance defined in the
- * ServiceData.xml for the WSDL dialect.
- */
- protected WSDLDataLocator(ServiceData[] data){
- dataList = data;
- }
-
- /**
- * getData API
- * Implement data retrieval logic for WSDL dialect
- */
- public Data[] getData(DataRetrievalRequest request,
- MessageContext msgContext) throws DataRetrievalException {
- log.trace("Default WSDL DataLocator getData starts");
-
- request_Identifier = (String) request.getIdentifier();
-
- OutputForm outputform = (OutputForm) request.getOutputForm();
-
- if (outputform == null) { // not defined, defualt to inline
- outputform = OutputForm.INLINE_FORM;
- }
-
- Data[] output = null;
-
- String outputFormString = outputform.getType();
-
- if (outputform == OutputForm.INLINE_FORM) {
- output = outputInlineForm(msgContext, dataList);
- }
- else if (outputform == OutputForm.LOCATION_FORM) {
- output = outputLocationForm(dataList);
-
- }
- else if (outputform == OutputForm.REFERENCE_FORM) {
- output = outputReferenceForm(msgContext, dataList);
-
- }
- else {
- output = outputInlineForm(msgContext, dataList);
-
- }
-
- if (output == null)
- if (log.isTraceEnabled())
- log.trace("Null data return! Data Locator does not know how to handle request for dialect= " + (String) request.getDialect()
- + " in the form of " + outputFormString);
-
-
- log.trace("Default WSDL DataLocator getData ends");
-
-
- return output;
- }
-
- /*
- * (non-Javadoc)
- * @see org.apache.axis2.dataretrieval.BaseAxisDataLocator#outputInlineForm(org.apache.axis2.context.MessageContext, org.apache.axis2.dataretrieval.ServiceData[])
- */
- protected Data[] outputInlineForm(MessageContext msgContext, ServiceData[] dataList)
- throws DataRetrievalException {
- Data[] result = super.outputInlineForm(msgContext, dataList);
-
- // Do not generate WSDL if Identifier was specified in the request as
- // (1) this is to support ?wsdl request;
- // (2) Data for specified Identifier must be available to satisfy the GetMetadata request.
-
- if (result.length==0 && request_Identifier == null) {
- log.trace("Default WSDL DataLocator attempt to generates WSDL.");
-
- if (msgContext != null) {
- theService = msgContext.getAxisService();
- serviceURL = msgContext.getTo().getAddress();
- } else {
- throw new DataRetrievalException("MessageContext was not set!");
- }
-
- AxisService2OM axisService2WOM;
- OMElement wsdlElement;
-
- try {
- String[] exposedEPRs = theService.getEPRs();
- if (exposedEPRs == null) {
- exposedEPRs = new String[] {theService.getEndpointName()};
- }
- axisService2WOM = new AxisService2OM(theService,
- exposedEPRs, "document", "literal",
- "");
- wsdlElement = axisService2WOM.generateOM();
- }
- catch (Exception e){
- log.debug(e);
- throw new DataRetrievalException(e);
- }
-
- if (wsdlElement != null) {
- log
- .trace("Default WSDL DataLocator successfully generated WSDL.");
- result = new Data[1];
- result[0] = new Data(wsdlElement, null);
- }
- }
- return result;
- }
-
- /*
- *
- */
- protected Data[] outputLocationForm(ServiceData[] serviceData) throws DataRetrievalException {
- Data[] result= super.outputLocationForm(serviceData);
-
- // Do not generate URL if Identifier was specified in the request as
- // (1) Axis2 ?wsdl URL request is not supporting Identifier;
- // (2) URL data for specified Identifier must be available to satisfy
- // the GetMetadata request.
-
- if (result.length==0 && request_Identifier == null) {
- result = new Data[1];
- result[0] = new Data( serviceURL + "?wsdl", null);
- }
- return result;
- }
-
-
-}
+/*
+* Copyright 2007 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package org.apache.axis2.dataretrieval;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.AxisService2OM;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Axis 2 Data Locator responsibles for retrieving WSDL metadata.
+ *
+ */
+public class WSDLDataLocator extends BaseAxisDataLocator implements AxisDataLocator {
+ private static final Log log = LogFactory.getLog(WSDLDataLocator.class);
+ String serviceURL=null;
+ AxisService theService=null;
+ String request_Identifier=null;
+
+
+ protected WSDLDataLocator(){
+
+ }
+
+ /**
+ * Constructor
+ * @param data an array of ServiceData instance defined in the
+ * ServiceData.xml for the WSDL dialect.
+ */
+ protected WSDLDataLocator(ServiceData[] data){
+ dataList = data;
+ }
+
+ /**
+ * getData API
+ * Implement data retrieval logic for WSDL dialect
+ */
+ public Data[] getData(DataRetrievalRequest request,
+ MessageContext msgContext) throws DataRetrievalException {
+ log.trace("Default WSDL DataLocator getData starts");
+
+ request_Identifier = (String) request.getIdentifier();
+
+ OutputForm outputform = (OutputForm) request.getOutputForm();
+
+ if (outputform == null) { // not defined, defualt to inline
+ outputform = OutputForm.INLINE_FORM;
+ }
+
+ Data[] output = null;
+
+ String outputFormString = outputform.getType();
+
+ if (outputform == OutputForm.INLINE_FORM) {
+ output = outputInlineForm(msgContext, dataList);
+ }
+ else if (outputform == OutputForm.LOCATION_FORM) {
+ output = outputLocationForm(dataList);
+
+ }
+ else if (outputform == OutputForm.REFERENCE_FORM) {
+ output = outputReferenceForm(msgContext, dataList);
+
+ }
+ else {
+ output = outputInlineForm(msgContext, dataList);
+
+ }
+
+ if (output == null)
+ if (log.isTraceEnabled())
+ log.trace("Null data return! Data Locator does not know how to handle request for dialect= " + (String) request.getDialect()
+ + " in the form of " + outputFormString);
+
+
+ log.trace("Default WSDL DataLocator getData ends");
+
+
+ return output;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.apache.axis2.dataretrieval.BaseAxisDataLocator#outputInlineForm(org.apache.axis2.context.MessageContext, org.apache.axis2.dataretrieval.ServiceData[])
+ */
+ protected Data[] outputInlineForm(MessageContext msgContext, ServiceData[] dataList)
+ throws DataRetrievalException {
+ Data[] result = super.outputInlineForm(msgContext, dataList);
+
+ // Do not generate WSDL if Identifier was specified in the request as
+ // (1) this is to support ?wsdl request;
+ // (2) Data for specified Identifier must be available to satisfy the GetMetadata request.
+
+ if (result.length==0 && request_Identifier == null) {
+ log.trace("Default WSDL DataLocator attempt to generates WSDL.");
+
+ if (msgContext != null) {
+ theService = msgContext.getAxisService();
+ serviceURL = msgContext.getTo().getAddress();
+ } else {
+ throw new DataRetrievalException("MessageContext was not set!");
+ }
+
+ AxisService2OM axisService2WOM;
+ OMElement wsdlElement;
+
+ try {
+ String[] exposedEPRs = theService.getEPRs();
+ if (exposedEPRs == null) {
+ exposedEPRs = new String[] {theService.getEndpointName()};
+ }
+ axisService2WOM = new AxisService2OM(theService,
+ exposedEPRs, "document", "literal",
+ "");
+ wsdlElement = axisService2WOM.generateOM();
+ }
+ catch (Exception e){
+ log.debug(e);
+ throw new DataRetrievalException(e);
+ }
+
+ if (wsdlElement != null) {
+ log
+ .trace("Default WSDL DataLocator successfully generated WSDL.");
+ result = new Data[1];
+ result[0] = new Data(wsdlElement, null);
+ }
+ }
+ return result;
+ }
+
+ /*
+ *
+ */
+ protected Data[] outputLocationForm(ServiceData[] serviceData) throws DataRetrievalException {
+ Data[] result= super.outputLocationForm(serviceData);
+
+ // Do not generate URL if Identifier was specified in the request as
+ // (1) Axis2 ?wsdl URL request is not supporting Identifier;
+ // (2) URL data for specified Identifier must be available to satisfy
+ // the GetMetadata request.
+
+ if (result.length==0 && request_Identifier == null) {
+ result = new Data[1];
+ result[0] = new Data( serviceURL + "?wsdl", null);
+ }
+ return result;
+ }
+
+
+}
Propchange: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/WSDLDataLocator.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/client/MexClient.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/client/MexClient.java?view=diff&rev=511585&r1=511584&r2=511585
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/client/MexClient.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/client/MexClient.java Sun Feb 25 11:56:59 2007
@@ -1,75 +1,75 @@
-package org.apache.axis2.dataretrieval.client;
-import java.net.URL;
-
-import javax.wsdl.Definition;
-import javax.xml.namespace.QName;
-
-import org.apache.axiom.om.OMAbstractFactory;
-import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMFactory;
-import org.apache.axiom.om.OMNamespace;
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.client.ServiceClient;
-import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.dataretrieval.DRConstants;
-import org.apache.axis2.description.AxisService;
-
-public class MexClient extends ServiceClient {
-
- public MexClient(ConfigurationContext configContext, AxisService axisService)
- throws AxisFault {
- super(configContext, axisService);
- }
-
- public MexClient(ConfigurationContext configContext,
- Definition wsdl4jDefinition, QName wsdlServiceName, String portName)
- throws AxisFault {
- super(configContext, wsdl4jDefinition, wsdlServiceName, portName);
- }
-
- public MexClient(ConfigurationContext configContext, URL wsdlURL,
- QName wsdlServiceName, String portName) throws AxisFault {
- super(configContext, wsdlURL, wsdlServiceName, portName);
- }
-
- public MexClient() throws AxisFault {
- }
-
- /**
- * Builds OMElement that makes up of SOAP body.
- */
- public OMElement setupGetMetadataRequest(String dialect,
- String identifier) throws AxisFault {
-
- // Attempt to engage MEX module
- /* try{
- super.engageModule(new QName("metadataExchange"));
- }
- catch (Exception e){
- throw new AxisFault ("Unable to proceed with GetMetadata Request!", e);
- } */
-
- OMFactory fac = OMAbstractFactory.getOMFactory();
-
- OMNamespace omNs = fac.createOMNamespace(
- DRConstants.SPEC.NS_URI, DRConstants.SPEC.NS_PREFIX);
-
- OMElement method = fac.createOMElement(DRConstants.SPEC.GET_METADATA,
- omNs);
- if (dialect != null) {
- OMElement dialect_Elem = fac.createOMElement(
- DRConstants.SPEC.DIALET, omNs);
-
- dialect_Elem.setText(dialect);
- method.addChild(dialect_Elem);
- }
- // create Identifier element
- if (identifier != null) {
- OMElement id_Elem = fac.createOMElement(
- DRConstants.SPEC.IDENTIFIER, omNs);
- id_Elem.setText(identifier);
- method.addChild(id_Elem);
- }
- return method;
- }
-}
+package org.apache.axis2.dataretrieval.client;
+import java.net.URL;
+
+import javax.wsdl.Definition;
+import javax.xml.namespace.QName;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMNamespace;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.dataretrieval.DRConstants;
+import org.apache.axis2.description.AxisService;
+
+public class MexClient extends ServiceClient {
+
+ public MexClient(ConfigurationContext configContext, AxisService axisService)
+ throws AxisFault {
+ super(configContext, axisService);
+ }
+
+ public MexClient(ConfigurationContext configContext,
+ Definition wsdl4jDefinition, QName wsdlServiceName, String portName)
+ throws AxisFault {
+ super(configContext, wsdl4jDefinition, wsdlServiceName, portName);
+ }
+
+ public MexClient(ConfigurationContext configContext, URL wsdlURL,
+ QName wsdlServiceName, String portName) throws AxisFault {
+ super(configContext, wsdlURL, wsdlServiceName, portName);
+ }
+
+ public MexClient() throws AxisFault {
+ }
+
+ /**
+ * Builds OMElement that makes up of SOAP body.
+ */
+ public OMElement setupGetMetadataRequest(String dialect,
+ String identifier) throws AxisFault {
+
+ // Attempt to engage MEX module
+ /* try{
+ super.engageModule(new QName("metadataExchange"));
+ }
+ catch (Exception e){
+ throw new AxisFault ("Unable to proceed with GetMetadata Request!", e);
+ } */
+
+ OMFactory fac = OMAbstractFactory.getOMFactory();
+
+ OMNamespace omNs = fac.createOMNamespace(
+ DRConstants.SPEC.NS_URI, DRConstants.SPEC.NS_PREFIX);
+
+ OMElement method = fac.createOMElement(DRConstants.SPEC.GET_METADATA,
+ omNs);
+ if (dialect != null) {
+ OMElement dialect_Elem = fac.createOMElement(
+ DRConstants.SPEC.DIALET, omNs);
+
+ dialect_Elem.setText(dialect);
+ method.addChild(dialect_Elem);
+ }
+ // create Identifier element
+ if (identifier != null) {
+ OMElement id_Elem = fac.createOMElement(
+ DRConstants.SPEC.IDENTIFIER, omNs);
+ id_Elem.setText(identifier);
+ method.addChild(id_Elem);
+ }
+ return method;
+ }
+}
Propchange: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/client/MexClient.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/AxisConfigBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/AxisConfigBuilder.java?view=diff&rev=511585&r1=511584&r2=511585
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/AxisConfigBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/AxisConfigBuilder.java Sun Feb 25 11:56:59 2007
@@ -142,11 +142,11 @@
}
OMElement clusterElement = config_element
- .getFirstChildWithName(new QName(TAG_CLUSTER));
- if (clusterElement != null) {
- ClusterBuilder clusterBuilder = new ClusterBuilder(axisConfig);
- clusterBuilder.buildCluster(clusterElement);
- }
+ .getFirstChildWithName(new QName(TAG_CLUSTER));
+ if (clusterElement != null) {
+ ClusterBuilder clusterBuilder = new ClusterBuilder(axisConfig);
+ clusterBuilder.buildCluster(clusterElement);
+ }
// process MessageBuilders
OMElement messageBuildersElement = config_element.getFirstChildWithName(new QName(TAG_MESSAGE_BUILDERS));
@@ -512,29 +512,29 @@
* process data locator configuration for data retrieval.
*/
private void processDataLocatorConfig(OMElement dataLocatorElement) {
- OMAttribute serviceOverallDataLocatorclass = dataLocatorElement
- .getAttribute(new QName(DRConstants.CLASS_ATTRIBUTE));
- if (serviceOverallDataLocatorclass != null) {
- String className = serviceOverallDataLocatorclass
- .getAttributeValue();
- axisConfig.addDataLocatorClassNames(DRConstants.GLOBAL_LEVEL,
- className);
- }
- Iterator iterator = dataLocatorElement.getChildrenWithName(new QName(
- DRConstants.DIALECT_LOCATOR_ELEMENT));
-
- while (iterator.hasNext()) {
- OMElement locatorElement = (OMElement) iterator.next();
- OMAttribute dialect = locatorElement.getAttribute(new QName(
- DRConstants.DIALECT_ATTRIBUTE));
- OMAttribute dialectclass = locatorElement.getAttribute(new QName(
- DRConstants.CLASS_ATTRIBUTE));
- axisConfig.addDataLocatorClassNames(dialect.getAttributeValue(),
- dialectclass.getAttributeValue());
-
- }
- }
-
+ OMAttribute serviceOverallDataLocatorclass = dataLocatorElement
+ .getAttribute(new QName(DRConstants.CLASS_ATTRIBUTE));
+ if (serviceOverallDataLocatorclass != null) {
+ String className = serviceOverallDataLocatorclass
+ .getAttributeValue();
+ axisConfig.addDataLocatorClassNames(DRConstants.GLOBAL_LEVEL,
+ className);
+ }
+ Iterator iterator = dataLocatorElement.getChildrenWithName(new QName(
+ DRConstants.DIALECT_LOCATOR_ELEMENT));
+
+ while (iterator.hasNext()) {
+ OMElement locatorElement = (OMElement) iterator.next();
+ OMAttribute dialect = locatorElement.getAttribute(new QName(
+ DRConstants.DIALECT_ATTRIBUTE));
+ OMAttribute dialectclass = locatorElement.getAttribute(new QName(
+ DRConstants.CLASS_ATTRIBUTE));
+ axisConfig.addDataLocatorClassNames(dialect.getAttributeValue(),
+ dialectclass.getAttributeValue());
+
+ }
+ }
+
private Phase getPhase(String className)
throws ClassNotFoundException, IllegalAccessException, InstantiationException {
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ClusterBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ClusterBuilder.java?view=diff&rev=511585&r1=511584&r2=511585
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ClusterBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ClusterBuilder.java Sun Feb 25 11:56:59 2007
@@ -49,24 +49,24 @@
* Populates service from corresponding OM.
*/
public void buildCluster(OMElement clusterElement)
- throws DeploymentException {
-
- String className = clusterElement.getAttribute(
- new QName(TAG_CLASS_NAME)).getAttributeValue();
- ClusterManager clusterManager;
- try {
- Class clazz = Class.forName(className);
- clusterManager = (ClusterManager) clazz.newInstance();
- axisConfig.setClusterManager(clusterManager);
- return;
- } catch (ClassNotFoundException e) {
- throw new DeploymentException (Messages.getMessage("clusterImplNotFound"));
- } catch (InstantiationException e) {
- throw new DeploymentException (Messages.getMessage("cannotLoadClusterImpl"));
- } catch (IllegalAccessException e) {
- throw new DeploymentException (e);
- }
+ throws DeploymentException {
+
+ String className = clusterElement.getAttribute(
+ new QName(TAG_CLASS_NAME)).getAttributeValue();
+ ClusterManager clusterManager;
+ try {
+ Class clazz = Class.forName(className);
+ clusterManager = (ClusterManager) clazz.newInstance();
+ axisConfig.setClusterManager(clusterManager);
+ return;
+ } catch (ClassNotFoundException e) {
+ throw new DeploymentException (Messages.getMessage("clusterImplNotFound"));
+ } catch (InstantiationException e) {
+ throw new DeploymentException (Messages.getMessage("cannotLoadClusterImpl"));
+ } catch (IllegalAccessException e) {
+ throw new DeploymentException (e);
+ }
- }
+ }
}
Propchange: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ClusterBuilder.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/Deployer.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/Deployer.java?view=diff&rev=511585&r1=511584&r2=511585
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/Deployer.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/Deployer.java Sun Feb 25 11:56:59 2007
@@ -1,38 +1,38 @@
-package org.apache.axis2.deployment;
-
-import org.apache.axis2.deployment.repository.util.DeploymentFileData;
-import org.apache.axis2.engine.AxisConfiguration;
-import org.apache.axis2.context.ConfigurationContext;
-
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-*
-*/
-/**
- * This interface is used to provide the custom deployment mechanism , where you
- * can write your owm Deployer to process a particular type and make that to
- * a service or a module.
- */
-public interface Deployer {
- //To initialize the deployer
- void init(ConfigurationContext configCtx);
-
- //Will process the file and add that to axisConfig
- void deploy(DeploymentFileData deploymentFileData);
- void setDirectory(String directory);
- void setExtension(String extension);
- void unDeploy(String fileName);
-}
+package org.apache.axis2.deployment;
+
+import org.apache.axis2.deployment.repository.util.DeploymentFileData;
+import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.axis2.context.ConfigurationContext;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*
+*/
+/**
+ * This interface is used to provide the custom deployment mechanism , where you
+ * can write your owm Deployer to process a particular type and make that to
+ * a service or a module.
+ */
+public interface Deployer {
+ //To initialize the deployer
+ void init(ConfigurationContext configCtx);
+
+ //Will process the file and add that to axisConfig
+ void deploy(DeploymentFileData deploymentFileData);
+ void setDirectory(String directory);
+ void setExtension(String extension);
+ void unDeploy(String fileName);
+}
Propchange: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/Deployer.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java?view=diff&rev=511585&r1=511584&r2=511585
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java Sun Feb 25 11:56:59 2007
@@ -20,14 +20,20 @@
import org.apache.axiom.om.OMElement;
import org.apache.axis2.AxisFault;
import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.deployment.repository.util.DeploymentFileData;
import org.apache.axis2.deployment.repository.util.ArchiveReader;
+import org.apache.axis2.deployment.repository.util.DeploymentFileData;
import org.apache.axis2.deployment.repository.util.WSInfo;
import org.apache.axis2.deployment.scheduler.DeploymentIterator;
import org.apache.axis2.deployment.scheduler.Scheduler;
import org.apache.axis2.deployment.scheduler.SchedulerTask;
import org.apache.axis2.deployment.util.Utils;
-import org.apache.axis2.description.*;
+import org.apache.axis2.description.AxisModule;
+import org.apache.axis2.description.AxisOperation;
+import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.AxisServiceGroup;
+import org.apache.axis2.description.Flow;
+import org.apache.axis2.description.Parameter;
+import org.apache.axis2.description.WSDL11ToAxisServiceBuilder;
import org.apache.axis2.engine.AxisConfiguration;
import org.apache.axis2.engine.MessageReceiver;
import org.apache.axis2.i18n.Messages;
@@ -37,7 +43,13 @@
import javax.xml.namespace.QName;
import javax.xml.stream.XMLStreamException;
-import java.io.*;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
@@ -158,7 +170,7 @@
ArrayList servicelist = populateService(serviceGroup,
servicesURL,
fileUrl.substring(0, fileUrl.indexOf(".aar")));
- addServiceGroup(serviceGroup, servicelist, servicesURL, null,axisConfig);
+ addServiceGroup(serviceGroup, servicelist, servicesURL, null, axisConfig);
}
}
} catch (MalformedURLException e) {
@@ -194,7 +206,7 @@
module.setName(new QName(moduleName));
populateModule(module, moduleurl);
module.setFileName(moduleurl);
- addNewModule(module,axisConfig);
+ addNewModule(module, axisConfig);
}
}
org.apache.axis2.util.Utils.calculateDefaultModuleVersion(
@@ -227,8 +239,8 @@
}
protected ArrayList populateService(AxisServiceGroup serviceGroup,
- URL servicesURL,
- String serviceName) throws DeploymentException {
+ URL servicesURL,
+ String serviceName) throws DeploymentException {
try {
serviceGroup.setServiceGroupName(serviceName);
DeploymentClassLoader serviceClassLoader = new DeploymentClassLoader(
@@ -236,15 +248,15 @@
String metainf = "meta-inf";
serviceGroup.setServiceGroupClassLoader(serviceClassLoader);
//processing wsdl.list
- InputStream wsdlfilesStream =serviceClassLoader.getResourceAsStream("meta-inf/wsdl.list");
- if(wsdlfilesStream==null){
- wsdlfilesStream =serviceClassLoader.getResourceAsStream("META-INF/wsdl.list");
- if(wsdlfilesStream!=null){
+ InputStream wsdlfilesStream = serviceClassLoader.getResourceAsStream("meta-inf/wsdl.list");
+ if (wsdlfilesStream == null) {
+ wsdlfilesStream = serviceClassLoader.getResourceAsStream("META-INF/wsdl.list");
+ if (wsdlfilesStream != null) {
metainf = "META-INF";
}
}
HashMap servicesMap = new HashMap();
- if(wsdlfilesStream!=null){
+ if (wsdlfilesStream != null) {
ArchiveReader reader = new ArchiveReader();
BufferedReader input = new BufferedReader(new InputStreamReader(wsdlfilesStream));
String line;
@@ -253,10 +265,10 @@
if (line.length() > 0) {
line = metainf + "/" + line;
try {
- AxisService service = reader.getAxisServiceFromWsdl(
+ AxisService service = reader.getAxisServiceFromWsdl(
serviceClassLoader.getResourceAsStream(line),
- serviceClassLoader,line);
- servicesMap.put(service.getName(),service);
+ serviceClassLoader, line);
+ servicesMap.put(service.getName(), service);
} catch (Exception e) {
throw new DeploymentException(e);
}
@@ -357,7 +369,7 @@
return axisConfig.getMessageReceiver(mepURL);
}
- public static void addNewModule(AxisModule modulemetadata ,
+ public static void addNewModule(AxisModule modulemetadata,
AxisConfiguration axisConfiguration) throws AxisFault {
Flow inflow = modulemetadata.getInFlow();
@@ -390,10 +402,10 @@
}
public static void addServiceGroup(AxisServiceGroup serviceGroup,
- ArrayList serviceList,
- URL serviceLocation,
- DeploymentFileData currentDeploymentFile,
- AxisConfiguration axisConfiguration)
+ ArrayList serviceList,
+ URL serviceLocation,
+ DeploymentFileData currentDeploymentFile,
+ AxisConfiguration axisConfiguration)
throws AxisFault {
fillServiceGroup(serviceGroup, serviceList, serviceLocation, axisConfiguration);
axisConfiguration.addServiceGroup(serviceGroup);
@@ -404,9 +416,9 @@
}
protected static void fillServiceGroup(AxisServiceGroup serviceGroup,
- ArrayList serviceList,
- URL serviceLocation,
- AxisConfiguration axisConfig) throws AxisFault {
+ ArrayList serviceList,
+ URL serviceLocation,
+ AxisConfiguration axisConfig) throws AxisFault {
serviceGroup.setParent(axisConfig);
// module from services.xml at serviceGroup level
ArrayList groupModules = serviceGroup.getModuleRefs();
@@ -472,8 +484,8 @@
}
private static void addAsWebResources(File in,
- String serviceFileName,
- AxisServiceGroup serviceGroup) {
+ String serviceFileName,
+ AxisServiceGroup serviceGroup) {
try {
if (webLocationString == null) {
return;
@@ -535,13 +547,13 @@
for (int i = 0; i < wsToDeploy.size(); i++) {
DeploymentFileData currentDeploymentFile = (DeploymentFileData) wsToDeploy.get(i);
String type = currentDeploymentFile.getType();
- if(TYPE_SERVICE.equals(type)){
+ if (TYPE_SERVICE.equals(type)) {
serviceDeployer.deploy(currentDeploymentFile);
- } else if (TYPE_MODULE.equals(type)){
+ } else if (TYPE_MODULE.equals(type)) {
moduleDeployer.deploy(currentDeploymentFile);
- } else{
+ } else {
Deployer deployer = (Deployer) extensioToDeployerMappingMap.get(type);
- if(deployer!=null){
+ if (deployer != null) {
deployer.deploy(currentDeploymentFile);
}
}
@@ -553,6 +565,7 @@
/**
* Checks if the modules, referred by server.xml, exist or that they are deployed.
+ *
* @throws org.apache.axis2.AxisFault : If smt goes wrong
*/
public void engageModules() throws AxisFault {
@@ -583,7 +596,7 @@
*/
public AxisConfiguration populateAxisConfiguration(InputStream in) throws DeploymentException {
axisConfig = new AxisConfiguration();
- AxisConfigBuilder builder = new AxisConfigBuilder(in, axisConfig,this);
+ AxisConfigBuilder builder = new AxisConfigBuilder(in, axisConfig, this);
builder.populateConfig();
try {
if (in != null) {
@@ -598,6 +611,7 @@
/**
* Starts the Deployment engine to perform Hot deployment and so on.
+ *
* @param listener : RepositoryListener
*/
protected void startSearch(RepositoryListener listener) {
@@ -614,14 +628,14 @@
String fileType = wsInfo.getType();
if (TYPE_SERVICE.equals(fileType)) {
if (isHotUpdate()) {
- serviceDeployer.unDeploy(wsInfo.getFileName());
+ serviceDeployer.unDeploy(wsInfo.getFileName());
} else {
axisConfig.removeFaultyService(wsInfo.getFileName());
}
} else {
if (isHotUpdate()) {
Deployer deployer = (Deployer) extensioToDeployerMappingMap.get(fileType);
- if(deployer!=null){
+ if (deployer != null) {
deployer.unDeploy(wsInfo.getFileName());
}
}
@@ -847,7 +861,7 @@
initializeDeployers(this.configContext);
}
- private void initializeDeployers(ConfigurationContext configContext){
+ private void initializeDeployers(ConfigurationContext configContext) {
serviceDeployer = new ServiceDeployer();
serviceDeployer.init(configContext);
Iterator deployers = extensioToDeployerMappingMap.values().iterator();
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentException.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentException.java?view=diff&rev=511585&r1=511584&r2=511585
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentException.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentException.java Sun Feb 25 11:56:59 2007
@@ -21,9 +21,9 @@
public class DeploymentException extends AxisFault {
- private static final long serialVersionUID = -206215612208580684L;
+ private static final long serialVersionUID = -206215612208580684L;
- public DeploymentException(String message) {
+ public DeploymentException(String message) {
super(message);
}
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DescriptionBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DescriptionBuilder.java?view=diff&rev=511585&r1=511584&r2=511585
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DescriptionBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DescriptionBuilder.java Sun Feb 25 11:56:59 2007
@@ -205,117 +205,117 @@
}
/**
- * Processes the message builders specified in axis2.xml or services.xml.
- *
- * @param messageBuildersElement
- */
- protected HashMap processMessageBuilders(OMElement messageBuildersElement)
- throws DeploymentException {
- HashMap builderSelector = new HashMap();
- Iterator msgBuilders = messageBuildersElement
- .getChildrenWithName(new QName(TAG_MESSAGE_BUILDER));
- while (msgBuilders.hasNext()) {
- OMElement msgBuilderElement = (OMElement) msgBuilders.next();
- final OMElement tempMsgBuilder = msgBuilderElement;
- Class builderClass = null;
- OMBuilder builderObject;
- try {
- builderClass = findAndValidateSelectorClass(tempMsgBuilder,
- DeploymentErrorMsgs.ERROR_LOADING_MESSAGE_BUILDER);
- builderObject = (OMBuilder)builderClass.newInstance();
- } catch (PrivilegedActionException e) {
- throw (DeploymentException) e.getException();
- } catch (InstantiationException e) {
- throw new DeploymentException(
- "Cannot instantiate the specified Builder Class : "
- + builderClass.getName() + ".", e);
- } catch (IllegalAccessException e) {
- throw new DeploymentException(
- "Cannot instantiate the specified Builder Class : "
- + builderClass.getName() + ".", e);
- }
- OMAttribute contentTypeAtt = msgBuilderElement
- .getAttribute(new QName(TAG_CONTENT_TYPE));
- builderSelector.put(contentTypeAtt.getAttributeValue(),
- builderObject);
- }
- return builderSelector;
- }
-
+ * Processes the message builders specified in axis2.xml or services.xml.
+ *
+ * @param messageBuildersElement
+ */
+ protected HashMap processMessageBuilders(OMElement messageBuildersElement)
+ throws DeploymentException {
+ HashMap builderSelector = new HashMap();
+ Iterator msgBuilders = messageBuildersElement
+ .getChildrenWithName(new QName(TAG_MESSAGE_BUILDER));
+ while (msgBuilders.hasNext()) {
+ OMElement msgBuilderElement = (OMElement) msgBuilders.next();
+ final OMElement tempMsgBuilder = msgBuilderElement;
+ Class builderClass = null;
+ OMBuilder builderObject;
+ try {
+ builderClass = findAndValidateSelectorClass(tempMsgBuilder,
+ DeploymentErrorMsgs.ERROR_LOADING_MESSAGE_BUILDER);
+ builderObject = (OMBuilder)builderClass.newInstance();
+ } catch (PrivilegedActionException e) {
+ throw (DeploymentException) e.getException();
+ } catch (InstantiationException e) {
+ throw new DeploymentException(
+ "Cannot instantiate the specified Builder Class : "
+ + builderClass.getName() + ".", e);
+ } catch (IllegalAccessException e) {
+ throw new DeploymentException(
+ "Cannot instantiate the specified Builder Class : "
+ + builderClass.getName() + ".", e);
+ }
+ OMAttribute contentTypeAtt = msgBuilderElement
+ .getAttribute(new QName(TAG_CONTENT_TYPE));
+ builderSelector.put(contentTypeAtt.getAttributeValue(),
+ builderObject);
+ }
+ return builderSelector;
+ }
+
/**
- * Processes the message builders specified in axis2.xml or services.xml.
- *
- * @param messageBuildersElement
- */
- protected HashMap processMessageFormatters(OMElement messageFormattersElement)
- throws DeploymentException {
- HashMap messageFormatters = new HashMap();
- Iterator msgFormatters = messageFormattersElement
- .getChildrenWithName(new QName(TAG_MESSAGE_FORMATTER));
- while (msgFormatters.hasNext()) {
- OMElement msgFormatterElement = (OMElement) msgFormatters.next();
- final OMElement tempMsgFormatter = msgFormatterElement;
- MessageFormatter formatterObject;
- Class formatterClass = null;
- try {
- formatterClass = findAndValidateSelectorClass(tempMsgFormatter,DeploymentErrorMsgs.ERROR_LOADING_MESSAGE_FORMATTER );
- formatterObject = (MessageFormatter)formatterClass.newInstance();
- } catch (PrivilegedActionException e) {
- throw (DeploymentException) e.getException();
- } catch (InstantiationException e) {
- throw new DeploymentException(
- "Cannot instantiate the specified Formatter Class : "
- + formatterClass.getName() + ".", e);
- } catch (IllegalAccessException e) {
- throw new DeploymentException(
- "Cannot instantiate the specified Formatter Class : "
- + formatterClass.getName() + ".", e);
- }
- OMAttribute contentTypeAtt = msgFormatterElement
- .getAttribute(new QName(TAG_CONTENT_TYPE));
- messageFormatters.put(contentTypeAtt.getAttributeValue(),
- formatterObject);
- }
- return messageFormatters;
- }
+ * Processes the message builders specified in axis2.xml or services.xml.
+ *
+ * @param messageBuildersElement
+ */
+ protected HashMap processMessageFormatters(OMElement messageFormattersElement)
+ throws DeploymentException {
+ HashMap messageFormatters = new HashMap();
+ Iterator msgFormatters = messageFormattersElement
+ .getChildrenWithName(new QName(TAG_MESSAGE_FORMATTER));
+ while (msgFormatters.hasNext()) {
+ OMElement msgFormatterElement = (OMElement) msgFormatters.next();
+ final OMElement tempMsgFormatter = msgFormatterElement;
+ MessageFormatter formatterObject;
+ Class formatterClass = null;
+ try {
+ formatterClass = findAndValidateSelectorClass(tempMsgFormatter,DeploymentErrorMsgs.ERROR_LOADING_MESSAGE_FORMATTER );
+ formatterObject = (MessageFormatter)formatterClass.newInstance();
+ } catch (PrivilegedActionException e) {
+ throw (DeploymentException) e.getException();
+ } catch (InstantiationException e) {
+ throw new DeploymentException(
+ "Cannot instantiate the specified Formatter Class : "
+ + formatterClass.getName() + ".", e);
+ } catch (IllegalAccessException e) {
+ throw new DeploymentException(
+ "Cannot instantiate the specified Formatter Class : "
+ + formatterClass.getName() + ".", e);
+ }
+ OMAttribute contentTypeAtt = msgFormatterElement
+ .getAttribute(new QName(TAG_CONTENT_TYPE));
+ messageFormatters.put(contentTypeAtt.getAttributeValue(),
+ formatterObject);
+ }
+ return messageFormatters;
+ }
- protected Class findAndValidateSelectorClass(final OMElement tempMsgBuilder, final String errorMsg)
- throws PrivilegedActionException {
- return (Class) org.apache.axis2.java.security.AccessController
- .doPrivileged(new PrivilegedExceptionAction() {
- public Object run()
- throws org.apache.axis2.deployment.DeploymentException {
- OMAttribute builderName = tempMsgBuilder
- .getAttribute(new QName(TAG_CLASS_NAME));
- String className = builderName.getAttributeValue();
- Class selectorClass;
- try {
- if ((className != null) && !"".equals(className)) {
- selectorClass = Loader.loadClass(Thread.currentThread()
- .getContextClassLoader(), className);
- }else
- {
- throw new DeploymentException(Messages.getMessage(errorMsg,
- "Invalid Class Name",className));
- }
- } catch (ClassNotFoundException e) {
- throw new DeploymentException(Messages.getMessage(errorMsg,
- "ClassNotFoundException",className), e);
- }
- return selectorClass;
- }
- });
- }
+ protected Class findAndValidateSelectorClass(final OMElement tempMsgBuilder, final String errorMsg)
+ throws PrivilegedActionException {
+ return (Class) org.apache.axis2.java.security.AccessController
+ .doPrivileged(new PrivilegedExceptionAction() {
+ public Object run()
+ throws org.apache.axis2.deployment.DeploymentException {
+ OMAttribute builderName = tempMsgBuilder
+ .getAttribute(new QName(TAG_CLASS_NAME));
+ String className = builderName.getAttributeValue();
+ Class selectorClass;
+ try {
+ if ((className != null) && !"".equals(className)) {
+ selectorClass = Loader.loadClass(Thread.currentThread()
+ .getContextClassLoader(), className);
+ }else
+ {
+ throw new DeploymentException(Messages.getMessage(errorMsg,
+ "Invalid Class Name",className));
+ }
+ } catch (ClassNotFoundException e) {
+ throw new DeploymentException(Messages.getMessage(errorMsg,
+ "ClassNotFoundException",className), e);
+ }
+ return selectorClass;
+ }
+ });
+ }
/**
- * Processes flow elements in services.xml .
- *
- * @param flowelement
- * <code>OMElement</code>
- * @return Returns Flow.
- * @throws DeploymentException
- * <code>DeploymentException</code>
- */
+ * Processes flow elements in services.xml .
+ *
+ * @param flowelement
+ * <code>OMElement</code>
+ * @return Returns Flow.
+ * @throws DeploymentException
+ * <code>DeploymentException</code>
+ */
protected Flow processFlow(OMElement flowelement, ParameterInclude parent)
throws DeploymentException {
Flow flow = new Flow();
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ModuleBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ModuleBuilder.java?view=diff&rev=511585&r1=511584&r2=511585
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ModuleBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ModuleBuilder.java Sun Feb 25 11:56:59 2007
@@ -67,15 +67,15 @@
final Class fmoduleClass = moduleClass;
final AxisModule fmodule = module;
try {
- AccessController.doPrivileged( new PrivilegedExceptionAction() {
- public Object run() throws IllegalAccessException, InstantiationException {
- Module new_module = (Module) fmoduleClass.newInstance();
- fmodule.setModule(new_module);
- return null;
+ AccessController.doPrivileged( new PrivilegedExceptionAction() {
+ public Object run() throws IllegalAccessException, InstantiationException {
+ Module new_module = (Module) fmoduleClass.newInstance();
+ fmodule.setModule(new_module);
+ return null;
}
- });
+ });
} catch (PrivilegedActionException e) {
- throw e.getException();
+ throw e.getException();
}
}
} catch (Exception e) {
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org