You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sm...@apache.org on 2011/05/14 20:35:02 UTC
svn commit: r1103180 [4/23] - in
/incubator/airavata/donations/ogce-donation: ./ modules/ modules/utils/
modules/utils/schemas/ modules/utils/schemas/gfac-schema-utils/
modules/utils/schemas/gfac-schema-utils/generated/
modules/utils/schemas/gfac-schem...
Added: incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/InParamObj.java
URL: http://svn.apache.org/viewvc/incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/InParamObj.java?rev=1103180&view=auto
==============================================================================
--- incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/InParamObj.java (added)
+++ incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/InParamObj.java Sat May 14 18:34:50 2011
@@ -0,0 +1,196 @@
+/*
+ * Copyright (c) 2002-2004 Extreme! Lab, Indiana University. All rights reserved.
+ *
+ * This software is open source. See the bottom of this file for the licence.
+ *
+ * $Id: InParamObj.java,v 1.1.2.1 2006/05/30 01:43:39 gkandasw Exp $
+ */
+
+
+/**
+ * @version $Revision: 1.1.2.1 $
+ * @author Gopi Kandaswamy [mailto:gkandasw@cs.indiana.edu]
+ */
+
+package org.ogce.schemas.gfac.wsdl;
+
+import java.util.Vector;
+
+import org.w3c.dom.Node;
+
+public class InParamObj
+{
+ private String name = null;
+ private String description = null;
+ private String displayAs = null;
+ private String dataType = null;
+ private Vector defaultValues = null;
+ private Node metadata;
+
+ public Node getMetadata() {
+ return metadata;
+ }
+
+ public void setMetadata(Node metadata) {
+ this.metadata = metadata;
+ }
+
+ /**
+ * Sets DefaultValues
+ *
+ * @param DefaultValues a Vector
+ */
+ public void setDefaultValues(Vector defaultValues)
+ {
+ this.defaultValues = defaultValues;
+ }
+
+ /**
+ * Returns DefaultValues
+ *
+ * @return a Vector
+ */
+ public Vector getDefaultValues()
+ {
+ return defaultValues;
+ }
+
+ /**
+ * Sets DataType
+ *
+ * @param DataType a String
+ */
+ public void setDataType(String dataType)
+ {
+ this.dataType = dataType;
+ }
+
+ /**
+ * Returns DataType
+ *
+ * @return a String
+ */
+ public String getDataType()
+ {
+ return dataType;
+ }
+
+ /**
+ * Sets DisplayAs
+ *
+ * @param DisplayAs a String
+ */
+ public void setDisplayAs(String displayAs)
+ {
+ this.displayAs = displayAs;
+ }
+
+ /**
+ * Returns DisplayAs
+ *
+ * @return a String
+ */
+ public String getDisplayAs()
+ {
+ return displayAs;
+ }
+
+ /**
+ * Sets Description
+ *
+ * @param Description a String
+ */
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+
+ /**
+ * Returns Description
+ *
+ * @return a String
+ */
+ public String getDescription()
+ {
+ return description;
+ }
+
+ /**
+ * Sets Name
+ *
+ * @param Name a String
+ */
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ /**
+ * Returns Name
+ *
+ * @return a String
+ */
+ public String getName()
+ {
+ return name;
+ }
+}
+
+/*
+ * Indiana University Extreme! Lab Software License, Version 1.2
+ *
+ * Copyright (c) 2002-2004 The Trustees of Indiana University.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * 1) All redistributions of source code must retain the above
+ * copyright notice, the list of authors in the original source
+ * code, this list of conditions and the disclaimer listed in this
+ * license;
+ *
+ * 2) All redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the disclaimer
+ * listed in this license in the documentation and/or other
+ * materials provided with the distribution;
+ *
+ * 3) Any documentation included with all redistributions must include
+ * the following acknowledgement:
+ *
+ * "This product includes software developed by the Indiana
+ * University Extreme! Lab. For further information please visit
+ * http://www.extreme.indiana.edu/"
+ *
+ * Alternatively, this acknowledgment may appear in the software
+ * itself, and wherever such third-party acknowledgments normally
+ * appear.
+ *
+ * 4) The name "Indiana University" or "Indiana University
+ * Extreme! Lab" shall not be used to endorse or promote
+ * products derived from this software without prior written
+ * permission from Indiana University. For written permission,
+ * please contact http://www.extreme.indiana.edu/.
+ *
+ * 5) Products derived from this software may not use "Indiana
+ * University" name nor may "Indiana University" appear in their name,
+ * without prior written permission of the Indiana University.
+ *
+ * Indiana University provides no reassurances that the source code
+ * provided does not infringe the patent or any other intellectual
+ * property rights of any other entity. Indiana University disclaims any
+ * liability to any recipient for claims brought by any other entity
+ * based on infringement of intellectual property rights or otherwise.
+ *
+ * LICENSEE UNDERSTANDS THAT SOFTWARE IS PROVIDED "AS IS" FOR WHICH
+ * NO WARRANTIES AS TO CAPABILITIES OR ACCURACY ARE MADE. INDIANA
+ * UNIVERSITY GIVES NO WARRANTIES AND MAKES NO REPRESENTATION THAT
+ * SOFTWARE IS FREE OF INFRINGEMENT OF THIRD PARTY PATENT, COPYRIGHT, OR
+ * OTHER PROPRIETARY RIGHTS. INDIANA UNIVERSITY MAKES NO WARRANTIES THAT
+ * SOFTWARE IS FREE FROM "BUGS", "VIRUSES", "TROJAN HORSES", "TRAP
+ * DOORS", "WORMS", OR OTHER HARMFUL CODE. LICENSEE ASSUMES THE ENTIRE
+ * RISK AS TO THE PERFORMANCE OF SOFTWARE AND/OR ASSOCIATED MATERIALS,
+ * AND TO THE PERFORMANCE AND VALIDITY OF INFORMATION GENERATED USING
+ * SOFTWARE.
+ */
Propchange: incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/InParamObj.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/MessageContext.java
URL: http://svn.apache.org/viewvc/incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/MessageContext.java?rev=1103180&view=auto
==============================================================================
--- incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/MessageContext.java (added)
+++ incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/MessageContext.java Sat May 14 18:34:50 2011
@@ -0,0 +1,400 @@
+package org.ogce.schemas.gfac.wsdl;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+
+import org.ogce.schemas.gfac.beans.utils.GFacSchemaException;
+import org.ogce.schemas.gfac.documents.InputParameterType;
+import org.ogce.schemas.gfac.documents.MethodType;
+import org.ogce.schemas.gfac.documents.OutputParameterType;
+import org.ogce.schemas.gfac.documents.ServiceMapType;
+import org.ogce.schemas.gfac.utils.GFacConstants;
+import org.ogce.schemas.gfac.utils.GfacUtils;
+import org.ogce.schemas.gfac.utils.ParameterFilter;
+import org.xmlpull.v1.builder.XmlElement;
+import org.xmlpull.v1.builder.XmlInfosetBuilder;
+import org.xmlpull.v1.builder.XmlNamespace;
+
+import xsul.XmlConstants;
+import xsul.soap.SoapUtil;
+import xsul.ws_addressing.WsaMessageInformationHeaders;
+
+/**
+ * Represent a Message, it can be either a input message or a output message
+ * @author Srinath Perera(hperera@cs.indiana.edu)
+ */
+
+public class MessageContext extends AbstractContext {
+ private final static XmlInfosetBuilder builder = XmlConstants.BUILDER;
+
+ private static final String VALUE = "value";
+
+ private final HashMap<String, Object> paramerters;
+
+ private final ArrayList<String> names;
+
+ private XmlElement envelope;
+
+ private final SoapUtil soapFragrance;
+
+ private final String operationName;
+
+ private final MethodType method;
+
+ private XmlNamespace bodyContentNs;
+
+ private WsaMessageInformationHeaders wsaHeaders;
+
+ private String requestURL;
+
+ private final boolean isInputMessage;
+
+ public MessageContext(SoapUtil soapFragrance, String operationName, ServiceMapType serviceMap,
+ XmlNamespace bodyContentNs,boolean isInputMessage) throws GFacSchemaException {
+ paramerters = new HashMap<String, Object>();
+ names = new ArrayList<String>();
+ this.soapFragrance = soapFragrance;
+ this.operationName = operationName;
+ method = GfacUtils.findOperationFromServiceMap(operationName, serviceMap);
+ this.bodyContentNs = bodyContentNs;
+ this.isInputMessage = isInputMessage;
+ }
+
+ public String getOperationName() {
+ return operationName;
+ }
+
+ public MessageContext(XmlElement envelope, ServiceMapType serviceMap, SoapUtil soapFragrance,boolean isInputMessage)
+ throws GFacSchemaException {
+ paramerters = new HashMap<String, Object>();
+ names = new ArrayList<String>();
+ this.soapFragrance = soapFragrance;
+ this.envelope = envelope;
+ operationName = findOperation(getBody());
+
+ // find the operations from service Map
+ method = GfacUtils.findOperationFromServiceMap(operationName, serviceMap);
+ XmlElement bodyContent = getBody();
+ Iterator childs = bodyContent.children();
+
+ // parse the input and populate input table
+ while (childs.hasNext()) {
+ Object obj = childs.next();
+ if (obj instanceof XmlElement) {
+ XmlElement ele = (XmlElement) obj;
+ InputParameterType paramMetadata = findInputParameter(ele.getName());
+
+ if (paramMetadata != null) {
+ handleParamElement(ele, paramMetadata);
+ } else {
+ throw new GFacSchemaException("Service Map does not define a parameter called "
+ + ele.getName());
+ }
+ }
+ }
+ wsaHeaders = new WsaMessageInformationHeaders(envelope);
+ this.isInputMessage = isInputMessage;
+ }
+
+ private InputParameterType findInputParameter(String name) {
+ InputParameterType[] inputParms = method.getInputParameterArray();
+ for (int i = 0; i < inputParms.length; i++) {
+ if (inputParms[i].getParameterName().equals(name)) {
+ return inputParms[i];
+ }
+ }
+ return null;
+ }
+
+ public XmlElement getBody() {
+ return soapFragrance.requiredBodyContent(envelope);
+ }
+
+ public XmlElement getHeaderBolock() {
+ return envelope.element(null, "Header");
+ }
+
+ public ArrayList<XmlElement> getHeaders() {
+ XmlElement header = envelope.element(null, "Header");
+ Iterator headersIt = header.children();
+
+ ArrayList<XmlElement> headers = new ArrayList<XmlElement>();
+ while (headersIt.hasNext()) {
+ Object obj = headersIt.next();
+ if (obj instanceof XmlElement) {
+ headers.add((XmlElement) obj);
+ }
+ }
+ return headers;
+ }
+
+ public XmlElement getHeader(String localName) {
+ XmlElement header = envelope.element(null, "Header");
+ if (header != null) {
+ return header.element(null, localName);
+ } else {
+ return null;
+ }
+
+ }
+
+ private void handleParamElement(XmlElement ele, InputParameterType inputPram)
+ throws GFacSchemaException {
+ String type = inputPram.getParameterType().toString();
+ if (GfacUtils.isArray(type)) {
+ org.xmlpull.v1.builder.Iterable it = ele.elements(null, VALUE);
+ Iterator childs;
+ if (it != null && (childs = it.iterator()).hasNext()) {
+ if (GFacConstants.Types.TYPE_DATAID_ARRAY.equals(type)) {
+ ArrayList<DataIDType> values = new ArrayList<DataIDType>();
+ while (childs.hasNext()) {
+ XmlElement valEle = (XmlElement) childs.next();
+ values.add(new DataIDType(valEle));
+ }
+ _addParameter(ele.getName(), values.toArray(new DataIDType[0]));
+ } else {
+ ArrayList<String> values = new ArrayList<String>();
+ while (childs.hasNext()) {
+ XmlElement valEle = (XmlElement) childs.next();
+ String value = valEle.requiredTextContent();
+ if (value != null) {
+ values.add(value);
+ } else {
+ throw new GFacSchemaException(
+ "Illegal InputMessage, No value content found for the parameter "
+ + ele.getName() + "/value");
+ }
+ }
+ addParameter(ele.getName(), values.toArray(new String[0]));
+ }
+ } else {
+ throw new GFacSchemaException(
+ "Illegal InputMessage, No value content found for the parameter "
+ + ele.getName());
+ }
+ } else if (GFacConstants.Types.LEAD_CROSSCUT_PARAMETERS.equals(type)) {
+ _addParameter(ele.getName(), ele);
+ } else if (GFacConstants.Types.TYPE_DATAID.equals(type)) {
+ _addParameter(ele.getName(), new DataIDType(ele));
+ } else {
+ addParameter(ele.getName(), ele.requiredTextContent());
+ }
+ }
+
+ public Iterator<String> getParameterNames() {
+ return names.iterator();
+ }
+
+ public XmlElement getXmlParameterValue(String name) {
+ return (XmlElement) paramerters.get(name);
+ }
+
+ public Object getParameterValue(String name) {
+ return paramerters.get(name);
+ }
+
+ public String getStringParameterValue(String name) {
+ return (String) paramerters.get(name);
+ }
+
+ public Object getStringArrayParameterValue(String name) {
+ return (String[]) paramerters.get(name);
+ }
+
+ public void addParameter(String paramName, String value) throws GFacSchemaException {
+ _addParameter(paramName, value);
+ }
+
+ public void addParameter(String paramName, String[] value) throws GFacSchemaException {
+ _addParameter(paramName, value);
+ }
+
+ public void _addParameter(String paramName, Object value) throws GFacSchemaException {
+ // if(value == null || (value instanceof String &&
+ // ((String)value).length() == 0)){
+ // throw new GfacException("Input parameters to Gfac Must not be Null");
+ // }
+ names.add(paramName);
+ paramerters.put(paramName, value);
+ }
+
+ public void updateParameter(String paramName, Object value) throws GFacSchemaException {
+ if (paramerters.containsKey(paramName)) {
+ paramerters.remove(paramName);
+ paramerters.put(paramName, value);
+ } else {
+ throw new GFacSchemaException("No parameter name " + paramName + " to update");
+ }
+
+ }
+
+ public XmlElement createEnvelope() throws GFacSchemaException {
+ if (envelope == null) {
+ XmlElement bodyContent;
+ if (bodyContentNs != null) {
+ bodyContent = builder.newFragment(builder.newNamespace(bodyContentNs.getPrefix(),
+ bodyContentNs.getNamespaceName()), operationName + "_OutputParams");
+ } else {
+ bodyContent = builder.newFragment(operationName + "_OutputParams");
+ }
+
+ OutputParameterType[] outputPramaeters = method.getOutputParameterArray();
+
+ XmlElement parm;
+ for (int i = 0; i < outputPramaeters.length; i++) {
+ OutputParameterType type = outputPramaeters[i];
+ parm = builder.newFragment(type.getParameterName());
+ String typeStr = type.getParameterType().toString();
+ if (GfacUtils.isArray(typeStr)) {
+ Object obj = getParameterValue(type.getParameterName());
+ if(GFacConstants.Types.TYPE_DATAID_ARRAY.equals(typeStr)){
+ if(obj instanceof DataIDType[]){
+ for(DataIDType id:(DataIDType[])obj){
+ XmlElement arrayValue = builder.newFragment(VALUE);
+ parm.addChild(arrayValue);
+ id.fillData(arrayValue);
+ }
+ }else{
+ throw new GFacSchemaException("Parameter " + type.getParameterName()
+ + "had a type " + (obj!=null?obj.getClass():null) + "instead of a DataIDType");
+ }
+ }else if (obj instanceof Object[]) {
+ Object[] values = (Object[]) obj;
+// if (values.length == 0) {
+// throw new GfacException(
+// "The application execution is complete, but Service can not find a value for Parameter "
+// + type.getParameterName()
+// + " Please look into standard out and standard error for further information");
+// }
+ for (int j = 0; j < values.length; j++) {
+ XmlElement arrayValue = builder.newFragment(VALUE);
+ arrayValue.addChild(String.valueOf(values[j]));
+ parm.addChild(arrayValue);
+ }
+ } else {
+ throw new GFacSchemaException(
+ "The application execution is complete, but Service can not find a value for Parameter "
+ + type.getParameterName()
+ + " Please look into standard out and standard error for further information [Parameter Map = "+ this+"]");
+ }
+ } else if (GFacConstants.Types.TYPE_DATAID.equals(typeStr)) {
+ Object obj = getParameterValue(type.getParameterName());
+ if (obj instanceof DataIDType) {
+ ((DataIDType) obj).fillData(parm);
+ } else {
+ throw new GFacSchemaException("Parameter " + type.getParameterName()
+ + "had a type " + obj.getClass() + "instead of a DataIDType");
+ }
+ } else {
+ String value = getStringParameterValue(type.getParameterName());
+ if (value == null) {
+ throw new GFacSchemaException("parameter " + type.getParameterName()
+ + "Not found [Parameter Map = "+ this+"]");
+ }
+ parm.addChild(value);
+ }
+ bodyContent.addChild(parm);
+ }
+ envelope = soapFragrance.wrapBodyContent(bodyContent).getDocumentElement();
+ }
+
+ return envelope;
+ }
+
+
+ public Iterator<String> findParameterNames(ParameterFilter filter)
+ throws GFacSchemaException {
+ ArrayList<String> filterednames = new ArrayList<String>();
+ if (isInputMessage) {
+ InputParameterType[] inputparams = method.getInputParameterArray();
+ for (int i = 0; i < inputparams.length; i++) {
+ String paramType = inputparams[i].getParameterType().toString();
+ if (filter.filter(inputparams[i].getParameterName(), paramType)) {
+ filterednames.add(inputparams[i].getParameterName());
+ }
+ }
+ } else {
+ OutputParameterType[] outputparams = method.getOutputParameterArray();
+ for (int i = 0; i < outputparams.length; i++) {
+ String paramType = outputparams[i].getParameterType().toString();
+ if (filter.filter(outputparams[i].getParameterName(), paramType)) {
+ filterednames.add(outputparams[i].getParameterName());
+ }
+ }
+ }
+ return filterednames.iterator();
+ }
+
+ public String getParameterType(String name) {
+ if(isInputMessage){
+ InputParameterType[] inputparams = method.getInputParameterArray();
+ for (int i = 0; i < inputparams.length; i++) {
+ String paramType = inputparams[i].getParameterType().toString();
+ if (name.equals(inputparams[i].getParameterName())) {
+ return paramType;
+ }
+ }
+ }else{
+ OutputParameterType[] outputparams = method.getOutputParameterArray();
+ for (int i = 0; i < outputparams.length; i++) {
+ String paramType = outputparams[i].getParameterType().toString();
+ if (name.equals(outputparams[i].getParameterName())) {
+ return paramType;
+ }
+ }
+ }
+ return null;
+ }
+
+ protected String findOperation(XmlElement message) throws GFacSchemaException {
+ String wrapper = message.getName();
+ int index = wrapper.indexOf("_InputParams");
+ if (index >= 0) {
+ return wrapper.substring(0, index);
+ } else {
+ throw new GFacSchemaException(
+ "Unsupported Message format, wrapper element must be <operation_name>_InputParams");
+ }
+
+ }
+
+ public MethodType getMethod() {
+ return method;
+ }
+
+ public XmlElement getEnvelope() {
+ return envelope;
+ }
+
+ public WsaMessageInformationHeaders getWsaHeaders() {
+ return wsaHeaders;
+ }
+
+ public String getRequestURL() {
+ return requestURL;
+ }
+
+ public void setRequestURL(String requestURL) {
+ this.requestURL = requestURL;
+ }
+
+ public SoapUtil getSoapFragrance() {
+ return soapFragrance;
+ }
+
+ @Override
+ public String toString() {
+ StringBuffer buf = new StringBuffer();
+ buf.append("[");
+ for(String key:paramerters.keySet()){
+ buf.append(key).append("=").append(paramerters.get(key)).append(" ");
+ }
+ buf.append("]");
+ return buf.toString();
+ }
+
+ public void setEnvelope(XmlElement envelope) {
+ this.envelope = envelope;
+ }
+}
Propchange: incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/MessageContext.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/MessageObj.java
URL: http://svn.apache.org/viewvc/incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/MessageObj.java?rev=1103180&view=auto
==============================================================================
--- incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/MessageObj.java (added)
+++ incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/MessageObj.java Sat May 14 18:34:50 2011
@@ -0,0 +1,274 @@
+/*
+ * Copyright (c) 2002-2004 Extreme! Lab, Indiana University. All rights reserved.
+ *
+ * This software is open source. See the bottom of this file for the licence.
+ *
+ * $Id: MessageObj.java,v 1.1.2.1 2006/05/30 01:43:39 gkandasw Exp $
+ */
+
+
+/**
+ * @version $Revision: 1.1.2.1 $
+ * @author Gopi Kandaswamy [mailto:gkandasw@cs.indiana.edu]
+ */
+
+package org.ogce.schemas.gfac.wsdl;
+
+import java.util.Vector;
+
+import javax.xml.namespace.QName;
+
+public class MessageObj
+{
+ private QName portType;
+ private String methodName;
+ private String namespace = null;
+
+ private String inElementName;
+ private Vector inMsgParamNames;
+ private Vector inMsgParamTypes;
+
+ private String outElementName;
+ private Vector outMsgParamNames;
+ private Vector outMsgParamTypes;
+
+ /**
+ * Sets OutMsgParamTypes
+ *
+ * @param OutMsgParamTypes a Vector
+ */
+ public void setOutMsgParamTypes(Vector outMsgParamTypes)
+ {
+ this.outMsgParamTypes = outMsgParamTypes;
+ }
+
+ /**
+ * Returns OutMsgParamTypes
+ *
+ * @return a Vector
+ */
+ public Vector getOutMsgParamTypes()
+ {
+ return outMsgParamTypes;
+ }
+
+ /**
+ * Sets Namespace
+ *
+ * @param Namespace a String
+ */
+ public void setNamespace(String namespace)
+ {
+ this.namespace = namespace;
+ }
+
+ /**
+ * Returns Namespace
+ *
+ * @return a String
+ */
+ public String getNamespace()
+ {
+ return namespace;
+ }
+
+ /**
+ * Sets InMsgParamTypes
+ *
+ * @param InMsgParamTypes a Vector
+ */
+ public void setInMsgParamTypes(Vector inMsgParamTypes)
+ {
+ this.inMsgParamTypes = inMsgParamTypes;
+ }
+
+ /**
+ * Returns InMsgParamTypes
+ *
+ * @return a Vector
+ */
+ public Vector getInMsgParamTypes()
+ {
+ return inMsgParamTypes;
+ }
+
+ /**
+ * Sets PortType
+ *
+ * @param PortType a QName
+ */
+ public void setPortType(QName portType)
+ {
+ this.portType = portType;
+ }
+
+ /**
+ * Returns PortType
+ *
+ * @return a QName
+ */
+ public QName getPortType()
+ {
+ return portType;
+ }
+
+ /**
+ * Sets OutputMessageParamNames
+ *
+ * @param OutputMessageParamNamesa Vector
+ */
+ public void setOutMsgParamNames(Vector outputMessageParamNames)
+ {
+ this.outMsgParamNames = outputMessageParamNames;
+ }
+
+ /**
+ * Returns OutputMessageParamNames
+ *
+ * @return a Vector
+ */
+ public Vector getOutMsgParamNames()
+ {
+ return outMsgParamNames;
+ }
+
+ /**
+ * Sets InputMessagePartNames
+ *
+ * @param InputMessagePartNamesa Vector
+ */
+ public void setInMsgParamNames(Vector inputMessagePartNames)
+ {
+ this.inMsgParamNames = inputMessagePartNames;
+ }
+
+ /**
+ * Returns InputMessagePartNames
+ *
+ * @return a Vector
+ */
+ public Vector getInMsgParamNames()
+ {
+ return inMsgParamNames;
+ }
+
+ /**
+ * Sets MethodName
+ *
+ * @param MethodName a String
+ */
+ public void setMethodName(String methodName)
+ {
+ this.methodName = methodName;
+ }
+
+ /**
+ * Returns MethodName
+ *
+ * @return a String
+ */
+ public String getMethodName()
+ {
+ return methodName;
+ }
+
+ /**
+ * Sets OutputMessageName
+ *
+ * @param OutputMessageName a String
+ */
+ public void setOutElementName(String outputMessageName)
+ {
+ this.outElementName = outputMessageName;
+ }
+
+ /**
+ * Returns OutputMessageName
+ *
+ * @return a String
+ */
+ public String getOutElementName()
+ {
+ return outElementName;
+ }
+
+ /**
+ * Sets InputMessageName
+ *
+ * @param InputMessageName a String
+ */
+ public void setInElementName(String inputMessageName)
+ {
+ this.inElementName = inputMessageName;
+ }
+
+ /**
+ * Returns InputMessageName
+ *
+ * @return a String
+ */
+ public String getInElementName()
+ {
+ return inElementName;
+ }
+}
+
+/*
+ * Indiana University Extreme! Lab Software License, Version 1.2
+ *
+ * Copyright (c) 2002-2004 The Trustees of Indiana University.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * 1) All redistributions of source code must retain the above
+ * copyright notice, the list of authors in the original source
+ * code, this list of conditions and the disclaimer listed in this
+ * license;
+ *
+ * 2) All redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the disclaimer
+ * listed in this license in the documentation and/or other
+ * materials provided with the distribution;
+ *
+ * 3) Any documentation included with all redistributions must include
+ * the following acknowledgement:
+ *
+ * "This product includes software developed by the Indiana
+ * University Extreme! Lab. For further information please visit
+ * http://www.extreme.indiana.edu/"
+ *
+ * Alternatively, this acknowledgment may appear in the software
+ * itself, and wherever such third-party acknowledgments normally
+ * appear.
+ *
+ * 4) The name "Indiana University" or "Indiana University
+ * Extreme! Lab" shall not be used to endorse or promote
+ * products derived from this software without prior written
+ * permission from Indiana University. For written permission,
+ * please contact http://www.extreme.indiana.edu/.
+ *
+ * 5) Products derived from this software may not use "Indiana
+ * University" name nor may "Indiana University" appear in their name,
+ * without prior written permission of the Indiana University.
+ *
+ * Indiana University provides no reassurances that the source code
+ * provided does not infringe the patent or any other intellectual
+ * property rights of any other entity. Indiana University disclaims any
+ * liability to any recipient for claims brought by any other entity
+ * based on infringement of intellectual property rights or otherwise.
+ *
+ * LICENSEE UNDERSTANDS THAT SOFTWARE IS PROVIDED "AS IS" FOR WHICH
+ * NO WARRANTIES AS TO CAPABILITIES OR ACCURACY ARE MADE. INDIANA
+ * UNIVERSITY GIVES NO WARRANTIES AND MAKES NO REPRESENTATION THAT
+ * SOFTWARE IS FREE OF INFRINGEMENT OF THIRD PARTY PATENT, COPYRIGHT, OR
+ * OTHER PROPRIETARY RIGHTS. INDIANA UNIVERSITY MAKES NO WARRANTIES THAT
+ * SOFTWARE IS FREE FROM "BUGS", "VIRUSES", "TROJAN HORSES", "TRAP
+ * DOORS", "WORMS", OR OTHER HARMFUL CODE. LICENSEE ASSUMES THE ENTIRE
+ * RISK AS TO THE PERFORMANCE OF SOFTWARE AND/OR ASSOCIATED MATERIALS,
+ * AND TO THE PERFORMANCE AND VALIDITY OF INFORMATION GENERATED USING
+ * SOFTWARE.
+ */
+
Propchange: incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/MessageObj.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/OutParamObj.java
URL: http://svn.apache.org/viewvc/incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/OutParamObj.java?rev=1103180&view=auto
==============================================================================
--- incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/OutParamObj.java (added)
+++ incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/OutParamObj.java Sat May 14 18:34:50 2011
@@ -0,0 +1,173 @@
+/*
+ * Copyright (c) 2002-2004 Extreme! Lab, Indiana University. All rights reserved.
+ *
+ * This software is open source. See the bottom of this file for the licence.
+ *
+ * $Id: OutParamObj.java,v 1.1.2.2 2006/08/10 13:21:45 hperera Exp $
+ */
+
+/**
+ * @version $Revision: 1.1.2.2 $
+ * @author Gopi Kandaswamy [mailto:gkandasw@cs.indiana.edu]
+ */
+
+package org.ogce.schemas.gfac.wsdl;
+
+import java.util.Vector;
+
+import org.w3c.dom.Node;
+
+public class OutParamObj {
+
+ private String name = null;
+ private String description = null;
+ private String dataType = null;
+ private String regExp = null;
+ private Vector defaultValues = null;
+ private Node metadata;
+
+ public Node getMetadata() {
+ return metadata;
+ }
+
+ public void setMetadata(Node metadata) {
+ this.metadata = metadata;
+ }
+
+ /**
+ * Sets DefaultValues
+ *
+ * @param DefaultValues a Vector
+ */
+ public void setDefaultValues(Vector defaultValues)
+ {
+ this.defaultValues = defaultValues;
+ }
+
+ /**
+ * Returns DefaultValues
+ *
+ * @return a Vector
+ */
+ public Vector getDefaultValues()
+ {
+ return defaultValues;
+ }
+
+ public void setRegExp(String regExp) {
+ this.regExp = regExp;
+ }
+
+ public String getRegExp() {
+ return this.regExp;
+ }
+
+ /**
+ * Sets DataType
+ *
+ * @param DataType
+ * a String
+ */
+ public void setDataType(String dataType) {
+ this.dataType = dataType;
+ }
+
+ /**
+ * Returns DataType
+ *
+ * @return a String
+ */
+ public String getDataType() {
+ return dataType;
+ }
+
+ /**
+ * Sets Description
+ *
+ * @param Description
+ * a String
+ */
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ /**
+ * Returns Description
+ *
+ * @return a String
+ */
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * Sets Name
+ *
+ * @param Name
+ * a String
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * Returns Name
+ *
+ * @return a String
+ */
+ public String getName() {
+ return name;
+ }
+}
+
+/*
+ * Indiana University Extreme! Lab Software License, Version 1.2
+ *
+ * Copyright (c) 2002-2004 The Trustees of Indiana University. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1) All redistributions of source code must retain the above copyright notice,
+ * the list of authors in the original source code, this list of conditions and
+ * the disclaimer listed in this license;
+ *
+ * 2) All redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the disclaimer listed in this license in
+ * the documentation and/or other materials provided with the distribution;
+ *
+ * 3) Any documentation included with all redistributions must include the
+ * following acknowledgement:
+ *
+ * "This product includes software developed by the Indiana University Extreme!
+ * Lab. For further information please visit http://www.extreme.indiana.edu/"
+ *
+ * Alternatively, this acknowledgment may appear in the software itself, and
+ * wherever such third-party acknowledgments normally appear.
+ *
+ * 4) The name "Indiana University" or "Indiana University Extreme! Lab" shall
+ * not be used to endorse or promote products derived from this software without
+ * prior written permission from Indiana University. For written permission,
+ * please contact http://www.extreme.indiana.edu/.
+ *
+ * 5) Products derived from this software may not use "Indiana University" name
+ * nor may "Indiana University" appear in their name, without prior written
+ * permission of the Indiana University.
+ *
+ * Indiana University provides no reassurances that the source code provided
+ * does not infringe the patent or any other intellectual property rights of any
+ * other entity. Indiana University disclaims any liability to any recipient for
+ * claims brought by any other entity based on infringement of intellectual
+ * property rights or otherwise.
+ *
+ * LICENSEE UNDERSTANDS THAT SOFTWARE IS PROVIDED "AS IS" FOR WHICH NO
+ * WARRANTIES AS TO CAPABILITIES OR ACCURACY ARE MADE. INDIANA UNIVERSITY GIVES
+ * NO WARRANTIES AND MAKES NO REPRESENTATION THAT SOFTWARE IS FREE OF
+ * INFRINGEMENT OF THIRD PARTY PATENT, COPYRIGHT, OR OTHER PROPRIETARY RIGHTS.
+ * INDIANA UNIVERSITY MAKES NO WARRANTIES THAT SOFTWARE IS FREE FROM "BUGS",
+ * "VIRUSES", "TROJAN HORSES", "TRAP DOORS", "WORMS", OR OTHER HARMFUL CODE.
+ * LICENSEE ASSUMES THE ENTIRE RISK AS TO THE PERFORMANCE OF SOFTWARE AND/OR
+ * ASSOCIATED MATERIALS, AND TO THE PERFORMANCE AND VALIDITY OF INFORMATION
+ * GENERATED USING SOFTWARE.
+ */
Propchange: incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/OutParamObj.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/ParamValueObj.java
URL: http://svn.apache.org/viewvc/incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/ParamValueObj.java?rev=1103180&view=auto
==============================================================================
--- incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/ParamValueObj.java (added)
+++ incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/ParamValueObj.java Sat May 14 18:34:50 2011
@@ -0,0 +1,121 @@
+/*
+ * Copyright (c) 2002-2004 Extreme! Lab, Indiana University. All rights reserved.
+ *
+ * This software is open source. See the bottom of this file for the licence.
+ *
+ * $Id: ParamValueObj.java,v 1.1.2.1 2006/05/30 01:43:39 gkandasw Exp $
+ */
+
+
+/**
+ * @version $Revision: 1.1.2.1 $
+ * @author Gopi Kandaswamy [mailto:gkandasw@cs.indiana.edu]
+ */
+
+package org.ogce.schemas.gfac.wsdl;
+
+
+public class ParamValueObj
+{
+ private String[] values = null;
+ private String[] descriptions = null;
+
+ /**
+ * Sets Descriptions
+ *
+ * @param Descriptions a String[]
+ */
+ public void setDescriptions(String[] descriptions)
+ {
+ this.descriptions = descriptions;
+ }
+
+ /**
+ * Returns Descriptions
+ *
+ * @return a String[]
+ */
+ public String[] getDescriptions()
+ {
+ return descriptions;
+ }
+
+ /**
+ * Sets Values
+ *
+ * @param Values a String[]
+ */
+ public void setValues(String[] values)
+ {
+ this.values = values;
+ }
+
+ /**
+ * Returns Values
+ *
+ * @return a String[]
+ */
+ public String[] getValues()
+ {
+ return values;
+ }
+}
+
+/*
+ * Indiana University Extreme! Lab Software License, Version 1.2
+ *
+ * Copyright (c) 2002-2004 The Trustees of Indiana University.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * 1) All redistributions of source code must retain the above
+ * copyright notice, the list of authors in the original source
+ * code, this list of conditions and the disclaimer listed in this
+ * license;
+ *
+ * 2) All redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the disclaimer
+ * listed in this license in the documentation and/or other
+ * materials provided with the distribution;
+ *
+ * 3) Any documentation included with all redistributions must include
+ * the following acknowledgement:
+ *
+ * "This product includes software developed by the Indiana
+ * University Extreme! Lab. For further information please visit
+ * http://www.extreme.indiana.edu/"
+ *
+ * Alternatively, this acknowledgment may appear in the software
+ * itself, and wherever such third-party acknowledgments normally
+ * appear.
+ *
+ * 4) The name "Indiana University" or "Indiana University
+ * Extreme! Lab" shall not be used to endorse or promote
+ * products derived from this software without prior written
+ * permission from Indiana University. For written permission,
+ * please contact http://www.extreme.indiana.edu/.
+ *
+ * 5) Products derived from this software may not use "Indiana
+ * University" name nor may "Indiana University" appear in their name,
+ * without prior written permission of the Indiana University.
+ *
+ * Indiana University provides no reassurances that the source code
+ * provided does not infringe the patent or any other intellectual
+ * property rights of any other entity. Indiana University disclaims any
+ * liability to any recipient for claims brought by any other entity
+ * based on infringement of intellectual property rights or otherwise.
+ *
+ * LICENSEE UNDERSTANDS THAT SOFTWARE IS PROVIDED "AS IS" FOR WHICH
+ * NO WARRANTIES AS TO CAPABILITIES OR ACCURACY ARE MADE. INDIANA
+ * UNIVERSITY GIVES NO WARRANTIES AND MAKES NO REPRESENTATION THAT
+ * SOFTWARE IS FREE OF INFRINGEMENT OF THIRD PARTY PATENT, COPYRIGHT, OR
+ * OTHER PROPRIETARY RIGHTS. INDIANA UNIVERSITY MAKES NO WARRANTIES THAT
+ * SOFTWARE IS FREE FROM "BUGS", "VIRUSES", "TROJAN HORSES", "TRAP
+ * DOORS", "WORMS", OR OTHER HARMFUL CODE. LICENSEE ASSUMES THE ENTIRE
+ * RISK AS TO THE PERFORMANCE OF SOFTWARE AND/OR ASSOCIATED MATERIALS,
+ * AND TO THE PERFORMANCE AND VALIDITY OF INFORMATION GENERATED USING
+ * SOFTWARE.
+ */
Propchange: incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/ParamValueObj.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/RoundTrip.java
URL: http://svn.apache.org/viewvc/incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/RoundTrip.java?rev=1103180&view=auto
==============================================================================
--- incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/RoundTrip.java (added)
+++ incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/RoundTrip.java Sat May 14 18:34:50 2011
@@ -0,0 +1,122 @@
+package org.ogce.schemas.gfac.wsdl;
+
+
+import java.io.IOException;
+import java.io.Reader;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.io.Writer;
+
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+import org.xmlpull.v1.XmlPullParserFactory;
+import org.xmlpull.v1.XmlSerializer;
+
+/**
+ * This sample demonstrates how to roundtrip XML document (roundtrip is not
+ * exact but infoset level)
+ */
+
+public class RoundTrip {
+ private final static String PROPERTY_XMLDECL_STANDALONE = "http://xmlpull.org/v1/doc/features.html#xmldecl-standalone";
+ private final static String PROPERTY_SERIALIZER_INDENTATION = "http://xmlpull.org/v1/doc/properties.html#serializer-indentation";
+ private XmlPullParser parser;
+ private XmlSerializer serializer;
+
+ private RoundTrip(XmlPullParser parser, XmlSerializer serializer) {
+ this.parser = parser;
+ this.serializer = serializer;
+ }
+
+ private void writeStartTag() throws XmlPullParserException, IOException {
+ // check for case when feature xml roundtrip is supported
+ // if (parser.getFeature (FEATURE_XML_ROUNDTRIP)) {
+ if (!parser.getFeature(XmlPullParser.FEATURE_REPORT_NAMESPACE_ATTRIBUTES)) {
+ for (int i = parser.getNamespaceCount(parser.getDepth() - 1); i <= parser
+ .getNamespaceCount(parser.getDepth()) - 1; i++) {
+ serializer.setPrefix(parser.getNamespacePrefix(i), parser.getNamespaceUri(i));
+ }
+ }
+ serializer.startTag(parser.getNamespace(), parser.getName());
+ for (int i = 0; i < parser.getAttributeCount(); i++) {
+ serializer.attribute(parser.getAttributeNamespace(i), parser.getAttributeName(i),
+ parser.getAttributeValue(i));
+ }
+ // serializer.closeStartTag();
+ }
+
+ private void writeToken(int eventType) throws XmlPullParserException, IOException {
+ switch (eventType) {
+ case XmlPullParser.START_DOCUMENT:
+ // use Boolean.TRUE to make it standalone
+ Boolean standalone = (Boolean) parser.getProperty(PROPERTY_XMLDECL_STANDALONE);
+ serializer.startDocument(parser.getInputEncoding(), standalone);
+ break;
+ case XmlPullParser.END_DOCUMENT:
+ serializer.endDocument();
+ break;
+ case XmlPullParser.START_TAG:
+ writeStartTag();
+ break;
+ case XmlPullParser.END_TAG:
+ serializer.endTag(parser.getNamespace(), parser.getName());
+ break;
+ case XmlPullParser.IGNORABLE_WHITESPACE:
+ // comment it to remove ignorable whtespaces from XML infoset
+ String s = parser.getText();
+ serializer.ignorableWhitespace(s);
+ break;
+ case XmlPullParser.TEXT:
+ serializer.text(parser.getText());
+ break;
+ case XmlPullParser.ENTITY_REF:
+ serializer.entityRef(parser.getName());
+ break;
+ case XmlPullParser.CDSECT:
+ serializer.cdsect(parser.getText());
+ break;
+ case XmlPullParser.PROCESSING_INSTRUCTION:
+ serializer.processingInstruction(parser.getText());
+ break;
+ case XmlPullParser.COMMENT:
+ serializer.comment(parser.getText());
+ break;
+ case XmlPullParser.DOCDECL:
+ serializer.docdecl(parser.getText());
+ break;
+ }
+ }
+
+ private void roundTrip() throws XmlPullParserException, IOException {
+ parser.nextToken(); // read first token
+ writeToken(XmlPullParser.START_DOCUMENT); // write optional XMLDecl if
+ // present
+ while (parser.getEventType() != XmlPullParser.END_DOCUMENT) {
+ writeToken(parser.getEventType());
+ parser.nextToken();
+ }
+ writeToken(XmlPullParser.END_DOCUMENT);
+ }
+
+ public static void roundTrip(Reader reader, Writer writer, String indent)
+ throws XmlPullParserException, IOException {
+ XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
+ factory.setNamespaceAware(true);
+ XmlPullParser pp = factory.newPullParser();
+ pp.setInput(reader);
+ XmlSerializer serializer = factory.newSerializer();
+ serializer.setOutput(writer);
+ if (indent != null) {
+ serializer.setProperty(PROPERTY_SERIALIZER_INDENTATION, indent);
+ }
+ (new RoundTrip(pp, serializer)).roundTrip();
+ }
+
+ public static void main(String[] args) throws Exception {
+ String XML = "<test><foo>fdf</foo></test>";
+ Reader r = new StringReader(XML);
+ Writer w = new StringWriter();
+ roundTrip(r, w, " ");
+ System.out.println("indented XML=" + w);
+ }
+}
Propchange: incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/RoundTrip.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/TypesGenerator.java
URL: http://svn.apache.org/viewvc/incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/TypesGenerator.java?rev=1103180&view=auto
==============================================================================
--- incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/TypesGenerator.java (added)
+++ incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/TypesGenerator.java Sat May 14 18:34:50 2011
@@ -0,0 +1,555 @@
+package org.ogce.schemas.gfac.wsdl;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Vector;
+import java.util.logging.Logger;
+
+import javax.wsdl.Definition;
+import javax.wsdl.Types;
+import javax.xml.namespace.QName;
+
+import org.ogce.schemas.gfac.documents.MethodType;
+import org.ogce.schemas.gfac.documents.ServiceMapType;
+import org.ogce.schemas.gfac.utils.GFacConstants;
+import org.w3c.dom.DOMImplementation;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import com.ibm.wsdl.extensions.schema.SchemaImpl;
+
+import xsul.MLogger;
+
+
+public class TypesGenerator implements WSDLConstants{
+ private static final String ENDPOINT_REFERENCE_TYPE = "EndpointReferenceType";
+ private static final String LEAD_CROSSCUT_PARAMETERS_NAME = "LeadCrosscutParameters";
+
+ public static Types addTypes(Definition def, DOMImplementation dImpl,
+ ServiceMapType serviceMap, String typens, String globalTypens,
+ MethodType[] methods) {
+ ArrayList<Element> schemaTable = new ArrayList<Element>();
+ Vector complexTypes = new Vector();
+ HashMap<String, String> knownTypes = new HashMap<String, String>();
+
+ Element documentation = null;
+
+ Document doc = dImpl.createDocument(typens, SCHEMA, null);
+
+ Element schema = doc.createElementNS(XSD_NAMESPACE,
+ "schema");
+ // Element schema = doc.getDocumentElement();
+ schema.setAttribute(TARGET_NAMESPACE, typens);
+ schema.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns",
+ "http://www.w3.org/2001/XMLSchema");
+ // schema.setAttribute(XMLNS,
+ // XSD_NAMESPACE);
+ schema.setAttribute(ELEMENT_FORM_DEFAULT,
+ UNQUALIFIED);
+
+ Element globalSchema = doc.createElementNS(XSD_NAMESPACE,
+ "schema");
+ // Element globalSchema = doc.getDocumentElement();
+ globalSchema.setAttribute(TARGET_NAMESPACE, globalTypens);
+ globalSchema.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns",
+ "http://www.w3.org/2001/XMLSchema");
+ // globalSchema.setAttribute(XMLNS,
+ // XSD_NAMESPACE);
+ globalSchema.setAttribute(ELEMENT_FORM_DEFAULT,
+ UNQUALIFIED);
+
+ Types types = def.createTypes();
+
+
+ // ==== for all the methods, write the input and output parameters
+ for (int i = 0; i < methods.length; ++i) {
+ String methodName = methods[i].getMethodName();
+
+ Vector inParams = WSDLGenUtil
+ .getInParams(serviceMap, methodName);
+ Vector inParamNames = new Vector();
+ Vector inParamDesc = new Vector();
+ Vector inParamTypes = new Vector();
+
+ for (int j = 0; j < inParams.size(); ++j) {
+ inParamNames.add(((InParamObj) inParams.get(j)).getName());
+ inParamDesc
+ .add(((InParamObj) inParams.get(j)).getDescription());
+ inParamTypes.add(((InParamObj) inParams.get(j)).getDataType()
+ .toString());
+ }
+
+ Vector outParams = WSDLGenUtil.getOutParams(serviceMap,
+ methodName);
+ Vector outParamNames = new Vector();
+ Vector outParamDesc = new Vector();
+ Vector outParamTypes = new Vector();
+
+ for (int j = 0; j < outParams.size(); ++j) {
+ outParamNames.add(((OutParamObj) outParams.get(j)).getName());
+ outParamDesc.add(((OutParamObj) outParams.get(j))
+ .getDescription());
+ outParamTypes.add(((OutParamObj) outParams.get(j))
+ .getDataType().toString());
+ }
+
+ MessageObj msgObj = new MessageObj();
+ msgObj.setNamespace(typens);
+ // Set the method name in the message object
+ msgObj.setMethodName(methodName);
+
+ // === write all the input parameters ========
+ // Input message name
+ String inputMessageName = methodName
+ + GFacConstants.SERVICE_IN_PARAMS_SUFFIX;
+
+ // Set the input message name in the message object
+ msgObj.setInElementName(inputMessageName);
+
+ // local data types
+ Element inputParams = doc.createElement("element");
+ String inputElementName = methodName
+ + GFacConstants.SERVICE_IN_PARAMS_SUFFIX;
+ String inputParametersType = methodName
+ + GFacConstants.SERVICE_INPUT_PARAMS_TYPE_SUFFIX;
+
+ inputParams.setAttribute("name", inputElementName);
+ inputParams.setAttribute("type", TYPENS + ":"
+ + inputParametersType);
+
+ schema.appendChild(inputParams);
+ // local data types
+
+ msgObj.setInMsgParamNames(inParamNames);
+ msgObj.setInMsgParamTypes(inParamTypes);
+
+ Element first = doc.createElement(COMPLEX_TYPE);
+ first.setAttribute("name", inputParametersType);
+
+ Element sequence = doc.createElement("sequence");
+
+ for (int j = 0; j < inParamNames.size(); ++j) {
+ Element elem = doc.createElement("element");
+ String paramName = (String) inParamNames.get(j);
+ paramName = paramName.replaceAll(HYPHEN,
+ HYPHEN_REPLACEMENT);
+ elem.setAttribute("name", paramName);
+ String dataType = (String) inParamTypes.get(j);
+
+ if (dataType.equals("String")) {
+ elem.setAttribute("type", XSD_STRING_TYPE);
+ } else if (dataType.equals("Integer")) {
+ elem.setAttribute("type", "xsd:int");
+ } else if (dataType.equals("Float")) {
+ elem.setAttribute("type", "xsd:float");
+ } else if (dataType.equals("Double")) {
+ elem.setAttribute("type", "xsd:double");
+ } else if (dataType.equals("Boolean")) {
+ elem.setAttribute("type", "xsd:boolean");
+ } else if (dataType.equals("QName")) {
+ elem.setAttribute("type", "xsd:QName");
+ } else if (dataType.equals("URI")) {
+ elem.setAttribute("type", "xsd:anyURI");
+ }
+ // schemas for complex types will be written later
+ else if (dataType.equals("StringArray")
+ || dataType.equals("IntegerArray")
+ || dataType.equals("FloatArray")
+ || dataType.equals("DoubleArray")
+ || dataType.equals("BooleanArray")
+ || dataType.equals("QNameArray")
+ || dataType.equals("LEADFileID")
+ || dataType.equals("LEADFileIDArray")
+ || dataType.equals("LEADNameListFile")
+ || dataType.equals("LEADNameListPropertiesFile")
+ || dataType.equals("HostName")
+ || dataType.equals(GFacConstants.Types.TYPE_URI_ARRAY)
+ || dataType.equals(GFacConstants.Types.TYPE_DATAID)) {
+ elem.setAttribute("type", GLOBAL_TYPENS + ":"
+ + dataType + "Type");
+ if (!complexTypes.contains(dataType)) {
+ complexTypes.add(dataType);
+ }
+ } else if (dataType.equals(GFacConstants.Types.TYPE_DATAID_ARRAY)) {
+ elem.setAttribute("type", GLOBAL_TYPENS + ":"
+ + dataType + "Type");
+ if (!complexTypes.contains(GFacConstants.Types.TYPE_DATAID_ARRAY)) {
+ complexTypes.add(GFacConstants.Types.TYPE_DATAID_ARRAY);
+ }
+ if (!complexTypes.contains(GFacConstants.Types.TYPE_DATAID)) {
+ complexTypes.add(GFacConstants.Types.TYPE_DATAID);
+ }
+ } else if (dataType.equals("StringEnum")
+ || dataType.equals("IntegerEnum")
+ || dataType.equals("FloatEnum")
+ || dataType.equals("DoubleEnum")) {
+ elem.setAttribute("type", TYPENS + ":"
+ + methodName + "_" + paramName + "_" + dataType
+ + "Type");
+ }else if(dataType.equals(LEAD_CROSSCUT_PARAMETERS_NAME)){
+ if(!knownTypes.containsKey(LEAD_CROSSCUT_PARAMETERS_NAME)){
+ schemaTable.add(createCorssCutSchema(doc));
+ knownTypes.put(LEAD_CROSSCUT_PARAMETERS_NAME, LEAD_CROSSCUT_PARAMETERS_NAME);
+ }
+ elem.setAttribute("type", WSDLGenerator.CROSSCUT_PREFIX + ":"
+ + LEAD_CROSSCUT_PARAMETERS_NAME);
+ }else if(dataType.equals(ENDPOINT_REFERENCE_TYPE)){
+ if(!knownTypes.containsKey(ENDPOINT_REFERENCE_TYPE)){
+ schemaTable.add(createAddressingSchema(doc));
+ knownTypes.put(ENDPOINT_REFERENCE_TYPE, ENDPOINT_REFERENCE_TYPE);
+ }
+ elem.setAttribute("type", WSDLGenerator.WSA_PREFIX + ":"
+ + ENDPOINT_REFERENCE_TYPE);
+ }
+
+ Element annotation = doc
+ .createElement(ANNOTATION);
+
+ // TODO create Metadata
+
+ WSDLGenerator.createMetadata((InParamObj) inParams.get(j), doc,
+ annotation);
+
+ documentation = doc.createElement(DOCUMENTATION);
+ documentation.appendChild(doc
+ .createTextNode((String) inParamDesc.get(j)));
+ annotation.appendChild(documentation);
+ elem.appendChild(annotation);
+ sequence.appendChild(elem);
+ } // end for inParams
+
+ first.appendChild(sequence);
+ schema.appendChild(first);
+
+ // write the enumeration types
+ for (int j = 0; j < inParamNames.size(); ++j) {
+ String dataType = (String) inParamTypes.get(j);
+ if (dataType.equals("StringEnum")
+ || dataType.equals("IntegerEnum")
+ || dataType.equals("FloatEnum")
+ || dataType.equals("DoubleEnum")) {
+ String paramName = (String) inParamNames.get(j);
+ ParamValueObj paramValues = WSDLGenUtil
+ .getInParamValues(serviceMap, methodName, paramName);
+ if (paramValues == null)
+ continue;
+ String[] values = paramValues.getValues();
+ String[] descs = paramValues.getDescriptions();
+ Element elem = doc.createElement(SIMPLE_TYPE);
+ elem.setAttribute("name", methodName + "_" + paramName
+ + "_" + dataType + "Type");
+
+ for (int k = 0; k < values.length; ++k) {
+ documentation = doc
+ .createElement(DOCUMENTATION);
+ // documentation.setAttribute(XML_LANG,
+ // ENGLISH);
+
+ Element value = doc.createElement("value");
+ value.appendChild(doc.createTextNode(values[k]));
+ Element description = doc.createElement("description");
+ description.appendChild(doc.createTextNode(descs[k]));
+ documentation.appendChild(value);
+ documentation.appendChild(description);
+ elem.appendChild(documentation);
+ }
+
+ Element restriction = doc.createElement("restriction");
+ if (dataType.equals("StringEnum")) {
+ restriction.setAttribute("base", "xsd:string");
+ } else if (dataType.equals("IntegerEnum")) {
+ restriction.setAttribute("base", "xsd:int");
+ } else if (dataType.equals("FloatEnum")) {
+ restriction.setAttribute("base", "xsd:float");
+ } else if (dataType.equals("DoubleEnum")) {
+ restriction.setAttribute("base", "xsd:double");
+ }
+ for (int k = 0; k < values.length; ++k) {
+ Element enumeration = doc.createElement("enumeration");
+ enumeration.setAttribute("value", values[k]);
+ restriction.appendChild(enumeration);
+ }
+ elem.appendChild(restriction);
+ schema.appendChild(elem);
+ }
+ }
+
+ // ====== write the output parameters ==============
+ // Output message name
+ if (outParams.size() > 0) {
+ String outputMessageName = methodName
+ + GFacConstants.SERVICE_OUT_PARAMS_SUFFIX;
+ // Set the output message name in the message object
+ msgObj.setOutElementName(outputMessageName);
+ Element outputParams = doc.createElement("element");
+ String outputElementName = methodName
+ + GFacConstants.SERVICE_OUT_PARAMS_SUFFIX;
+ String outputParametersType = methodName
+ + GFacConstants.SERVICE_OUTPUT_PARAMS_TYPE_SUFFIX;
+ outputParams.setAttribute("name", outputElementName);
+ outputParams.setAttribute("type", TYPENS + ":"
+ + outputParametersType);
+ schema.appendChild(outputParams);
+ msgObj.setOutMsgParamNames(outParamNames);
+ msgObj.setOutMsgParamTypes(outParamTypes);
+
+ // Now add the output parameters
+ first = doc.createElement(COMPLEX_TYPE);
+ first.setAttribute("name", outputParametersType);
+ sequence = doc.createElement("sequence");
+
+ for (int j = 0; j < outParamNames.size(); ++j) {
+ Element elem = doc.createElement("element");
+ elem.setAttribute("name", (String) outParamNames.get(j));
+ String dataType = (String) outParamTypes.get(j);
+
+ if (dataType.equals("String") || dataType.equals("StdOut")
+ || dataType.equals("StdErr")) {
+ elem
+ .setAttribute("type",
+ XSD_STRING_TYPE);
+ } else if (dataType.equals("Integer")) {
+ elem.setAttribute("type", "xsd:int");
+ } else if (dataType.equals("Float")) {
+ elem.setAttribute("type", "xsd:float");
+ } else if (dataType.equals("Double")) {
+ elem.setAttribute("type", "xsd:double");
+ } else if (dataType.equals("Boolean")) {
+ elem.setAttribute("type", "xsd:boolean");
+ } else if (dataType.equals("URI")) {
+ elem.setAttribute("type", "xsd:anyURI");
+ } else if (dataType.equals("QName")) {
+ elem.setAttribute("type", "xsd:QName");
+ } else if (dataType.equals("StringArray")
+ || dataType.equals("IntegerArray")
+ || dataType.equals("FloatArray")
+ || dataType.equals("DoubleArray")
+ || dataType.equals("BooleanArray")
+ || dataType.equals("QNameArray")
+ || dataType.equals("LEADFileID")
+ || dataType.equals("LEADFileIDArray")
+ || dataType.equals(GFacConstants.Types.TYPE_DATAID)
+ || dataType.equals(GFacConstants.Types.TYPE_URI_ARRAY)
+ ) {
+ elem.setAttribute("type", GLOBAL_TYPENS
+ + ":" + dataType + "Type");
+ if (!complexTypes.contains(dataType)) {
+ complexTypes.add(dataType);
+ }
+ } else if (dataType.equals(GFacConstants.Types.TYPE_DATAID_ARRAY)) {
+ elem.setAttribute("type", GLOBAL_TYPENS
+ + ":" + dataType +"Type");
+ if (!complexTypes.contains(GFacConstants.Types.TYPE_DATAID_ARRAY)) {
+ complexTypes.add(GFacConstants.Types.TYPE_DATAID_ARRAY);
+ }
+ if (!complexTypes.contains(GFacConstants.Types.TYPE_DATAID)) {
+ complexTypes.add(GFacConstants.Types.TYPE_DATAID);
+ }
+ }else if(dataType.equals(LEAD_CROSSCUT_PARAMETERS_NAME)){
+ if(!knownTypes.containsKey(LEAD_CROSSCUT_PARAMETERS_NAME)){
+ schemaTable.add(createCorssCutSchema(doc));
+ knownTypes.put(LEAD_CROSSCUT_PARAMETERS_NAME, LEAD_CROSSCUT_PARAMETERS_NAME);
+ }
+ elem.setAttribute("type", WSDLGenerator.CROSSCUT_PREFIX + ":"
+ + LEAD_CROSSCUT_PARAMETERS_NAME);
+// }else if(dataType.equals(ENDPOINT_REFERENCE_TYPE)){
+// if(!knownTypes.containsKey(ENDPOINT_REFERENCE_TYPE)){
+// schemaTable.add(createAddressingSchema(doc));
+// knownTypes.put(ENDPOINT_REFERENCE_TYPE, ENDPOINT_REFERENCE_TYPE);
+// }
+// elem.setAttribute("type", WSDLGenerator.WSA_PREFIX + ":"
+// + ENDPOINT_REFERENCE_TYPE);
+ }
+
+ // Create an annotation
+ Element annotation = doc
+ .createElement(ANNOTATION);
+ WSDLGenerator.createMetadata(
+ (OutParamObj) outParams.get(j), doc, annotation);
+ documentation = doc
+ .createElement(DOCUMENTATION);
+ documentation.appendChild(doc
+ .createTextNode((String) outParamDesc.get(j)));
+ annotation.appendChild(documentation);
+ elem.appendChild(annotation);
+ sequence.appendChild(elem);
+
+ } // end for outParamNames.size()
+ }
+
+ first.appendChild(sequence);
+ schema.appendChild(first);
+
+ } // end for methods.length
+
+ // write the schemas for the complex types in the input and output
+ // parameters
+
+ for (int i = 0; i < complexTypes.size(); ++i) {
+ String dataType = (String) complexTypes.get(i);
+
+ if (dataType.equals("LEADFileID")
+ || dataType.equals("LEADNameListFile")
+ || dataType.equals("LEADNameListPropertiesFile")
+ || dataType.equals("LEADWorkflowIDType")) {
+ Element first = doc.createElement(SIMPLE_TYPE);
+ first.setAttribute("name", dataType + "Type");
+ Element restriction = doc.createElement("restriction");
+ restriction.setAttribute("base", "xsd:anyURI");
+ first.appendChild(restriction);
+ globalSchema.appendChild(first);
+ }else if (dataType.equals("HostName")) {
+ Element first = doc.createElement(SIMPLE_TYPE);
+ first.setAttribute("name", dataType + "Type");
+ Element restriction = doc.createElement("restriction");
+ restriction.setAttribute("base", "xsd:string");
+ first.appendChild(restriction);
+ globalSchema.appendChild(first);
+ }else if(dataType.equals(GFacConstants.Types.TYPE_DATAID)){
+ Element first = doc.createElement(COMPLEX_TYPE);
+ first.setAttribute("name", dataType + "Type");
+ Element complexContent = doc.createElement("complexContent");
+ first.appendChild(complexContent);
+ Element extension = doc.createElement("extension");
+ extension.setAttribute("base", "xsd:anyURI");
+ complexContent.appendChild(extension);
+ Element attribute = doc.createElement("attribute");
+ extension.appendChild(attribute);
+ attribute.setAttribute("name", DataIDType.LOCATION_ATTRIBUTE);
+ attribute.setAttribute("type", "xsd:string");
+ attribute.setAttribute("use", "optional");
+ globalSchema.appendChild(first);
+ }
+ }
+
+ for (int i = 0; i < complexTypes.size(); ++i) {
+ Element first = doc.createElement(COMPLEX_TYPE);
+ String dataType = (String) complexTypes.get(i);
+ first.setAttribute("name", dataType + "Type");
+ Element sequence = doc.createElement("sequence");
+ Element elem = doc.createElement("element");
+ elem.setAttribute("name", GFacConstants.ARRAY_VALUE);
+
+ if (dataType.equals("StringArray")) {
+ elem.setAttribute("type", "xsd:string");
+ } else if (dataType.equals("IntegerArray")) {
+ elem.setAttribute("type", "xsd:int");
+ } else if (dataType.equals("FloatArray")) {
+ elem.setAttribute("type", "xsd:float");
+ } else if (dataType.equals("DoubleArray")) {
+ elem.setAttribute("type", "xsd:double");
+ } else if (dataType.equals("BooleanArray")) {
+ elem.setAttribute("type", "xsd:boolean");
+ } else if (dataType.equals(GFacConstants.Types.TYPE_LEADFILEID_ARRAY)
+ || dataType.equals(GFacConstants.Types.TYPE_URI_ARRAY)) {
+ elem.setAttribute("type", "xsd:anyURI");
+ }else if(dataType.equals(GFacConstants.Types.TYPE_DATAID_ARRAY)){
+ elem.setAttribute("type", "globalTypens:"+GFacConstants.Types.TYPE_DATAID + "Type");
+ } else if (dataType.equals("QNameArray")) {
+ elem.setAttribute("type", "xsd:anyQName");
+ } else {
+ continue;
+ }
+
+ elem.setAttribute("minOccurs", "0");
+ elem.setAttribute("maxOccurs", "unbounded");
+ sequence.appendChild(elem);
+ first.appendChild(sequence);
+ globalSchema.appendChild(first);
+ }
+
+ // types.setDocumentationElement(schema);
+ SchemaImpl schemaImpl = new SchemaImpl();
+// SchemaImportImpl schemaimport = new SchemaImportImpl();
+// schemaimport.setNamespaceURI("http://www.extreme.indiana.edu/lead/xsd");
+// schemaimport.setSchemaLocationURI("http://www.extreme.indiana.edu/gfac/gfac-simple-types.xsd");
+// schemaImpl.addImport(schemaimport);
+
+ Element importEle = doc.createElement("import");
+ importEle.setAttribute("namespace","http://www.extreme.indiana.edu/lead/xsd");
+ importEle.setAttribute("schemaLocation", "http://www.extreme.indiana.edu/gfac/gfac-simple-types.xsd");
+ schema.insertBefore(importEle, schema.getFirstChild());
+
+ if(knownTypes.containsKey(LEAD_CROSSCUT_PARAMETERS_NAME)){
+ importEle = doc.createElement("import");
+ importEle.setAttribute("namespace","http://lead.extreme.indiana.edu/namespaces/2006/lead-crosscut-parameters/");
+ importEle.setAttribute("schemaLocation", "http://www.extreme.indiana.edu/gfac/schemas/leadcrosscut.xsd");
+ schema.insertBefore(importEle, schema.getFirstChild());
+ }
+
+
+ //schema.appendChild();
+
+
+ schemaImpl.setElement(schema);
+ schemaImpl.setElementType(new QName("http://www.w3.org/2001/XMLSchema",
+ "schema"));
+
+ SchemaImpl globalSchemaImpl = new SchemaImpl();
+ globalSchemaImpl.setElement(globalSchema);
+ globalSchemaImpl.setElementType(new QName(
+ "http://www.w3.org/2001/XMLSchema", "schema"));
+ globalSchemaImpl.getElement().setAttribute("xmlns:xsd", "http://www.w3.org/2001/XMLSchema");
+
+ types.addExtensibilityElement(schemaImpl);
+ //types.addExtensibilityElement(globalSchemaImpl);
+
+// for(Element schemaEle:schemaTable){
+// SchemaImpl newSchema = new SchemaImpl();
+// newSchema.setElement(schemaEle);
+// newSchema.setElementType(new QName(
+// "http://www.w3.org/2001/XMLSchema", "schema"));
+// types.addExtensibilityElement(newSchema);
+// }
+
+ return types;
+ }
+
+
+ public static Element createCorssCutSchema(Document doc){
+ Element crossCutSchema = doc.createElementNS(XSD_NAMESPACE,"schema");
+// Element globalSchema = doc.getDocumentElement();
+ crossCutSchema.setAttribute(TARGET_NAMESPACE, "http://lead.extreme.indiana.edu/namespaces/2006/lead-crosscut-parameters/");
+ crossCutSchema.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns","http://www.w3.org/2001/XMLSchema");
+ crossCutSchema.setAttribute("attributeFormDefault", "qualified");
+ crossCutSchema.setAttribute(ELEMENT_FORM_DEFAULT, "qualified");
+
+ Element type = doc.createElement("complexType");
+ type.setAttribute("name",LEAD_CROSSCUT_PARAMETERS_NAME);
+
+ Element sequence = doc.createElement("sequence");
+ Element any = doc.createElement("any");
+ any.setAttribute("namespace","##any");
+ any.setAttribute("minOccurs","0");
+
+ sequence.appendChild(any);
+ type.appendChild(sequence);
+ crossCutSchema.appendChild(type);
+
+ return crossCutSchema;
+ }
+
+
+ public static Element createAddressingSchema(Document doc){
+ Element crossCutSchema = doc.createElementNS(XSD_NAMESPACE,"schema");
+// Element globalSchema = doc.getDocumentElement();
+ crossCutSchema.setAttribute(TARGET_NAMESPACE, "http://www.w3.org/2005/08/addressing");
+ crossCutSchema.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns","http://www.w3.org/2001/XMLSchema");
+ crossCutSchema.setAttribute("attributeFormDefault", "unqualified");
+ crossCutSchema.setAttribute(ELEMENT_FORM_DEFAULT, "qualified");
+
+ Element type = doc.createElement("complexType");
+ type.setAttribute("name",ENDPOINT_REFERENCE_TYPE);
+
+ Element sequence = doc.createElement("sequence");
+ Element any = doc.createElement("any");
+ any.setAttribute("namespace","##any");
+ any.setAttribute("minOccurs","0");
+
+ sequence.appendChild(any);
+ type.appendChild(sequence);
+ crossCutSchema.appendChild(type);
+
+ return crossCutSchema;
+ }
+}
Propchange: incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/TypesGenerator.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/WSDLConstants.java
URL: http://svn.apache.org/viewvc/incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/WSDLConstants.java?rev=1103180&view=auto
==============================================================================
--- incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/WSDLConstants.java (added)
+++ incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/WSDLConstants.java Sat May 14 18:34:50 2011
@@ -0,0 +1,85 @@
+package org.ogce.schemas.gfac.wsdl;
+
+public interface WSDLConstants {
+ // For wsdl generation
+ public final static String TYPENS = "typens";
+
+ public final static String GLOBAL_TYPENS = "globalTypens";
+
+ public final static String WSDLNS = "wsdlns";
+
+ public final static String SOAP = "soap";
+
+ public final static String XSD = "xsd";
+
+ public final static String XMLNS = "xmlns";
+
+ public final static String TARGET_NAMESPACE = "targetNamespace";
+
+ public final static String SCHEMA = "schema";
+
+ public final static String ELEMENT_FORM_DEFAULT = "elementFormDefault";
+
+ public final static String UNQUALIFIED = "unqualified";
+
+ public final static String ANNOTATION = "annotation";
+
+ public final static String WSDL_DOCUMENTATION = "wsdl:documentation";
+
+ public final static String DOCUMENTATION = "documentation";
+
+ public static final String SERVICE_QNAME = "SERVICE_QNAME";
+
+ public final static String AWSDL = "AWSDL";
+
+ public static final String WSDL_PORT_SUFFIX = "_Port";
+
+ public static final String WSDL_SOAP_BINDING_SUFFIX = "_SoapBinding";
+
+ public static final String LITERAL = "literal";
+
+ public static final String DOCUMENT = "document";
+
+ public static final String XSD_STRING_TYPE = "xsd:string";
+
+ public static final String COMPLEX_TYPE = "complexType";
+
+ public static final String SIMPLE_TYPE = "simpleType";
+
+ public static final String PART_NAME = "parameters";
+
+ public final static String WSDL = "WSDL";
+
+ public final static String WSDL_QNAME = "WSDL_QNAME";
+
+ public static final String XSD_NAMESPACE = "http://www.w3.org/2001/XMLSchema";
+
+ public static final String WSDL_NAMEPSPACE = "http://schemas.xmlsoap.org/wsdl/";
+
+ public static final String SOAP_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/soap/";
+
+ public static final String SOAP_HTTP_NAMESPACE = "http://schemas.xmlsoap.org/soap/http";
+
+ public static final String WSP_NAMESPACE = "http://schemas.xmlsoap.org/ws/2004/09/policy";
+
+ public static final String WSPE_NAMESPACE = "http://schemas.xmlsoap.org/ws/2004/09/policy/encoding";
+
+ public static final String WSA_NAMESPACE = "http://schemas.xmlsoap.org/ws/2004/08/addressing";
+
+ public static final String WSU_NAMESPACE = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
+
+ public static final String SP_NAMESPACE = "http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";
+
+ public static final String WSS10_NAMESPACE = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
+
+ public static final String LEAD_NAMESPACE = "http://www.extreme.indiana.edu/lead";
+
+ public static final String WST_NAMESPACE = "http://schemas.xmlsoap.org/ws/2005/02/trust";
+
+ public static final String SERVICE_LOCATION = "ServiceLocation";
+
+ public static final String HYPHEN_REPLACEMENT = "GFAC_MINUS_REPLACEMENT";
+
+ public static final String HYPHEN = "-";
+
+}
Propchange: incubator/airavata/donations/ogce-donation/modules/utils/schemas/gfac-schema-utils/src/main/java/org/ogce/schemas/gfac/wsdl/WSDLConstants.java
------------------------------------------------------------------------------
svn:executable = *