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 ke...@apache.org on 2007/03/22 07:02:30 UTC
svn commit: r521126 [1/2] - in
/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2: builder/
description/ util/
Author: keithc
Date: Wed Mar 21 23:02:29 2007
New Revision: 521126
URL: http://svn.apache.org/viewvc?view=rev&rev=521126
Log:
Rewriting AxisService2WSDL2 to create a WSDL2 document from an axisService. Tested with services built using WSDL 2.0 documents and a few WSDL 1.1. documents. Need more
testing and may need to add more properties. The binding Heirachy is serialized in a way that each component serializes itself. This will generate a WSDL which is an
approximate of the original WSDL.
Added WSDLSerializationUtil.java and moven common code to it.
Added:
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/WSDLSerializationUtil.java
Modified:
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/BuilderUtil.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisBinding.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisBindingMessage.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisBindingOperation.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisOperation.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2OM.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL2.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL20DefaultValueHolder.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL2Constants.java
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/BuilderUtil.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/BuilderUtil.java?view=diff&rev=521126&r1=521125&r2=521126
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/BuilderUtil.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/BuilderUtil.java Wed Mar 21 23:02:29 2007
@@ -77,7 +77,6 @@
AxisMessage axisMessage =
axisOperation.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
xmlSchemaElement = axisMessage.getSchemaElement();
- }
if (xmlSchemaElement == null) {
// if there is no schema its piece of cake !! add these to the soap body in any order you like.
@@ -162,6 +161,7 @@
}
}
}
+ }
return soapEnvelope;
}
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisBinding.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisBinding.java?view=diff&rev=521126&r1=521125&r2=521126
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisBinding.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisBinding.java Wed Mar 21 23:02:29 2007
@@ -19,11 +19,20 @@
package org.apache.axis2.description;
import org.apache.axis2.AxisFault;
+import org.apache.axis2.util.WSDLSerializationUtil;
+import org.apache.axis2.wsdl.SOAPModuleMessage;
import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMNamespace;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.soap.SOAP11Constants;
import javax.xml.namespace.QName;
import java.util.HashMap;
import java.util.Map;
+import java.util.ArrayList;
+import java.util.Iterator;
public class AxisBinding extends AxisDescription {
@@ -95,5 +104,97 @@
public boolean isEngaged(QName moduleName) {
throw new UnsupportedOperationException("axisMessage.isEngaged(qName) is not supported");
+ }
+
+ /**
+ * Generates the binding element
+ * @param tns - The targetnamespace
+ * @param wsoap - The SOAP namespace (WSDL 2.0)
+ * @param whttp - The HTTP namespace (WSDL 2.0)
+ * @param interfaceName - The name of the interface
+ * @param nameSpaceMap - The namespacemap of the service
+ * @return The generated binding element
+ */
+ public OMElement toWSDL20(OMNamespace tns, OMNamespace wsoap, OMNamespace whttp,
+ String interfaceName, Map nameSpaceMap) {
+ String property;
+ OMFactory omFactory = OMAbstractFactory.getOMFactory();
+ OMElement bindingElement;
+ bindingElement = omFactory.createOMElement(WSDL2Constants.BINDING_LOCAL_NAME, null);
+ bindingElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_NAME, null,
+ this.name.getLocalPart()));
+ bindingElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.INTERFACE_LOCAL_NAME, null,
+ tns.getPrefix() + ":" + interfaceName));
+
+ if (WSDL2Constants.URI_WSDL2_SOAP.equals(type)) {
+ // SOAP Binding specific properties
+ property = (String) options.get(WSDL2Constants.ATTR_WSOAP_VERSION);
+ if (property != null) {
+ if (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(property)) {
+ bindingElement.addAttribute(omFactory.createOMAttribute(
+ WSDL2Constants.ATTRIBUTE_VERSION, wsoap,
+ WSDL2Constants.SOAP_VERSION_1_1));
+ } else {
+ bindingElement.addAttribute(omFactory.createOMAttribute(
+ WSDL2Constants.ATTRIBUTE_VERSION, wsoap,
+ WSDL2Constants.SOAP_VERSION_1_2));
+ }
+ }
+ property = (String) options.get(WSDL2Constants.ATTR_WSOAP_PROTOCOL);
+ if (property != null) {
+ bindingElement.addAttribute(omFactory.createOMAttribute(
+ WSDL2Constants.ATTRIBUTE_PROTOCOL, wsoap, property));
+ }
+ property = (String) options.get(WSDL2Constants.ATTR_WSOAP_MEP);
+ if (property != null) {
+ bindingElement.addAttribute(omFactory.createOMAttribute(
+ WSDL2Constants.ATTRIBUTE_MEP_DEFAULT, wsoap, property));
+ }
+ ArrayList soapModules = (ArrayList) options.get(WSDL2Constants.ATTR_WSOAP_MODULE);
+ if (soapModules != null && soapModules.size() > 0) {
+ WSDLSerializationUtil.addSOAPModuleElements(omFactory, soapModules, wsoap, bindingElement);
+ }
+ } else if (WSDL2Constants.URI_WSDL2_HTTP.equals(type)) {
+ // HTTP Binding specific properties
+ property = (String) options.get(WSDL2Constants.ATTR_WHTTP_METHOD);
+ if (property != null) {
+ bindingElement.addAttribute(omFactory.createOMAttribute(
+ WSDL2Constants.ATTRIBUTE_METHOD_DEFAULT, whttp, property));
+ }
+ }
+
+ // Common Properties
+ property = getType();
+ if (property != null) {
+ bindingElement.addAttribute(
+ omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_TYPE, null, property));
+ }
+ property = (String) options.get(WSDL2Constants.ATTR_WHTTP_CONTENT_ENCODING);
+ if (property != null) {
+ bindingElement.addAttribute(omFactory.createOMAttribute(
+ WSDL2Constants.ATTRIBUTE_CONTENT_ENCODING_DEFAULT, whttp, property));
+ }
+ property = (String) options.get(WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR);
+ if (property != null) {
+ bindingElement.addAttribute(omFactory.createOMAttribute(
+ WSDL2Constants.ATTRIBUTE_QUERY_PARAMETER_SEPERATOR_DEFAULT, whttp, property));
+ }
+
+ // Populate Binding faults
+ if (faults != null) {
+ Iterator iterator = faults.values().iterator();
+ while (iterator.hasNext()) {
+ AxisBindingMessage axisBindingFault = (AxisBindingMessage) iterator.next();
+ bindingElement.addChild(axisBindingFault.toWSDL20(tns, wsoap, whttp, nameSpaceMap));
+ }
+ }
+
+ // Populate Binding Operations
+ Iterator iterator = this.getChildren();
+ while (iterator.hasNext()) {
+ AxisBindingOperation axisBindingOperation = (AxisBindingOperation) iterator.next();
+ bindingElement.addChild(axisBindingOperation.toWSDL20(tns, wsoap, whttp, type, nameSpaceMap));
+ }
+ return bindingElement;
}
}
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisBindingMessage.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisBindingMessage.java?view=diff&rev=521126&r1=521125&r2=521126
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisBindingMessage.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisBindingMessage.java Wed Mar 21 23:02:29 2007
@@ -19,11 +19,21 @@
package org.apache.axis2.description;
import org.apache.axis2.AxisFault;
+import org.apache.axis2.util.WSDLSerializationUtil;
+import org.apache.axis2.wsdl.WSDLConstants;
+import org.apache.axis2.wsdl.SOAPModuleMessage;
+import org.apache.axis2.wsdl.HTTPHeaderMessage;
+import org.apache.axis2.wsdl.SOAPHeaderMessage;
import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMNamespace;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMAbstractFactory;
import javax.xml.namespace.QName;
import java.util.HashMap;
import java.util.Map;
+import java.util.ArrayList;
public class AxisBindingMessage extends AxisDescription {
@@ -35,6 +45,17 @@
private AxisMessage axisMessage;
+ // Used to indicate whether this message is a fault or not. Needed for the WSDL 2.0 serializer
+ private boolean fault = false;
+
+ public boolean isFault() {
+ return fault;
+ }
+
+ public void setFault(boolean fault) {
+ this.fault = fault;
+ }
+
public String getName() {
return name;
}
@@ -93,6 +114,86 @@
public boolean isEngaged(QName moduleName) {
throw new UnsupportedOperationException("axisMessage.isEngaged(qName) is not supported");
+ }
+
+ /**
+ * Generates the bindingMessage element (can be input, output, infault or outfault)
+ * @param tns - The targetnamespace
+ * @param wsoap - The SOAP namespace (WSDL 2.0)
+ * @param whttp - The HTTP namespace (WSDL 2.0)
+ * @param nameSpaceMap - The namespacemap of the service
+ * @return The generated bindingMessage element
+ */
+ public OMElement toWSDL20(OMNamespace tns, OMNamespace wsoap, OMNamespace whttp,
+ Map nameSpaceMap) {
+ String property;
+ ArrayList list;
+ OMFactory omFactory = OMAbstractFactory.getOMFactory();
+ OMElement bindingMessageElement;
+
+ // If this is a fault, create a fault element and add fault specific properties
+ if (this.isFault()) {
+
+ if (this.getParent() instanceof AxisBinding) {
+ bindingMessageElement =
+ omFactory.createOMElement(WSDL2Constants.FAULT_LOCAL_NAME, null);
+ } else if (WSDLConstants.WSDL_MESSAGE_DIRECTION_IN.equals(this.getDirection())) {
+ bindingMessageElement =
+ omFactory.createOMElement(WSDL2Constants.IN_FAULT_LOCAL_NAME, null);
+ } else {
+ bindingMessageElement =
+ omFactory.createOMElement(WSDL2Constants.OUT_FAULT_LOCAL_NAME, null);
+ }
+ bindingMessageElement.addAttribute(omFactory.createOMAttribute(
+ WSDL2Constants.ATTRIBUTE_REF, null, tns.getPrefix() + ":" + this.name));
+ // Fault specific properties
+ property = (String) this.options.get(WSDL2Constants.ATTR_WSOAP_CODE);
+ if (property != null) {
+ bindingMessageElement.addAttribute(omFactory.createOMAttribute(
+ WSDL2Constants.ATTRIBUTE_CODE, wsoap, property));
+ }
+ property = (String) this.options.get(WSDL2Constants.ATTR_WSOAP_SUBCODES);
+ if (property != null) {
+ bindingMessageElement.addAttribute(omFactory.createOMAttribute(
+ WSDL2Constants.ATTRIBUTE_SUBCODES, wsoap, property));
+ }
+ Integer code = (Integer) this.options.get(WSDL2Constants.ATTR_WHTTP_CODE);
+ if (code != null) {
+ bindingMessageElement.addAttribute(omFactory.createOMAttribute(
+ WSDL2Constants.ATTRIBUTE_CODE, whttp, code.toString()));
+ }
+
+ //Checks whether the message is an input message
+ } else if (WSDLConstants.WSDL_MESSAGE_DIRECTION_IN.equals(this.getDirection())) {
+ bindingMessageElement =
+ omFactory.createOMElement(WSDL2Constants.IN_PUT_LOCAL_NAME, null);
+
+ //Message should be an output message
+ } else {
+ bindingMessageElement =
+ omFactory.createOMElement(WSDL2Constants.OUT_PUT_LOCAL_NAME, null);
+ }
+
+
+ // Populate common properties
+ property = (String) this.options.get(WSDL2Constants.ATTR_WHTTP_CONTENT_ENCODING);
+ if (property != null) {
+ bindingMessageElement.addAttribute(omFactory.createOMAttribute(
+ WSDL2Constants.ATTRIBUTE_CONTENT_ENCODING, whttp, property));
+ }
+ list = (ArrayList) this.options.get(WSDL2Constants.ATTR_WHTTP_HEADER);
+ if (list != null && list.size() > 0) {
+ WSDLSerializationUtil.addHTTPHeaderElements(omFactory, list, whttp, bindingMessageElement, nameSpaceMap);
+ }
+ list = (ArrayList) this.options.get(WSDL2Constants.ATTR_WSOAP_HEADER);
+ if (list != null && list.size() > 0) {
+ WSDLSerializationUtil.addSOAPHeaderElements(omFactory, list, wsoap, bindingMessageElement, nameSpaceMap);
+ }
+ list = (ArrayList) this.options.get(WSDL2Constants.ATTR_WSOAP_MODULE);
+ if (list != null && list.size() > 0) {
+ WSDLSerializationUtil.addSOAPModuleElements(omFactory, list, wsoap, bindingMessageElement);
+ }
+ return bindingMessageElement;
}
}
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisBindingOperation.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisBindingOperation.java?view=diff&rev=521126&r1=521125&r2=521126
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisBindingOperation.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisBindingOperation.java Wed Mar 21 23:02:29 2007
@@ -19,11 +19,21 @@
package org.apache.axis2.description;
import org.apache.axis2.AxisFault;
+import org.apache.axis2.util.WSDLSerializationUtil;
+import org.apache.axis2.wsdl.SOAPModuleMessage;
+import org.apache.axis2.wsdl.WSDLConstants;
import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMNamespace;
import javax.xml.namespace.QName;
import java.util.HashMap;
import java.util.Map;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
public class AxisBindingOperation extends AxisDescription {
@@ -84,7 +94,7 @@
}
public Object getKey() {
- return null; //To change body of implemented methods use File | Settings | File Templates.
+ return null;
}
public void engageModule(AxisModule axisModule, AxisConfiguration axisConfig) throws AxisFault {
@@ -96,5 +106,113 @@
}
+ /**
+ * Generates the bindingOperation element
+ * @param tns - The targetnamespace
+ * @param wsoap - The SOAP namespace (WSDL 2.0)
+ * @param whttp - The HTTP namespace (WSDL 2.0)
+ * @param type - Indicates whether the binding is SOAP or HTTP
+ * @param nameSpaceMap - The namespacemap of the service
+ * @return The generated binding element
+ */
+ public OMElement toWSDL20(OMNamespace tns, OMNamespace wsoap, OMNamespace whttp,
+ String type, Map nameSpaceMap) {
+ String property;
+ OMFactory omFactory = OMAbstractFactory.getOMFactory();
+ OMElement bindingOpElement =
+ omFactory.createOMElement(WSDL2Constants.OPERATION_LOCAL_NAME, null);
+ bindingOpElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_REF,
+ null, tns.getPrefix() + ":" +
+ this.name.getLocalPart()));
+
+ if (WSDL2Constants.URI_WSDL2_SOAP.equals(type)) {
+ // SOAP Binding specific properties
+ property = (String) this.options.get(WSDL2Constants.ATTR_WSOAP_ACTION);
+ if (property != null) {
+ bindingOpElement.addAttribute(omFactory.createOMAttribute(
+ WSDL2Constants.ATTRIBUTE_ACTION, wsoap, property));
+ }
+ ArrayList soapModules = (ArrayList) this.options.get(WSDL2Constants.ATTR_WSOAP_MODULE);
+ if (soapModules != null && soapModules.size() > 0) {
+ WSDLSerializationUtil.addSOAPModuleElements(omFactory, soapModules, wsoap, bindingOpElement);
+ }
+ property = (String) this.options.get(WSDL2Constants.ATTR_WSOAP_MEP);
+ if (property != null) {
+ bindingOpElement.addAttribute(
+ omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_MEP, wsoap, property));
+ }
+ } else if (WSDL2Constants.URI_WSDL2_HTTP.equals(type)) {
+
+ // HTTP Binding specific properties
+ property = (String) this.options.get(WSDL2Constants.ATTR_WHTTP_INPUT_SERIALIZATION);
+ if (property != null) {
+ bindingOpElement.addAttribute(omFactory.createOMAttribute(
+ WSDL2Constants.ATTRIBUTE_INPUT_SERIALIZATION, whttp, property));
+ }
+ property = (String) this.options.get(WSDL2Constants.ATTR_WHTTP_OUTPUT_SERIALIZATION);
+ if (property != null) {
+ bindingOpElement.addAttribute(omFactory.createOMAttribute(
+ WSDL2Constants.ATTRIBUTE_OUTPUT_SERIALIZATION, whttp, property));
+ }
+ property = (String) this.options.get(WSDL2Constants.ATTR_WHTTP_FAULT_SERIALIZATION);
+ if (property != null) {
+ bindingOpElement.addAttribute(omFactory.createOMAttribute(
+ WSDL2Constants.ATTRIBUTE_FAULT_SERIALIZATION, whttp, property));
+ }
+ property = this.options.get(WSDL2Constants.ATTR_WHTTP_IGNORE_UNCITED).toString();
+ if (property != null) {
+ bindingOpElement.addAttribute(omFactory.createOMAttribute(
+ WSDL2Constants.ATTRIBUTE_IGNORE_UNCITED, whttp, property));
+ }
+ property = (String) this.options.get(WSDL2Constants.ATTR_WHTTP_METHOD);
+ if (property != null) {
+ bindingOpElement.addAttribute(omFactory.createOMAttribute(
+ WSDL2Constants.ATTRIBUTE_METHOD, whttp, property));
+ }
+ }
+
+ // Common properties
+ property = (String) this.options.get(WSDL2Constants.ATTR_WHTTP_LOCATION);
+ if (property != null) {
+ bindingOpElement.addAttribute(omFactory.createOMAttribute(
+ WSDL2Constants.ATTRIBUTE_LOCATION, whttp, property));
+ }
+ property = (String) this.options.get(WSDL2Constants.ATTR_WHTTP_CONTENT_ENCODING);
+ if (property != null) {
+ bindingOpElement.addAttribute(omFactory.createOMAttribute(
+ WSDL2Constants.ATTRIBUTE_CONTENT_ENCODING, whttp, property));
+ }
+ property = (String) this.options.get(WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR);
+ if (property != null) {
+ bindingOpElement.addAttribute(omFactory.createOMAttribute(
+ WSDL2Constants.ATTRIBUTE_QUERY_PARAMETER_SEPERATOR, whttp, property));
+ }
+
+ // Add the input element
+ AxisBindingMessage inMessage =
+ (AxisBindingMessage) this.getChild(WSDLConstants.WSDL_MESSAGE_DIRECTION_IN);
+ if (inMessage != null) {
+ bindingOpElement.addChild(inMessage.toWSDL20(tns, wsoap, whttp, nameSpaceMap));
+ }
+
+ // Add the output element
+ AxisBindingMessage outMessage =
+ (AxisBindingMessage) this.getChild(WSDLConstants.WSDL_MESSAGE_DIRECTION_OUT);
+ if (outMessage != null) {
+ bindingOpElement.addChild(outMessage.toWSDL20(tns, wsoap, whttp, nameSpaceMap));
+ }
+
+ // Add any fault elements
+ if (faults != null && faults.size() > 0) {
+ Collection faultValues = faults.values();
+ Iterator iterator = faultValues.iterator();
+ while (iterator.hasNext()) {
+ AxisBindingMessage faultMessage = (AxisBindingMessage) iterator.next();
+ bindingOpElement.addChild(faultMessage.toWSDL20(tns, wsoap, whttp, nameSpaceMap));
+ }
+ }
+
+ return bindingOpElement;
+ }
}
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java?view=diff&rev=521126&r1=521125&r2=521126
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java Wed Mar 21 23:02:29 2007
@@ -20,6 +20,10 @@
import org.apache.axis2.AxisFault;
import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMNamespace;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMAbstractFactory;
import javax.xml.namespace.QName;
import java.util.HashMap;
@@ -107,5 +111,23 @@
public boolean isEngaged(QName moduleName) {
throw new UnsupportedOperationException("axisMessage.isEngaged(qName) is not supported");
+ }
+
+ public OMElement toWSDL20(OMNamespace tns, OMNamespace whttp) {
+ String property;
+ OMFactory omFactory = OMAbstractFactory.getOMFactory();
+ OMElement endpointElement = omFactory.createOMElement(WSDL2Constants.ENDPOINT_LOCAL_NAME, null);
+ endpointElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_NAME, null, this.getName()));
+ endpointElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.BINDING_LOCAL_NAME, null, tns.getPrefix() + ":" + getBinding().getName().getLocalPart()));
+ endpointElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_ADDRESS, null, getEndpointURL()));
+ property = (String) this.options.get(WSDL2Constants.ATTR_WHTTP_AUTHENTICATION_TYPE);
+ if (property != null) {
+ endpointElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_AUTHENTICATION_TYPE, whttp, property));
+ }
+ property = (String)options.get(WSDL2Constants.ATTR_WHTTP_AUTHENTICATION_REALM);
+ if (property != null) {
+ endpointElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_AUTHENTICATION_REALM, whttp, property));
+ }
+ return endpointElement;
}
}
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisOperation.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisOperation.java?view=diff&rev=521126&r1=521125&r2=521126
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisOperation.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisOperation.java Wed Mar 21 23:02:29 2007
@@ -17,7 +17,13 @@
package org.apache.axis2.description;
import org.apache.axiom.om.util.UUIDGenerator;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMNamespace;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axis2.AxisFault;
+import org.apache.axis2.util.WSDLSerializationUtil;
+import org.apache.axis2.namespace.Constants;
import org.apache.axis2.client.OperationClient;
import org.apache.axis2.client.Options;
import org.apache.axis2.context.ConfigurationContext;
@@ -41,6 +47,7 @@
import java.util.HashMap;
import java.util.Iterator;
import java.util.Set;
+import java.util.Map;
public abstract class AxisOperation extends AxisDescription
implements WSDLConstants {
@@ -628,4 +635,64 @@
}
return false;
}
-}
+
+ /**
+ * Generates the interface Operation element. As with the binding operations we dont need to
+ * ask AxisMessage to serialize its message cause AxisMessage does not have specific properties
+ * as bindings.
+ * @param tns - The targetnamespace
+ * @param wsdlx - The WSDL extentions namespace (WSDL 2.0)
+ * @return The generated binding element
+ */
+ public OMElement toWSDL20(OMNamespace tns, OMNamespace wsdlx) {
+ OMFactory omFactory = OMAbstractFactory.getOMFactory();
+ OMElement axisOperationElement =
+ omFactory.createOMElement(WSDL2Constants.OPERATION_LOCAL_NAME, null);
+ axisOperationElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_NAME,
+ null,
+ this.getName().getLocalPart()));
+ axisOperationElement.addAttribute(omFactory.createOMAttribute(
+ WSDL2Constants.ATTRIBUTE_NAME_PATTERN, null, this.getMessageExchangePattern()));
+ Parameter param = this.getParameter(WSDL2Constants.ATTR_WSDLX_SAFE);
+ if (param != null) {
+ axisOperationElement.addAttribute(omFactory.createOMAttribute(
+ WSDL2Constants.ATTRIBUTE_SAFE, wsdlx, (param.getValue()).toString()));
+ }
+ AxisService axisService = (AxisService) this.getParent();
+ Map nameSpaceMap = axisService.getNameSpacesMap();
+
+ // Add the input element
+ AxisMessage inMessage = (AxisMessage) getChild(WSDLConstants.WSDL_MESSAGE_IN_MESSAGE);
+ if (inMessage != null) {
+ OMElement inMessageElement = omFactory.createOMElement(WSDL2Constants.IN_PUT_LOCAL_NAME, null);
+ inMessageElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_ELEMENT, null, WSDLSerializationUtil.getElementName(inMessage, nameSpaceMap)));
+ axisOperationElement.addChild(inMessageElement);
+ }
+
+ // Add the output element
+ AxisMessage outMessage = (AxisMessage) getChild(WSDLConstants.WSDL_MESSAGE_OUT_MESSAGE);
+ if (outMessage != null) {
+ OMElement outMessageElement = omFactory.createOMElement(WSDL2Constants.OUT_PUT_LOCAL_NAME, null);
+ outMessageElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_ELEMENT, null, WSDLSerializationUtil.getElementName(outMessage, nameSpaceMap)));
+ axisOperationElement.addChild(outMessageElement);
+ }
+
+ // Add the fault element
+ ArrayList faults = getFaultMessages();
+ if (faults != null) {
+ Iterator iterator = faults.iterator();
+ while (iterator.hasNext()) {
+ AxisMessage faultMessage = (AxisMessage) iterator.next();
+ OMElement faultElement;
+ if (WSDLConstants.WSDL_MESSAGE_DIRECTION_IN.equals(faultMessage.getDirection())) {
+ faultElement = omFactory.createOMElement(WSDL2Constants.IN_FAULT_LOCAL_NAME, null);
+ } else {
+ faultElement = omFactory.createOMElement(WSDL2Constants.OUT_FAULT_LOCAL_NAME, null);
+ }
+ faultElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_REF, null, tns.getPrefix() + ":" + faultMessage.getName()));
+ axisOperationElement.addChild(faultElement);
+ }
+ }
+ return axisOperationElement;
+ }
+ }
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java?view=diff&rev=521126&r1=521125&r2=521126
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java Wed Mar 21 23:02:29 2007
@@ -18,6 +18,11 @@
package org.apache.axis2.description;
import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMNamespace;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMNode;
+import org.apache.axiom.om.OMAttribute;
import org.apache.axis2.AxisFault;
import org.apache.axis2.Constants;
import org.apache.axis2.addressing.AddressingConstants;
@@ -46,6 +51,7 @@
import org.apache.axis2.transport.http.server.HttpUtils;
import org.apache.axis2.util.Loader;
import org.apache.axis2.util.XMLUtils;
+import org.apache.axis2.util.WSDLSerializationUtil;
import org.apache.axis2.wsdl.WSDLConstants;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -72,9 +78,12 @@
import javax.wsdl.xml.WSDLWriter;
import javax.xml.namespace.QName;
import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.stream.XMLStreamException;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
+import java.io.StringWriter;
+import java.io.ByteArrayInputStream;
import java.net.SocketException;
import java.net.URL;
import java.security.PrivilegedAction;
@@ -1017,7 +1026,7 @@
private void getWSDL2(OutputStream out, String[] serviceURL) throws AxisFault {
AxisService2WSDL2 axisService2WSDL2 = new AxisService2WSDL2(this, serviceURL);
try {
- OMElement wsdlElement = axisService2WSDL2.generateOM();
+ OMElement wsdlElement = axisService2WSDL2.toWSDL20();
wsdlElement.serialize(out);
out.flush();
out.close();
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2OM.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2OM.java?view=diff&rev=521126&r1=521125&r2=521126
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2OM.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2OM.java Wed Mar 21 23:02:29 2007
@@ -12,6 +12,7 @@
import org.apache.axis2.util.ExternalPolicySerializer;
import org.apache.axis2.util.PolicyUtil;
import org.apache.axis2.util.XMLUtils;
+import org.apache.axis2.util.WSDLSerializationUtil;
import org.apache.axis2.wsdl.SOAPHeaderMessage;
import org.apache.axis2.wsdl.WSDLConstants;
import org.apache.neethi.Policy;
@@ -131,25 +132,18 @@
policiesInDefinitions = new HashMap();
- Map nameSpaceMap = axisService.getNameSpacesMap();
- Iterator keys = nameSpaceMap.keySet().iterator();
- while (keys.hasNext()) {
- String key = (String) keys.next();
- if ("".equals(key)) {
- ele.declareDefaultNamespace((String) nameSpaceMap.get(key));
- } else {
- ele.declareNamespace((String) nameSpaceMap.get(key), key);
- }
- }
+ Map namespaceMap = axisService.getNameSpacesMap();
+ WSDLSerializationUtil.populateNamespaces(ele, namespaceMap);
soap = ele.declareNamespace(URI_WSDL11_SOAP, SOAP11_PREFIX);
soap12 = ele.declareNamespace(URI_WSDL12_SOAP, SOAP12_PREFIX);
http = ele.declareNamespace(HTTP_NAMESPACE, HTTP_PREFIX);
mime = ele.declareNamespace(MIME_NAMESPACE, MIME_PREFIX);
- String prefix = getPrefix(axisService.getTargetNamespace());
+ String prefix = WSDLSerializationUtil.getPrefix(axisService.getTargetNamespace(), namespaceMap);
if (prefix == null || "".equals(prefix)) {
prefix = DEFAULT_TARGET_NAMESPACE_PREFIX;
}
- axisService.getNameSpacesMap().put(prefix,
+
+ namespaceMap.put(prefix,
axisService.getTargetNamespace());
tns = ele.declareNamespace(axisService.getTargetNamespace(), prefix);
@@ -314,8 +308,8 @@
throw new RuntimeException(ELEMENT_ATTRIBUTE_NAME
+ " is null for " + header.getMessage());
}
- messagePart.addAttribute(ELEMENT_ATTRIBUTE_NAME, getPrefix(header
- .getElement().getNamespaceURI())
+ messagePart.addAttribute(ELEMENT_ATTRIBUTE_NAME, WSDLSerializationUtil.getPrefix(header
+ .getElement().getNamespaceURI(), axisService.getNameSpacesMap())
+ ":" + header.getElement().getLocalPart(), null);
}
}
@@ -336,7 +330,7 @@
messageElement.addChild(messagePart);
messagePart.addAttribute(ATTRIBUTE_NAME, "part1", null);
messagePart.addAttribute(ELEMENT_ATTRIBUTE_NAME,
- getPrefix(schemaElementName.getNamespaceURI()) + ":"
+ WSDLSerializationUtil.getPrefix(schemaElementName.getNamespaceURI(), axisService.getNameSpacesMap()) + ":"
+ schemaElementName.getLocalPart(), null);
}
}
@@ -943,21 +937,9 @@
extElement.addAttribute("part", header.part(), null);
}
if (header.getMessage() != null) {
- extElement.addAttribute("message", getPrefix(targetNamespace) + ":"
+ extElement.addAttribute("message", WSDLSerializationUtil.getPrefix(targetNamespace, axisService.getNameSpacesMap()) + ":"
+ header.getMessage().getLocalPart(), null);
}
- }
-
- private String getPrefix(String targetNameSpace) {
- Map map = axisService.getNameSpacesMap();
- Iterator keys = map.keySet().iterator();
- while (keys.hasNext()) {
- String key = (String) keys.next();
- if (map.get(key).equals(targetNameSpace)) {
- return key;
- }
- }
- return null;
}
private void addWSAWActionAttribute(OMElement element, String action) {
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL2.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL2.java?view=diff&rev=521126&r1=521125&r2=521126
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL2.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL2.java Wed Mar 21 23:02:29 2007
@@ -4,322 +4,238 @@
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
import org.apache.axiom.om.OMNamespace;
-import org.apache.axis2.namespace.Constants;
+import org.apache.axiom.om.OMAttribute;
+import org.apache.axiom.om.OMNode;
import org.apache.axis2.util.XMLUtils;
-import org.apache.axis2.wsdl.WSDLConstants;
+import org.apache.axis2.util.WSDLSerializationUtil;
+import org.apache.axis2.AxisFault;
import org.apache.ws.commons.schema.XmlSchema;
-import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
import java.io.ByteArrayInputStream;
import java.io.StringWriter;
-import java.net.URL;
+import java.io.OutputStream;
+import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Map;
-/*
-* 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 AxisService2WSDL2 implements WSDL2Constants {
private AxisService axisService;
private String[] url;
- private OMNamespace wsoap;
- private OMNamespace tns;
-
public AxisService2WSDL2(AxisService service, String[] serviceURL) {
this.axisService = service;
url = serviceURL;
}
- public OMElement generateOM() throws Exception {
- OMFactory fac = OMAbstractFactory.getOMFactory();
- fac.createOMNamespace(WSDL_NAMESPACE,
- DEFAULT_WSDL_NAMESPACE_PREFIX);
- OMElement description = fac.createOMElement(DESCRIPTION, null);
- Map nameSpaceMap = axisService.getNameSpacesMap();
- Iterator keys = nameSpaceMap.keySet().iterator();
- while (keys.hasNext()) {
- String key = (String) keys.next();
- if ("".equals(key)) {
- description.declareDefaultNamespace((String) nameSpaceMap.get(key));
- } else {
- description.declareNamespace((String) nameSpaceMap.get(key), key);
- }
- }
- wsoap = description.declareNamespace(URI_WSDL2_SOAP, SOAP_PREFIX);
- description.declareNamespace(URI_WSDL2_SOAP_ENV, SOAP_ENV_PREFIX);
- String prefix = getPrefix(axisService.getTargetNamespace());
- if (prefix == null || "".equals(prefix)) {
- prefix = DEFAULT_TARGET_NAMESPACE_PREFIX;
- }
- axisService.getNameSpacesMap().put(prefix,
- axisService.getTargetNamespace());
- tns = description.declareNamespace(axisService.getTargetNamespace(), prefix);
-
- description.addAttribute("targetNamespace", axisService.getTargetNamespace(),
- null);
- //adding service document
- if (axisService.getServiceDescription() != null) {
- addDocumentation(description, fac, axisService.getServiceDescription());
+ /**
+ * Generates a WSDL 2.0 document for this web service
+ * @return The WSDL2 document element
+ * @throws org.apache.axis2.AxisFault - Thrown in case an exception occurs
+ */
+ public OMElement toWSDL20() throws AxisFault {
+
+ Map nameSpacesMap = axisService.getNameSpacesMap();
+ OMFactory omFactory = OMAbstractFactory.getOMFactory();
+ OMElement descriptionElement = omFactory.createOMElement(WSDL2Constants.DESCRIPTION, null);
+
+ // Declare all the defined namespaces in the document
+ WSDLSerializationUtil.populateNamespaces(descriptionElement, nameSpacesMap);
+
+ // Need to add the targetnamespace as an attribute according to the wsdl 2.0 spec
+ OMAttribute targetNamespace = omFactory
+ .createOMAttribute(WSDL2Constants.TARGET_NAMESPACE, null,
+ axisService.getTargetNamespace());
+ descriptionElement.addAttribute(targetNamespace);
+
+ // Check whether the required namespaces are already in namespaceMap, if they are not
+ // present declare them.
+ OMNamespace wsoap;
+ OMNamespace whttp;
+ OMNamespace wsdlx;
+
+ OMNamespace tns = omFactory
+ .createOMNamespace(axisService.getTargetNamespace(),
+ axisService.getTargetNamespacePrefix());
+ if (!nameSpacesMap.containsValue(WSDL2Constants.WSDL_NAMESPACE)) {
+ descriptionElement.declareDefaultNamespace(WSDL2Constants.WSDL_NAMESPACE);
+ }
+ if (nameSpacesMap.containsValue(WSDL2Constants.URI_WSDL2_SOAP)) {
+ wsoap = omFactory
+ .createOMNamespace(WSDL2Constants.URI_WSDL2_SOAP,
+ WSDLSerializationUtil.getPrefix(
+ WSDL2Constants.URI_WSDL2_SOAP, nameSpacesMap));
+ } else {
+ wsoap = descriptionElement
+ .declareNamespace(WSDL2Constants.URI_WSDL2_SOAP, WSDL2Constants.SOAP_PREFIX);
+ }
+ if (nameSpacesMap.containsValue(WSDL2Constants.URI_WSDL2_HTTP)) {
+ whttp = omFactory
+ .createOMNamespace(WSDL2Constants.URI_WSDL2_HTTP,
+ WSDLSerializationUtil.getPrefix(
+ WSDL2Constants.URI_WSDL2_HTTP, nameSpacesMap));
+ } else {
+ whttp = descriptionElement
+ .declareNamespace(WSDL2Constants.URI_WSDL2_HTTP, WSDL2Constants.HTTP_PREFIX);
+ }
+ if (nameSpacesMap.containsValue(WSDL2Constants.URI_WSDL2_EXTENSIONS)) {
+ wsdlx = omFactory
+ .createOMNamespace(WSDL2Constants.URI_WSDL2_EXTENSIONS,
+ WSDLSerializationUtil.getPrefix(
+ WSDL2Constants.URI_WSDL2_EXTENSIONS, nameSpacesMap));
+ } else {
+ wsdlx = descriptionElement.declareNamespace(WSDL2Constants.URI_WSDL2_EXTENSIONS,
+ WSDL2Constants.WSDL_EXTENTION_PREFIX);
+ }
+
+ // Add the documentation element
+ String description;
+ OMElement documentationElement =
+ omFactory.createOMElement(WSDL2Constants.DOCUMENTATION, null);
+ if ((description = axisService.getServiceDescription()) != null) {
+ documentationElement.setText(description);
}
- OMElement wsdlTypes = fac.createOMElement("types", null);
- description.addChild(wsdlTypes);
- // populate the schema mappings
+ descriptionElement.addChild(documentationElement);
+
+ // Add types element
+ OMElement typesElement = omFactory.createOMElement(WSDL2Constants.TYPES_LOCAL_NALE, null);
axisService.populateSchemaMappings();
ArrayList schemas = axisService.getSchema();
for (int i = 0; i < schemas.size(); i++) {
StringWriter writer = new StringWriter();
XmlSchema schema = axisService.getSchema(i);
- if (!Constants.URI_2001_SCHEMA_XSD.equals(schema.getTargetNamespace())) {
+ if (!org.apache.axis2.namespace.Constants.URI_2001_SCHEMA_XSD
+ .equals(schema.getTargetNamespace())) {
schema.write(writer);
String schemaString = writer.toString();
if (!"".equals(schemaString)) {
- wsdlTypes.addChild(
- XMLUtils.toOM(new ByteArrayInputStream(schemaString.getBytes())));
+ try {
+ typesElement.addChild(
+ XMLUtils.toOM(new ByteArrayInputStream(schemaString.getBytes())));
+ } catch (XMLStreamException e) {
+ throw new AxisFault(e);
+ }
}
}
}
- //generating interface
- generateInterface(description, fac);
+ descriptionElement.addChild(typesElement);
- //generating soap binding
- generateSOAPBinding(description, fac);
-
- //generating service element
- generateServiceElement(description, fac);
+ Parameter parameter = axisService.getParameter(WSDL2Constants.INTERFACE_LOCAL_NAME);
+ String interfaceName;
+ if (parameter != null) {
+ interfaceName = (String) parameter.getValue();
+ } else {
+ interfaceName = WSDL2Constants.DEFAULT_INTERFACE_NAME;
+ }
+
+ // Add the interface element
+ descriptionElement.addChild(getInterfaceEmelent(tns, wsdlx, omFactory, interfaceName));
+
+ // Check whether the axisService has any endpoints. If they exists serialize them else
+ // generate default endpoint elements.
+ Map endpointMap = axisService.getEndpoints();
+ if (endpointMap != null && endpointMap.size() > 0) {
+ OMElement serviceElement = getServiceElement(tns, omFactory, interfaceName);
+ Iterator iterator = endpointMap.values().iterator();
+ while (iterator.hasNext()) {
+ AxisEndpoint axisEndpoint = (AxisEndpoint) iterator.next();
+ serviceElement.addChild(axisEndpoint.toWSDL20(tns, whttp));
+
+ descriptionElement.addChild(axisEndpoint.getBinding().toWSDL20(tns, wsoap, whttp,
+ interfaceName,
+ axisService.getNameSpacesMap()));
+ }
+
+ descriptionElement.addChild(serviceElement);
+ } else {
+
+ // There are no andpoints defined hence generate default bindings and endpoints
+ descriptionElement.addChild(
+ WSDLSerializationUtil.generateSOAP11Binding(omFactory, axisService, wsoap,
+ tns));
+ descriptionElement.addChild(
+ WSDLSerializationUtil.generateSOAP12Binding(omFactory, axisService, wsoap,
+ tns));
+ descriptionElement.addChild(
+ WSDLSerializationUtil.generateHTTPBinding(omFactory, axisService, whttp, tns));
+ descriptionElement
+ .addChild(WSDLSerializationUtil.generateServiceElement(omFactory, tns,
+ axisService));
+ }
- return description;
+ return descriptionElement;
}
/**
- * To add documenttaion tag to any given element
+ * Generates the interface element for the service
*
- * @param element
- * @param factory
- * @param docmentString
+ * @param tns - The target namespace
+ * @param wsdlx - wsdl extentions namespace
+ * @param fac - OMFactory
+ * @param interfaceName - The name of the interface
+ * @return - The generated interface element
*/
- private void addDocumentation(OMElement element,
- OMFactory factory,
- String docmentString) {
- OMElement documentation = factory.createOMElement(DOCUMENTATION, wsoap);
- documentation.setText(docmentString);
- element.addChild(documentation);
+ private OMElement getInterfaceEmelent(OMNamespace tns, OMNamespace wsdlx,
+ OMFactory fac, String interfaceName) {
- }
-
- private void generateInterface(OMElement description, OMFactory fac) {
- OMElement interfaceElement = fac.createOMElement(INTERFACE_LOCAL_NAME, null);
- interfaceElement.addAttribute("name", axisService.getName() + INTERFACE_PREFIX, null);
- generateInterfaceFaultElement(interfaceElement, fac);
- generateInterfaceOperations(interfaceElement, fac);
- description.addChild(interfaceElement);
- }
-
- private void generateInterfaceOperations(OMElement interfaceElement, OMFactory fac) {
- Iterator operations = axisService.getOperations();
- while (operations.hasNext()) {
- AxisOperation axisOperation = (AxisOperation) operations.next();
- if (!axisOperation.isControlOperation()) {
-
- String operationName = axisOperation.getName().getLocalPart();
- OMElement operation = fac.createOMElement(OPERATION_LOCAL_NAME,
- null);
- interfaceElement.addChild(operation);
- operation.addAttribute(ATTRIBUTE_NAME, operationName, null);
- String MEP = axisOperation.getMessageExchangePattern();
- operation.addAttribute(ATTRIBUTE_NAME_PATTERN, getUpdatedMEP(MEP), null);
- //TODO need to add : style="http://www.w3.org/2006/01/wsdl/style/iri"
- //TODO need to add : swsdlx:safe = "true"
- if (WSDLConstants.WSDL20_2006Constants.MEP_URI_IN_ONLY.equals(MEP)
- || WSDLConstants.WSDL20_2006Constants.MEP_URI_IN_OPTIONAL_OUT.equals(MEP)
- || WSDLConstants.WSDL20_2006Constants.MEP_URI_OUT_OPTIONAL_IN.equals(MEP)
- || WSDLConstants.WSDL20_2006Constants.MEP_URI_ROBUST_OUT_ONLY.equals(MEP)
- || WSDLConstants.WSDL20_2006Constants.MEP_URI_ROBUST_IN_ONLY.equals(MEP)
- || WSDLConstants.WSDL20_2006Constants.MEP_URI_IN_OUT.equals(MEP)) {
- AxisMessage inaxisMessage = axisOperation
- .getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
- if (inaxisMessage != null) {
- OMElement input = fac.createOMElement(IN_PUT_LOCAL_NAME,
- null);
- input.addAttribute(MESSAGE_LABEL, WSDLConstants.MESSAGE_LABEL_IN_VALUE,
- null);
- operation.addChild(input);
- addMessageElementAtt(input, inaxisMessage);
- }
+ OMElement interfaceElement = fac.createOMElement(WSDL2Constants.INTERFACE_LOCAL_NAME, null);
+ interfaceElement.addAttribute(fac.createOMAttribute(WSDL2Constants.ATTRIBUTE_NAME, null,
+ interfaceName));
+ Iterator iterator = axisService.getOperations();
+ ArrayList interfaceOperations = new ArrayList();
+ ArrayList interfaceFaults = new ArrayList();
+ int i = 0;
+ while (iterator.hasNext()) {
+ AxisOperation axisOperation = (AxisOperation) iterator.next();
+ interfaceOperations.add(i, axisOperation.toWSDL20(tns, wsdlx));
+ i++;
+ Iterator faultsIterator = axisOperation.getFaultMessages().iterator();
+ while (faultsIterator.hasNext()) {
+ AxisMessage faultMessage = (AxisMessage) faultsIterator.next();
+ String name = faultMessage.getName();
+ if (!interfaceFaults.contains(name)) {
+ OMElement faultElement =
+ fac.createOMElement(WSDL2Constants.FAULT_LOCAL_NAME, null);
+ faultElement.addAttribute(
+ fac.createOMAttribute(WSDL2Constants.ATTRIBUTE_NAME, null, name));
+ faultElement.addAttribute(fac.createOMAttribute(
+ WSDL2Constants.ATTRIBUTE_ELEMENT, null, WSDLSerializationUtil
+ .getElementName(faultMessage, axisService.getNameSpacesMap())));
+ interfaceFaults.add(name);
+ interfaceElement.addChild(faultElement);
}
-
- if (WSDLConstants.WSDL20_2006Constants.MEP_URI_OUT_ONLY.equals(MEP)
- || WSDLConstants.WSDL20_2006Constants.MEP_URI_OUT_OPTIONAL_IN.equals(MEP)
- || WSDLConstants.WSDL20_2006Constants.MEP_URI_IN_OPTIONAL_OUT.equals(MEP)
- || WSDLConstants.WSDL20_2006Constants.MEP_URI_ROBUST_OUT_ONLY.equals(MEP)
- || WSDLConstants.WSDL20_2006Constants.MEP_URI_ROBUST_IN_ONLY.equals(MEP)
- || WSDLConstants.WSDL20_2006Constants.MEP_URI_IN_OUT.equals(MEP)) {
- AxisMessage outAxisMessage = axisOperation
- .getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
- if (outAxisMessage != null) {
- OMElement output = fac.createOMElement(OUT_PUT_LOCAL_NAME,
- null);
- operation.addChild(output);
- output.addAttribute(MESSAGE_LABEL, WSDLConstants.MESSAGE_LABEL_OUT_VALUE,
- null);
- addMessageElementAtt(output, outAxisMessage);
- }
- }
- addInterfaceOperationFault(operation, fac, axisOperation);
}
- }
- }
- private void addMessageElementAtt(OMElement messageElement, AxisMessage message) {
- QName elementQName = message.getElementQName();
- String attValue = elementQName.getPrefix() + ":" + elementQName.getLocalPart();
- messageElement.addAttribute(ATTRIBUTE_ELEMENT, attValue, null);
- }
-
- private void addInterfaceOperationFault(OMElement operationElement, OMFactory fac,
- AxisOperation operation) {
-
- ArrayList faultMessages = operation.getFaultMessages();
- for (Iterator iterator = faultMessages.iterator(); iterator.hasNext();) {
- AxisMessage faultMessage = (AxisMessage) iterator.next();
- if (faultMessage != null) {
- QName elementQName = faultMessage.getElementQName();
-
- String direction = faultMessage.getDirection();
- OMElement faultElement = null;
- if (MESSAGE_LABEL_OUT.equalsIgnoreCase(direction)) {
- faultElement = fac.createOMElement(OUT_FAULT, null, operationElement);
- } else if (MESSAGE_LABEL_IN.equalsIgnoreCase(direction)) {
- faultElement = fac.createOMElement(IN_FAULT, null, operationElement);
- } else {
- return;
- }
-
- faultElement.addAttribute(MESSAGE_LABEL, direction, null);
- faultElement.addAttribute(ATTRIBUTE_REF, elementQName.getPrefix() + ":" +
- elementQName.getLocalPart(), null);
-
- }
}
-
-
- }
-
- private void generateInterfaceFaultElement(OMElement interfaceElement, OMFactory fac) {
-// axisService.get
- }
-
- private void generateSOAPBinding(OMElement description, OMFactory fac) {
- OMElement bindingElement = fac.createOMElement(BINDING_LOCAL_NAME, null);
- description.addChild(bindingElement);
- bindingElement.addAttribute("name", axisService.getName() + SOAP_BINDING_PREFIX, null);
- bindingElement
- .addAttribute(INTERFACE_LOCAL_NAME, tns.getPrefix() + ":" + axisService.getName() +
- INTERFACE_PREFIX, null);
- bindingElement.addAttribute("type", URI_WSDL2_SOAP, null);
- bindingElement.addAttribute("protocol", HTTP_PROTOCAL, wsoap);
-
- addBindingFaultElement(bindingElement, fac);
- generateBindingOperations(bindingElement, fac);
-
- }
-
- private void addBindingFaultElement(OMElement bindingElement, OMFactory fac) {
- //TODO : need to implement this
- }
-
- private void generateBindingOperations(OMElement bindingElement, OMFactory fac) {
- Iterator operations = axisService.getOperations();
- while (operations.hasNext()) {
- AxisOperation axisOperation = (AxisOperation) operations.next();
- if (axisOperation.isControlOperation()) {
- continue;
- }
- OMElement operation = fac.createOMElement(OPERATION_LOCAL_NAME, null);
- bindingElement.addChild(operation);
- String MEP = axisOperation.getMessageExchangePattern();
- operation.addAttribute("ref", tns.getPrefix() + ":" +
- axisOperation.getName().getLocalPart(), null);
- //TODO : I am not sure whether I am doing the right thing here , need to read the spec
- operation.addAttribute("mep", getMep(axisOperation.getMessageExchangePattern()), wsoap);
- }
- }
-
- private void generateServiceElement(OMElement description, OMFactory fac) throws Exception {
- OMElement serviceElement = fac.createOMElement(SERVICE_LOCAL_NAME, null);
- serviceElement.addAttribute(ATTRIBUTE_NAME, axisService.getName() + "Service", null);
- serviceElement.addAttribute(INTERFACE_LOCAL_NAME, tns.getPrefix()
- + ":" + axisService.getName() + INTERFACE_PREFIX, null);
-
- description.addChild(serviceElement);
- generateEndpoints(serviceElement, fac);
- }
-
- private void generateEndpoints(OMElement serviceElement, OMFactory fac) throws Exception {
- int count;
- for (int i = 0; i < url.length; i++) {
- String s = url[i];
- OMElement endpoint = fac.createOMElement("endpoint", null);
- URL url = new URL(s);
- endpoint.addAttribute(ATTRIBUTE_NAME, axisService.getName()
- + "Endpoint" + "_" + url.getProtocol(), null);
- //TODO : We have to have mechnishm to support multiple bindings
- endpoint.addAttribute(BINDING_LOCAL_NAME, tns.getPrefix() + ":" +
- axisService.getName() + SOAP_BINDING_PREFIX, null);
- endpoint.addAttribute("address", s, null);
- serviceElement.addChild(endpoint);
+ for (i = 0; i < interfaceOperations.size(); i++) {
+ interfaceElement.addChild((OMNode) interfaceOperations.get(i));
}
+ return interfaceElement;
}
/**
- * To get the soap mep for given wsdl2.0 mep
- */
- private String getMep(String mep) {
- //TODO : need to fix this , this wrong
- return "http://www.w3.org/2003/05/soap/mep/soap-response";
- }
-
-
- /**
- * This method is to convert http://www.w3.org/2004/08/wsdl/in-out to
- * http://www.w3.org/2006/01/wsdl/in-out
+ * Generates the service element for the service
*
- * @param oldmepuri
+ * @param tns - The target namespace
+ * @param omFactory - OMFactory
+ * @param interfaceName - The name of the interface
+ * @return - The generated service element
*/
- public String getUpdatedMEP(String oldmepuri) {
- //TODO : Need to improve this , what I am doing is wrong
- return oldmepuri.replaceAll("2004/08", "2006/01");
- }
-
- private String getPrefix(String targetNameSpace) {
- Map map = axisService.getNameSpacesMap();
- Iterator keys = map.keySet().iterator();
- while (keys.hasNext()) {
- String key = (String) keys.next();
- if (map.get(key).equals(targetNameSpace)) {
- return key;
- }
- }
- return null;
+ private OMElement getServiceElement(OMNamespace tns, OMFactory omFactory,
+ String interfaceName) {
+ OMElement serviceElement =
+ omFactory.createOMElement(WSDL2Constants.SERVICE_LOCAL_NAME, null);
+ serviceElement.addAttribute(
+ omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_NAME, null,
+ axisService.getName()));
+ serviceElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.INTERFACE_LOCAL_NAME,
+ null, tns.getPrefix() + ":" +
+ interfaceName));
+ return serviceElement;
}
}
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java?view=diff&rev=521126&r1=521125&r2=521126
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java Wed Mar 21 23:02:29 2007
@@ -367,6 +367,9 @@
private void populatePortType(PortType wsdl4jPortType) throws AxisFault {
List wsdl4jOperations = wsdl4jPortType.getOperations();
+ // Added to use in ?wsdl2 as the interface name
+ axisService.addParameter(new Parameter(WSDL2Constants.INTERFACE_LOCAL_NAME,
+ wsdl4jPortType.getQName().getLocalPart()));
if (wsdl4jOperations.size() < 1) {
throw new AxisFault("No operation found in the portType element");
}
@@ -506,6 +509,7 @@
axisOperation.getFaultMessages());
AxisBindingMessage axisBindingFaultMessage = new AxisBindingMessage();
+ axisBindingFaultMessage.setFault(true);
axisBindingFaultMessage.setAxisMessage(faultMessage);
axisBindingFaultMessage.setParent(axisBindingOperation);
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL20DefaultValueHolder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL20DefaultValueHolder.java?view=diff&rev=521126&r1=521125&r2=521126
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL20DefaultValueHolder.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL20DefaultValueHolder.java Wed Mar 21 23:02:29 2007
@@ -41,6 +41,7 @@
defaultValuesMap.put(WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,
ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR_DEFAULT);
defaultValuesMap.put(WSDLConstants.WSDL_1_1_STYLE, WSDLConstants.STYLE_DOC);
+ defaultValuesMap.put(WSDL2Constants.ATTR_WSOAP_MEP,WSDLConstants.WSDL20_2006Constants.MEP_URI_IN_OUT);
}
public static String getDefaultValue(String name) {
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java?view=diff&rev=521126&r1=521125&r2=521126
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java Wed Mar 21 23:02:29 2007
@@ -2,6 +2,9 @@
import org.apache.axiom.soap.SOAP11Constants;
import org.apache.axiom.soap.SOAP12Constants;
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMNamespace;
import org.apache.axis2.AxisFault;
import org.apache.axis2.namespace.Constants;
import org.apache.axis2.transport.http.util.RESTUtil;
@@ -48,6 +51,7 @@
import org.apache.woden.wsdl20.extensions.soap.SOAPModule;
import org.apache.woden.wsdl20.xml.DescriptionElement;
import org.apache.woden.wsdl20.xml.TypesElement;
+import org.apache.woden.wsdl20.xml.DocumentationElement;
import org.apache.ws.commons.schema.XmlSchema;
import org.apache.ws.commons.schema.utils.NamespaceMap;
import org.w3c.dom.Document;
@@ -172,10 +176,10 @@
// if there are documentation elements in the root. Lets add them as the wsdlService description
// but since there can be multiple documentation elements, lets only add the first one
-// DocumentationElement[] documentationElements = description.toElement().getDocumentationElements();
-// if (documentationElements != null && documentationElements.length > 0) {
-// axisService.setServiceDescription(documentationElements[0].getContent().toString());
-// }
+ DocumentationElement[] documentationElements = description.toElement().getDocumentationElements();
+ if (documentationElements != null && documentationElements.length > 0) {
+ axisService.setServiceDescription(documentationElements[0].getContent().toString());
+ }
// adding ns in the original WSDL
// processPoliciesInDefintion(wsdl4jDefinition); TODO : Defering policy handling for now - Chinthaka
@@ -286,7 +290,9 @@
wsdlService = services[0];
axisService.setName(wsdlService.getName().getLocalPart().toString());
- processInterface(wsdlService.getInterface());
+ Interface serviceInterface = wsdlService.getInterface();
+ axisService.addParameter(new Parameter(WSDL2Constants.INTERFACE_LOCAL_NAME, serviceInterface.getName().getLocalPart()));
+ processInterface(serviceInterface);
if (isCodegen) {
axisService.setOperationsNameList(operationNames);
}
@@ -392,9 +398,9 @@
private AxisBinding processBinding(Binding binding)
throws AxisFault {
AxisBinding axisBinding = new AxisBinding();
- axisBinding.setType(binding.getType().toString());
axisBinding.setName(binding.getName());
String bindingType = binding.getType().toString();
+ axisBinding.setType(bindingType);
if (bindingType.equals(WSDL2Constants.URI_WSDL2_SOAP)) {
processSOAPBindingExtention(binding, axisBinding);
@@ -463,6 +469,7 @@
InterfaceFault interfaceFault = bindingFault.getInterfaceFault();
AxisBindingMessage axisBindingFault = new AxisBindingMessage();
+ axisBindingFault.setFault(true);
axisBindingFault.setName(interfaceFault.getName().getLocalPart());
axisBindingFault.setParent(axisBinding);
@@ -600,6 +607,7 @@
AxisBindingMessage axisBindingMessageFault = new AxisBindingMessage();
axisBindingMessageFault.setParent(axisBindingOperation);
+ axisBindingMessageFault.setFault(true);
axisBindingMessageFault.setName(bindingFaultReference.getInterfaceFaultReference()
.getInterfaceFault().getName().getLocalPart());
@@ -657,6 +665,7 @@
InterfaceFault interfaceFault = bindingFault.getInterfaceFault();
AxisBindingMessage axisBindingFault = new AxisBindingMessage();
+ axisBindingFault.setFault(true);
axisBindingFault.setName(interfaceFault.getName().getLocalPart());
axisBindingFault.setParent(axisBinding);
@@ -777,10 +786,11 @@
for (int j = 0; j < bindingFaultReferences.length; j++) {
BindingFaultReference bindingFaultReference = bindingFaultReferences[j];
- AxisBindingMessage axisBindingMessageFault =
- axisBinding.getFault(bindingFaultReference.getInterfaceFaultReference()
- .getInterfaceFault().getName().getLocalPart());
-
+ AxisBindingMessage axisBindingMessageFault = new AxisBindingMessage();
+ axisBindingMessageFault.setFault(true);
+ axisBindingMessageFault.setName(bindingFaultReference.getInterfaceFaultReference()
+ .getInterfaceFault().getName().getLocalPart());
+ axisBindingMessageFault.setParent(axisBindingOperation);
axisBindingOperation.addFault(axisBindingMessageFault);
}
@@ -819,7 +829,13 @@
AxisOperation axisOperation = axisService.getOperation(opName);
if (axisOperation == null) {
- String MEP = operation.getMessageExchangePattern().toString();
+ URI pattern = operation.getMessageExchangePattern();
+ String MEP = pattern.toString();
+ if (MEP == null) {
+ MEP = WSDL20DefaultValueHolder.getDefaultValue(WSDL2Constants.ATTR_WSOAP_MEP);
+ } else {
+ MEP = pattern.toString();
+ }
axisOperation = AxisOperationFactory.getOperationDescription(MEP);
axisOperation.setName(opName);
@@ -917,7 +933,7 @@
}
message.setElementQName(elementQName);
- message.setName(elementQName != null ? elementQName.getLocalPart() : null);
+ message.setName(elementQName != null ? elementQName.getLocalPart() : axisOperation.getName().getLocalPart());
axisOperation.addMessage(message, messageLabel);
// populate this map so that this can be used in SOAPBody based dispatching
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL2Constants.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL2Constants.java?view=diff&rev=521126&r1=521125&r2=521126
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL2Constants.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL2Constants.java Wed Mar 21 23:02:29 2007
@@ -27,20 +27,56 @@
String URI_WSDL2_HTTP = "http://www.w3.org/2006/01/wsdl/http";
String URI_WSDL2_EXTENSIONS = "http://www.w3.org/2006/01/wsdl-extensions";
String SOAP_PREFIX = "wsoap";
+ String HTTP_PREFIX = "whttp";
String URI_WSDL2_SOAP_ENV = "http://www.w3.org/2003/05/soap-envelope";
+ String WSDL_EXTENTION_PREFIX = "wsdlx";
String SOAP_ENV_PREFIX = "soap";
String DEFAULT_TARGET_NAMESPACE_PREFIX = "axis2";
String DOCUMENTATION = "documentation";
+ String DEFAULT_SOAP11_ENDPOINT_NAME = "SOAP11Endpoint";
+ String DEFAULT_SOAP12_ENDPOINT_NAME = "SOAP12Endpoint";
+ String DEFAULT_HTTP_ENDPOINT_NAME = "HTTPEndpoint";
+ String DEFAULT_INTERFACE_NAME = "ServiceInterface";
+ String TYPES_LOCAL_NALE = "types";
String INTERFACE_LOCAL_NAME = "interface";
String INTERFACE_PREFIX = "Interface";
String OPERATION_LOCAL_NAME = "operation";
String ATTRIBUTE_NAME = "name";
+ String TARGET_NAMESPACE= "targetNamespace";
String ATTRIBUTE_REF = "ref";
+ String ATTRIBUTE_LOCATION = "location";
+ String ATTRIBUTE_CONTENT_ENCODING_DEFAULT = "contentEncodingDefault";
+ String ATTRIBUTE_CONTENT_ENCODING = "contentEncoding";
+ String ATTRIBUTE_QUERY_PARAMETER_SEPERATOR = "queryParameterSeparator";
+ String ATTRIBUTE_QUERY_PARAMETER_SEPERATOR_DEFAULT = "queryParameterSeparatorDefault";
+ String ATTRIBUTE_ACTION = "action";
+ String ATTRIBUTE_MEP = "mep";
+ String ATTRIBUTE_MEP_DEFAULT = "mepDefault";
+ String ATTRIBUTE_METHOD = "method";
+ String ATTRIBUTE_METHOD_DEFAULT = "methodDefault";
+ String ATTRIBUTE_MODULE = "module";
+ String ATTRIBUTE_IGNORE_UNCITED = "ignoreUncited";
+ String ATTRIBUTE_INPUT_SERIALIZATION = "inputSerialization";
+ String ATTRIBUTE_OUTPUT_SERIALIZATION = "outputSerialization";
+ String ATTRIBUTE_FAULT_SERIALIZATION = "faultSerialization";
+ String ATTRIBUTE_CODE = "code";
+ String ATTRIBUTE_SUBCODES = "subcodes";
+ String ATTRIBUTE_HEADER = "header";
+ String ATTRIBUTE_TYPE = "type";
+ String ATTRIBUTE_REQUIRED = "required";
+ String ATTRIBUTE_MUST_UNDERSTAND = "mustUnderstand";
+ String ATTRIBUTE_VERSION = "version";
+ String ATTRIBUTE_PROTOCOL = "protocol";
+ String ATTRIBUTE_SAFE = "safe";
+ String ATTRIBUTE_ADDRESS = "address";
+ String ATTRIBUTE_AUTHENTICATION_TYPE = "authenticationType";
+ String ATTRIBUTE_AUTHENTICATION_REALM = "authenticationRealm";
String IN_PUT_LOCAL_NAME = "input";
String OUT_PUT_LOCAL_NAME = "output";
- String OUT_FAULT = "outfault";
- String IN_FAULT = "infault";
+ String OUT_FAULT_LOCAL_NAME = "outfault";
+ String IN_FAULT_LOCAL_NAME = "infault";
+ String FAULT_LOCAL_NAME = "fault";
String ATTRIBUTE_NAME_PATTERN = "pattern";
String MESSAGE_LABEL = "messageLabel";
String ATTRIBUTE_ELEMENT = "element";
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org