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 pr...@apache.org on 2007/06/17 14:11:57 UTC

svn commit: r548033 [10/11] - in /webservices/axis2/branches/java/jaxws21: ./ etc/ modules/adb-codegen/ modules/adb-codegen/src/org/apache/axis2/schema/ modules/adb-codegen/src/org/apache/axis2/schema/template/ modules/adb-codegen/src/org/apache/axis2/...

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/server/AxisHttpService.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/server/AxisHttpService.java?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/server/AxisHttpService.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/server/AxisHttpService.java Sun Jun 17 05:11:16 2007
@@ -117,16 +117,15 @@
         MessageContext msgContext = configurationContext.createMessageContext();
         msgContext.setIncomingTransportName(Constants.TRANSPORT_HTTP);
 
-        if (conn instanceof HttpInetConnection) {
-            HttpInetConnection inetconn = (HttpInetConnection) conn;
+        if (conn != null) {
             msgContext.setProperty(MessageContext.REMOTE_ADDR,
-                                   inetconn.getRemoteAddress().getHostAddress());
+                                   conn.getRemoteAddress().getHostAddress());
             msgContext.setProperty(MessageContext.TRANSPORT_ADDR,
-                                   inetconn.getLocalAddress().getHostAddress());
+                                   conn.getLocalAddress().getHostAddress());
 
             if (LOG.isDebugEnabled()) {
                 LOG.debug("Remote address of the connection : " +
-                          inetconn.getRemoteAddress().getHostAddress());
+                          conn.getRemoteAddress().getHostAddress());
             }
         }
 
@@ -261,6 +260,7 @@
             msgContext.setProperty(RequestResponseTransport.TRANSPORT_CONTROL,
                                    new SimpleHTTPRequestResponseTransport());
 
+
             this.worker.service(request, response, msgContext);
         } catch (SocketException ex) {
             // Socket is unreliable. 
@@ -270,8 +270,6 @@
             throw ex;
         } catch (Throwable e) {
 
-            AxisEngine engine = new AxisEngine(this.configurationContext);
-
             msgContext.setProperty(MessageContext.TRANSPORT_OUT,
                                    response.getOutputStream());
             msgContext.setProperty(Constants.OUT_TRANSPORT_INFO,
@@ -297,7 +295,7 @@
                     response.sendError(HttpStatus.SC_INTERNAL_SERVER_ERROR, "Internal server error");
                 }
             }
-            engine.sendFault(faultContext);
+            AxisEngine.sendFault(faultContext);
         }
     }
 

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/server/HttpUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/server/HttpUtils.java?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/server/HttpUtils.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/server/HttpUtils.java Sun Jun 17 05:11:16 2007
@@ -28,6 +28,9 @@
 package org.apache.axis2.transport.http.server;
 
 import org.apache.axis2.transport.http.HTTPConstants;
+import org.apache.axis2.transport.TransportListener;
+import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.axis2.description.Parameter;
 import org.apache.http.Header;
 
 import java.net.InetAddress;
@@ -84,6 +87,23 @@
         }
 
         return address;
+    }
+
+    /**
+     * First check whether the hostname parameter is there in AxisConfiguration (axis2.xml) ,
+     * if it is there then this will retun that as the host name , o.w will return the IP address.
+     */
+    public static String getIpAddress(AxisConfiguration axisConfiguration) throws SocketException {
+        if(axisConfiguration!=null){
+            Parameter param = axisConfiguration.getParameter(TransportListener.HOST_ADDRESS);
+            if (param != null) {
+                String  hostAddress = ((String) param.getValue()).trim();
+                if(hostAddress!=null){
+                    return hostAddress;
+                }
+            }
+        }
+        return getIpAddress();
     }
 
     private static boolean isIP(String hostAddress) {

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/local/LocalTransportReceiver.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/local/LocalTransportReceiver.java?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/local/LocalTransportReceiver.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/local/LocalTransportReceiver.java Sun Jun 17 05:11:16 2007
@@ -21,6 +21,8 @@
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.Constants;
+import org.apache.axis2.util.Utils;
+import org.apache.axis2.util.MessageContextBuilder;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.builder.BuilderUtil;
 import org.apache.axis2.context.ConfigurationContext;
@@ -48,37 +50,51 @@
         this.sender = sender;
     }
 
-    public void processMessage(InputStream in, EndpointReference to, String action) throws AxisFault {
+    public void processMessage(InputStream in, EndpointReference to, String action)
+            throws AxisFault {
+        MessageContext msgCtx = confContext.createMessageContext();
+        TransportInDescription tIn = confContext.getAxisConfiguration().getTransportIn(
+                Constants.TRANSPORT_LOCAL);
+        TransportOutDescription tOut = confContext.getAxisConfiguration().getTransportOut(
+                Constants.TRANSPORT_LOCAL);
         try {
-            TransportInDescription tIn = confContext.getAxisConfiguration().getTransportIn(
-                    Constants.TRANSPORT_LOCAL);
-            TransportOutDescription tOut = confContext.getAxisConfiguration().getTransportOut(
-                    Constants.TRANSPORT_LOCAL);
 
             tOut.setSender(new LocalResponder(sender));
 
-            MessageContext msgCtx = confContext.createMessageContext();
             msgCtx.setTransportIn(tIn);
             msgCtx.setTransportOut(tOut);
+            msgCtx.setProperty(MessageContext.TRANSPORT_OUT, sender.getResponse());
 
             msgCtx.setTo(to);
             msgCtx.setWSAAction(action);
             msgCtx.setServerSide(true);
-            msgCtx.setProperty(MessageContext.TRANSPORT_OUT, sender.getResponse());
 
             InputStreamReader streamReader = new InputStreamReader(in);
-            OMXMLParserWrapper builder = BuilderUtil.getBuilder(streamReader);
+            OMXMLParserWrapper builder;
+            try {
+                builder = BuilderUtil.getBuilder(streamReader);
+            } catch (XMLStreamException e) {
+                throw AxisFault.makeFault(e);
+            }
             SOAPEnvelope envelope = (SOAPEnvelope) builder.getDocumentElement();
 
             msgCtx.setEnvelope(envelope);
 
-            AxisEngine engine = new AxisEngine(confContext);
-
-            engine.receive(msgCtx);
-        } catch (XMLStreamException e) {
-            throw AxisFault.makeFault(e);
-        } catch (FactoryConfigurationError e) {
-            throw AxisFault.makeFault(e);
+            AxisEngine.receive(msgCtx);
+        } catch (AxisFault e) {
+            // write the fault back.
+            try {
+                MessageContext faultContext =
+                        MessageContextBuilder.createFaultMessageContext(msgCtx, e);
+                
+                faultContext.setTransportOut(tOut);
+                faultContext.setProperty(MessageContext.TRANSPORT_OUT, sender.getResponse());
+
+                AxisEngine.sendFault(faultContext);
+            } catch (AxisFault axisFault) {
+                // can't handle this, so just throw it
+                throw axisFault;
+            }
         }
     }
 }

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/tcp/TCPServer.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/tcp/TCPServer.java?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/tcp/TCPServer.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/tcp/TCPServer.java Sun Jun 17 05:11:16 2007
@@ -202,7 +202,7 @@
         }
         if (ip == null) {
             try {
-                ip = HttpUtils.getIpAddress();
+                ip = HttpUtils.getIpAddress(configContext.getAxisConfiguration());
             } catch (SocketException e) {
                 throw AxisFault.makeFault(e);
             }

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/CallbackReceiver.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/CallbackReceiver.java?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/CallbackReceiver.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/CallbackReceiver.java Sun Jun 17 05:11:16 2007
@@ -18,6 +18,7 @@
 
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axiom.soap.SOAPFault;
+import org.apache.axiom.om.OMException;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.addressing.RelatesTo;
 import org.apache.axis2.client.async.AsyncResult;
@@ -46,7 +47,7 @@
     }
 
     public Callback lookupCallback(String msgID) {
-        return (Callback) callbackStore.get(msgID);
+        return (Callback) callbackStore.remove(msgID);
     }
 
     public void receive(MessageContext messageCtx) throws AxisFault {
@@ -62,23 +63,23 @@
             throw new AxisFault("The Callback realtes to MessageID " + messageID + " is not found");
         }
         
-        try {
             // check weather the result is a fault.
+        try {
             SOAPEnvelope envelope = result.getResponseEnvelope();
-            SOAPFault fault = envelope.getBody().getFault();
-            OperationContext opContext =messageCtx.getOperationContext();
-            if(opContext!=null&&!opContext.isComplete()){
+            OperationContext opContext = messageCtx.getOperationContext();
+            if (opContext != null && !opContext.isComplete()) {
                 opContext.addMessageContext(messageCtx);
             }
-            if (fault == null) {
-                // if there is not fault call the onComplete method
-                callback.onComplete(result);
-            } else {
-                // else call the on error method with the fault
-                AxisFault axisFault = Utils.getInboundFaultFromMessageContext(messageCtx);
+            if (envelope.getBody().hasFault()) {
+                AxisFault axisFault =
+                        Utils.getInboundFaultFromMessageContext(messageCtx);
                 callback.onError(axisFault);
+            } else {
+                callback.onComplete(result);
             }
-        } finally {
+        } catch (Exception e) {
+            callback.onError(e);
+        }  finally {
             callback.setComplete(true);
         }
     }

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/MessageContextBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/MessageContextBuilder.java?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/MessageContextBuilder.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/MessageContextBuilder.java Sun Jun 17 05:11:16 2007
@@ -77,6 +77,8 @@
         newmsgCtx.setTransportIn(inMessageContext.getTransportIn());
         newmsgCtx.setTransportOut(inMessageContext.getTransportOut());
         newmsgCtx.setServerSide(inMessageContext.isServerSide());
+
+        // TODO: Should this be specifying (or defaulting to) the "response" relationshipType??
         newmsgCtx.addRelatesTo(new RelatesTo(inMessageContext.getOptions().getMessageId()));
 
         newmsgCtx.setProperty(AddressingConstants.WS_ADDRESSING_VERSION,
@@ -102,11 +104,6 @@
 
         newmsgCtx.setOperationContext(inMessageContext.getOperationContext());
 
-        ServiceContext serviceContext = inMessageContext.getServiceContext();
-        if (serviceContext != null) {
-            newmsgCtx.setServiceContext(serviceContext);
-        }
-
         newmsgCtx.setProperty(MessageContext.TRANSPORT_OUT,
                               inMessageContext.getProperty(MessageContext.TRANSPORT_OUT));
         newmsgCtx.setProperty(Constants.OUT_TRANSPORT_INFO,
@@ -253,17 +250,11 @@
         // Create a basic response MessageContext with basic fields copied
         MessageContext faultContext = createResponseMessageContext(processingContext);
 
-        String contentType = (String) processingContext
-                .getProperty(Constants.Configuration.CONTENT_TYPE_OF_FAULT);
-        if (contentType != null) {
-            faultContext.setProperty(Constants.Configuration.CONTENT_TYPE, contentType);
-        }
-
         // Register the fault message context
-        if (processingContext.getAxisOperation() != null &&
-                processingContext.getOperationContext() != null) {
-            processingContext.getAxisOperation()
-                    .addFaultMessageContext(faultContext, processingContext.getOperationContext());
+        OperationContext operationContext = processingContext.getOperationContext();
+        if (operationContext != null) {
+            processingContext.getAxisOperation().addFaultMessageContext(faultContext,
+                                                                        operationContext);
         }
 
         faultContext.setProcessingFault(true);
@@ -271,30 +262,34 @@
         // Set wsa:Action for response message
         
         // Use specified value if available
-        AxisOperation op = processingContext.getAxisOperation();
-        if (op != null && op.getFaultAction() != null) {
-            faultContext.setWSAAction(op.getFaultAction());
-        } else { //If, for some reason there is no value set, should use a sensible action.
-            faultContext.setWSAAction(Final.WSA_SOAP_FAULT_ACTION);
-        }
-        // override if the fault action has been set in the AxisFault
-        if (e instanceof AxisFault) {
-        	if(((AxisFault)e).getFaultAction() != null){
-        		faultContext.setWSAAction(((AxisFault)e).getFaultAction());
-        	}
+
+        String faultAction = (e instanceof AxisFault) ? ((AxisFault)e).getFaultAction() : null;
+
+        if (faultAction == null) {
+            AxisOperation op = processingContext.getAxisOperation();
+            if (op != null && op.getFaultAction() != null) {
+                // TODO: Should the op be able to pick a fault action based on the fault?
+                faultAction = op.getFaultAction();
+            } else { //If, for some reason there is no value set, should use a sensible action.
+                faultAction = Final.WSA_SOAP_FAULT_ACTION;
+            }
         }
 
+        faultContext.setWSAAction(faultAction);
+
         // there are some information  that the fault thrower wants to pass to the fault path.
         // Means that the fault is a ws-addressing one hence use the ws-addressing fault action.
         Object faultInfoForHeaders =
                 processingContext.getProperty(Constants.FAULT_INFORMATION_FOR_HEADERS);
         if (faultInfoForHeaders != null) {
             faultContext.setProperty(Constants.FAULT_INFORMATION_FOR_HEADERS, faultInfoForHeaders);
+
+            // Note that this overrides any action set above
             faultContext.setWSAAction(Final.WSA_FAULT_ACTION);
         }
 
-        // if the exception is due to a problem in the faultTo header itself, we can not use those
-        // fault informatio to send the error. Try to send using replyTo, leave it to transport
+        // if the exception is due to a problem in the faultTo header itself, we can not use that
+        // fault information to send the error. Try to send using replyTo, else leave it to transport
         boolean shouldSendFaultToFaultTo =
                 AddressingHelper.shouldSendFaultToFaultTo(processingContext);
         EndpointReference faultTo = processingContext.getFaultTo();
@@ -331,6 +326,7 @@
         faultContext.setEnvelope(envelope);
 
         //get the SOAP headers, user is trying to send in the fault
+        // TODO: Rationalize this mechanism a bit - maybe headers should live in the fault?
         List soapHeadersList =
                 (List) processingContext.getProperty(SOAPConstants.HEADER_LOCAL_NAME);
         if (soapHeadersList != null) {
@@ -341,6 +337,7 @@
             }
         }
 
+        // TODO: Transport-specific stuff in here?  Why?  Is there a better way?
         // now add HTTP Headers
         faultContext.setProperty(HTTPConstants.HTTP_HEADERS,
                                  processingContext.getProperty(HTTPConstants.HTTP_HEADERS));
@@ -428,12 +425,12 @@
         SOAPProcessingException soapException = null;
         AxisFault axisFault = null;
 
-        if (e != null) {
-            if (e instanceof AxisFault) {
-                axisFault = (AxisFault) e;
-            } else if (e.getCause() instanceof AxisFault) {
-                axisFault = (AxisFault) e.getCause();
-            }
+        if (e == null) return envelope;
+
+        if (e instanceof AxisFault) {
+            axisFault = (AxisFault) e;
+        } else if (e.getCause() instanceof AxisFault) {
+            axisFault = (AxisFault) e.getCause();
         }
 
         if (axisFault != null) {
@@ -450,8 +447,6 @@
             if (axisFault.getCause() instanceof SOAPProcessingException) {
                 soapException = (SOAPProcessingException) axisFault.getCause();
             }
-        } else {
-            // we have recd an instance of just the Exception class
         }
 
         // user can set the fault information to the message context or to the AxisFault itself.
@@ -460,7 +455,6 @@
         Object faultCode = context.getProperty(SOAP12Constants.SOAP_FAULT_CODE_LOCAL_NAME);
         String soapFaultCode = "";
 
-
         if (faultCode != null) {
             fault.setCode((SOAPFaultCode) faultCode);
         } else if (soapException != null) {
@@ -502,46 +496,36 @@
         if(faultCode == null && !context.isSOAP11()){
             fault.getCode().getValue().setText(soapFaultCode);
         }
-        Object faultReason = context.getProperty(SOAP12Constants.SOAP_FAULT_REASON_LOCAL_NAME);
-        String message = "";
+        SOAPFaultReason faultReason = (SOAPFaultReason)context.getProperty(
+                                            SOAP12Constants.SOAP_FAULT_REASON_LOCAL_NAME);
 
+        if (faultReason == null && axisFault != null) {
+            faultReason = axisFault.getFaultReasonElement();
+        }
         if (faultReason != null) {
-            fault.setReason((SOAPFaultReason) faultReason);
-            if(context.isSOAP11()) {
-                message = fault.getReason().getText();
-            } else {
-                message = fault.getReason().getFirstSOAPText().getText();
-            }
-        } else if (soapException != null) {
-            message = soapException.getMessage();
-        } else if (axisFault != null) {
-            if (axisFault.getFaultReasonElement() != null) {
-                fault.setReason(axisFault.getFaultReasonElement());
-            } else {
+            fault.setReason(faultReason);
+        } else {
+            String message = "";
+            if (soapException != null) {
+                message = soapException.getMessage();
+            } else if (axisFault != null) {
+                // Couldn't find FaultReasonElement, try reason string
                 message = axisFault.getReason();
-                if (message == null || "".equals(message)) {
-                    message = getFaultReasonFromException(e, context);
-                }
             }
-        }  else {
-            if (e != null && (message == null || "".equals(message))) {
+
+            if (message == null || "".equals(message)) {
                 message = getFaultReasonFromException(e, context);
             }
-        }
 
-        // defaulting to reason, unknown, if no reason is available
-        if (faultReason == null) {
-            message = ("".equals(message) || (message == null))
-                    ? "unknown"
-                    : message;
-            if(context.isSOAP11()) {
+            if (message == null || "".equals(message)) message = "unknown";
+
+            if (context.isSOAP11()) {
                 fault.getReason().setText(message);
             } else {
                 fault.getReason().getFirstSOAPText().setLang("en-US");
                 fault.getReason().getFirstSOAPText().setText(message);
             }
         }
-
 
         Object faultRole = context.getProperty(SOAP12Constants.SOAP_FAULT_ROLE_LOCAL_NAME);
         if (faultRole != null) {

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/Utils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/Utils.java?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/Utils.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/Utils.java Sun Jun 17 05:11:16 2007
@@ -33,6 +33,7 @@
 import org.apache.axis2.description.AxisServiceGroup;
 import org.apache.axis2.description.Flow;
 import org.apache.axis2.description.HandlerDescription;
+import org.apache.axis2.description.InOnlyAxisOperation;
 import org.apache.axis2.description.InOutAxisOperation;
 import org.apache.axis2.description.OutInAxisOperation;
 import org.apache.axis2.description.Parameter;
@@ -88,6 +89,26 @@
                                             className,
                                             opName);
     }
+    
+    
+    public static AxisService createSimpleInOnlyService(QName serviceName,
+            MessageReceiver messageReceiver,
+            QName opName)
+        throws AxisFault {
+        AxisService service = new AxisService(serviceName.getLocalPart());
+        service.setClassLoader(Thread.currentThread().getContextClassLoader());
+        
+        AxisOperation axisOp = new InOnlyAxisOperation(opName);
+        
+        axisOp.setMessageReceiver(messageReceiver);
+        axisOp.setStyle(WSDLConstants.STYLE_RPC);
+        service.addOperation(axisOp);
+        service.mapActionToOperation(Constants.AXIS2_NAMESPACE_URI + "/" + opName.getLocalPart(),
+        axisOp);
+        
+        return service;
+    }
+    
 
     public static AxisService createSimpleService(QName serviceName,
                                                   MessageReceiver messageReceiver, String className,
@@ -223,14 +244,16 @@
     }
 
     /**
-     * To get the name of the module , where archive name is combination of module name + its version
-     * The format of the module version will be like follow
-     * moduleName-00.0000 as an exmple addressing-01.0001.aar
+     * Get the name of the module , where archive name is combination of module name + its version
+     * The format of the name is as follows:
+     *   moduleName-00.0000
+     * Example: "addressing-01.0001.mar" would return "addressing"
+     * @param moduleName the name of the module archive
+     * @return the module name parsed out of the file name
      */
-
     public static String getModuleName(String moduleName) {
-        char version_seperator = '-';
-        int version_index = moduleName.lastIndexOf(version_seperator);
+        char delimiter = '-';
+        int version_index = moduleName.lastIndexOf(delimiter);
         if (version_index > 0) {
             return moduleName.substring(0, version_index);
         } else {

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/WSDLSerializationUtil.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/WSDLSerializationUtil.java?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/WSDLSerializationUtil.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/WSDLSerializationUtil.java Sun Jun 17 05:11:16 2007
@@ -227,8 +227,9 @@
     public static OMElement generateHTTPBinding(OMFactory fac, AxisService axisService,
                                                 OMNamespace wsdl, OMNamespace whttp, OMNamespace tns) {
         OMElement binding = fac.createOMElement(WSDL2Constants.BINDING_LOCAL_NAME, wsdl);
+        String serviceName = axisService.getName();
         binding.addAttribute(
-                fac.createOMAttribute(WSDL2Constants.ATTRIBUTE_NAME, null, axisService.getName() +
+                fac.createOMAttribute(WSDL2Constants.ATTRIBUTE_NAME, null, serviceName +
                         Java2WSDLConstants.HTTP_BINDING));
         binding.addAttribute(fac.createOMAttribute(WSDL2Constants.INTERFACE_LOCAL_NAME, null, tns
                 .getPrefix() + ":" + WSDL2Constants.DEFAULT_INTERFACE_NAME));
@@ -244,7 +245,7 @@
             opElement.addAttribute(fac.createOMAttribute(WSDL2Constants.ATTRIBUTE_REF, null,
                                                          tns.getPrefix() + ":" + name));
             opElement.addAttribute(fac.createOMAttribute(WSDL2Constants.ATTRIBUTE_LOCATION, whttp,
-                                                         name));
+                                                         serviceName + "/" + name));
         }
         return binding;
     }
@@ -287,9 +288,6 @@
         for (int i = 0; i < eprs.length; i++) {
             String name = "";
             String epr = eprs[i];
-            if (!epr.endsWith("/")) {
-                epr = epr + "/";
-            }
             if (epr.startsWith("https://")) {
                 name = WSDL2Constants.DEFAULT_HTTPS_PREFIX;
             }

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/test-resources/deployment/CustomDeployerRepo/axis2.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/test-resources/deployment/CustomDeployerRepo/axis2.xml?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/test-resources/deployment/CustomDeployerRepo/axis2.xml (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/test-resources/deployment/CustomDeployerRepo/axis2.xml Sun Jun 17 05:11:16 2007
@@ -109,7 +109,7 @@
     </messageFormatters>
 
     <!-- Test custom deployment by registering for "svc" files, and the "widgets" dir -->
-    <deployer extension="svc" directory="widgets"
+    <deployer extension=".svc" directory="widgets"
             class="org.apache.axis2.deployment.deployers.CustomDeployer"/>
 
     <!-- ================================================= -->

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/test/org/apache/axis2/ModuleHandler1.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/test/org/apache/axis2/ModuleHandler1.java?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/test/org/apache/axis2/ModuleHandler1.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/test/org/apache/axis2/ModuleHandler1.java Sun Jun 17 05:11:16 2007
@@ -22,7 +22,7 @@
 *
 */
 
-public class ModuleHandler1 extends AbstractHandler implements Handler {
+public class ModuleHandler1 extends AbstractHandler  {
     private static final Log log = LogFactory.getLog(ModuleHandler1 .class);
     private String message;
     private String name;

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/test/org/apache/axis2/deployment/CustomDeployerTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/test/org/apache/axis2/deployment/CustomDeployerTest.java?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/test/org/apache/axis2/deployment/CustomDeployerTest.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/test/org/apache/axis2/deployment/CustomDeployerTest.java Sun Jun 17 05:11:16 2007
@@ -32,7 +32,7 @@
         // OK, let's see what we've got here...
         assertTrue("Init was not called", CustomDeployer.initCalled);
         assertEquals("Wrong directory", "widgets", CustomDeployer.directory);
-        assertEquals("Wrong extension", "svc", CustomDeployer.extension);
+        assertEquals("Wrong extension", ".svc", CustomDeployer.extension);
         assertEquals("Wrong number of deployed items", 2, CustomDeployer.deployedItems);
         assertTrue("George wasn't found", CustomDeployer.georgeDeployed);
         assertTrue("Mary wasn't found", CustomDeployer.maryDeployed);

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/test/org/apache/axis2/deployment/ModuleversionTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/test/org/apache/axis2/deployment/ModuleversionTest.java?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/test/org/apache/axis2/deployment/ModuleversionTest.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/test/org/apache/axis2/deployment/ModuleversionTest.java Sun Jun 17 05:11:16 2007
@@ -75,21 +75,21 @@
         boolean found2 = false;
         boolean found3 = false;
         while (engageModules.hasNext()) {
-            String qName = (String) engageModules.next();
+            String qName = ((AxisModule) engageModules.next()).getName();
             if (qName.equals("Module2-0.95")) {
                 found1 = true;
             }
         }
         engageModules = axiConfiguration.getEngagedModules().iterator();
         while (engageModules.hasNext()) {
-            String name = (String) engageModules.next();
+            String name = ((AxisModule) engageModules.next()).getName();
             if (name.equals("Module1")) {
                 found2 = true;
             }
         }
         engageModules = axiConfiguration.getEngagedModules().iterator();
         while (engageModules.hasNext()) {
-            String qName = (String) engageModules.next();
+            String qName = ((AxisModule) engageModules.next()).getName();
             if (qName.equals("testModule-1.93")) {
                 found3 = true;
             }

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/test/org/apache/axis2/engine/MessageContextChangeTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/test/org/apache/axis2/engine/MessageContextChangeTest.java?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/test/org/apache/axis2/engine/MessageContextChangeTest.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/test/org/apache/axis2/engine/MessageContextChangeTest.java Sun Jun 17 05:11:16 2007
@@ -60,8 +60,7 @@
             new FieldDescription("boolean", "newThreadRequired"),
             new FieldDescription("boolean", "isSOAP11"),
             new FieldDescription("java.util.ArrayList", "executionChain"),
-            new FieldDescription("java.util.LinkedList", "inboundExecutedPhases"),
-            new FieldDescription("java.util.LinkedList", "outboundExecutedPhases"),
+            new FieldDescription("java.util.LinkedList", "executedPhases"),
             new FieldDescription("boolean", "doingREST"),
             new FieldDescription("boolean", "doingMTOM"),
             new FieldDescription("boolean", "doingSwA"),
@@ -94,8 +93,7 @@
             new FieldDescription("int", "selfManagedDataHandlerCount"),
             new FieldDescription("java.util.ArrayList", "selfManagedDataListHolder"),
             new FieldDescription("java.util.ArrayList", "metaExecutionChain"),
-            new FieldDescription("java.util.LinkedList", "metaInboundExecuted"),
-            new FieldDescription("java.util.LinkedList", "metaOutboundExecuted"),
+            new FieldDescription("java.util.LinkedList", "metaExecuted"),
             new FieldDescription("int", "metaHandlerIndex"),
             new FieldDescription("int", "metaPhaseIndex"),
             new FieldDescription("org.apache.axis2.util.MetaDataEntry", "metaAxisOperation"),
@@ -105,8 +103,7 @@
             new FieldDescription("org.apache.axis2.util.MetaDataEntry", "metaTransportIn"),
             new FieldDescription("org.apache.axis2.util.MetaDataEntry", "metaAxisMessage"),
             new FieldDescription("boolean", "reconcileAxisMessage"),
-            new FieldDescription("boolean", "inboundReset"),
-            new FieldDescription("boolean", "outboundReset"),
+            new FieldDescription("boolean", "executedPhasesReset"),
             new FieldDescription("java.lang.String", "selfManagedDataDelimiter"),
             new FieldDescription("java.lang.Class",
                                  "class$org$apache$axis2$context$MessageContext"),

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/test/org/apache/axis2/engine/MessageContextSaveATest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/test/org/apache/axis2/engine/MessageContextSaveATest.java?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/test/org/apache/axis2/engine/MessageContextSaveATest.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/test/org/apache/axis2/engine/MessageContextSaveATest.java Sun Jun 17 05:11:16 2007
@@ -683,8 +683,8 @@
                 assertTrue(comparesOk);
 
                 // check executed list
-                Iterator restored_executed_it = restoredSimpleMsg.getInboundExecutedPhases();
-                Iterator orig_executed_it = simpleMsg.getInboundExecutedPhases();
+                Iterator restored_executed_it = restoredSimpleMsg.getExecutedPhases();
+                Iterator orig_executed_it = simpleMsg.getExecutedPhases();
                 if ((restored_executed_it != null) && (orig_executed_it != null)) {
                     while (restored_executed_it.hasNext() && orig_executed_it.hasNext()) {
                         Object p1 = restored_executed_it.next();
@@ -832,8 +832,8 @@
                 assertTrue(comparesOk);
 
                 // check executed list
-                Iterator restored_executed_it = restoredSimpleMsg.getInboundExecutedPhases();
-                Iterator orig_executed_it = simpleMsg.getInboundExecutedPhases();
+                Iterator restored_executed_it = restoredSimpleMsg.getExecutedPhases();
+                Iterator orig_executed_it = simpleMsg.getExecutedPhases();
                 if ((restored_executed_it != null) && (orig_executed_it != null)) {
                     while (restored_executed_it.hasNext() && orig_executed_it.hasNext()) {
                         Object p1 = restored_executed_it.next();
@@ -1240,8 +1240,8 @@
                         assertTrue(comparesOk);
 
                         // check executed list
-                        Iterator restored_executed_it = msgContext2.getInboundExecutedPhases();
-                        Iterator orig_executed_it = msgContext.getInboundExecutedPhases();
+                        Iterator restored_executed_it = msgContext2.getExecutedPhases();
+                        Iterator orig_executed_it = msgContext.getExecutedPhases();
                         if ((restored_executed_it != null) && (orig_executed_it != null)) {
                             while (restored_executed_it.hasNext() && orig_executed_it.hasNext()) {
                                 Object p1 = restored_executed_it.next();

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/test/org/apache/axis2/engine/ModuleEngageTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/test/org/apache/axis2/engine/ModuleEngageTest.java?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/test/org/apache/axis2/engine/ModuleEngageTest.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/test/org/apache/axis2/engine/ModuleEngageTest.java Sun Jun 17 05:11:16 2007
@@ -17,32 +17,28 @@
 package org.apache.axis2.engine;
 
 import junit.framework.TestCase;
-import org.apache.axis2.AxisFault;
 import org.apache.axis2.AbstractTestCase;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.ModuleHandler1;
 import org.apache.axis2.context.ConfigurationContextFactory;
-import org.apache.axis2.deployment.DeploymentException;
-import org.apache.axis2.description.AxisModule;
-import org.apache.axis2.description.AxisOperation;
-import org.apache.axis2.description.AxisService;
-import org.apache.axis2.phaseresolver.PhaseException;
+import org.apache.axis2.description.*;
 
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamException;
+import java.util.List;
 
 public class ModuleEngageTest extends TestCase {
-    AxisConfiguration ac;
+    AxisConfiguration axisConfig;
 
-    public void testModuleEngageMent() throws PhaseException,
-            DeploymentException,
-            AxisFault,
+    public void testModuleEngagement() throws AxisFault,
             XMLStreamException {
         String filename = AbstractTestCase.basedir + "/target/test-resources/deployment";
-        ac = ConfigurationContextFactory.createConfigurationContextFromFileSystem(filename, null)
+        axisConfig = ConfigurationContextFactory.createConfigurationContextFromFileSystem(filename, null)
                 .getAxisConfiguration();
-        AxisModule module = ac.getModule("module1");
+        AxisModule module = axisConfig.getModule("module1");
         assertNotNull(module);
-        ac.engageModule("module1");
-        AxisService service = ac.getService("service2");
+        axisConfig.engageModule("module1");
+        AxisService service = axisConfig.getService("service2");
         assertNotNull(service);
         AxisOperation moduleOperation = service.getOperation(
                 new QName("creatSeq"));

Modified: webservices/axis2/branches/java/jaxws21/modules/metadata/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/metadata/pom.xml?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/metadata/pom.xml (original)
+++ webservices/axis2/branches/java/jaxws21/modules/metadata/pom.xml Sun Jun 17 05:11:16 2007
@@ -34,6 +34,11 @@
 		</dependency>
 		<dependency>
 			<groupId>org.apache.axis2</groupId>
+			<artifactId>axis2-jws-api</artifactId>
+			<version>${version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.axis2</groupId>
 			<artifactId>axis2-jaxws-api</artifactId>
 			<version>${version}</version>
 		</dependency>

Modified: webservices/axis2/branches/java/jaxws21/modules/metadata/project.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/metadata/project.xml?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/metadata/project.xml (original)
+++ webservices/axis2/branches/java/jaxws21/modules/metadata/project.xml Sun Jun 17 05:11:16 2007
@@ -185,7 +185,12 @@
             <artifactId>axis2-saaj</artifactId>
             <version>${pom.currentVersion}</version>
         </dependency>
-		<dependency>
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2-jws-api</artifactId>
+            <version>${pom.currentVersion}</version>
+        </dependency>
+        <dependency>
             <groupId>org.apache.axis2</groupId>
             <artifactId>axis2-jaxws-api</artifactId>
             <version>${pom.currentVersion}</version>

Modified: webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/EndpointDescription.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/EndpointDescription.java?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/EndpointDescription.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/EndpointDescription.java Sun Jun 17 05:11:16 2007
@@ -97,6 +97,8 @@
      */
     public abstract String getBindingType();
 
+    public abstract void setHandlerChain(HandlerChainsType handlerChain);
+    
     public abstract HandlerChainsType getHandlerChain();
 
     /**

Modified: webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/builder/converter/JavaClassToDBCConverter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/builder/converter/JavaClassToDBCConverter.java?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/builder/converter/JavaClassToDBCConverter.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/builder/converter/JavaClassToDBCConverter.java Sun Jun 17 05:11:16 2007
@@ -1,14 +1,11 @@
 package org.apache.axis2.jaxws.description.builder.converter;
 
-import org.apache.axis2.jaxws.description.builder.BindingTypeAnnot;
-import org.apache.axis2.jaxws.description.builder.DescriptionBuilderComposite;
-import org.apache.axis2.jaxws.description.builder.FieldDescriptionComposite;
-import org.apache.axis2.jaxws.description.builder.MethodDescriptionComposite;
-import org.apache.axis2.jaxws.description.builder.ServiceModeAnnot;
-import org.apache.axis2.jaxws.description.builder.WebFaultAnnot;
-import org.apache.axis2.jaxws.description.builder.WebServiceAnnot;
-import org.apache.axis2.jaxws.description.builder.WebServiceProviderAnnot;
-import org.apache.axis2.jaxws.description.builder.WebServiceRefAnnot;
+import java.lang.reflect.Method;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
 
 import javax.jws.WebService;
 import javax.xml.ws.BindingType;
@@ -18,12 +15,16 @@
 import javax.xml.ws.WebServiceProvider;
 import javax.xml.ws.WebServiceRef;
 import javax.xml.ws.WebServiceRefs;
-import java.lang.reflect.Method;
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
+
+import org.apache.axis2.jaxws.description.builder.BindingTypeAnnot;
+import org.apache.axis2.jaxws.description.builder.DescriptionBuilderComposite;
+import org.apache.axis2.jaxws.description.builder.FieldDescriptionComposite;
+import org.apache.axis2.jaxws.description.builder.MethodDescriptionComposite;
+import org.apache.axis2.jaxws.description.builder.ServiceModeAnnot;
+import org.apache.axis2.jaxws.description.builder.WebFaultAnnot;
+import org.apache.axis2.jaxws.description.builder.WebServiceAnnot;
+import org.apache.axis2.jaxws.description.builder.WebServiceProviderAnnot;
+import org.apache.axis2.jaxws.description.builder.WebServiceRefAnnot;
 
 public class JavaClassToDBCConverter {
 
@@ -52,18 +53,17 @@
         HashMap<String, DescriptionBuilderComposite> dbcMap = new HashMap<String,
                 DescriptionBuilderComposite>();
         for (int i = 0; i < classes.size(); i++) {
-            serviceClass = classes.get(i);
-            DescriptionBuilderComposite composite = new DescriptionBuilderComposite();
-            introspectClass(composite);
-            dbcMap.put(composite.getClassName(), composite);
+            buildDBC(dbcMap, classes.get(i));
             if (seiClassName != null && !seiClassName.equals("")) {
-                DescriptionBuilderComposite seiComposite = new DescriptionBuilderComposite();
                 try {
-                    serviceClass =
+                    Class seiClass =
                             Thread.currentThread().getContextClassLoader().loadClass(seiClassName);
-                    if (serviceClass != null) {
-                        introspectClass(seiComposite);
-                        dbcMap.put(seiComposite.getClassName(), seiComposite);
+                    buildDBC(dbcMap, seiClass);
+                    
+                    // Also try to see if the SEI has any super interfaces  
+                    Class[] interfaces = seiClass.getInterfaces();
+                    for (int j = 0; j < interfaces.length; j++) {
+                        buildDBC(dbcMap, interfaces[i]);                            
                     }
                 }
                 catch (ClassNotFoundException e) {
@@ -77,6 +77,13 @@
         return dbcMap;
     }
 
+    private void buildDBC(HashMap<String, DescriptionBuilderComposite> dbcMap, Class clazz) {
+        serviceClass = clazz;
+        DescriptionBuilderComposite composite = new DescriptionBuilderComposite();
+        introspectClass(composite);
+        dbcMap.put(composite.getClassName(), composite);        
+    }
+    
     /**
      * This method will drive the introspection of the class-level information. It will store the
      * gathered information in the pertinent data members of the <code>DescriptionBuilderComposite</code>

Modified: webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionUtils.java?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionUtils.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionUtils.java Sun Jun 17 05:11:16 2007
@@ -23,10 +23,14 @@
 import static org.apache.axis2.jaxws.description.builder.MDQConstants.CONSTRUCTOR_METHOD;
 import org.apache.axis2.jaxws.description.builder.MethodDescriptionComposite;
 import org.apache.axis2.jaxws.description.builder.WebMethodAnnot;
+import org.apache.axis2.jaxws.description.xml.handler.HandlerChainsType;
 import org.apache.axis2.jaxws.i18n.Messages;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.Unmarshaller;
 import javax.xml.namespace.QName;
 import javax.xml.ws.Response;
 import java.io.IOException;
@@ -42,7 +46,7 @@
 import java.util.concurrent.Future;
 
 /** Utilities used throughout the Description package. */
-class DescriptionUtils {
+public class DescriptionUtils {
     private static final Log log = LogFactory.getLog(DescriptionUtils.class);
 
     static boolean isEmpty(String string) {
@@ -337,5 +341,24 @@
         } else {
             return false;
         }
+    }
+    
+    public static HandlerChainsType loadHandlerChains(InputStream is) {
+        try {
+            // All the classes we need should be part of this package
+            JAXBContext jc = JAXBContext
+                    .newInstance("org.apache.axis2.jaxws.description.xml.handler",
+                                 EndpointDescriptionImpl.class.getClassLoader());
+
+            Unmarshaller u = jc.createUnmarshaller();
+
+            JAXBElement<?> o = (JAXBElement<?>)u.unmarshal(is);
+            return (HandlerChainsType)o.getValue();
+
+        } catch (Exception e) {
+            throw ExceptionFactory
+                    .makeWebServiceException(
+                            "EndpointDescriptionImpl: loadHandlerList: thrown when attempting to unmarshall JAXB content");
+        }       
     }
 }

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?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- 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 Sun Jun 17 05:11:16 2007
@@ -1229,6 +1229,10 @@
     // ANNOTATION: HandlerChain
     // ===========================================
 
+    public void setHandlerChain(HandlerChainsType handlerChain) {
+        handlerChainsType = handlerChain;
+    }
+    
     /**
      * Returns a schema derived java class containing the the handler configuration filel
      *
@@ -1263,28 +1267,13 @@
                 if(is == null) {
                     log.warn("Unable to load handlers from file: " + handlerFileName);                    
                 } else {
-                    try {
-                        // All the classes we need should be part of this package
-                        JAXBContext jc = JAXBContext
-                                .newInstance("org.apache.axis2.jaxws.description.xml.handler",
-                                             this.getClass().getClassLoader());
-    
-                        Unmarshaller u = jc.createUnmarshaller();
-    
-                        JAXBElement<?> o = (JAXBElement<?>)u.unmarshal(is);
-                        handlerChainsType = (HandlerChainsType)o.getValue();
-    
-                    } catch (Exception e) {
-                        throw ExceptionFactory
-                                .makeWebServiceException(
-                                        "EndpointDescriptionImpl: getHandlerList: thrown when attempting to unmarshall JAXB content");
-                    }
+                    handlerChainsType = DescriptionUtils.loadHandlerChains(is);
                 }
             }
         }
         return handlerChainsType;
     }
-
+  
     public HandlerChain getAnnoHandlerChainAnnotation() {
         if (this.handlerChainAnnotation == null) {
             if (getServiceDescriptionImpl().isDBCMap()) {

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?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/parent/pom.xml (original)
+++ webservices/axis2/branches/java/jaxws21/modules/parent/pom.xml Sun Jun 17 05:11:16 2007
@@ -85,7 +85,7 @@
 		<ant.version>1.7.0</ant.version>
 		<antlr.version>2.7.4</antlr.version>
         <activemq.version>4.1.0-incubator</activemq.version>
-        <axiom.version>1.2.3</axiom.version>
+        <axiom.version>SNAPSHOT</axiom.version>
 		<backport.util.concurrent.version>2.2</backport.util.concurrent.version>
 		<bcel.version>5.2</bcel.version>
 		<bcprov.version>jdk13-133</bcprov.version>

Modified: webservices/axis2/branches/java/jaxws21/modules/saaj/src/org/apache/axis2/saaj/SOAPBodyImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/saaj/src/org/apache/axis2/saaj/SOAPBodyImpl.java?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/saaj/src/org/apache/axis2/saaj/SOAPBodyImpl.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/saaj/src/org/apache/axis2/saaj/SOAPBodyImpl.java Sun Jun 17 05:11:16 2007
@@ -497,7 +497,11 @@
         if (qname.getNamespaceURI() == null || "".equals(qname.getNamespaceURI())) {
             childEle = new SOAPBodyElementImpl(
                     (ElementImpl)getOwnerDocument().createElement(qname.getLocalPart()));
-        } else {
+        }else if(null == qname.getPrefix() || "".equals(qname.getPrefix().trim())) {
+            childEle = new SOAPBodyElementImpl(
+                    (ElementImpl)getOwnerDocument().createElementNS(qname.getNamespaceURI(),
+                                                                            qname.getLocalPart()));
+        }else {
             childEle = new SOAPBodyElementImpl(
                     (ElementImpl)getOwnerDocument().createElementNS(qname.getNamespaceURI(),
                                                                     qname.getPrefix() + ":" +

Modified: webservices/axis2/branches/java/jaxws21/modules/saaj/src/org/apache/axis2/saaj/SOAPHeaderImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/saaj/src/org/apache/axis2/saaj/SOAPHeaderImpl.java?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/saaj/src/org/apache/axis2/saaj/SOAPHeaderImpl.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/saaj/src/org/apache/axis2/saaj/SOAPHeaderImpl.java Sun Jun 17 05:11:16 2007
@@ -176,7 +176,7 @@
     public Iterator examineHeaderElements(String actor) {
         Collection elements = new ArrayList();
         for (Iterator iterator = omSOAPHeader.examineHeaderBlocks(actor); iterator.hasNext();) {
-            elements.add(((NodeImpl)iterator.next()).getUserData(SAAJ_NODE));
+            elements.add(toSAAJNode((NodeImpl)iterator.next()));
         }
         return elements.iterator();
     }
@@ -197,7 +197,7 @@
     public Iterator extractHeaderElements(String actor) {
         Collection elements = new ArrayList();
         for (Iterator iterator = omSOAPHeader.extractHeaderBlocks(actor); iterator.hasNext();) {
-            elements.add(((NodeImpl)iterator.next()).getUserData(SAAJ_NODE));
+            elements.add(toSAAJNode((NodeImpl)iterator.next()));
         }
         return elements.iterator();
     }
@@ -215,7 +215,7 @@
         Collection elements = new ArrayList();
         for (Iterator iterator = omSOAPHeader.examineMustUnderstandHeaderBlocks(actor);
              iterator.hasNext();) {
-            elements.add(((NodeImpl)iterator.next()).getUserData(SAAJ_NODE));
+            elements.add(toSAAJNode((NodeImpl)iterator.next()));
         }
         return elements.iterator();
     }
@@ -230,7 +230,7 @@
     public Iterator examineAllHeaderElements() {
         Collection elements = new ArrayList();
         for (Iterator iterator = omSOAPHeader.examineAllHeaderBlocks(); iterator.hasNext();) {
-            elements.add(((NodeImpl)iterator.next()).getUserData(SAAJ_NODE));
+            elements.add(toSAAJNode((NodeImpl)iterator.next()));
         }
         return elements.iterator();
     }
@@ -245,7 +245,7 @@
     public Iterator extractAllHeaderElements() {
         Collection elements = new ArrayList();
         for (Iterator iterator = omSOAPHeader.extractAllHeaderBlocks(); iterator.hasNext();) {
-            elements.add(((NodeImpl)iterator.next()).getUserData(SAAJ_NODE));
+            elements.add(toSAAJNode((NodeImpl)iterator.next()));
         }
         return elements.iterator();
     }

Modified: webservices/axis2/branches/java/jaxws21/modules/saaj/src/org/apache/axis2/saaj/SOAPPartImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/saaj/src/org/apache/axis2/saaj/SOAPPartImpl.java?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/saaj/src/org/apache/axis2/saaj/SOAPPartImpl.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/saaj/src/org/apache/axis2/saaj/SOAPPartImpl.java Sun Jun 17 05:11:16 2007
@@ -15,6 +15,31 @@
  */
 package org.apache.axis2.saaj;
 
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.Iterator;
+
+import javax.xml.soap.MimeHeader;
+import javax.xml.soap.MimeHeaders;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.soap.SOAPPart;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.TransformerFactoryConfigurationError;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
 import org.apache.axiom.attachments.Attachments;
 import org.apache.axiom.om.impl.MTOMConstants;
 import org.apache.axiom.om.util.StAXUtils;
@@ -48,30 +73,6 @@
 import org.w3c.dom.Text;
 import org.w3c.dom.UserDataHandler;
 
-import javax.xml.soap.MimeHeader;
-import javax.xml.soap.MimeHeaders;
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPEnvelope;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.soap.SOAPPart;
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.TransformerFactoryConfigurationError;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.stream.StreamSource;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.Iterator;
-
 public class SOAPPartImpl extends SOAPPart {
 
     private static final Log log = LogFactory.getLog(SOAPPartImpl.class);
@@ -1194,27 +1195,28 @@
     }
 
     public String getValue() {
-        return null;  //TODO - Not yet implemented
-    }        //if(mimeHeaderSet){
+    	//There are no immediate child text nodes to soap part
+        return null;        
+    }        
 
 
     public void setParentElement(SOAPElement parent) throws SOAPException {
-        //TODO - Not yet implemented
+    	throw new SOAPException("Cannot set the parent element of SOAPPart");
     }
 
     public SOAPElement getParentElement() {
-        return null;  //TODO - Not yet implemented
+        return null;  //SOAP part is the root element
     }
 
     public void detachNode() {
-        //TODO - Not yet implemented
+        //nothing to do here
     }
 
     public void recycleNode() {
-        //TODO - Not yet implemented
+        //nothing to do here
     }
 
     public void setValue(String value) {
-        //TODO - Not yet implemented
+    	throw new IllegalStateException("Cannot set value of SOAPPart.");
     }
 }

Modified: webservices/axis2/branches/java/jaxws21/modules/saaj/src/org/apache/axis2/saaj/TextImplEx.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/saaj/src/org/apache/axis2/saaj/TextImplEx.java?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/saaj/src/org/apache/axis2/saaj/TextImplEx.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/saaj/src/org/apache/axis2/saaj/TextImplEx.java Sun Jun 17 05:11:16 2007
@@ -261,6 +261,10 @@
         return textNode.getData();
     }
 
+    public String getNodeValue() {
+        return textNode.getData();
+    }
+
     /**
      * If this is a Text node then this method will set its value, otherwise it sets the value of
      * the immediate (Text) child of this node. The value of the immediate child of this node can be
@@ -272,6 +276,10 @@
      *                               child node or has a child node that is not a Text node
      */
     public void setValue(String value) {
+        textNode.setData(value);
+    }
+
+    public void setNodeValue(String value) {
         textNode.setData(value);
     }
 

Modified: webservices/axis2/branches/java/jaxws21/modules/saaj/test/org/apache/axis2/saaj/SOAPEnvelopeTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/saaj/test/org/apache/axis2/saaj/SOAPEnvelopeTest.java?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/saaj/test/org/apache/axis2/saaj/SOAPEnvelopeTest.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/saaj/test/org/apache/axis2/saaj/SOAPEnvelopeTest.java Sun Jun 17 05:11:16 2007
@@ -545,11 +545,11 @@
         }
     }
 
-    //TODO : check
-    public void _testSetEncodingStyle() throws Exception {
+    public void testSetEncodingStyle() throws Exception {
         SOAPEnvelope envelope = getSOAPEnvelope();
         envelope.setEncodingStyle("http://example.com/MyEncodings");
         assertNotNull(envelope.getEncodingStyle());
+        assertEquals("http://example.com/MyEncodings",envelope.getEncodingStyle());
     }
 
     public void testElementAfterBody() throws Exception {

Modified: webservices/axis2/branches/java/jaxws21/modules/saaj/test/org/apache/axis2/saaj/SOAPPartTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/saaj/test/org/apache/axis2/saaj/SOAPPartTest.java?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/saaj/test/org/apache/axis2/saaj/SOAPPartTest.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/saaj/test/org/apache/axis2/saaj/SOAPPartTest.java Sun Jun 17 05:11:16 2007
@@ -94,10 +94,6 @@
                 while (attrs.hasNext()) {
                     Name attrName = (Name)attrs.next();
                     assertNotNull(attrName);
-                    //System.out.println(indent + " Attribute name is " +
-                    //                   attrName.getQualifiedName());
-                    //System.out.println(indent + " Attribute value is " +
-                    //                   element.getAttributeValue(attrName));
                 }
 
                 Iterator iter2 = element.getChildElements();
@@ -187,5 +183,4 @@
             fail("Unexpected Exception " + e);
         }
     }
-
 }

Modified: webservices/axis2/branches/java/jaxws21/modules/saaj/test/org/apache/axis2/saaj/integration/IntegrationTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/saaj/test/org/apache/axis2/saaj/integration/IntegrationTest.java?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/saaj/test/org/apache/axis2/saaj/integration/IntegrationTest.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/saaj/test/org/apache/axis2/saaj/integration/IntegrationTest.java Sun Jun 17 05:11:16 2007
@@ -67,7 +67,7 @@
                 port +
                 "/axis2/services/Echo";
     }
-
+    
     public static Test suite() {
         return new TestSetup(new TestSuite(IntegrationTest.class)) {
             public void setUp() throws Exception {
@@ -96,6 +96,37 @@
     }
 
 
+    public void testSendReceiveMessageWithEmptyNSPrefix() {
+        try {
+            MessageFactory mf = MessageFactory.newInstance();
+            SOAPMessage request = mf.createMessage();
+
+            SOAPPart sPart = request.getSOAPPart();
+            SOAPEnvelope env = sPart.getEnvelope();
+            SOAPBody body = env.getBody();
+
+            //Namespace prefix is empty
+            body.addBodyElement(new QName("http://fakeNamespace2.org","echo"))
+            							.addTextNode("This is some text");
+
+            SOAPConnection sCon = SOAPConnectionFactory.newInstance().createConnection();
+            SOAPMessage response = sCon.call(request, getAddress());
+            assertFalse(response.getAttachments().hasNext());
+            assertEquals(0, response.countAttachments());
+
+            String requestStr = printSOAPMessage(request);
+            String responseStr = printSOAPMessage(response);
+            assertTrue(responseStr.indexOf("echo") > -1);
+            sCon.close();
+        } catch (SOAPException e) {
+            e.printStackTrace();
+            fail("Unexpected Exception while running test: " + e);
+        } catch (IOException e) {
+            fail("Unexpected Exception while running test: " + e);
+        }
+    }
+    
+    
     public void testSendReceiveSimpleSOAPMessage() {
         try {
             MessageFactory mf = MessageFactory.newInstance();

Modified: webservices/axis2/branches/java/jaxws21/modules/samples/build.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/samples/build.xml?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/samples/build.xml (original)
+++ webservices/axis2/branches/java/jaxws21/modules/samples/build.xml Sun Jun 17 05:11:16 2007
@@ -17,7 +17,7 @@
 
     <property name="jardrop.dir" value="${build.dir}/services"/>
     <property environment="env"/>
-    <property name="AXIS2_HOME" value="${env.AXIS2_HOME}"/>
+    <property name="AXIS2_HOME" value="../.."/>
     <property name="axis.serverJarDrop.dir" value="${AXIS2_HOME}/WEB-INF/services"/>
 
     <property name="conf.dir" value="conf"/>

Modified: webservices/axis2/branches/java/jaxws21/modules/samples/databinding/service/build.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/samples/databinding/service/build.xml?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/samples/databinding/service/build.xml (original)
+++ webservices/axis2/branches/java/jaxws21/modules/samples/databinding/service/build.xml Sun Jun 17 05:11:16 2007
@@ -25,7 +25,7 @@
 			<arg line="-sd"/>
 			<arg line="-o ${target}"/> <!-- Output directory in which to generate files --> <!-- NB it generates to the src folder under this directory!! -->
 			<classpath>
-				<fileset dir="${env.AXIS2_HOME}\lib">
+				<fileset dir="..\..\lib">
 					<include name="*.jar"/>
 				</fileset>
 			</classpath>

Modified: webservices/axis2/branches/java/jaxws21/modules/samples/faulthandling/build.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/samples/faulthandling/build.xml?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/samples/faulthandling/build.xml (original)
+++ webservices/axis2/branches/java/jaxws21/modules/samples/faulthandling/build.xml Sun Jun 17 05:11:16 2007
@@ -1,7 +1,5 @@
 <project name="faulthandling" basedir="." default="generate.service">
 
-    <property environment="env"/>
-
     <property name="wsdl.uri" value="bank.wsdl"/>
     <property name="service.target" value="build/service"/>
     <property name="client.target" value="build/client"/>

Modified: webservices/axis2/branches/java/jaxws21/modules/samples/quickstart/build.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/samples/quickstart/build.xml?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/samples/quickstart/build.xml (original)
+++ webservices/axis2/branches/java/jaxws21/modules/samples/quickstart/build.xml Sun Jun 17 05:11:16 2007
@@ -1,7 +1,7 @@
 <project name="quickstart" basedir="." default="generate.service">
 
     <property environment="env"/>
-    <property name="AXIS2_HOME" value="${env.AXIS2_HOME}"/>
+    <property name="AXIS2_HOME" value="../.."/>
 
     <property name="build.dir" value="build"/>
 

Modified: webservices/axis2/branches/java/jaxws21/modules/samples/quickstartadb/build.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/samples/quickstartadb/build.xml?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/samples/quickstartadb/build.xml (original)
+++ webservices/axis2/branches/java/jaxws21/modules/samples/quickstartadb/build.xml Sun Jun 17 05:11:16 2007
@@ -1,7 +1,7 @@
 <project name="quickstartadb" basedir="." default="generate.service">
 
     <property environment="env"/>
-    <property name="AXIS2_HOME" value="${env.AXIS2_HOME}"/>
+    <property name="AXIS2_HOME" value="../.."/>
 
     <property name="build.dir" value="build"/>
 

Modified: webservices/axis2/branches/java/jaxws21/modules/samples/quickstartaxiom/build.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/samples/quickstartaxiom/build.xml?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/samples/quickstartaxiom/build.xml (original)
+++ webservices/axis2/branches/java/jaxws21/modules/samples/quickstartaxiom/build.xml Sun Jun 17 05:11:16 2007
@@ -1,7 +1,7 @@
 <project name="quickstartaxiom" basedir="." default="generate.service">
 
     <property environment="env"/>
-    <property name="AXIS2_HOME" value="${env.AXIS2_HOME}"/>
+    <property name="AXIS2_HOME" value="../.."/>
 
     <property name="build.dir" value="build"/>
 

Modified: webservices/axis2/branches/java/jaxws21/modules/samples/quickstartjibx/build.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/samples/quickstartjibx/build.xml?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/samples/quickstartjibx/build.xml (original)
+++ webservices/axis2/branches/java/jaxws21/modules/samples/quickstartjibx/build.xml Sun Jun 17 05:11:16 2007
@@ -1,7 +1,7 @@
 <project name="quickstartjibx" basedir="." default="generate.all">
 
     <property environment="env"/>
-    <property name="AXIS2_HOME" value="${env.AXIS2_HOME}"/>
+    <property name="AXIS2_HOME" value="../.."/>
 
     <property name="build.dir" value="build"/>
 

Modified: webservices/axis2/branches/java/jaxws21/modules/samples/quickstartxmlbeans/build.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/samples/quickstartxmlbeans/build.xml?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/samples/quickstartxmlbeans/build.xml (original)
+++ webservices/axis2/branches/java/jaxws21/modules/samples/quickstartxmlbeans/build.xml Sun Jun 17 05:11:16 2007
@@ -1,7 +1,7 @@
 <project name="quickstartxmlbeans" basedir="." default="generate.service">
 
     <property environment="env"/>
-    <property name="AXIS2_HOME" value="${env.AXIS2_HOME}"/>
+    <property name="AXIS2_HOME" value="../.."/>
 
     <property name="build.dir" value="build"/>
 

Modified: webservices/axis2/branches/java/jaxws21/modules/tool/axis2-eclipse-codegen-plugin/src/main/java/org/apache/axis2/tool/core/ServiceFileCreator.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/core/ServiceFileCreator.java?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/tool/axis2-eclipse-codegen-plugin/src/main/java/org/apache/axis2/tool/core/ServiceFileCreator.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/tool/axis2-eclipse-codegen-plugin/src/main/java/org/apache/axis2/tool/core/ServiceFileCreator.java Sun Jun 17 05:11:16 2007
@@ -1,6 +1,6 @@
 package org.apache.axis2.tool.core;
 
-import org.apache.axis2.wsdl.codegen.writer.ClassWriter;
+import org.apache.axis2.wsdl.codegen.writer.FileWriter;
 import org.apache.axis2.wsdl.codegen.writer.ServiceXMLWriter;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
@@ -42,8 +42,8 @@
         String currentUserDir = System.getProperty("user.dir");
         String fileName = "services.xml";
         
-        ClassWriter serviceXmlWriter = new ServiceXMLWriter(currentUserDir);
-        writeClass(getServiceModel(serviceName,implementationClassName,methodList),serviceXmlWriter,fileName);
+        FileWriter serviceXmlWriter = new ServiceXMLWriter(currentUserDir);
+        writeFile(getServiceModel(serviceName,implementationClassName,methodList),serviceXmlWriter,fileName);
 
         return new File(currentUserDir + File.separator + fileName);
 
@@ -84,7 +84,7 @@
      * @throws IOException
      * @throws Exception
      */
-    private void writeClass(Document model, ClassWriter writer,String fileName) throws IOException,Exception {
+    private void writeFile(Document model, FileWriter writer,String fileName) throws IOException,Exception {
         
         Source source = new DOMSource(model);
         ByteArrayOutputStream memoryStream = new ByteArrayOutputStream();

Modified: webservices/axis2/branches/java/jaxws21/modules/tool/axis2-eclipse-service-plugin/src/main/java/org/apache/axis2/tool/core/ServiceFileCreator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/tool/axis2-eclipse-service-plugin/src/main/java/org/apache/axis2/tool/core/ServiceFileCreator.java?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/tool/axis2-eclipse-service-plugin/src/main/java/org/apache/axis2/tool/core/ServiceFileCreator.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/tool/axis2-eclipse-service-plugin/src/main/java/org/apache/axis2/tool/core/ServiceFileCreator.java Sun Jun 17 05:11:16 2007
@@ -1,6 +1,6 @@
 package org.apache.axis2.tool.core;
 
-import org.apache.axis2.wsdl.codegen.writer.ClassWriter;
+import org.apache.axis2.wsdl.codegen.writer.FileWriter;
 import org.apache.axis2.wsdl.codegen.writer.ServiceXMLWriter;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
@@ -42,8 +42,8 @@
         String currentUserDir = System.getProperty("user.dir");
         String fileName = "services.xml";
         
-        ClassWriter serviceXmlWriter = new ServiceXMLWriter(currentUserDir);
-        writeClass(getServiceModel(serviceName,implementationClassName,methodList),serviceXmlWriter,fileName);
+        FileWriter serviceXmlWriter = new ServiceXMLWriter(currentUserDir);
+        writeFile(getServiceModel(serviceName,implementationClassName,methodList),serviceXmlWriter,fileName);
 
         return new File(currentUserDir + File.separator + fileName);
 
@@ -84,7 +84,7 @@
      * @throws IOException
      * @throws Exception
      */
-    private void writeClass(Document model, ClassWriter writer,String fileName) throws IOException,Exception {
+    private void writeFile(Document model, FileWriter writer,String fileName) throws IOException,Exception {
         
         Source source = new DOMSource(model);
         ByteArrayOutputStream memoryStream = new ByteArrayOutputStream();

Modified: webservices/axis2/branches/java/jaxws21/modules/tool/script/axis2.sh
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/tool/script/axis2.sh?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/tool/script/axis2.sh (original)
+++ webservices/axis2/branches/java/jaxws21/modules/tool/script/axis2.sh Sun Jun 17 05:11:16 2007
@@ -35,16 +35,16 @@
 prearg=""
 for arg in "$@"
 do
-   if [ $arg != -classpath ] && [ $arg != -cp ] && [ $prearg != -classpath ] && [ $prearg != -cp  ]
+   if [ "$arg" != -classpath ] && [ "$arg" != -cp ] && [ "$prearg" != -classpath ] && [ "$prearg" != -cp  ]
    then
       USER_COMMANDS="$USER_COMMANDS ""$arg"
    fi
 
-   if [ $prearg=-classpath ] || [ $prearg=-cp  ]
+   if [ "$prearg"=-classpath ] || [ "$prearg"=-cp  ]
    then
       AXIS2_CLASSPATH="$arg":"$AXIS2_CLASSPATH"
    fi
-   prearg=$arg
+   prearg="$arg"
 done 
 
 

Modified: webservices/axis2/branches/java/jaxws21/modules/tool/script/setenv.sh
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/tool/script/setenv.sh?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/tool/script/setenv.sh (original)
+++ webservices/axis2/branches/java/jaxws21/modules/tool/script/setenv.sh Sun Jun 17 05:11:16 2007
@@ -96,9 +96,9 @@
   JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"`
 fi
 
-export AXIS2_HOME=$AXIS2_HOME
-export JAVA_HOME=$JAVA_HOME
-export AXIS2_CLASSPATH=$AXIS2_CLASSPATH
+export AXIS2_HOME="$AXIS2_HOME"
+export JAVA_HOME="$JAVA_HOME"
+export AXIS2_CLASSPATH="$AXIS2_CLASSPATH"
 
 
 echo " Using AXIS2_HOME:   $AXIS2_HOME"

Modified: webservices/axis2/branches/java/jaxws21/modules/xmlbeans/src/org/apache/axis2/xmlbeans/CodeGenerationUtility.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/xmlbeans/src/org/apache/axis2/xmlbeans/CodeGenerationUtility.java?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/xmlbeans/src/org/apache/axis2/xmlbeans/CodeGenerationUtility.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/xmlbeans/src/org/apache/axis2/xmlbeans/CodeGenerationUtility.java Sun Jun 17 05:11:16 2007
@@ -595,7 +595,7 @@
             }
             StringBuffer pathBuilder = new StringBuffer();
             for (Iterator iter = pathElementStack.iterator(); iter.hasNext();) {
-                pathBuilder.append("/" + iter.next());
+                pathBuilder.append(File.separator + iter.next());
             }
             systemId = pathBuilder.toString().substring(1);
 
@@ -630,7 +630,7 @@
                     //if the systemId actually had a scheme then as per the URL
                     //constructor, the context URL scheme should be ignored
                     baseUri = (baseUri == null) ? "file:///" : baseUri;
-                    URL url = new URL(new URL(baseUri), systemId);
+                    URL url = new URL(baseUri + systemId);
                     return new InputSource(url.openStream());
                 }
                 return XMLUtils.getEmptyInputSource();

Modified: webservices/axis2/branches/java/jaxws21/modules/xmlbeans/src/org/apache/axis2/xmlbeans/template/XmlbeansDatabindingTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/xmlbeans/src/org/apache/axis2/xmlbeans/template/XmlbeansDatabindingTemplate.xsl?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/xmlbeans/src/org/apache/axis2/xmlbeans/template/XmlbeansDatabindingTemplate.xsl (original)
+++ webservices/axis2/branches/java/jaxws21/modules/xmlbeans/src/org/apache/axis2/xmlbeans/template/XmlbeansDatabindingTemplate.xsl Sun Jun 17 05:11:16 2007
@@ -20,7 +20,8 @@
 
         <xsl:for-each select="param[not(@type = preceding-sibling::param/@type) and @type!='']">
 
-            private  org.apache.axiom.om.OMElement  toOM(<xsl:value-of select="@type"/> param, boolean optimizeContent){
+            private  org.apache.axiom.om.OMElement  toOM(<xsl:value-of select="@type"/> param, boolean optimizeContent)
+            throws org.apache.axis2.AxisFault{
             org.apache.axiom.om.impl.builder.StAXOMBuilder builder = new org.apache.axiom.om.impl.builder.StAXOMBuilder
             (org.apache.axiom.om.OMAbstractFactory.getOMFactory(),new org.apache.axis2.util.StreamWrapper(param.newXMLStreamReader())) ;
             org.apache.axiom.om.OMElement documentElement = builder.getDocumentElement();
@@ -62,7 +63,7 @@
                                 <xsl:for-each select="../../param[@type!='' and @direction='in' and @opname=$opname]/param">
                                     <xsl:value-of select="@type"/> param<xsl:value-of select="position()"/>,
                                 </xsl:for-each><xsl:value-of select="$inputElementType"/> dummyWrappedType,
-                                boolean optimizeContent){
+                                boolean optimizeContent) throws org.apache.axis2.AxisFault{
 
                                 <xsl:value-of select="$inputElementType"/> wrappedType = <xsl:value-of select="$inputElementType"/>.Factory.newInstance();
 
@@ -95,7 +96,8 @@
                             </xsl:when>
                             <xsl:otherwise>
                                 <!-- Assumption - the parameter is always an XMLBeans -->
-                                private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, <xsl:value-of select="$inputElementType"/> param, boolean optimizeContent){
+                                private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, <xsl:value-of select="$inputElementType"/> param, boolean optimizeContent)
+                                throws org.apache.axis2.AxisFault{
                                 org.apache.axiom.soap.SOAPEnvelope envelope = factory.getDefaultEnvelope();
                                 if (param != null){
                                 envelope.getBody().addChild(toOM(param, optimizeContent));
@@ -123,7 +125,8 @@
 
                         <!-- Assumption - This is an XMLBeans element-->
                         <xsl:if test="generate-id($outElement) = generate-id(key('paramsOut', $outElementType)[1])">
-                            private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, <xsl:value-of select="../../param[@type!='' and @direction='out' and @opname=$opname]/@type"/> param, boolean optimizeContent){
+                            private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, <xsl:value-of select="../../param[@type!='' and @direction='out' and @opname=$opname]/@type"/> param, boolean optimizeContent)
+                            throws org.apache.axis2.AxisFault {
                             org.apache.axiom.soap.SOAPEnvelope envelope = factory.getDefaultEnvelope();
                             if (param != null){
                             envelope.getBody().addChild(toOM(param, optimizeContent));
@@ -179,7 +182,7 @@
         public org.apache.xmlbeans.XmlObject fromOM(
         org.apache.axiom.om.OMElement param,
         java.lang.Class type,
-        java.util.Map extraNamespaces){
+        java.util.Map extraNamespaces) throws org.apache.axis2.AxisFault{
         try{
         <xsl:for-each select="param[@type!='' and not(@primitive)]">
 

Modified: webservices/axis2/branches/java/jaxws21/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/pom.xml?view=diff&rev=548033&r1=548032&r2=548033
==============================================================================
--- webservices/axis2/branches/java/jaxws21/pom.xml (original)
+++ webservices/axis2/branches/java/jaxws21/pom.xml Sun Jun 17 05:11:16 2007
@@ -43,7 +43,6 @@
 		<module>modules/mtompolicy</module>
 		<module>modules/parent</module>
 		<module>modules/ping</module>
-		<module>modules/scripting</module>
 		<module>modules/samples/version</module>
 		<module>modules/soapmonitor</module>
 		<module>modules/spring</module>
@@ -65,10 +64,12 @@
 				<jdk>1.5</jdk>
 			</activation>
 			<modules>
+				<module>modules/scripting</module>
 				<module>modules/jaxbri</module>
 				<module>modules/metadata</module>
 				<module>modules/saaj-api</module>
 				<module>modules/saaj</module>
+                                <module>modules/jws-api</module>
 				<module>modules/jaxws-api</module>
 				<module>modules/jaxws</module>
 				<module>modules/clustering</module>
@@ -84,6 +85,7 @@
 				<module>modules/metadata</module>
 				<module>modules/saaj-api</module>
 				<module>modules/saaj</module>
+                                <module>modules/jws-api</module>
 				<module>modules/jaxws-api</module>
 				<module>modules/jaxws</module>
 				<module>modules/clustering</module>



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org