You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by pr...@apache.org on 2007/09/04 19:11:34 UTC
svn commit: r572740 [4/5] - in /webservices/axis2/branches/java/jaxws21: ./
modules/adb-codegen/src/org/apache/axis2/schema/template/
modules/adb-codegen/src/org/apache/axis2/schema/writer/
modules/adb/src/org/apache/axis2/databinding/typemapping/ modu...
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/context/MessageContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/context/MessageContext.java?rev=572740&r1=572739&r2=572740&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/context/MessageContext.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/context/MessageContext.java Tue Sep 4 10:11:13 2007
@@ -21,18 +21,14 @@
import org.apache.axiom.attachments.Attachments;
import org.apache.axiom.om.OMOutputFormat;
-import org.apache.axiom.om.impl.MTOMConstants;
-import org.apache.axiom.om.impl.builder.StAXBuilder;
-import org.apache.axiom.om.util.StAXUtils;
import org.apache.axiom.om.util.UUIDGenerator;
import org.apache.axiom.soap.SOAP11Constants;
import org.apache.axiom.soap.SOAP12Constants;
import org.apache.axiom.soap.SOAPEnvelope;
-import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder;
import org.apache.axis2.AxisFault;
+import org.apache.axis2.Constants.Configuration;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.addressing.RelatesTo;
-import org.apache.axis2.builder.BuilderUtil;
import org.apache.axis2.client.Options;
import org.apache.axis2.description.AxisMessage;
import org.apache.axis2.description.AxisModule;
@@ -45,21 +41,22 @@
import org.apache.axis2.description.TransportInDescription;
import org.apache.axis2.description.TransportOutDescription;
import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.axis2.engine.AxisError;
import org.apache.axis2.engine.Handler;
import org.apache.axis2.engine.Phase;
-import org.apache.axis2.engine.AxisError;
+import org.apache.axis2.util.JavaUtils;
import org.apache.axis2.util.LoggingControl;
+import org.apache.axis2.util.MessageExternalizeUtils;
import org.apache.axis2.util.MetaDataEntry;
import org.apache.axis2.util.ObjectStateUtils;
import org.apache.axis2.util.SelfManagedDataHolder;
-import org.apache.axis2.util.JavaUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.neethi.Policy;
import javax.activation.DataHandler;
import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamReader;
+
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.Externalizable;
@@ -2113,128 +2110,35 @@
ObjectStateUtils.writeString(out, this.getLogCorrelationID(), "logCorrelationID");
- boolean persistWithOptimizedMTOM = (getProperty(MTOMConstants.ATTACHMENTS) != null);
- out.writeBoolean(persistWithOptimizedMTOM);
-
- //---------------------------------------------------------
- // message
- //---------------------------------------------------------
-
- // Just in case anything else is added here, notice that in the case
- // of MTOM, something is written to the stream in middle of the envelope
- // serialization logic below
-
- // make sure message attachments are handled
-
- if (envelope != null) {
- String msgClass = envelope.getClass().getName();
-
- ByteArrayOutputStream msgBuffer = new ByteArrayOutputStream();
-
- try {
- // use a non-destructive method on the soap message
-
- // We don't need to write to a separate byte array
- // unless we want to log the message
- ByteArrayOutputStream msgData = new ByteArrayOutputStream();
-
- OMOutputFormat outputFormat = new OMOutputFormat();
- outputFormat.setAutoCloseWriter(true);
-
- outputFormat.setSOAP11(isSOAP11);
-
- if (persistWithOptimizedMTOM) {
- outputFormat.setDoOptimize(true);
-
- //Notice that we're writing this next bit out to the
- //serialized stream and not the baos
- out.writeUTF(outputFormat.getContentType());
- }
-
- // this will be expensive because it builds the OM tree
- envelope.serialize(msgData, outputFormat);
-
- msgBuffer.write(msgData.toByteArray(), 0, msgData.size());
-
- if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
- log.trace(logCorrelationIDString + ":writeExternal(): msg data [" + msgData +
- "]");
- }
-
- }
- catch (Exception e) {
- if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
- log.trace(logCorrelationIDString +
- ":writeExternal(): can not serialize the SOAP message ***Exception*** [" +
- e.getClass().getName() + " : " + e.getMessage() + "]");
- }
- }
-
- //---------------------------------------------
- // get the character encoding for the message
- //---------------------------------------------
- String charSetEnc = (String) getProperty(MessageContext.CHARACTER_SET_ENCODING);
-
- if (charSetEnc == null) {
- OperationContext opContext = getOperationContext();
- if (opContext != null) {
- charSetEnc =
- (String) opContext.getProperty(MessageContext.CHARACTER_SET_ENCODING);
- }
- }
-
- if (charSetEnc == null) {
- charSetEnc = MessageContext.DEFAULT_CHAR_SET_ENCODING;
- }
-
- //---------------------------------------------
- // get the soap namespace uri
- //---------------------------------------------
- String namespaceURI = envelope.getNamespace().getNamespaceURI();
-
- // write out the following information, IN ORDER:
- // the class name
- // the active or empty flag
- // the data length
- // the data
- out.writeUTF(msgClass);
-
- int msgSize = msgBuffer.size();
-
- if (msgSize != 0) {
- out.writeBoolean(ObjectStateUtils.ACTIVE_OBJECT);
- out.writeUTF(charSetEnc);
- out.writeUTF(namespaceURI);
- out.writeInt(msgSize);
- out.write(msgBuffer.toByteArray());
-
- if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
- log.trace(logCorrelationIDString + ":writeExternal(): msg charSetEnc=[" +
- charSetEnc + "] namespaceURI=[" + namespaceURI + "] msgSize=[" +
- msgSize + "]");
- }
- } else {
- // the envelope is null
- out.writeBoolean(ObjectStateUtils.EMPTY_OBJECT);
-
- if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
- log.trace(logCorrelationIDString + ":writeExternal(): msg is Empty");
- }
- }
-
- // close out internal stream
- msgBuffer.close();
- } else {
- // the envelope is null
- out.writeUTF("MessageContext.envelope");
- out.writeBoolean(ObjectStateUtils.EMPTY_OBJECT);
-
- if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
- log.trace(logCorrelationIDString + ":writeExternal(): msg is Empty");
- }
- }
+ //-----------------------------------------------------------------------
+ // Create and initialize the OMOutputFormat for Message Externalization
+ //-----------------------------------------------------------------------
+
+ OMOutputFormat outputFormat= new OMOutputFormat();
+ outputFormat.setSOAP11(isSOAP11);
+ boolean persistOptimized = getPersistOptimized();
+ if (persistOptimized) {
+ outputFormat.setDoOptimize(true);
+ }
+ String charSetEnc = (String) getProperty(MessageContext.CHARACTER_SET_ENCODING);
+ if (charSetEnc == null) {
+ OperationContext opContext = getOperationContext();
+ if (opContext != null) {
+ charSetEnc =
+ (String) opContext.getProperty(MessageContext.CHARACTER_SET_ENCODING);
+ }
+ }
+ if (charSetEnc == null) {
+ charSetEnc = MessageContext.DEFAULT_CHAR_SET_ENCODING;
+ }
+ outputFormat.setCharSetEncoding(charSetEnc);
+
+ // ----------------------------------------------------------
+ // Externalize the Message
+ // ----------------------------------------------------------
+ MessageExternalizeUtils.writeExternal(out, this, logCorrelationIDString, outputFormat);
- //---------------------------------------------------------
+ // ---------------------------------------------------------
// ArrayList executionChain
// handler and phase related data
//---------------------------------------------------------
@@ -2775,6 +2679,41 @@
}
}
+
+ /**
+ * @return true if the data should be persisted as optimized attachments
+ */
+ private boolean getPersistOptimized() {
+ boolean persistOptimized = false;
+ if (attachments != null && attachments.getContentIDList().size() > 1) {
+ persistOptimized = true;
+ if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled())
+ log.trace(logCorrelationIDString
+ + ":getPersistOptimized(): attachments present; persist optimized");
+ }
+ if (!persistOptimized) {
+ Object property = getProperty(Configuration.ENABLE_MTOM);
+ if (property != null && JavaUtils.isTrueExplicitly(property)) {
+ persistOptimized = true;
+ if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled())
+ log.trace(logCorrelationIDString
+ + ":getPersistOptimized(): ENBABLE_MTOM is set; persist optimized");
+ }
+ }
+ if (!persistOptimized) {
+ Object property = getProperty(Configuration.ENABLE_SWA);
+ if (property != null && JavaUtils.isTrueExplicitly(property)) {
+ persistOptimized = true;
+ if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled())
+ log.trace(logCorrelationIDString
+ + ":getPersistOptimized(): ENBABLE_SWA is set; persist optimized");
+ }
+ }
+ if (!persistOptimized && LoggingControl.debugLoggingAllowed && log.isTraceEnabled())
+ log.trace(logCorrelationIDString
+ + ":getPersistOptimized(): No attachments or attachment settings; persist non-optimized");
+ return persistOptimized;
+ }
/**
@@ -2852,121 +2791,11 @@
logCorrelationIDString);
}
- boolean persistedWithOptimizedMTOM = in.readBoolean();
-
- String contentType = null;
- if (persistedWithOptimizedMTOM) {
- contentType = in.readUTF();
- }
-
//---------------------------------------------------------
- // message
+ // Message
+ // Read the message and attachments
//---------------------------------------------------------
-
- in.readUTF();
- boolean gotMsg = in.readBoolean();
-
- if (gotMsg == ObjectStateUtils.ACTIVE_OBJECT) {
- String charSetEnc = in.readUTF();
- String namespaceURI = in.readUTF();
-
- int msgSize = in.readInt();
- byte[] buffer = new byte[msgSize];
-
- int bytesRead = 0;
- int numberOfBytesLastRead;
-
- while (bytesRead < msgSize) {
- numberOfBytesLastRead = in.read(buffer, bytesRead, msgSize - bytesRead);
-
- if (numberOfBytesLastRead == -1) {
- // TODO: What should we do if the reconstitution fails?
- // For now, log the event
- if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
- log.trace(logCorrelationIDString +
- ":readExternal(): ***WARNING*** unexpected end to message bytesRead [" +
- bytesRead + "] msgSize [" + msgSize + "]");
- }
- break;
- }
-
- bytesRead += numberOfBytesLastRead;
- }
-
-
- String tmpMsg = new String(buffer);
-
- if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
- log.trace(logCorrelationIDString + ":readExternal(): msg charSetEnc=[" +
- charSetEnc + "] namespaceURI=[" + namespaceURI + "] msgSize=[" + msgSize +
- "] bytesRead [" + bytesRead + "]");
- log.trace(logCorrelationIDString + ":readExternal(): msg [" + tmpMsg + "]");
- }
-
- ByteArrayInputStream msgBuffer;
-
- if (bytesRead > 0) {
- msgBuffer = new ByteArrayInputStream(buffer);
-
- // convert what was saved into the soap envelope
-
- XMLStreamReader xmlreader = null;
-
- try {
- if (persistedWithOptimizedMTOM) {
- boolean isSOAP = true;
- StAXBuilder builder = BuilderUtil
- .getAttachmentsBuilder(this, msgBuffer, contentType, isSOAP);
- envelope = (SOAPEnvelope) builder.getDocumentElement();
- // build the OM in order to free the input stream
- envelope.buildWithAttachments();
- } else {
- xmlreader = StAXUtils.createXMLStreamReader(msgBuffer, charSetEnc);
- StAXBuilder builder = new StAXSOAPModelBuilder(xmlreader, namespaceURI);
- envelope = (SOAPEnvelope) builder.getDocumentElement();
- // build the OM in order to free the input stream
- envelope.build();
- }
- }
- catch (Exception ex) {
- // TODO: what to do if can't get the XML stream reader
- // For now, log the event
- log.error(logCorrelationIDString +
- ":readExternal(): Error when deserializing persisted envelope: [" +
- ex.getClass().getName() + " : " + ex.getLocalizedMessage() + "]", ex);
- envelope = null;
- }
-
- if (xmlreader != null) {
- try {
- xmlreader.close();
- } catch (Exception xmlex) {
- // Can't close down the xml stream reader
- log.error(logCorrelationIDString+
- ":readExternal(): Error when closing XMLStreamReader for envelope: ["
- + xmlex.getClass().getName() + " : " + xmlex.getLocalizedMessage() + "]", xmlex);
- }
- }
-
- msgBuffer.close();
- } else {
- // no message
- envelope = null;
-
- if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
- log.trace(logCorrelationIDString +
- ":readExternal(): no message from the input stream");
- }
- }
-
- } else {
- // no message
- envelope = null;
-
- if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
- log.trace(logCorrelationIDString + ":readExternal(): no message present");
- }
- }
+ envelope = MessageExternalizeUtils.readExternal(in, this, logCorrelationIDString);
//---------------------------------------------------------
// ArrayList executionChain
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/context/OperationContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/context/OperationContext.java?rev=572740&r1=572739&r2=572740&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/context/OperationContext.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/context/OperationContext.java Tue Sep 4 10:11:13 2007
@@ -272,6 +272,24 @@
}
+ /**
+ * Remove the indicated message context.
+ * Example Usage: The exchange is aborted and we need to
+ * undo the work and free resources.
+ * @param label
+ * @throws AxisFault
+ */
+ public void removeMessageContext(String label) throws AxisFault {
+
+ MessageContext mc = getMessageContext(label);
+ if (mc != null) {
+ messageContexts.remove(mc);
+ setComplete(false);
+ touch();
+ }
+ }
+
+
public HashMap getMessageContexts() {
return messageContexts;
}
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/WarBasedAxisConfigurator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/WarBasedAxisConfigurator.java?rev=572740&r1=572739&r2=572740&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/WarBasedAxisConfigurator.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/WarBasedAxisConfigurator.java Tue Sep 4 10:11:13 2007
@@ -91,7 +91,7 @@
*
* @param servletConfig the ServletConfig object from the AxisServlet. This method is called from the init() of the AxisServlet.
*/
- public WarBasedAxisConfigurator(ServletConfig servletConfig) {
+ public WarBasedAxisConfigurator(ServletConfig servletConfig) throws DeploymentException {
try {
this.config = servletConfig;
InputStream axis2Stream = null;
@@ -170,6 +170,7 @@
} catch (DeploymentException e) {
log.error(e.getMessage(), e);
+ throw e;
} catch (IOException e) {
log.error(e.getMessage(), e);
}
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/axis2_default.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/axis2_default.xml?rev=572740&r1=572739&r2=572740&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/axis2_default.xml (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/axis2_default.xml Tue Sep 4 10:11:13 2007
@@ -165,6 +165,8 @@
<parameter name="PROTOCOL">HTTP/1.1</parameter>
<parameter name="Transfer-Encoding">chunked</parameter>
</transportSender>
+ <!--<transportSender name="java"-->
+ <!--class="org.apache.axis2.transport.java.JavaTransportSender"/>-->
<!-- ================================================= -->
<!-- Phases -->
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisOperation.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisOperation.java?rev=572740&r1=572739&r2=572740&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisOperation.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisOperation.java Tue Sep 4 10:11:13 2007
@@ -497,6 +497,7 @@
}
public void setFaultMessages(AxisMessage faultMessage) {
+ faultMessage.setParent(this);
faultMessages.add(faultMessage);
if(getFaultAction(faultMessage.getName())==null){
addFaultAction(faultMessage.getName(),"urn:" + name.getLocalPart()
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisService.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisService.java?rev=572740&r1=572739&r2=572740&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisService.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisService.java Tue Sep 4 10:11:13 2007
@@ -69,6 +69,8 @@
import javax.wsdl.*;
import javax.wsdl.extensions.soap.SOAPAddress;
import javax.wsdl.extensions.schema.Schema;
+import javax.wsdl.extensions.soap12.SOAP12Address;
+import javax.wsdl.extensions.http.HTTPAddress;
import javax.wsdl.factory.WSDLFactory;
import javax.wsdl.xml.WSDLReader;
import javax.wsdl.xml.WSDLWriter;
@@ -117,9 +119,17 @@
// Maps httpLocations to corresponding operations. Used to dispatch rest messages.
private HashMap httpLocationDispatcherMap = null;
- /**
- * Map from String(action URI) -> AxisOperation
- */
+ // A map of (String alias, AxisOperation operation). The aliases might include: SOAPAction,
+ // WS-Addressing action, the operation name, the AxisInputMessage name. See:
+ // - invalidOperationsAliases
+ // - mapActionToOperatoin()
+ // - getOperationByAction()
+ // REVIEW: This really should be seperate maps for the different types of aliases so they don't
+ // conflict with each other. For example, so that an identical operation name and soap action
+ // on different operatoins don't cause a collision; the following can't be routed because
+ // "foo" is not unique across different operations:
+ // operation 1: action = foo, name = bar
+ // operation 2: action = bar, name = foo
private HashMap operationsAliasesMap = null;
// Collection of aliases that are invalid for this service because they are duplicated across
@@ -689,9 +699,10 @@
}
/**
- * Maps an action (a SOAPAction or WSA action) to the given operation. This is used by
- * dispatching (both SOAPAction- and WSAddressing- based dispatching) to figure out which
- * operation a given message is for. Some notes on restrictions of "action"
+ * Maps an alias (such as a SOAPAction, WSA action, or an operation name) to the given
+ * AxisOperation. This is used by dispatching (both SOAPAction- and WSAddressing-
+ * based dispatching) to figure out which operation a given message is for.
+ * Some notes on restrictions of "action"
* - A null or empty action will be ignored
* - An action that is a duplicate and references an idential operation is allowed
* - An acton that is a duplicate and references a different operation is NOT allowed. In this
@@ -699,7 +710,11 @@
* the ability to route based on this action. This is necessary to prevent mis-directing
* incoming message to the wrong operation based on SOAPAction.
*
- * @param action the action key
+ * Note that an alias could be a SOAPAction, WS-Addressing Action, the operation name, or some
+ * other alias.
+ * @see #getOperationByAction(String)
+ *
+ * @param action the alias key
* @param axisOperation the operation to map to
*/
public void mapActionToOperation(String action, AxisOperation axisOperation) {
@@ -1105,8 +1120,20 @@
} else {
((SOAPAddress) extensibilityEle).setLocationURI(calculateEPRs(requestIP)[0]);
}
- //TODO : change the Endpoint refrence addess as well.
+ } else if (extensibilityEle instanceof SOAP12Address){
+ if (requestIP == null) {
+ ((SOAP12Address) extensibilityEle).setLocationURI(getEPRs()[0]);
+ } else {
+ ((SOAP12Address) extensibilityEle).setLocationURI(calculateEPRs(requestIP)[0]);
+ }
+ } else if (extensibilityEle instanceof HTTPAddress){
+ if (requestIP == null) {
+ ((HTTPAddress) extensibilityEle).setLocationURI(getEPRs()[0]);
+ } else {
+ ((HTTPAddress) extensibilityEle).setLocationURI(calculateEPRs(requestIP)[0]);
+ }
}
+ //TODO : change the Endpoint refrence addess as well.
}
}
}
@@ -1264,9 +1291,11 @@
/**
- * Returns the AxisOperation which has been mapped to the given action.
+ * Returns the AxisOperation which has been mapped to the given alias.
*
- * @param action the action key
+ * @see #mapActionToOperation(String, AxisOperation)
+ *
+ * @param action the alias key
* @return Returns the corresponding AxisOperation or null if it isn't found.
*/
public AxisOperation getOperationByAction(String action) {
@@ -1279,7 +1308,8 @@
* this Service. If more than one Endpoint exists, one of them will be
* picked. If more than one Operation is found with the given SOAP Action;
* null will be returned. If no particular Operation is found with the given
- * SOAP Action; null will be returned.
+ * SOAP Action; null will be returned. If the action is in the list of invaliad aliases,
+ * which means it did not uniquely identify an operation, a null will be returned.
*
* @param soapAction SOAP Action defined for the particular Operation
* @return Returns an AxisOperation if a unique Operation can be found with the given
@@ -1289,6 +1319,11 @@
if ((soapAction == null) || soapAction.length() == 0) {
return null;
}
+ // If the action maps to an alais that is not unique, then it can't be used to map to
+ // an operation.
+ if (invalidOperationsAliases.contains(soapAction)) {
+ return null;
+ }
AxisOperation operation = (AxisOperation) getChild(new QName(soapAction));
@@ -1972,8 +2007,17 @@
* @param s
*/
private void insertIntoNameTable(Hashtable nameTable, XmlSchema s) {
+ String sourceURI = s.getSourceURI();
+ sourceURI = sourceURI.substring(sourceURI.lastIndexOf('/') + 1);
+ //remove the .xsd extention
+ sourceURI = sourceURI.substring(0,sourceURI.indexOf("."));
+ // make it unique
+ while(nameTable.containsValue(sourceURI)){
+ sourceURI = sourceURI + count++;
+ }
+
nameTable.put(s,
- ("xsd" + count++)
+ (sourceURI)
+ (customSchemaNameSuffix != null ?
customSchemaNameSuffix :
""));
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java?rev=572740&r1=572739&r2=572740&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java Tue Sep 4 10:11:13 2007
@@ -227,16 +227,21 @@
* We are following the async path. If the user hasn't set a callback object then we must
* block until the whole MEP is complete, as they have no other way to get their reply message.
*/
+ // THREADSAFE issue: Multiple threads could be trying to initialize the callback receiver
+ // so it is synchronized. It is not done within the else clause to avoid the
+ // double-checked lock antipattern.
CallbackReceiver callbackReceiver;
- if (axisOp.getMessageReceiver() != null &&
- axisOp.getMessageReceiver() instanceof CallbackReceiver) {
- callbackReceiver = (CallbackReceiver) axisOp.getMessageReceiver();
- } else {
- if (log.isDebugEnabled()) {
- log.debug("Creating new callback receiver");
+ synchronized (axisOp) {
+ if (axisOp.getMessageReceiver() != null &&
+ axisOp.getMessageReceiver() instanceof CallbackReceiver) {
+ callbackReceiver = (CallbackReceiver) axisOp.getMessageReceiver();
+ } else {
+ if (log.isDebugEnabled()) {
+ log.debug("Creating new callback receiver");
+ }
+ callbackReceiver = new CallbackReceiver();
+ axisOp.setMessageReceiver(callbackReceiver);
}
- callbackReceiver = new CallbackReceiver();
- axisOp.setMessageReceiver(callbackReceiver);
}
SyncCallBack internalCallback = null;
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java?rev=572740&r1=572739&r2=572740&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java Tue Sep 4 10:11:13 2007
@@ -38,9 +38,7 @@
import org.apache.ws.commons.schema.utils.NamespaceMap;
import org.apache.axiom.soap.SOAP12Constants;
import org.apache.axiom.soap.SOAP11Constants;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
+import org.w3c.dom.*;
import org.xml.sax.SAXException;
import javax.wsdl.*;
@@ -1372,6 +1370,7 @@
while (faultKeyIterator.hasNext()) {
Fault fault = (Fault) faults.get(faultKeyIterator.next());
AxisMessage axisFaultMessage = new AxisMessage();
+
Message faultMessage = fault.getMessage();
if (null != faultMessage) {
axisFaultMessage
@@ -2150,8 +2149,51 @@
axisOperation, anonymousValue);
}
}
+ } else if (wsdl4jExtensibilityElement.getElementType() != null &&
+ wsdl4jExtensibilityElement.getElementType().getNamespaceURI().equals(
+ org.apache.axis2.namespace.Constants.FORMAT_BINDING)) {
+ Element typeMapping = unknown.getElement();
+ NodeList typeMaps = typeMapping.getElementsByTagNameNS(
+ org.apache.axis2.namespace.Constants.FORMAT_BINDING,
+ "typeMap");
+ int count = typeMaps.getLength();
+ HashMap typeMapper = new HashMap();
+ for (int index = 0; index < count; index++) {
+ Node node = typeMaps.item(index);
+ NamedNodeMap attributes = node.getAttributes();
+ Node typeName = attributes.getNamedItem("typeName");
+
+ if (typeName != null) {
+ String prefix = getPrefix(typeName.getNodeValue());
+
+ if (prefix != null) {
+ String ns = (String) wsdl4jDefinition.getNamespaces().get(prefix);
+ if (ns != null) {
+ Node formatType = attributes.getNamedItem("formatType");
+ typeMapper.put(new QName(ns, getTypeName(
+ typeName.getNodeValue())), formatType.getNodeValue());
+ }
- } else {
+ }
+ }
+ }
+ } else if (wsdl4jExtensibilityElement.getElementType() != null &&
+ wsdl4jExtensibilityElement.getElementType().getNamespaceURI().equals(
+ org.apache.axis2.namespace.Constants.JAVA_NS)) {
+ Element unknowJavaElement = unknown.getElement();
+ if (unknowJavaElement.getLocalName().equals("address") ) {
+ NamedNodeMap nameAttributes = unknowJavaElement.getAttributes();
+ Node node = nameAttributes.getNamedItem("className");
+ Parameter serviceClass = new Parameter();
+ serviceClass.setName("className");
+ serviceClass.setValue(node.getNodeValue());
+ axisService.addParameter(serviceClass);
+ Parameter transportName = new Parameter();
+ transportName.setName("TRANSPORT_NAME");
+ transportName.setValue("java");
+ axisService.addParameter(transportName);
+ }
+ } else {
// Ignore this element - it is a totally unknown element
if (isTraceEnabled) {
log.trace("copyExtensibleElements:: Unknown Extensibility Element found " +
@@ -2695,4 +2737,34 @@
// }
// }
// }
+
+ /**
+ * This method is to split attribute like abc:cde and get the prefix part of it
+ * so the method will retuen abc if the ":" is present in the the string else it
+ * will return null
+ *
+ * @param attributeValue : String
+ * @return String
+ */
+ public static String getPrefix(String attributeValue) {
+ if (attributeValue != null) {
+ int splitIdex = attributeValue.indexOf(':');
+ if (splitIdex > 0) {
+ return attributeValue.substring(0, splitIdex);
+ }
+ }
+ return null;
+ }
+
+ public static String getTypeName(String attributeValue) {
+ if (attributeValue != null) {
+ int splitIdex = attributeValue.indexOf(':');
+ if (splitIdex > 0) {
+ return attributeValue.substring(splitIdex + 1);
+ } else {
+ return attributeValue;
+ }
+ }
+ return null;
+ }
}
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java?rev=572740&r1=572739&r2=572740&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java Tue Sep 4 10:11:13 2007
@@ -34,6 +34,7 @@
import org.apache.woden.WSDLFactory;
import org.apache.woden.WSDLReader;
import org.apache.woden.WSDLSource;
+import org.apache.woden.XMLElement;
import org.apache.woden.internal.DOMWSDLFactory;
import org.apache.woden.internal.wsdl20.extensions.InterfaceOperationExtensionsImpl;
import org.apache.woden.internal.wsdl20.extensions.http.HTTPBindingExtensionsImpl;
@@ -1116,7 +1117,8 @@
StringBuffer x;
for (int i = 0; i < documentationElements.length; i++) {
DocumentationElement documentationElement = documentationElements[i];
- Element content = (Element) documentationElement.getContent();
+ XMLElement contentElement = documentationElement.getContent();
+ Element content = (Element)contentElement.getSource();
if (content != null) {
documentation = documentation + DOM2Writer.nodeToString(content.getFirstChild());
}
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java?rev=572740&r1=572739&r2=572740&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java Tue Sep 4 10:11:13 2007
@@ -34,6 +34,7 @@
import org.codehaus.jam.*;
import javax.xml.namespace.QName;
+import javax.activation.DataHandler;
import java.util.*;
public class DefaultSchemaGenerator implements Java2WSDLConstants, SchemaGenerator {
@@ -581,7 +582,7 @@
if (isArryType && "byte".equals(propertyName)) {
propertyName = "base64Binary";
}
- if ("javax.activation.DataHandler".equals(propertyName)) {
+ if (isDataHandler(type)) {
propertyName = "base64Binary";
}
@@ -653,7 +654,8 @@
classTypeName = "base64Binary";
isArrayType = false;
}
- if ("javax.activation.DataHandler".equals(classTypeName)) {
+
+ if (isDataHandler(type)) {
classTypeName = "base64Binary";
}
QName schemaTypeName = typeTable.getSimpleSchemaTypeName(classTypeName);
@@ -675,6 +677,26 @@
}
return schemaTypeName;
+ }
+
+ protected boolean isDataHandler(JClass clazz){
+ if(clazz == null ){
+ return false;
+ }
+ String classType = clazz.getQualifiedName();
+ if("java.lang.Object".equals(classType)){
+ return false;
+ }
+ if ("javax.activation.DataHandler".equals(classType)) {
+ return true;
+ } else {
+ JClass supuerClass = clazz.getSuperclass();
+ if (supuerClass != null) {
+ return isDataHandler(supuerClass);
+ } else {
+ return false;
+ }
+ }
}
protected void addContentToMethodSchemaType(XmlSchemaSequence sequence,
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/java2wsdl/DocLitBareSchemaGenerator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/java2wsdl/DocLitBareSchemaGenerator.java?rev=572740&r1=572739&r2=572740&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/java2wsdl/DocLitBareSchemaGenerator.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/java2wsdl/DocLitBareSchemaGenerator.java Tue Sep 4 10:11:13 2007
@@ -262,7 +262,7 @@
classTypeName = "base64Binary";
isArrayType = false;
}
- if ("javax.activation.DataHandler".equals(classTypeName)) {
+ if (isDataHandler(type)) {
classTypeName = "base64Binary";
}
QName schemaTypeName = typeTable.getSimpleSchemaTypeName(classTypeName);
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/dispatchers/ActionBasedOperationDispatcher.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/dispatchers/ActionBasedOperationDispatcher.java?rev=572740&r1=572739&r2=572740&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/dispatchers/ActionBasedOperationDispatcher.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/dispatchers/ActionBasedOperationDispatcher.java Tue Sep 4 10:11:13 2007
@@ -44,6 +44,12 @@
action);
}
if (action != null) {
+ // REVIEW: Should we FIRST try to find an operation that explicitly mapped this
+ // SOAPAction as an alias by calling:
+ // AxisOperation op = service.getOperationByAction(action);
+ // And THEN, if we didn't find an explicit mapping of this action, see if there's an
+ // operation that has the same name as the action, and route to that by calling:
+ // service.getOperationBySOAPAction(action);
AxisOperation op = service.getOperationBySOAPAction(action);
if (op == null) {
op = service.getOperationByAction(action);
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java?rev=572740&r1=572739&r2=572740&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java Tue Sep 4 10:11:13 2007
@@ -30,12 +30,14 @@
import org.apache.axis2.context.OperationContext;
import org.apache.axis2.description.AxisOperation;
import org.apache.axis2.description.TransportOutDescription;
+import org.apache.axis2.description.WSDL2Constants;
import org.apache.axis2.engine.Handler.InvocationResponse;
import org.apache.axis2.i18n.Messages;
import org.apache.axis2.transport.TransportSender;
import org.apache.axis2.util.CallbackReceiver;
import org.apache.axis2.util.LoggingControl;
import org.apache.axis2.util.MessageContextBuilder;
+import org.apache.axis2.wsdl.WSDLConstants;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -149,6 +151,20 @@
return pi;
} else if (pi.equals(InvocationResponse.ABORT)) {
flowComplete(msgContext);
+ // Undo any partial work.
+ // Remove the incoming message context
+ if (log.isDebugEnabled()) {
+ log.debug("InvocationResponse is aborted. " +
+ "The incoming MessageContext is removed, " +
+ "and the OperationContext is marked as incomplete");
+ }
+ String mepURI = msgContext.getAxisOperation().getMessageExchangePattern();
+ if (WSDL2Constants.MEP_URI_OUT_IN.equals(mepURI)) {
+ OperationContext opCtx = msgContext.getOperationContext();
+ if (opCtx != null) {
+ opCtx.removeMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
+ }
+ }
return pi;
} else {
String errorMsg =
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/engine/Handler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/engine/Handler.java?rev=572740&r1=572739&r2=572740&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/engine/Handler.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/engine/Handler.java Tue Sep 4 10:11:13 2007
@@ -126,10 +126,6 @@
this.description = description;
}
- public boolean equals(InvocationResponse instruction) {
- return this.instructionID == instruction.instructionID;
- }
-
public int hashCode() {
return instructionID;
}
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/namespace/Constants.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/namespace/Constants.java?rev=572740&r1=572739&r2=572740&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/namespace/Constants.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/namespace/Constants.java Tue Sep 4 10:11:13 2007
@@ -112,6 +112,8 @@
public static final String URI_POLICY =
"http://schemas.xmlsoap.org/ws/2004/09/policy";
+ public static final String FORMAT_BINDING = "http://schemas.xmlsoap.org/wsdl/formatbinding/";
+ public static final String JAVA_NS = "http://schemas.xmlsoap.org/wsdl/java/";
/**
* WSDL Namespace.
*/
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/ApplicationXMLFormatter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/ApplicationXMLFormatter.java?rev=572740&r1=572739&r2=572740&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/ApplicationXMLFormatter.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/ApplicationXMLFormatter.java Tue Sep 4 10:11:13 2007
@@ -45,15 +45,35 @@
public class ApplicationXMLFormatter implements MessageFormatter {
private static final Log log = LogFactory.getLog(ApplicationXMLFormatter.class);
- public byte[] getBytes(MessageContext messageContext, OMOutputFormat format) throws AxisFault {
+ public byte[] getBytes(MessageContext
+ messageContext,
+ OMOutputFormat format) throws AxisFault {
+ return getBytes(messageContext, format, false);
+ }
+
+ /**
+ * Get the bytes for this message
+ * @param messageContext
+ * @param format
+ * @param preserve (indicates if the OM should be preserved or consumed)
+ * @return
+ * @throws AxisFault
+ */
+ public byte[] getBytes(MessageContext messageContext,
+ OMOutputFormat format,
+ boolean preserve) throws AxisFault {
if (log.isDebugEnabled()) {
log.debug("start getBytes()");
- log.debug(" fault flow=" + (messageContext.getFLOW() == MessageContext.OUT_FAULT_FLOW));
+ log.debug(" fault flow=" +
+ (messageContext.getFLOW() == MessageContext.OUT_FAULT_FLOW));
}
try {
OMElement omElement;
+ // Find the correct element to serialize. Normally it is the first element
+ // in the body. But if this is a fault, use the detail entry element or the
+ // fault reason.
if (messageContext.getFLOW() == MessageContext.OUT_FAULT_FLOW) {
SOAPFault fault = messageContext.getEnvelope().getBody().getFault();
SOAPFaultDetail soapFaultDetail = fault.getDetail();
@@ -64,6 +84,7 @@
}
} else {
+ // Normal case: The xml payload is the first element in the body.
omElement = messageContext.getEnvelope().getBody().getFirstElement();
}
ByteArrayOutputStream bytesOut = new ByteArrayOutputStream();
@@ -71,7 +92,11 @@
if (omElement != null) {
try {
- omElement.serializeAndConsume(bytesOut, format);
+ if (preserve) {
+ omElement.serialize(bytesOut, format);
+ } else {
+ omElement.serializeAndConsume(bytesOut, format);
+ }
} catch (XMLStreamException e) {
throw AxisFault.makeFault(e);
}
@@ -111,7 +136,11 @@
}
if (omElement != null) {
try {
- omElement.serializeAndConsume(outputStream, format);
+ if (preserve) {
+ omElement.serialize(outputStream, format);
+ } else {
+ omElement.serializeAndConsume(outputStream, format);
+ }
} catch (XMLStreamException e) {
throw AxisFault.makeFault(e);
}
@@ -166,7 +195,9 @@
return contentType;
}
- public URL getTargetAddress(MessageContext messageContext, OMOutputFormat format, URL targetURL)
+ public URL getTargetAddress(MessageContext messageContext,
+ OMOutputFormat format,
+ URL targetURL)
throws AxisFault {
// Check whether there is a template in the URL, if so we have to replace then with data
@@ -186,7 +217,8 @@
return true;
}
// search for "type=text/xml"
- else if (JavaUtils.indexOfIgnoreCase(contentType, SOAP11Constants.SOAP_11_CONTENT_TYPE) > -1) {
+ else if (JavaUtils.indexOfIgnoreCase(contentType,
+ SOAP11Constants.SOAP_11_CONTENT_TYPE) > -1) {
return true;
}
return false;
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/TransportHeaders.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/TransportHeaders.java?rev=572740&r1=572739&r2=572740&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/TransportHeaders.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/TransportHeaders.java Tue Sep 4 10:11:13 2007
@@ -23,20 +23,38 @@
import java.util.Collection;
import java.util.Enumeration;
import java.util.HashMap;
+import java.util.Iterator;
import java.util.Map;
import java.util.Set;
/**
- * Pass-Thru / delayed get of the values from HttpServletRequest
+ * Pass-Thru / delayed get and put of the values from HttpServletRequest
*/
public class TransportHeaders implements Map {
HttpServletRequest req;
+ // This map contains the headers from the request; it will be filled in lazily if needed,
+ // for performance
HashMap headerMap = null;
+ // This map contains properties that have been put onto the map; it is not populated by values
+ // from the HttpServletRequest. A null value means the headerMap has been fully populated and
+ // any values that were in localHeaderMap have been migrated to headerMap.
+ HashMap localHeaderMap = new HashMap();
public TransportHeaders(HttpServletRequest req) {
this.req = req;
}
+ /**
+ * This will fully populate the HashMap with the value from the HttpSerlvetRequest and migrate
+ * any values previously put onto localHeaderMap into the new HashMap.
+ *
+ * Note this is a bit non-performant, so it is only done if needed.
+ * If/when it is done, there may be properties that have been set on the localHeaderMap.
+ * If headerMap must be created due to a call
+ * to size, or isEmpty, or some other method which requires a fully populated map, then any
+ * previously created entries in the localHeaderMap are migrated to the new hashmap.
+ * After that localHeaderMap is released and only headerMap is used after that.
+ */
private void init() {
headerMap = new HashMap();
Enumeration headerNames = req.getHeaderNames();
@@ -47,6 +65,16 @@
headerMap.put(key, value);
}
+
+ // Migrate any previously set local properties to the newly created hashmap then release
+ // the local hashmap
+ Set localHeaderSet = localHeaderMap.entrySet();
+ Iterator localHeaderIterator = localHeaderSet.iterator();
+ while (localHeaderIterator.hasNext()) {
+ Map.Entry localHeaderEntry = (Map.Entry) localHeaderIterator.next();
+ headerMap.put(localHeaderEntry.getKey(), localHeaderEntry.getValue());
+ }
+ localHeaderMap = null;
}
public int size() {
@@ -60,6 +88,9 @@
if (headerMap != null) {
headerMap.clear();
}
+ if (localHeaderMap != null) {
+ localHeaderMap.clear();
+ }
}
public boolean isEmpty() {
@@ -112,6 +143,14 @@
}
public Object get(Object key) {
+ // If there is a local map, look there first.
+ if (localHeaderMap != null) {
+ Object returnValue = null;
+ returnValue = localHeaderMap.get(key);
+ if (returnValue != null) {
+ return returnValue;
+ }
+ }
if (headerMap == null) {
return req.getHeader((String) key);
}
@@ -126,6 +165,9 @@
}
public Object put(Object key, Object value) {
+ if (localHeaderMap != null) {
+ return localHeaderMap.put(key, value);
+ }
if (headerMap == null) {
init();
}
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/CommandLineOptionConstants.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/CommandLineOptionConstants.java?rev=572740&r1=572739&r2=572740&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/CommandLineOptionConstants.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/CommandLineOptionConstants.java Tue Sep 4 10:11:13 2007
@@ -87,5 +87,9 @@
String WSDL_VERSION_1 = "1.1";
}
+ interface ExtensionArguments {
+ String WITHOUT_DATABIND_CODE = "wdc";
+ }
+
public static final String SOLE_INPUT = "SOLE_INPUT";
}
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/JavaUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/JavaUtils.java?rev=572740&r1=572739&r2=572740&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/JavaUtils.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/JavaUtils.java Tue Sep 4 10:11:13 2007
@@ -455,6 +455,28 @@
return null;
}
+ public static Class getWrapperClass(String primitive) {
+ if (primitive.equals("int")) {
+ return java.lang.Integer.class;
+ } else if (primitive.equals("short")) {
+ return java.lang.Short.class;
+ } else if (primitive.equals("boolean")) {
+ return java.lang.Boolean.class;
+ } else if (primitive.equals("byte")) {
+ return java.lang.Byte.class;
+ } else if (primitive.equals("long")) {
+ return java.lang.Long.class;
+ } else if (primitive.equals("double")) {
+ return java.lang.Double.class;
+ } else if (primitive.equals("float")) {
+ return java.lang.Float.class;
+ } else if (primitive.equals("char")) {
+ return java.lang.Character.class;
+ }
+
+ return null;
+ }
+
/**
* Scans the parameter string for the parameter search ignoring case when
* comparing characters.
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/XMLUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/XMLUtils.java?rev=572740&r1=572739&r2=572740&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/XMLUtils.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/XMLUtils.java Tue Sep 4 10:11:13 2007
@@ -507,13 +507,24 @@
}
/**
- * Converts a given DOM Element to an OMElement.
- *
- * @param element
- * @return Returns OMElement.
+ * Convert DOM Element into a fully built OMElement
+ * @param element dom Element
+ * @return OMElement
* @throws Exception
*/
public static OMElement toOM(Element element) throws Exception {
+ return toOM(element, true);
+ }
+
+ /**
+ * Convert DOM Element into a fully built OMElement
+ * @param element
+ * @param buildAll if true, full OM tree is immediately built. if false, caller is responsible
+ * for building the tree and closing the parser.
+ * @return
+ * @throws Exception
+ */
+ public static OMElement toOM(Element element, boolean buildAll) throws Exception {
Source source = new DOMSource(element);
@@ -529,8 +540,14 @@
StAXOMBuilder builder = new StAXOMBuilder(reader);
builder.setCache(true);
+ builder.releaseParserOnClose(true);
- return builder.getDocumentElement();
+ OMElement omElement = builder.getDocumentElement();
+ if (buildAll) {
+ omElement.build();
+ builder.close();
+ }
+ return omElement;
}
@@ -554,32 +571,81 @@
/**
* Converts a given inputstream to an OMNode
+ * The reurned OMNode is fully built.
*
* @param inputStream
- * @return
+ * @return OMNode
* @throws javax.xml.stream.XMLStreamException
*
*/
public static OMNode toOM(InputStream inputStream) throws XMLStreamException {
+ return toOM(inputStream, true);
+ }
+
+ /**
+ * Converts a given inputstream to an OMNode
+ * The reurned OMNode is fully built if buildAll is true.
+ * If buildAll is false, the caller is responsible for closing the parser.
+ *
+ * @param inputStream
+ * @param buildAll
+ * @return OMNode
+ * @throws javax.xml.stream.XMLStreamException
+ *
+ */
+ public static OMNode toOM(InputStream inputStream, boolean buildAll) throws XMLStreamException {
XMLStreamReader xmlReader = StAXUtils
.createXMLStreamReader(inputStream);
OMFactory fac = OMAbstractFactory.getOMFactory();
- StAXOMBuilder staxOMBuilder = new StAXOMBuilder(fac, xmlReader);
- return staxOMBuilder.getDocumentElement();
+ StAXOMBuilder builder = new StAXOMBuilder(fac, xmlReader);
+ builder.setCache(true);
+ builder.releaseParserOnClose(true);
+ OMNode omNode = builder.getDocumentElement();
+
+ if (buildAll) {
+ omNode.build();
+ builder.close();
+ }
+
+ return omNode;
}
/**
- * Converts a given Reader to an OMNode
+ * Converts a given Reader to an OMNode.
+ * The reurned OMNode is fully built.
*
* @param reader
* @return
* @throws XMLStreamException
*/
public static OMNode toOM(Reader reader) throws XMLStreamException {
+ return toOM(reader, true);
+ }
+
+ /**
+ * Converts a given Reader to an OMNode.
+ * The reurned OMNode is fully built if buildAll is true.
+ * If buildAll is false, the caller is responsible for closing the parser.
+ *
+ * @param reader
+ * @param buildAll
+ * @return OMNode
+ * @throws XMLStreamException
+ */
+ public static OMNode toOM(Reader reader, boolean buildAll) throws XMLStreamException {
XMLStreamReader xmlReader = StAXUtils
.createXMLStreamReader(reader);
OMFactory fac = OMAbstractFactory.getOMFactory();
- StAXOMBuilder staxOMBuilder = new StAXOMBuilder(fac, xmlReader);
- return staxOMBuilder.getDocumentElement();
+ StAXOMBuilder builder = new StAXOMBuilder(fac, xmlReader);
+ builder.setCache(true);
+ builder.releaseParserOnClose(true);
+ OMNode omNode = builder.getDocumentElement();
+
+ if (buildAll) {
+ omNode.build();
+ builder.close();
+ }
+
+ return omNode;
}
}
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/test/org/apache/axis2/engine/SOAPActionBasedDispatcherTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/test/org/apache/axis2/engine/SOAPActionBasedDispatcherTest.java?rev=572740&r1=572739&r2=572740&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/test/org/apache/axis2/engine/SOAPActionBasedDispatcherTest.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/test/org/apache/axis2/engine/SOAPActionBasedDispatcherTest.java Tue Sep 4 10:11:13 2007
@@ -133,8 +133,8 @@
// doesn't somehow get it added back into the valid alias map
AxisOperation operation4 = new InOnlyAxisOperation(new QName("operation4"));
// Note that the SOAPAction is intentionally duplicated with operation 2 above.
- operation3.setSoapAction("urn:org.apache.axis2.dispatchers.test:operation2");
- as.addOperation(operation3);
+ operation4.setSoapAction("urn:org.apache.axis2.dispatchers.test:operation2");
+ as.addOperation(operation4);
messageContext = new MessageContext();
messageContext.setAxisService(as);
@@ -153,6 +153,83 @@
}
-
-
+
+ public void testActionVsOpName() throws Exception {
+ // Should route based on action before trying to route based on operation name
+ // - method operation1, action = operation2
+ // - method operation2, action = operation1
+ // Incoming action should route to:
+ // - action = operation2, route to operation1
+ // - action = operation1, route to operation2
+ MessageContext messageContext = new MessageContext();
+ AxisService as = new AxisService("Service1");
+ messageContext.setAxisService(as);
+
+ AxisOperation operation1 = new InOnlyAxisOperation(new QName("operation1"));
+ operation1.setSoapAction("operation2");
+
+ AxisOperation operation2 = new InOnlyAxisOperation(new QName("operation2"));
+ operation2.setSoapAction("operation1");
+
+ as.addOperation(operation1);
+ as.addOperation(operation2);
+
+ messageContext.setSoapAction("operation2");
+
+ SOAPActionBasedDispatcher soapActionDispatcher = new SOAPActionBasedDispatcher();
+ soapActionDispatcher.invoke(messageContext);
+ // Since Axis2 uses a single alias table for SOAPActions and operation names (and
+ // WS-Addressing actions and input message names), having an action with the same name
+ // as a different operation will cause that alias to be unusable for routing.
+// assertEquals(operation1, messageContext.getAxisOperation());
+ assertNull(messageContext.getAxisOperation());
+
+ // Make sure the other action works also
+ messageContext = new MessageContext();
+ messageContext.setAxisService(as);
+ messageContext.setSoapAction("operation1");
+ soapActionDispatcher = new SOAPActionBasedDispatcher();
+ soapActionDispatcher.invoke(messageContext);
+// assertEquals(operation2, messageContext.getAxisOperation());
+ assertNull(messageContext.getAxisOperation());
+
+ }
+
+ public void testInvalidActionVsOpName() throws Exception {
+ // Shouldn't route on action because it is invalid (used > 1 time) even though it matches
+ // an operation name
+ // - method operation1, action = operation2
+ // - method operation2, action = operation2
+ // Incoming action should route to:
+ // - action = operation2, null
+ // - action = operation1, route to operation1 (based on method name match to action)
+ //
+ MessageContext messageContext = new MessageContext();
+ AxisService as = new AxisService("Service1");
+ messageContext.setAxisService(as);
+
+ AxisOperation operation1 = new InOnlyAxisOperation(new QName("operation1"));
+ operation1.setSoapAction("operation2");
+
+ AxisOperation operation2 = new InOnlyAxisOperation(new QName("operation2"));
+ operation2.setSoapAction("operation2");
+
+ as.addOperation(operation1);
+ as.addOperation(operation2);
+
+ messageContext.setSoapAction("operation2");
+
+ SOAPActionBasedDispatcher soapActionDispatcher = new SOAPActionBasedDispatcher();
+ soapActionDispatcher.invoke(messageContext);
+ // Verify that we can't route on the SOAPAction because it has been specified > 1 time
+ assertNull(messageContext.getAxisOperation());
+
+ // Now verify that a SOAPAction that happens to map to an operation name can still be routed
+ messageContext = new MessageContext();
+ messageContext.setAxisService(as);
+ messageContext.setSoapAction("operation1");
+ soapActionDispatcher = new SOAPActionBasedDispatcher();
+ soapActionDispatcher.invoke(messageContext);
+ assertEquals(operation1, messageContext.getAxisOperation());
+ }
}
Modified: webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java?rev=572740&r1=572739&r2=572740&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java Tue Sep 4 10:11:13 2007
@@ -1380,6 +1380,15 @@
break;
}
}
+ // We need to convert the wsdl-based SOAP and HTTP namespace into the expected namespace for
+ //SOAPBindings or HTTPBindings
+ if (SOAP11_WSDL_BINDING.equals(wsdlBindingType)) {
+ wsdlBindingType = SOAPBinding.SOAP11HTTP_BINDING;
+ } else if (SOAP12_WSDL_BINDING.equals(wsdlBindingType)) {
+ wsdlBindingType = SOAPBinding.SOAP12HTTP_BINDING;
+ } else if (HTTP_WSDL_BINDING.equals(wsdlBindingType)) {
+ wsdlBindingType = javax.xml.ws.http.HTTPBinding.HTTP_BINDING;
+ }
}
return wsdlBindingType;
}
@@ -1428,6 +1437,9 @@
if (clientBindingID == null) {
if (getWSDLDefinition() != null) {
clientBindingID = getWSDLBindingType();
+ if (clientBindingID == null) {
+ clientBindingID = DEFAULT_CLIENT_BINDING_ID;
+ }
} else {
clientBindingID = DEFAULT_CLIENT_BINDING_ID;
}
Modified: webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java?rev=572740&r1=572739&r2=572740&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java Tue Sep 4 10:11:13 2007
@@ -1353,6 +1353,28 @@
.getMessage("serverSideAsync", mdc.getDeclaringClass(), mdc
.getMethodName()));
}
+ // Verify that the SOAPBinding annotation values are supported.
+ if (mdc.getSoapBindingAnnot() != null) {
+
+ // For this JAXWS engine, SOAPBinding.Use = ENCODED is unsupported
+ if (mdc.getSoapBindingAnnot().use() == javax.jws.soap.SOAPBinding.Use.ENCODED) {
+ throw ExceptionFactory.
+ makeWebServiceException(Messages.getMessage("soapBindingUseEncoded",
+ mdc.getDeclaringClass(),
+ mdc.getMethodName()));
+
+ }
+
+ // Verify that, if a SOAPBinding annotation exists, that its style be set to
+ // only DOCUMENT JSR181-Sec 4.7.1
+ if (mdc.getSoapBindingAnnot().style() == javax.jws.soap.SOAPBinding.Style.RPC) {
+ throw ExceptionFactory.
+ makeWebServiceException(Messages.getMessage("soapBindingStyle",
+ mdc.getDeclaringClass(),
+ mdc.getMethodName()));
+ }
+
+ }
}
}
// TODO: Fill this out to validate all MethodDescriptionComposite (and
Modified: webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/validator/EndpointDescriptionValidator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/validator/EndpointDescriptionValidator.java?rev=572740&r1=572739&r2=572740&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/validator/EndpointDescriptionValidator.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/validator/EndpointDescriptionValidator.java Tue Sep 4 10:11:13 2007
@@ -68,6 +68,8 @@
private boolean validateWSDLBindingType() {
boolean isBindingValid = false;
String bindingType = endpointDesc.getBindingType();
+ //The wsdl binding type that we now receive has been previously mapped to the expected
+ //SOAP and HTTP bindings. So, there is now limited validation to perform
String wsdlBindingType = endpointDescWSDL.getWSDLBindingType();
if (bindingType == null) {
// I don't think this can happen; the Description layer should provide a default
@@ -90,27 +92,27 @@
isBindingValid = true;
}
// Validate that the WSDL value is valid
- else if (!EndpointDescriptionWSDL.SOAP11_WSDL_BINDING.equals(wsdlBindingType) &&
- !EndpointDescriptionWSDL.SOAP12_WSDL_BINDING.equals(wsdlBindingType) &&
- !EndpointDescriptionWSDL.HTTP_WSDL_BINDING.equals(wsdlBindingType)) {
+ else if (!SOAPBinding.SOAP11HTTP_BINDING.equals(wsdlBindingType)
+ && !SOAPBinding.SOAP12HTTP_BINDING.equals(wsdlBindingType)
+ && !javax.xml.ws.http.HTTPBinding.HTTP_BINDING.equals(wsdlBindingType)) {
addValidationFailure(this, "Invalid wsdl binding value specified: " + wsdlBindingType);
isBindingValid = false;
}
// Validate that the WSDL and annotations values indicate the same type of binding
- else if (wsdlBindingType.equals(EndpointDescriptionWSDL.SOAP11_WSDL_BINDING)
+ else if (wsdlBindingType.equals(SOAPBinding.SOAP11HTTP_BINDING)
&& (bindingType.equals(SOAPBinding.SOAP11HTTP_BINDING) ||
bindingType.equals(SOAPBinding.SOAP11HTTP_MTOM_BINDING))) {
isBindingValid = true;
- } else if (wsdlBindingType.equals(EndpointDescriptionWSDL.SOAP12_WSDL_BINDING)
+ } else if (wsdlBindingType.equals(SOAPBinding.SOAP12HTTP_BINDING)
&& (bindingType.equals(SOAPBinding.SOAP12HTTP_BINDING) ||
bindingType.equals(SOAPBinding.SOAP12HTTP_MTOM_BINDING))) {
isBindingValid = true;
- } else if (wsdlBindingType.equals(EndpointDescriptionWSDL.HTTP_WSDL_BINDING) &&
- bindingType.equals(HTTPBinding.HTTP_BINDING)) {
+ } else if (wsdlBindingType.equals(HTTPBinding.HTTP_BINDING)
+ && bindingType.equals(HTTPBinding.HTTP_BINDING)) {
isBindingValid = true;
}
// The HTTP binding is not valid on a Java Bean SEI-based endpoint; only on a Provider based one.
- else if (wsdlBindingType.equals(EndpointDescriptionWSDL.HTTP_WSDL_BINDING) &&
+ else if (wsdlBindingType.equals(HTTPBinding.HTTP_BINDING) &&
endpointDesc.isEndpointBased()) {
addValidationFailure(this,
"The HTTPBinding can not be specified for SEI-based endpoints");
Modified: webservices/axis2/branches/java/jaxws21/modules/parent/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/parent/pom.xml?rev=572740&r1=572739&r2=572740&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/parent/pom.xml (original)
+++ webservices/axis2/branches/java/jaxws21/modules/parent/pom.xml Tue Sep 4 10:11:13 2007
@@ -173,6 +173,10 @@
<organization>WSO2</organization>
</developer>
<developer>
+ <name>Jeff Barrett</name>
+ <organization>IBM</organization>
+ </developer>
+ <developer>
<name>Eran Chinthaka</name>
<id>chinthaka</id>
<email>chinthaka AT wso2.com</email>
@@ -186,6 +190,12 @@
<organization>Sonic Software</organization>
</developer>
<developer>
+ <name>Brian DePradine</name>
+ <id>pradine</id>
+ <email>pradine AT uk.ibm.com</email>
+ <organization>IBM</organization>
+ </developer>
+ <developer>
<name>Jaliya Ekanayake</name>
<id>jaliya</id>
<email>jaliya AT opensource.lk</email>
@@ -199,6 +209,10 @@
<organization>WSO2</organization>
</developer>
<developer>
+ <name>Nicholas Gallardo</name>
+ <organization>IBM</organization>
+ </developer>
+ <developer>
<name>Thilina Gunarathne</name>
<id>thilina</id>
<email>thilina AT opensource.lk</email>
@@ -212,6 +226,12 @@
<url>www.apache.org/~chathura</url>
</developer>
<developer>
+ <name>David Illsley</name>
+ <id>davidillsley</id>
+ <organization>IBM</organization>
+ <url>http://www.illsley.org</url>
+ </developer>
+ <developer>
<name>Deepal Jayasinghe</name>
<id>deepal</id>
<email>deepal AT wso2.com</email>
@@ -231,6 +251,10 @@
<organization>HP labs</organization>
</developer>
<developer>
+ <name>Bill Nagy</name>
+ <organization>IBM</organization>
+ </developer>
+ <developer>
<name>Chatra Nakkawita</name>
<id>chatra</id>
<email>chatra AT WSO2.com</email>
@@ -269,12 +293,26 @@
<organization>Computer Associates</organization>
</developer>
<developer>
+ <name>Michael Rheinheimer</name>
+ <organization>IBM</organization>
+ </developer>
+ <developer>
+ <name>Ann Robinson</name>
+ <organization>IBM</organization>
+ </developer>
+ <developer>
<name>Sanka Samaranayake</name>
<id>sanka</id>
<email>sanka AT wso2.com</email>
<organization>WSO2</organization>
</developer>
<developer>
+ <name>Rich Scheuerle</name>
+ <id>scheu</id>
+ <email>scheu AT us.ibm.com</email>
+ <organization>IBM</organization>
+ </developer>
+ <developer>
<name>Ashutosh Shahi</name>
<id>ashu</id>
<email>Ashutosh.Shahi AT ca.com</email>
@@ -303,6 +341,10 @@
<id>jaya</id>
<email>jayachandra AT gmail.com</email>
<organization>Computer Associates</organization>
+ </developer>
+ <developer>
+ <name>Nikhil Thaker</name>
+ <organization>IBM</organization>
</developer>
<developer>
<name>Chamil Thanthrimudalige</name>
Modified: webservices/axis2/branches/java/jaxws21/modules/tool/axis2-eclipse-codegen-plugin/eclipse-codegen-plugin-assembly.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/tool/axis2-eclipse-codegen-plugin/eclipse-codegen-plugin-assembly.xml?rev=572740&r1=572739&r2=572740&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/tool/axis2-eclipse-codegen-plugin/eclipse-codegen-plugin-assembly.xml (original)
+++ webservices/axis2/branches/java/jaxws21/modules/tool/axis2-eclipse-codegen-plugin/eclipse-codegen-plugin-assembly.xml Tue Sep 4 10:11:13 2007
@@ -29,30 +29,127 @@
</fileSet>
</fileSets>
<dependencySets>
- <dependencySet>
- <outputDirectory>lib</outputDirectory>
- <includes>
- <include>org.apache.geronimo.specs:geronimo-activation_1.1_spec:jar</include>
- <include>annogen:annogen:jar</include>
- <include>org.apache.ws.commons.axiom:axiom-api:jar</include>
- <include>org.apache.ws.commons.axiom:axiom-dom:jar</include>
- <include>org.apache.ws.commons.axiom:axiom-impl:jar</include>
- <include>commons-logging:commons-logging:jar</include>
- <include>org.apache.axis2:axis2:jar</include>
- <include>org.codehaus.woodstox:wstx-asl:jar</include>
- <include>org.apache.neethi:neethi:jar</include>
- <include>stax:stax-api:jar</include>
- <include>wsdl4j:wsdl4j:jar</include>
- <include>xmlbeans:xbean:jar</include>
- <include>org.apache.ws.commons.schema:XmlSchema:jar</include>
- <include>log4j:log4j:jar</include>
- <include>org.apache.woden:woden:jar</include>
- <include>commons-httpclient:commons-httpclient:jar</include>
- <include>commons-codec:commons-codec:jar</include>
- <include>jibx:jibx-bind:jar</include>
- <include>jibx:jibx-run::jar</include>
- <include>org.apache.ant:ant:jar</include>
- </includes>
- </dependencySet>
+ <dependencySet>
+ <outputFileNameMapping>${artifactId}-${geronimo.spec.activation.version}.${extension}</outputFileNameMapping>
+ <outputDirectory>lib</outputDirectory>
+ <includes>
+ <include>org.apache.geronimo.specs:geronimo-activation_1.1_spec:jar</include>
+ </includes>
+ </dependencySet>
+ <dependencySet>
+ <outputFileNameMapping>${artifactId}-${axiom.version}.${extension}</outputFileNameMapping>
+ <outputDirectory>lib</outputDirectory>
+ <includes>
+ <include>org.apache.ws.commons.axiom:axiom-api:jar</include>
+ <include>org.apache.ws.commons.axiom:axiom-dom:jar</include>
+ <include>org.apache.ws.commons.axiom:axiom-impl:jar</include>
+ </includes>
+ </dependencySet>
+ <dependencySet>
+ <outputFileNameMapping>${artifactId}-${annogen.version}.${extension}</outputFileNameMapping>
+ <outputDirectory>lib</outputDirectory>
+ <includes>
+ <include>annogen:annogen:jar</include>
+ </includes>
+ </dependencySet>
+ <dependencySet>
+ <outputFileNameMapping>${artifactId}-${commons.logging.version}.${extension}</outputFileNameMapping>
+ <outputDirectory>lib</outputDirectory>
+ <includes>
+ <include>commons-logging:commons-logging:jar</include>
+ </includes>
+ </dependencySet>
+ <dependencySet>
+ <outputFileNameMapping>${artifactId}-${version}.${extension}</outputFileNameMapping>
+ <outputDirectory>lib</outputDirectory>
+ <includes>
+ <include>org.apache.axis2:axis2:jar</include>
+ </includes>
+ </dependencySet>
+ <dependencySet>
+ <outputFileNameMapping>${artifactId}-${stax.impl.version}.${extension}</outputFileNameMapping>
+ <outputDirectory>lib</outputDirectory>
+ <includes>
+ <include>org.codehaus.woodstox:wstx-asl:jar</include>
+ </includes>
+ </dependencySet>
+ <dependencySet>
+ <outputFileNameMapping>${artifactId}-${neethi.version}.${extension}</outputFileNameMapping>
+ <outputDirectory>lib</outputDirectory>
+ <includes>
+ <include>org.apache.neethi:neethi:jar</include>
+ </includes>
+ </dependencySet>
+ <dependencySet>
+ <outputFileNameMapping>${artifactId}-${stax.api.version}.${extension}</outputFileNameMapping>
+ <outputDirectory>lib</outputDirectory>
+ <includes>
+ <include>stax:stax-api:jar</include>
+ </includes>
+ </dependencySet>
+ <dependencySet>
+ <outputFileNameMapping>${artifactId}-${wsdl4j.version}.${extension}</outputFileNameMapping>
+ <outputDirectory>lib</outputDirectory>
+ <includes>
+ <include>wsdl4j:wsdl4j:jar</include>
+ </includes>
+ </dependencySet>
+ <dependencySet>
+ <outputFileNameMapping>${artifactId}-${xbean.version}.${extension}</outputFileNameMapping>
+ <outputDirectory>lib</outputDirectory>
+ <includes>
+ <include>xmlbeans:xbean:jar</include>
+ </includes>
+ </dependencySet>
+ <dependencySet>
+ <outputFileNameMapping>${artifactId}-${xmlschema.version}.${extension}</outputFileNameMapping>
+ <outputDirectory>lib</outputDirectory>
+ <includes>
+ <include>org.apache.ws.commons.schema:XmlSchema:jar</include>
+ </includes>
+ </dependencySet>
+ <dependencySet>
+ <outputFileNameMapping>${artifactId}-${log4j.version}.${extension}</outputFileNameMapping>
+ <outputDirectory>lib</outputDirectory>
+ <includes>
+ <include>log4j:log4j:jar</include>
+ </includes>
+ </dependencySet>
+ <dependencySet>
+ <outputFileNameMapping>${artifactId}-${woden.version}.${extension}</outputFileNameMapping>
+ <outputDirectory>lib</outputDirectory>
+ <includes>
+ <include>org.apache.woden:woden:jar</include>
+ </includes>
+ </dependencySet>
+ <dependencySet>
+ <outputFileNameMapping>${artifactId}-${commons.httpclient.version}.${extension}</outputFileNameMapping>
+ <outputDirectory>lib</outputDirectory>
+ <includes>
+ <include>commons-httpclient:commons-httpclient:jar</include>
+ </includes>
+ </dependencySet>
+ <dependencySet>
+ <outputFileNameMapping>${artifactId}-${commons.codec.version}.${extension}</outputFileNameMapping>
+ <outputDirectory>lib</outputDirectory>
+ <includes>
+ <include>commons-codec:commons-codec:jar</include>
+ </includes>
+ </dependencySet>
+ <dependencySet>
+ <outputFileNameMapping>${artifactId}-${jibx.version}.${extension}</outputFileNameMapping>
+ <outputDirectory>lib</outputDirectory>
+ <includes>
+ <include>jibx:jibx-bind:jar</include>
+ <include>jibx:jibx-run:jar</include>
+ </includes>
+ </dependencySet>
+ <dependencySet>
+ <outputFileNameMapping>${artifactId}-${ant.version}.${extension}</outputFileNameMapping>
+ <outputDirectory>lib</outputDirectory>
+ <includes>
+ <include>org.apache.ant:ant:jar</include>
+ </includes>
+ </dependencySet>
</dependencySets>
</assembly>
Modified: webservices/axis2/branches/java/jaxws21/modules/tool/axis2-eclipse-codegen-plugin/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/tool/axis2-eclipse-codegen-plugin/pom.xml?rev=572740&r1=572739&r2=572740&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/tool/axis2-eclipse-codegen-plugin/pom.xml (original)
+++ webservices/axis2/branches/java/jaxws21/modules/tool/axis2-eclipse-codegen-plugin/pom.xml Tue Sep 4 10:11:13 2007
@@ -268,6 +268,14 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.4</source>
+ <target>1.4</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>${maven.assembly.version}</version>
<executions>
Modified: webservices/axis2/branches/java/jaxws21/modules/tool/axis2-eclipse-codegen-plugin/src/main/java/org/apache/axis2/tool/codegen/eclipse/CodeGenWizard.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/tool/axis2-eclipse-codegen-plugin/src/main/java/org/apache/axis2/tool/codegen/eclipse/CodeGenWizard.java?rev=572740&r1=572739&r2=572740&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/tool/axis2-eclipse-codegen-plugin/src/main/java/org/apache/axis2/tool/codegen/eclipse/CodeGenWizard.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/tool/axis2-eclipse-codegen-plugin/src/main/java/org/apache/axis2/tool/codegen/eclipse/CodeGenWizard.java Tue Sep 4 10:11:13 2007
@@ -439,7 +439,7 @@
} catch (Throwable e) {
-
+ e.printStackTrace();
throw new RuntimeException(e);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org