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 ch...@apache.org on 2005/10/11 10:26:41 UTC
svn commit: r312839 - in /webservices/axis2/trunk/java/modules:
codegen/src/org/apache/axis2/databinding/
codegen/src/org/apache/axis2/databinding/extensions/XMLBeans/
codegen/src/org/apache/axis2/databinding/utils/
core/src/org/apache/axis2/deployment...
Author: chinthaka
Date: Tue Oct 11 01:26:17 2005
New Revision: 312839
URL: http://svn.apache.org/viewcvs?rev=312839&view=rev
Log:
- Adding a mechanism to get pull parser from a bean generated by Axis2 codegen framework
- making some contants in Deployment, available to outsiders
Added:
webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/ADBBean.java
webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/utils/ADBPullParser.java
Modified:
webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/extensions/XMLBeans/XMLBeansSchemaUtility.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentConstants.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java
Added: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/ADBBean.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/ADBBean.java?rev=312839&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/ADBBean.java (added)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/ADBBean.java Tue Oct 11 01:26:17 2005
@@ -0,0 +1,36 @@
+package org.apache.axis2.databinding;
+
+import javax.xml.stream.XMLStreamReader;
+
+/*
+ * Copyright 2001-2004 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.
+ *
+ * @author : Eran Chinthaka (chinthaka@apache.org)
+ *
+ * ADBBean - Axis Data Binding Bean. This will be implemented by all the beans that are being generated by
+ * Axis2 data binding framework
+ */
+
+public interface ADBBean {
+ /**
+ * get the OM implementation
+ */
+ public XMLStreamReader getPullParser();
+
+ /* There will be a self factory in every generated data bound class.
+ * static XXX read (XMLStreamReader);
+ */
+
+}
Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/extensions/XMLBeans/XMLBeansSchemaUtility.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/extensions/XMLBeans/XMLBeansSchemaUtility.java?rev=312839&r1=312838&r2=312839&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/extensions/XMLBeans/XMLBeansSchemaUtility.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/extensions/XMLBeans/XMLBeansSchemaUtility.java Tue Oct 11 01:26:17 2005
@@ -100,7 +100,7 @@
this.definition = definition;
// first fill the schema information
- getSchema(serviceDescription);
+// getSchema(serviceDescription);
// now fill port type and message elements
createMessagesAndPortTypes(serviceDescription);
Added: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/utils/ADBPullParser.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/utils/ADBPullParser.java?rev=312839&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/utils/ADBPullParser.java (added)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/utils/ADBPullParser.java Tue Oct 11 01:26:17 2005
@@ -0,0 +1,219 @@
+package org.apache.axis2.databinding.utils;
+
+import javax.xml.namespace.NamespaceContext;
+import javax.xml.namespace.QName;
+import javax.xml.stream.Location;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import java.util.ArrayList;
+
+/*
+ * 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.
+ */
+
+public class ADBPullParser implements XMLStreamReader{
+
+ private ArrayList propertyList;
+ private QName elementQName;
+
+ private ADBPullParser(ArrayList propertyList, QName elementQName) {
+ this.propertyList = propertyList;
+ this.elementQName = elementQName;
+ }
+
+ public static XMLStreamReader createPullParser(ArrayList propertyList, QName adbBeansQName) {
+ return new ADBPullParser(propertyList, adbBeansQName);
+ }
+
+ public Object getProperty(String string) throws IllegalArgumentException {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public int next() throws XMLStreamException {
+ return 0; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public void require(int i, String string, String string1) throws XMLStreamException {
+ //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public String getElementText() throws XMLStreamException {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public int nextTag() throws XMLStreamException {
+ return 0; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public boolean hasNext() throws XMLStreamException {
+ return false; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public void close() throws XMLStreamException {
+ //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public String getNamespaceURI(String string) {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public boolean isStartElement() {
+ return false; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public boolean isEndElement() {
+ return false; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public boolean isCharacters() {
+ return false; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public boolean isWhiteSpace() {
+ return false; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public String getAttributeValue(String string, String string1) {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public int getAttributeCount() {
+ return 0; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public QName getAttributeName(int i) {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public String getAttributeNamespace(int i) {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public String getAttributeLocalName(int i) {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public String getAttributePrefix(int i) {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public String getAttributeType(int i) {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public String getAttributeValue(int i) {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public boolean isAttributeSpecified(int i) {
+ return false; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public int getNamespaceCount() {
+ return 0; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public String getNamespacePrefix(int i) {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public String getNamespaceURI(int i) {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public NamespaceContext getNamespaceContext() {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public int getEventType() {
+ return 0; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public String getText() {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public char[] getTextCharacters() {
+ return new char[0]; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public int getTextCharacters(int i, char[] chars, int i1, int i2) throws XMLStreamException {
+ return 0; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public int getTextStart() {
+ return 0; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public int getTextLength() {
+ return 0; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public String getEncoding() {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public boolean hasText() {
+ return false; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public Location getLocation() {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public QName getName() {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public String getLocalName() {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public boolean hasName() {
+ return false; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public String getNamespaceURI() {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public String getPrefix() {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public String getVersion() {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public boolean isStandalone() {
+ return false; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public boolean standaloneSet() {
+ return false; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public String getCharacterEncodingScheme() {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public String getPITarget() {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public String getPIData() {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+}
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentConstants.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentConstants.java?rev=312839&r1=312838&r2=312839&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentConstants.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentConstants.java Tue Oct 11 01:26:17 2005
@@ -23,9 +23,10 @@
int SERVICE = 0; // if it is a servise
int MODULE = 1; // if it is a module
- String META_INF ="META-INF";
+ public static String META_INF ="META-INF";
String SERVICEXML = "META-INF/services.xml";
- String SERVICEWSDL = "META-INF/service.wsdl";
+ public static final String SERVICE_WSDL_NAME = "service.wsdl";
+ String SERVICE_WSDL_WITH_FOLDER = "META-INF/service.wsdl";
String MODULEXML = "META-INF/module.xml";
String PARAMETERST = "parameter";// paramater start tag
String LISTENERST = "listener";// paramater start tag
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java?rev=312839&r1=312838&r2=312839&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java Tue Oct 11 01:26:17 2005
@@ -63,7 +63,7 @@
*/
public ServiceDescription createService(ArchiveFileData file) throws DeploymentException {
ServiceDescription service = null;
- InputStream in = file.getClassLoader().getResourceAsStream(SERVICEWSDL);
+ InputStream in = file.getClassLoader().getResourceAsStream(SERVICE_WSDL_WITH_FOLDER);
boolean foundservice = false;
try {
if (in != null) {