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 he...@apache.org on 2005/02/20 17:32:26 UTC
svn commit: r154521 - in webservices/axis/trunk/java/modules:
core/src/java/org/apache/axis/ core/src/java/org/apache/axis/clientapi/
core/src/java/org/apache/axis/context/
core/src/java/org/apache/axis/description/
core/src/java/org/apache/axis/engine/ core/src/java/org/apache/axis/handlers/
core/src/java/org/apache/axis/phaseresolver/
core/src/java/org/apache/axis/providers/
core/src/java/org/apache/axis/receivers/
core/src/java/org/apache/axis/transport/http/
core/src/java/org/apache/axis/util/
deployment/src/java/org/apache/axis/deployment/
deployment/src/java/org/apache/axis/deployment/repository/utill/
deployment/src/samples/deployment/service1/META-INF/
deployment/src/samples/deployment/service2/META-INF/
deployment/src/test-resources/deployment/
deployment/src/test/org/apache/axis/deployment/
om/src/java/org/apache/axis/om/ om/src/java/org/apache/axis/om/impl/llom/
samples/src/java/encoding/sample1/
samples/src/java/encoding/sample2/benchMark/
samples/src/java/userguide/sample1/ wsdl/src/java/org/apache/wsdl/
wsdl/src/java/org/apache/wsdl/impl/
Author: hemapani
Date: Sun Feb 20 08:32:19 2005
New Revision: 154521
URL: http://svn.apache.org/viewcvs?view=rev&rev=154521
Log:
add getFirstChildElement & getNextSiblingElement to OM .. use the style to handle the doc and rpc styles and cler the sample dd's from the unsupported operations
Removed:
webservices/axis/trunk/java/modules/om/src/java/org/apache/axis/om/OMUtils.java
Modified:
webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/Constants.java
webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/clientapi/Call.java
webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/context/GlobalContext.java
webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/context/MessageContext.java
webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/AxisGlobal.java
webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/AxisModule.java
webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/AxisService.java
webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/AxisTransport.java
webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/FlowImpl.java
webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/HandlerMetadata.java
webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/ParameterIncludeImpl.java
webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/SimpleAxisOperationImpl.java
webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/engine/AxisEngine.java
webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/engine/Dispatcher.java
webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/engine/EngineRegistryImpl.java
webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/engine/ExecutionChain.java
webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/handlers/OpNameFinder.java
webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/phaseresolver/PhaseHolder.java
webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/phaseresolver/PhaseResolver.java
webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/providers/RawXMLProvider.java
webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/receivers/INReceiver.java
webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/receivers/InOutAsyncReceiver.java
webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/receivers/InOutSyncReceiver.java
webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/transport/http/HTTPTransportSender.java
webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/util/OperationItemBean.java
webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/util/ServiceItemBean.java
webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/util/ServiceListBean.java
webservices/axis/trunk/java/modules/deployment/src/java/org/apache/axis/deployment/DeploymentParser.java
webservices/axis/trunk/java/modules/deployment/src/java/org/apache/axis/deployment/repository/utill/UnZipJAR.java
webservices/axis/trunk/java/modules/deployment/src/samples/deployment/service1/META-INF/service.xml
webservices/axis/trunk/java/modules/deployment/src/samples/deployment/service2/META-INF/service.xml
webservices/axis/trunk/java/modules/deployment/src/test-resources/deployment/service.xml
webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/BuildERWithDeploymentTest.java
webservices/axis/trunk/java/modules/om/src/java/org/apache/axis/om/OMElement.java
webservices/axis/trunk/java/modules/om/src/java/org/apache/axis/om/impl/llom/OMElementImpl.java
webservices/axis/trunk/java/modules/om/src/java/org/apache/axis/om/impl/llom/SOAPBodyImpl.java
webservices/axis/trunk/java/modules/om/src/java/org/apache/axis/om/impl/llom/SOAPEnvelopeImpl.java
webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/service.xml
webservices/axis/trunk/java/modules/samples/src/java/encoding/sample2/benchMark/service.xml
webservices/axis/trunk/java/modules/samples/src/java/userguide/sample1/service.xml
webservices/axis/trunk/java/modules/wsdl/src/java/org/apache/wsdl/WSDLOperation.java
webservices/axis/trunk/java/modules/wsdl/src/java/org/apache/wsdl/WSDLService.java
webservices/axis/trunk/java/modules/wsdl/src/java/org/apache/wsdl/impl/WSDLOperationImpl.java
Modified: webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/Constants.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/Constants.java?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/Constants.java (original)
+++ webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/Constants.java Sun Feb 20 08:32:19 2005
@@ -35,9 +35,10 @@
public static final String TRANSPORT_HTTP = "http";
public static final String TRANSPORT_SMTP= "smtp";
-public static final String LISTSERVICES = "listServices";
+ public static final String LISTSERVICES = "listServices";
public static final String SERVICE_MAP = "servicemap";
public static final String SINGLE_SERVICE = "singleservice";
-
+
+ public static final char METHOD_NAME_ESCAPE_CHARACTOR = '#';
}
Modified: webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/clientapi/Call.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/clientapi/Call.java?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/clientapi/Call.java (original)
+++ webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/clientapi/Call.java Sun Feb 20 08:32:19 2005
@@ -16,6 +16,9 @@
package org.apache.axis.clientapi;
+import java.io.IOException;
+import java.io.Writer;
+
import org.apache.axis.Constants;
import org.apache.axis.addressing.EndpointReference;
import org.apache.axis.context.MessageContext;
@@ -31,12 +34,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.Writer;
-import java.net.URL;
-import java.net.URLConnection;
-
public class Call {
private EngineRegistry registry;
protected Log log = LogFactory.getLog(getClass());
@@ -103,20 +100,12 @@
* @param envelope
*/
public void sendAsync(SOAPEnvelope envelope) throws AxisFault {
- OutputStream out = null;
+ Writer out = null;
try {
- URL url = new URL(targetEPR.getAddress());
-
- final URLConnection urlConnect;
- urlConnect = url.openConnection();
final AxisEngine engine = new AxisEngine(registry);
- urlConnect.setDoOutput(true);
-
MessageContext msgctx = new MessageContext(registry, null, null);
msgctx.setEnvelope(envelope);
-
- out = urlConnect.getOutputStream();
- msgctx.setProperty(MessageContext.TRANSPORT_WRITER, out);
+ msgctx.setTo(targetEPR);
msgctx.setProperty(
MessageContext.TRANSPORT_TYPE,
Constants.TRANSPORT_HTTP);
Modified: webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/context/GlobalContext.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/context/GlobalContext.java?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/context/GlobalContext.java (original)
+++ webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/context/GlobalContext.java Sun Feb 20 08:32:19 2005
@@ -26,7 +26,7 @@
*/
public class GlobalContext {
private EngineRegistry registry;
- private HashMap map = new HashMap(10);
+ private final HashMap map = new HashMap(10);
public GlobalContext(EngineRegistry er) {
Modified: webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/context/MessageContext.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/context/MessageContext.java?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/context/MessageContext.java (original)
+++ webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/context/MessageContext.java Sun Feb 20 08:32:19 2005
@@ -16,7 +16,11 @@
package org.apache.axis.context;
-import org.apache.axis.Constants;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.stream.XMLStreamReader;
+
import org.apache.axis.addressing.EndpointReference;
import org.apache.axis.addressing.miheaders.RelatesTo;
import org.apache.axis.description.AxisOperation;
@@ -27,10 +31,8 @@
import org.apache.axis.engine.ExecutionChain;
import org.apache.axis.om.OMElement;
import org.apache.axis.om.SOAPEnvelope;
+import org.apache.wsdl.WSDLService;
-import javax.xml.stream.XMLStreamReader;
-import java.util.HashMap;
-import java.util.Map;
/**
* The palce where all the service specific states are kept.
@@ -39,7 +41,7 @@
* artifacts does not keep states foward from the execution.
*/
public class MessageContext {
- private int messageStyle = Constants.SOAP_STYLE_RPC_ENCODED;
+ private String messageStyle = WSDLService.STYLE_RPC;
/**
* Follwing are the defined properties that are stored in the message Context
@@ -70,7 +72,7 @@
private final Map properties;
private final GlobalContext globalContext;
- private SessionContext sessionContext;
+ private final SessionContext sessionContext;
private AxisService service;
private SOAPEnvelope envelope;
private boolean responseWritten;
@@ -94,6 +96,8 @@
this.globalContext = new GlobalContext(er);
if(sessionContext == null){
this.sessionContext = new SimpleSessionContext();
+ }else{
+ this.sessionContext = sessionContext;
}
if (initialProperties == null) {
@@ -333,25 +337,22 @@
this.service = service;
}
- /**
- * @param context
- */
- public void setSessionContext(SessionContext context) {
- sessionContext = context;
- }
+
/**
* @return
*/
- public int getMessageStyle() {
+ public String getMessageStyle() {
return messageStyle;
}
/**
* @param i
*/
- public void setMessageStyle(int i) {
- messageStyle = i;
+ public void setMessageStyle(String i) {
+ if(i != null){
+ messageStyle = i;
+ }
}
Modified: webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/AxisGlobal.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/AxisGlobal.java?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/AxisGlobal.java (original)
+++ webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/AxisGlobal.java Sun Feb 20 08:32:19 2005
@@ -36,9 +36,9 @@
* global handler is via a modules</p>
*/
public class AxisGlobal implements ParameterInclude, PhasesInclude {
- protected ParameterInclude paramInclude;
- protected PhasesInclude phasesInclude;
- protected List modules;
+ protected final ParameterInclude paramInclude;
+ protected final PhasesInclude phasesInclude;
+ protected final List modules;
//TODO provide a way to store name (name attribute value server.xml)
public AxisGlobal() {
Modified: webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/AxisModule.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/AxisModule.java?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/AxisModule.java (original)
+++ webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/AxisModule.java Sun Feb 20 08:32:19 2005
@@ -33,8 +33,8 @@
private QName name;
- private FlowInclude flowInclude = new FlowIncludeImpl();
- private ParameterInclude parameters = new ParameterIncludeImpl();
+ private final FlowInclude flowInclude = new FlowIncludeImpl();
+ private final ParameterInclude parameters = new ParameterIncludeImpl();
public AxisModule() {
}
Modified: webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/AxisService.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/AxisService.java?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/AxisService.java (original)
+++ webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/AxisService.java Sun Feb 20 08:32:19 2005
@@ -16,21 +16,24 @@
package org.apache.axis.description;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+
+import javax.xml.namespace.QName;
+
import org.apache.axis.engine.AxisFault;
import org.apache.axis.engine.Provider;
import org.apache.wsdl.WSDLService;
import org.apache.wsdl.impl.WSDLServiceImpl;
-import javax.swing.text.Style;
-import javax.xml.namespace.QName;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-
public class AxisService extends WSDLServiceImpl implements WSDLService, ParameterInclude, FlowInclude, PhasesInclude, DescriptionConstants {
-
- protected HashMap operationsMap = new HashMap();
+ /**
+ * TODO this should be in the WSDLInterface, yet we want it to have in the the
+ * Services, so we put this here for M1 until we foud better way to do that
+ */
+ protected final HashMap operationsMap = new HashMap();
public AxisService() {
this.setComponentProperty(MODULEREF_KEY, new ArrayList());
@@ -127,7 +130,7 @@
/* (non-Javadoc)
* @see org.apache.axis.description.AxisService#setStyle(javax.swing.text.Style)
*/
- public void setStyle(Style style) {
+ public void setStyle(String style) {
if (style != null) {
this.setComponentProperty(STYLE_KEY, style);
}
@@ -136,8 +139,8 @@
/* (non-Javadoc)
* @see org.apache.axis.description.AxisService#getStyle()
*/
- public Style getStyle() {
- return (Style) this.getComponentProperty(STYLE_KEY);
+ public String getStyle() {
+ return (String) this.getComponentProperty(STYLE_KEY);
}
/* (non-Javadoc)
@@ -237,5 +240,4 @@
public HashMap getOperations() {
return operationsMap;
}
-
}
Modified: webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/AxisTransport.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/AxisTransport.java?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/AxisTransport.java (original)
+++ webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/AxisTransport.java Sun Feb 20 08:32:19 2005
@@ -25,9 +25,9 @@
* Represents a transport deployed in AXis2
*/
public class AxisTransport implements ParameterInclude, PhasesInclude, FlowInclude {
- protected ParameterInclude paramInclude;
- protected PhasesInclude phasesInclude;
- private FlowInclude flowInclude;
+ protected final ParameterInclude paramInclude;
+ protected final PhasesInclude phasesInclude;
+ private final FlowInclude flowInclude;
protected QName name;
public AxisTransport(QName name) {
Modified: webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/FlowImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/FlowImpl.java?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/FlowImpl.java (original)
+++ webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/FlowImpl.java Sun Feb 20 08:32:19 2005
@@ -21,7 +21,7 @@
import java.util.List;
public class FlowImpl implements Flow {
- protected List list;
+ protected final List list;
public FlowImpl() {
list = new ArrayList();
Modified: webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/HandlerMetadata.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/HandlerMetadata.java?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/HandlerMetadata.java (original)
+++ webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/HandlerMetadata.java Sun Feb 20 08:32:19 2005
@@ -24,7 +24,7 @@
* represent the deployment information about the handler
*/
public class HandlerMetadata implements ParameterInclude {
- private ParameterInclude parameterInclude;
+ private final ParameterInclude parameterInclude;
private QName name;
private PhaseRule rules;
private Handler handler;
Modified: webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/ParameterIncludeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/ParameterIncludeImpl.java?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/ParameterIncludeImpl.java (original)
+++ webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/ParameterIncludeImpl.java Sun Feb 20 08:32:19 2005
@@ -20,7 +20,7 @@
import java.util.HashMap;
public class ParameterIncludeImpl implements ParameterInclude {
- protected HashMap parmeters;
+ protected final HashMap parmeters;
public ParameterIncludeImpl() {
parmeters = new HashMap();
Modified: webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/SimpleAxisOperationImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/SimpleAxisOperationImpl.java?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/SimpleAxisOperationImpl.java (original)
+++ webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/description/SimpleAxisOperationImpl.java Sun Feb 20 08:32:19 2005
@@ -27,8 +27,8 @@
import java.util.List;
public class SimpleAxisOperationImpl implements AxisOperation {
- protected WSDLOperation wsdlOperation;
- protected ParameterInclude parameters;
+ protected final WSDLOperation wsdlOperation;
+ protected final ParameterInclude parameters;
/**
*
@@ -148,7 +148,7 @@
/**
* @return
*/
- public int getStyle() {
+ public String getStyle() {
return wsdlOperation.getStyle();
}
@@ -231,7 +231,7 @@
/**
* @param style
*/
- public void setStyle(int style) {
+ public void setStyle(String style) {
wsdlOperation.setStyle(style);
}
Modified: webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/engine/AxisEngine.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/engine/AxisEngine.java?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/engine/AxisEngine.java (original)
+++ webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/engine/AxisEngine.java Sun Feb 20 08:32:19 2005
@@ -32,7 +32,7 @@
*/
public class AxisEngine {
private Log log = LogFactory.getLog(getClass());
- private EngineRegistry registry;
+ private final EngineRegistry registry;
public AxisEngine(EngineRegistry registry) {
log.info("Axis Engine Started");
Modified: webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/engine/Dispatcher.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/engine/Dispatcher.java?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/engine/Dispatcher.java (original)
+++ webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/engine/Dispatcher.java Sun Feb 20 08:32:19 2005
@@ -16,12 +16,16 @@
package org.apache.axis.engine;
+import org.apache.axis.Constants;
import org.apache.axis.addressing.EndpointReference;
import org.apache.axis.context.MessageContext;
+import org.apache.axis.description.AxisOperation;
import org.apache.axis.description.AxisService;
import org.apache.axis.description.HandlerMetadata;
import org.apache.axis.handlers.AbstractHandler;
import org.apache.axis.handlers.OpNameFinder;
+import org.apache.wsdl.WSDLService;
+
import javax.xml.namespace.QName;
@@ -34,37 +38,52 @@
public void invoke(MessageContext msgctx) throws AxisFault {
if (msgctx.isServerSide()) {
- String uri = null;
EndpointReference toEPR = msgctx.getTo();
String filePart = toEPR.getAddress();
String soapAction = (String) msgctx.getProperty(MessageContext.SOAP_ACTION);
- String pattern = "services/";
- int serviceIndex = 0;
- if ((serviceIndex = filePart.indexOf(pattern)) > 0) {
- uri = filePart.substring(serviceIndex + pattern.length());
+ int index = filePart.lastIndexOf('/');
+ String serviceAndMethodStr = null;
+ if (index > 0) {
+ serviceAndMethodStr = filePart.substring(index + 1);
+
+ }
+ if(serviceAndMethodStr == null){
+ serviceAndMethodStr = soapAction;
}
+
+ index = serviceAndMethodStr.lastIndexOf(Constants.METHOD_NAME_ESCAPE_CHARACTOR);
QName serviceName = null;
- if (uri != null) {
- int index = uri.indexOf('?');
- if (index > -1) {
- //TODO get the opeartion name from URI as well
- serviceName = new QName(uri);
- } else {
- serviceName = new QName(uri);
- }
- } else {
- if (soapAction != null) {
- serviceName = new QName(soapAction);
- }
+ QName operationName = null;
+ if (index > 0) {
+ serviceName = new QName(serviceAndMethodStr.substring(0,index - 1));
+ operationName = new QName(serviceAndMethodStr.substring(index + 1));
+ }else{
+ serviceName = new QName(serviceAndMethodStr);
}
+
if (serviceName != null) {
EngineRegistry registry = msgctx.getGlobalContext().getRegistry();
AxisService service = registry.getService(serviceName);
if (service != null) {
msgctx.setService(service);
+ msgctx.setMessageStyle(service.getStyle());
+ if(!WSDLService.STYLE_RPC.equals(msgctx.getMessageStyle())){
+ if(operationName != null){
+ AxisOperation op = service.getOperation(operationName);
+ if(op != null){
+ msgctx.setOperation(op);
+ }else{
+ throw new AxisFault("Operation not found " + operationName);
+ }
+ }else{
+ throw new AxisFault("Operation Name not specifed");
+ }
+ }
+
+
//let add the Handlers
ExecutionChain chain = msgctx.getExecutionChain();
chain.addPhases(service.getPhases(EngineRegistry.INFLOW));
Modified: webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/engine/EngineRegistryImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/engine/EngineRegistryImpl.java?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/engine/EngineRegistryImpl.java (original)
+++ webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/engine/EngineRegistryImpl.java Sun Feb 20 08:32:19 2005
@@ -27,10 +27,10 @@
public class EngineRegistryImpl implements EngineRegistry {
- private HashMap modules = new HashMap();
- private HashMap services = new HashMap();
- private HashMap transports = new HashMap();
- private AxisGlobal global;
+ private final HashMap modules = new HashMap();
+ private final HashMap services = new HashMap();
+ private final HashMap transports = new HashMap();
+ private final AxisGlobal global;
private ArrayList phases;
Modified: webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/engine/ExecutionChain.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/engine/ExecutionChain.java?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/engine/ExecutionChain.java (original)
+++ webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/engine/ExecutionChain.java Sun Feb 20 08:32:19 2005
@@ -32,8 +32,8 @@
* </p>
*/
public class ExecutionChain {
- private HashMap phases;
- private ArrayList executionList;
+ private final HashMap phases;
+ private final ArrayList executionList;
private Log log = LogFactory.getLog(getClass());
public ExecutionChain() {
Modified: webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/handlers/OpNameFinder.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/handlers/OpNameFinder.java?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/handlers/OpNameFinder.java (original)
+++ webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/handlers/OpNameFinder.java Sun Feb 20 08:32:19 2005
@@ -13,66 +13,51 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
+
package org.apache.axis.handlers;
-import org.apache.axis.Constants;
+import javax.xml.namespace.QName;
+
import org.apache.axis.context.MessageContext;
import org.apache.axis.description.AxisOperation;
import org.apache.axis.description.AxisService;
import org.apache.axis.description.HandlerMetadata;
import org.apache.axis.engine.AxisFault;
import org.apache.axis.om.OMElement;
-import org.apache.axis.om.OMNamespace;
-import org.apache.axis.om.OMNode;
import org.apache.axis.om.SOAPBody;
import org.apache.axis.om.SOAPEnvelope;
+import org.apache.wsdl.WSDLService;
-import javax.xml.namespace.QName;
public class OpNameFinder extends AbstractHandler {
- public static final QName NAME = new QName("http://axis.ws.apache.org", "OpNameFinder");
-
+ public static final QName NAME =
+ new QName("http://axis.ws.apache.org", "OpNameFinder");
public OpNameFinder() {
init(new HandlerMetadata(NAME));
}
public void invoke(MessageContext msgContext) throws AxisFault {
- int style = msgContext.getMessageStyle();
-
-
- if (style == Constants.SOAP_STYLE_RPC_ENCODED || style == Constants.SOAP_STYLE_RPC_LITERAL) {
+ String style = msgContext.getMessageStyle();
+ if (style.equals(WSDLService.STYLE_RPC)) {
SOAPEnvelope envelope = msgContext.getEnvelope();
SOAPBody body = envelope.getBody();
- OMNode node = body.getFirstChild();
- while (node != null) {
- int type = node.getType();
- if (type == OMNode.ELEMENT_NODE) {
- OMElement bodyChild = (OMElement) node;
- msgContext.setSoapOperationElement(bodyChild);
- OMNamespace omns = bodyChild.getNamespace();
- if (omns != null) {
- String ns = omns.getName();
- if (ns != null) {
- QName opName = new QName(ns, bodyChild.getLocalName());
- AxisService service = msgContext.getService();
- AxisOperation op = service.getOperation(opName);
- if (op != null) {
- msgContext.setOperation(op);
- } else {
- throw new AxisFault(opName + " operation not found");
- }
- break;
- }
-
- } else {
- throw new AxisFault("SOAP Body must be NS Qualified");
- }
- }
- node = node.getNextSibling();
+
+ OMElement bodyChild = body.getFirstElement();
+ msgContext.setSoapOperationElement(bodyChild);
+ QName opName =
+ new QName(
+ bodyChild.getNamespaceName(),
+ bodyChild.getLocalName());
+ AxisService service = msgContext.getService();
+ AxisOperation op = service.getOperation(opName);
+ if (op != null) {
+ msgContext.setOperation(op);
+ } else {
+ throw new AxisFault(opName + " operation not found");
}
+
}
}
}
Modified: webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/phaseresolver/PhaseHolder.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/phaseresolver/PhaseHolder.java?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/phaseresolver/PhaseHolder.java (original)
+++ webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/phaseresolver/PhaseHolder.java Sun Feb 20 08:32:19 2005
@@ -41,8 +41,8 @@
/**
* Referance to ServerMetaData inorder to get information about phases.
*/
- private EngineRegistry registry;// = new ServerMetaData();
- private AxisService service;
+ private final EngineRegistry registry;// = new ServerMetaData();
+ private final AxisService service;
public PhaseHolder(EngineRegistry registry, AxisService serviceIN) {
Modified: webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/phaseresolver/PhaseResolver.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/phaseresolver/PhaseResolver.java?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/phaseresolver/PhaseResolver.java (original)
+++ webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/phaseresolver/PhaseResolver.java Sun Feb 20 08:32:19 2005
@@ -34,7 +34,7 @@
public class PhaseResolver {
- private EngineRegistry engineRegistry;
+ private final EngineRegistry engineRegistry;
private AxisService axisService;
private PhaseHolder phaseHolder;
Modified: webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/providers/RawXMLProvider.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/providers/RawXMLProvider.java?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/providers/RawXMLProvider.java (original)
+++ webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/providers/RawXMLProvider.java Sun Feb 20 08:32:19 2005
@@ -13,9 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
+
package org.apache.axis.providers;
+import java.lang.reflect.Method;
+
+import javax.xml.namespace.QName;
+
import org.apache.axis.Constants;
import org.apache.axis.context.MessageContext;
import org.apache.axis.context.SessionContext;
@@ -24,19 +28,15 @@
import org.apache.axis.engine.Provider;
import org.apache.axis.om.OMElement;
import org.apache.axis.om.OMFactory;
-import org.apache.axis.om.OMUtils;
import org.apache.axis.om.SOAPEnvelope;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import javax.xml.namespace.QName;
-import java.lang.reflect.Method;
-
/**
* This is a Simple java Provider.
*/
-public class RawXMLProvider extends AbstractProvider implements Provider {
+public class RawXMLProvider extends AbstractProvider implements Provider {
protected Log log = LogFactory.getLog(getClass());
private String scope;
private Method method;
@@ -48,7 +48,7 @@
}
protected Object makeNewServiceObject(MessageContext msgContext)
- throws AxisFault {
+ throws AxisFault {
try {
AxisService service = msgContext.getService();
classLoader = service.getClassLoader();
@@ -59,7 +59,8 @@
}
}
- public Object getTheImplementationObject(MessageContext msgContext) throws AxisFault {
+ public Object getTheImplementationObject(MessageContext msgContext)
+ throws AxisFault {
AxisService service = msgContext.getService();
QName serviceName = service.getName();
if (Constants.APPLICATION_SCOPE.equals(scope)) {
@@ -86,15 +87,15 @@
}
-
public MessageContext invoke(MessageContext msgContext) throws AxisFault {
try {
//get the implementation class for the Web Service
Object obj = getTheImplementationObject(msgContext);
-
+
//find the WebService method
Class ImplClass = obj.getClass();
- String methodName = msgContext.getOperation().getName().getLocalPart();
+ String methodName =
+ msgContext.getOperation().getName().getLocalPart();
Method[] methods = ImplClass.getMethods();
for (int i = 0; i < methods.length; i++) {
if (methods[i].getName().equals(methodName)) {
@@ -102,20 +103,34 @@
break;
}
}
+ Class[] parameters = method.getParameterTypes();
+ if (parameters != null
+ && parameters.length == 1
+ && OMElement.class.getName().equals(parameters[0].getName())) {
+ OMElement methodElement =
+ msgContext.getEnvelope().getBody().getFirstElement();
+ OMElement parmeter = methodElement.getFirstElement();
+
+ Object[] parms = new Object[] { parmeter };
+ //invoke the WebService
+ OMElement result = (OMElement) method.invoke(obj, parms);
+ MessageContext msgContext1 =
+ new MessageContext(
+ msgContext.getGlobalContext().getRegistry(),
+ msgContext.getProperties(),
+ msgContext.getSessionContext());
+
+ SOAPEnvelope envelope =
+ OMFactory.newInstance().getDefaultEnvelope();
+ envelope.getBody().setFirstChild(result);
+ msgContext1.setEnvelope(envelope);
+ return msgContext1;
+ } else {
+ throw new AxisFault(
+ "Raw Xml provider supports only the methods bearing the signature public OMElement "
+ + "<method-name>(OMElement) where the method name is anything");
+ }
- OMElement methodElement = OMUtils.getFirstChildElement(msgContext.getEnvelope().getBody());
- OMElement parmeter = OMUtils.getFirstChildElement(methodElement);
-
- Object[] parms = new Object[]{parmeter};
- //invoke the WebService
- OMElement result = (OMElement) method.invoke(obj, parms);
- MessageContext msgContext1 = new MessageContext(msgContext.getGlobalContext().getRegistry(), msgContext.getProperties(),msgContext.getSessionContext());
-
- SOAPEnvelope envelope = OMFactory.newInstance().getDefaultEnvelope();
- envelope.getBody().setFirstChild(result);
- msgContext1.setEnvelope(envelope);
-
- return msgContext1;
} catch (Exception e) {
throw AxisFault.makeFault(e);
}
Modified: webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/receivers/INReceiver.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/receivers/INReceiver.java?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/receivers/INReceiver.java (original)
+++ webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/receivers/INReceiver.java Sun Feb 20 08:32:19 2005
@@ -16,6 +16,10 @@
package org.apache.axis.receivers;
+/**
+ * This is takes care of the IN MEP in the server side
+ */
+
public class INReceiver {
}
Modified: webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/receivers/InOutAsyncReceiver.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/receivers/InOutAsyncReceiver.java?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/receivers/InOutAsyncReceiver.java (original)
+++ webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/receivers/InOutAsyncReceiver.java Sun Feb 20 08:32:19 2005
@@ -15,7 +15,9 @@
*/
package org.apache.axis.receivers;
-
+/**
+ * This is takes care of the IN-OUT sync MEP in the server side
+ */
public class InOutAsyncReceiver {
}
Modified: webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/receivers/InOutSyncReceiver.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/receivers/InOutSyncReceiver.java?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/receivers/InOutSyncReceiver.java (original)
+++ webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/receivers/InOutSyncReceiver.java Sun Feb 20 08:32:19 2005
@@ -28,10 +28,12 @@
import javax.xml.namespace.QName;
+/**
+ * This is takes care of the IN-OUT Async MEP in the server side
+ */
public class InOutSyncReceiver extends AbstractHandler implements Receiver {
protected Log log = LogFactory.getLog(getClass());
public static final QName NAME = new QName("http://axis.ws.apache.org", "InOutSyncReceiver");
-
public InOutSyncReceiver() {
init(new HandlerMetadata(NAME));
Modified: webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/transport/http/HTTPTransportSender.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/transport/http/HTTPTransportSender.java?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/transport/http/HTTPTransportSender.java (original)
+++ webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/transport/http/HTTPTransportSender.java Sun Feb 20 08:32:19 2005
@@ -50,23 +50,10 @@
SocketAddress add = new InetSocketAddress(url.getHost(), url.getPort());
socket = new Socket();
socket.connect(add);
-
- StringBuffer buf = new StringBuffer();
- buf.append("POST ").append(url.getFile()).append(" HTTP/1.0\n");
- buf.append("Content-Type: text/xml; charset=utf-8\n");
- buf.append("Accept: application/soap+xml, application/dime, multipart/related, text/*\n");
- buf.append("Host: ").append(url.getHost()).append("\n");
- buf.append("Cache-Control: no-cache\n");
- buf.append("Pragma: no-cache\n");
- buf.append("SOAPAction: \"\"\n\n");
+
outS = socket.getOutputStream();
out = new BufferedWriter(new OutputStreamWriter(outS));
- out.write(buf.toString().toCharArray());
-
-// URLConnection connection = url.openConnection();
-// connection.setDoOutput(true);
-// out = new OutputStreamWriter(connection.getOutputStream());
-
+ writeTransportHeaders(out,url);
msgContext.setProperty(MessageContext.TRANSPORT_READER, new BufferedReader(new InputStreamReader(socket.getInputStream())));
msgContext.setProperty(HTTPConstants.SOCKET, socket);
} catch (MalformedURLException e) {
@@ -103,15 +90,17 @@
}
protected void startSending(MessageContext msgContext) throws AxisFault {
-
- // Content-Type: text/xml; charset=utf-8
- // Accept: application/soap+xml, application/dime, multipart/related, text/*
- // User-Agent: Axis/1.2RC1
- // Host: 127.0.0.1:8081
- // Cache-Control: no-cache
- // Pragma: no-cache
- // SOAPAction: ""
-
}
-
+
+ protected void writeTransportHeaders(Writer out,URL url) throws IOException{
+ StringBuffer buf = new StringBuffer();
+ buf.append("POST ").append(url.getFile()).append(" HTTP/1.0\n");
+ buf.append("Content-Type: text/xml; charset=utf-8\n");
+ buf.append("Accept: application/soap+xml, application/dime, multipart/related, text/*\n");
+ buf.append("Host: ").append(url.getHost()).append("\n");
+ buf.append("Cache-Control: no-cache\n");
+ buf.append("Pragma: no-cache\n");
+ buf.append("SOAPAction: \"\"\n\n");
+ out.write(buf.toString().toCharArray());
+ }
}
Modified: webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/util/OperationItemBean.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/util/OperationItemBean.java?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/util/OperationItemBean.java (original)
+++ webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/util/OperationItemBean.java Sun Feb 20 08:32:19 2005
@@ -16,12 +16,7 @@
package org.apache.axis.util;
-/**
- * Created by IntelliJ IDEA.
- * User: Ajith
- * Date: Feb 17, 2005
- * Time: 6:03:36 PM
- */
+
public class OperationItemBean {
private String operationName;
Modified: webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/util/ServiceItemBean.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/util/ServiceItemBean.java?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/util/ServiceItemBean.java (original)
+++ webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/util/ServiceItemBean.java Sun Feb 20 08:32:19 2005
@@ -18,12 +18,7 @@
import java.util.ArrayList;
-/**
- * Created by IntelliJ IDEA.
- * User: Ajith
- * Date: Feb 17, 2005
- * Time: 5:58:09 PM
- */
+
public class ServiceItemBean {
private String serviceName;
private ArrayList operationsList;
Modified: webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/util/ServiceListBean.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/util/ServiceListBean.java?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/util/ServiceListBean.java (original)
+++ webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/util/ServiceListBean.java Sun Feb 20 08:32:19 2005
@@ -18,12 +18,7 @@
import java.util.ArrayList;
-/**
- * Created by IntelliJ IDEA.
- * User: Ajith
- * Date: Feb 17, 2005
- * Time: 5:57:47 PM
- */
+
public class ServiceListBean {
private ArrayList serviceList;
Modified: webservices/axis/trunk/java/modules/deployment/src/java/org/apache/axis/deployment/DeploymentParser.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/deployment/src/java/org/apache/axis/deployment/DeploymentParser.java?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/deployment/src/java/org/apache/axis/deployment/DeploymentParser.java (original)
+++ webservices/axis/trunk/java/modules/deployment/src/java/org/apache/axis/deployment/DeploymentParser.java Sun Feb 20 08:32:19 2005
@@ -237,7 +237,7 @@
dpengine.getCurrentFileItem().setProvideName(attvalue);
}
} else if (STYLENAME.equals(attname)) {
- // axisService.setStyle();
+ axisService.setStyle(attvalue);
//TODO setStyle should be handle latter
} else if (CONTEXTPATHNAME.equals(attname)) {
axisService.setContextPath(getValue(attvalue));
Modified: webservices/axis/trunk/java/modules/deployment/src/java/org/apache/axis/deployment/repository/utill/UnZipJAR.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/deployment/src/java/org/apache/axis/deployment/repository/utill/UnZipJAR.java?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/deployment/src/java/org/apache/axis/deployment/repository/utill/UnZipJAR.java (original)
+++ webservices/axis/trunk/java/modules/deployment/src/java/org/apache/axis/deployment/repository/utill/UnZipJAR.java Sun Feb 20 08:32:19 2005
@@ -58,6 +58,7 @@
throw new DeploymentException("service.xml not found");
}
} catch (Exception e) {
+ e.printStackTrace();
throw new DeploymentException(e.getMessage());
}
}
Modified: webservices/axis/trunk/java/modules/deployment/src/samples/deployment/service1/META-INF/service.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/deployment/src/samples/deployment/service1/META-INF/service.xml?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/deployment/src/samples/deployment/service1/META-INF/service.xml (original)
+++ webservices/axis/trunk/java/modules/deployment/src/samples/deployment/service1/META-INF/service.xml Sun Feb 20 08:32:19 2005
@@ -1,24 +1,16 @@
-<service provider="org.apache.axis.sample.echo.EchoProvider" style="xsd:anyURI" contextPath="xsd:anycontextPath" >
+<service provider="org.apache.axis.sample.echo.EchoProvider" style="rpc" contextPath="services">
<java:implementation class="org.apache.axis.sample.echo.EchoImpl" xmlns:java="http://ws.apache.org/axis2/deployment/java"/>
-
- <inflow>
+ <inflow>
<handler name="logging" class="org.apache.axis.sample.handlers.LoggingHandler">
<order phase="Logging" phaseFirst="true"/>
</handler>
- </inflow>
-
- <outflow>
- </outflow>
-
+ </inflow>
+ <outflow/>
<faultflow>
- <handler name="logging2" class="org.apache.axis.sample.handlers.LoggingHandler">
-
- </handler>
+ <handler name="logging2" class="org.apache.axis.sample.handlers.LoggingHandler"/>
</faultflow>
-
-
- <operation name="echoString" qname="echoString" style="anyStyle" use="anyUse"/>
- <operation name="echoStringArray" qname="echoStringArray" style="anyStyle" use="anyUse"/>
- <operation name="echoEchoStruct" qname="echoEchoStruct" style="anyStyle" use="anyUse"/>
- <operation name="echoEchoStructArray" qname="echoEchoStructArray" style="anyStyle" use="anyUse"/>
+ <operation name="echoString"/>
+ <operation name="echoStringArray"/>
+ <operation name="echoEchoStruct"/>
+ <operation name="echoEchoStructArray"/>
</service>
Modified: webservices/axis/trunk/java/modules/deployment/src/samples/deployment/service2/META-INF/service.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/deployment/src/samples/deployment/service2/META-INF/service.xml?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/deployment/src/samples/deployment/service2/META-INF/service.xml (original)
+++ webservices/axis/trunk/java/modules/deployment/src/samples/deployment/service2/META-INF/service.xml Sun Feb 20 08:32:19 2005
@@ -1,4 +1,4 @@
-<service provider="org.apache.axis.providers.RawXMLProvider" style="xsd:anyURI" contextPath="xsd:anycontextPath" >
+<service provider="org.apache.axis.providers.RawXMLProvider" style="rpc" contextPath="services">
<java:implementation class="Echo2" xmlns:java="http://ws.apache.org/axis2/deployment/java"/>
<!-- these are Service Parameters -->
@@ -41,7 +41,5 @@
<order phase="service" phaseFirst="true" phaseLast="false"/>
</handler>
</faultflow>
- <operation name="opname" qname="opqname" style="anyStyle" use="anyUse">
-
- </operation>
+ <operation name="opname"/>
</service>
Modified: webservices/axis/trunk/java/modules/deployment/src/test-resources/deployment/service.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/deployment/src/test-resources/deployment/service.xml?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/deployment/src/test-resources/deployment/service.xml (original)
+++ webservices/axis/trunk/java/modules/deployment/src/test-resources/deployment/service.xml Sun Feb 20 08:32:19 2005
@@ -1,4 +1,4 @@
-<service provider="xsd:anyprovider" style="xsd:anyURI" contextPath="xsd:anycontextPath">
+<service provider="xsd:anyprovider" style="rpcI" contextPath="services">
<!-- these are Service Parameters -->
<parameter name="para1" locked="xsd:true">10</parameter>
<parameter name="para2" locked="xsd:false">Colombo</parameter>
Modified: webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/BuildERWithDeploymentTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/BuildERWithDeploymentTest.java?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/BuildERWithDeploymentTest.java (original)
+++ webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/BuildERWithDeploymentTest.java Sun Feb 20 08:32:19 2005
@@ -49,6 +49,7 @@
assertNotNull(cl);
Class.forName("Echo2", true, cl);
assertNotNull(service.getName());
+ assertEquals(service.getStyle(),"rpc");
Flow flow = service.getFaultFlow();
assertTrue(flow.getHandlerCount() > 0);
Modified: webservices/axis/trunk/java/modules/om/src/java/org/apache/axis/om/OMElement.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/om/src/java/org/apache/axis/om/OMElement.java?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/om/src/java/org/apache/axis/om/OMElement.java (original)
+++ webservices/axis/trunk/java/modules/om/src/java/org/apache/axis/om/OMElement.java Sun Feb 20 08:32:19 2005
@@ -175,6 +175,19 @@
* @return
*/
public OMNode getFirstChild();
+
+ /**
+ * Convienace extention of the getFristChild
+ * @return
+ */
+
+ public OMElement getFirstElement();
+
+ /**
+ * Convienace extention of the getNextSibling
+ * @return
+ */
+ public OMElement getNextSiblingElement() throws OMException;
/**
* Returns the pull parser that will generate the pull
Modified: webservices/axis/trunk/java/modules/om/src/java/org/apache/axis/om/impl/llom/OMElementImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/om/src/java/org/apache/axis/om/impl/llom/OMElementImpl.java?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/om/src/java/org/apache/axis/om/impl/llom/OMElementImpl.java (original)
+++ webservices/axis/trunk/java/modules/om/src/java/org/apache/axis/om/impl/llom/OMElementImpl.java Sun Feb 20 08:32:19 2005
@@ -787,5 +787,32 @@
private String getNextNamespacePrefix() {
return "ns" + ++noPrefixNamespaceCounter;
}
-}
+ public OMElement getFirstElement() {
+ OMNode node = getFirstChild();
+ while(node != null){
+ if(node.getType() == OMNode.ELEMENT_NODE){
+ return (OMElement)node;
+ }else{
+ node = node.getNextSibling();
+ }
+ }
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.axis.om.OMElement#getNextSiblingElement()
+ */
+ public OMElement getNextSiblingElement() throws OMException {
+ OMNode node = getNextSibling();
+ while(node != null){
+ if(node.getType() == OMNode.ELEMENT_NODE){
+ return (OMElement)node;
+ }else{
+ node = node.getNextSibling();
+ }
+ }
+ return null;
+ }
+
+}
Modified: webservices/axis/trunk/java/modules/om/src/java/org/apache/axis/om/impl/llom/SOAPBodyImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/om/src/java/org/apache/axis/om/impl/llom/SOAPBodyImpl.java?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/om/src/java/org/apache/axis/om/impl/llom/SOAPBodyImpl.java (original)
+++ webservices/axis/trunk/java/modules/om/src/java/org/apache/axis/om/impl/llom/SOAPBodyImpl.java Sun Feb 20 08:32:19 2005
@@ -16,15 +16,13 @@
package org.apache.axis.om.impl.llom;
import org.apache.axis.om.OMConstants;
+import org.apache.axis.om.OMElement;
import org.apache.axis.om.OMException;
import org.apache.axis.om.OMXMLParserWrapper;
import org.apache.axis.om.SOAPBody;
import org.apache.axis.om.SOAPEnvelope;
import org.apache.axis.om.SOAPFault;
-import javax.xml.namespace.QName;
-import java.util.Iterator;
-
/**
* Class SOAPBodyImpl
*/
@@ -34,7 +32,7 @@
* Field hasSOAPFault
*/
private boolean hasSOAPFault = false;
-
+
/**
* @param envelope
*/
@@ -82,15 +80,16 @@
if (hasSOAPFault) {
return true;
} else {
- Iterator soapFaultChildren =
- getChildrenWithName(new QName(SOAPFAULT_NAMESPACE_URI,
- SOAPFAULT_LOCAL_NAME));
- if (soapFaultChildren.hasNext()) {
+ OMElement element = getFirstElement();
+ if(element != null
+ && SOAPFAULT_LOCAL_NAME.equals(element.getLocalName())
+ && SOAPFAULT_NAMESPACE_URI.equals(element.getNamespaceName())){
hasSOAPFault = true;
return true;
+ }else{
+ return false;
}
}
- return false;
}
/**
@@ -101,14 +100,15 @@
* object
*/
public SOAPFault getFault() {
- Iterator soapFaultChildren =
- getChildrenWithName(new QName(SOAPFAULT_NAMESPACE_URI,
- SOAPFAULT_LOCAL_NAME));
- while (soapFaultChildren.hasNext()) {
- Object o = soapFaultChildren.next();
- if (o instanceof SOAPFault) {
- SOAPFault soapFault = (SOAPFault) o;
- return soapFault;
+ if(hasSOAPFault){
+ OMElement element = getFirstElement();
+ if(element != null
+ && SOAPFAULT_LOCAL_NAME.equals(element.getLocalName())
+ && SOAPFAULT_NAMESPACE_URI.equals(element.getNamespaceName())){
+ hasSOAPFault = true;
+ return (SOAPFault)element;
+ }else{
+ return null;
}
}
return null;
Modified: webservices/axis/trunk/java/modules/om/src/java/org/apache/axis/om/impl/llom/SOAPEnvelopeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/om/src/java/org/apache/axis/om/impl/llom/SOAPEnvelopeImpl.java?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/om/src/java/org/apache/axis/om/impl/llom/SOAPEnvelopeImpl.java (original)
+++ webservices/axis/trunk/java/modules/om/src/java/org/apache/axis/om/impl/llom/SOAPEnvelopeImpl.java Sun Feb 20 08:32:19 2005
@@ -19,7 +19,6 @@
import org.apache.axis.om.OMElement;
import org.apache.axis.om.OMException;
import org.apache.axis.om.OMNamespace;
-import org.apache.axis.om.OMNode;
import org.apache.axis.om.OMXMLParserWrapper;
import org.apache.axis.om.SOAPBody;
import org.apache.axis.om.SOAPEnvelope;
@@ -68,22 +67,9 @@
* @throws OMException
*/
public SOAPHeader getHeader() throws OMException {
-
- // if(builder != null){
- // while(header == null && body == null){
- // builder.next();
- // }
- // }
- OMNode node = getFirstChild();
- while (node != null) {
- if ((node != null) && (node.getType() == OMNode.ELEMENT_NODE)) {
- OMElement element = (OMElement) node;
- if (OMConstants.HEADER_LOCAL_NAME.equals(
- element.getLocalName())) {
- return (SOAPHeader) element;
- }
- }
- node = node.getNextSibling();
+ OMElement element = getFirstElement();
+ if (OMConstants.HEADER_LOCAL_NAME.equals(element.getLocalName())) {
+ return (SOAPHeader) element;
}
return null;
}
@@ -103,16 +89,14 @@
* @throws OMException
*/
public SOAPBody getBody() throws OMException {
- OMNode node = getFirstChild();
- while (node != null) {
- if ((node != null) && (node.getType() == OMNode.ELEMENT_NODE)) {
- OMElement element = (OMElement) node;
- if (OMConstants.BODY_LOCAL_NAME.equals(
- element.getLocalName())) {
- return (SOAPBody) element;
- }
+ OMElement element = getFirstElement();
+ if (OMConstants.BODY_LOCAL_NAME.equals(element.getLocalName())) {
+ return (SOAPBody) element;
+ }else{
+ element = element.getNextSiblingElement();
+ if (OMConstants.BODY_LOCAL_NAME.equals(element.getLocalName())) {
+ return (SOAPBody) element;
}
- node = node.getNextSibling();
}
return null;
}
Modified: webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/service.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/service.xml?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/service.xml (original)
+++ webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/service.xml Sun Feb 20 08:32:19 2005
@@ -1,7 +1,7 @@
-<service provider="encoding.sample1.EchoProvider" style="xsd:anyURI" contextPath="xsd:anycontextPath" >
+<service provider="encoding.sample1.EchoProvider" style="rpc" contextPath="services">
<java:implementation class="encoding.sample1.EchoImpl" xmlns:java="http://ws.apache.org/axis2/deployment/java"/>
- <operation name="echoString" qname="echoString" style="anyStyle" use="anyUse"/>
- <operation name="echoStringArray" qname="echoStringArray" style="anyStyle" use="anyUse"/>
- <operation name="echoEchoStruct" qname="echoEchoStruct" style="anyStyle" use="anyUse"/>
- <operation name="echoEchoStructArray" qname="echoEchoStructArray" style="anyStyle" use="anyUse"/>
+ <operation name="echoString"/>
+ <operation name="echoStringArray"/>
+ <operation name="echoEchoStruct"/>
+ <operation name="echoEchoStructArray"/>
</service>
Modified: webservices/axis/trunk/java/modules/samples/src/java/encoding/sample2/benchMark/service.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/java/encoding/sample2/benchMark/service.xml?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/java/encoding/sample2/benchMark/service.xml (original)
+++ webservices/axis/trunk/java/modules/samples/src/java/encoding/sample2/benchMark/service.xml Sun Feb 20 08:32:19 2005
@@ -1,16 +1,16 @@
-<service provider="encoding.sample2.benchMark.BenchProvider" style="xsd:anyURI" contextPath="xsd:anycontextPath" >
+<service provider="encoding.sample2.benchMark.BenchProvider" style="rpc" contextPath="services">
<java:implementation class="encoding.sample2.benchMark.Benchmark1Impl" xmlns:java="http://ws.apache.org/axis2/deployment/java"/>
- <operation name="echoVoid" qname="echoVoid" style="anyStyle" use="anyUse"/>
- <operation name="echoStrings" qname="echoStrings" style="anyStyle" use="anyUse"/>
- <operation name="echoInts" qname="echoInts" style="anyStyle" use="anyUse"/>
- <operation name="echoDoubles" qname="echoDoubles" style="anyStyle" use="anyUse"/>
- <operation name="echoBase64" qname="echoBase64" style="anyStyle" use="anyUse"/>
- <operation name="receiveStrings" qname="receiveStrings" style="anyStyle" use="anyUse"/>
- <operation name="receiveInts" qname="receiveInts" style="anyStyle" use="anyUse"/>
- <operation name="receiveDoubles" qname="receiveDoubles" style="anyStyle" use="anyUse"/>
- <operation name="receiveBase64" qname="receiveBase64" style="anyStyle" use="anyUse"/>
- <operation name="sendStrings" qname="sendStrings" style="anyStyle" use="anyUse"/>
- <operation name="sendInts" qname="sendInts" style="anyStyle" use="anyUse"/>
- <operation name="sendDoubles" qname="sendDoubles" style="anyStyle" use="anyUse"/>
- <operation name="sendBase64" qname="sendBase64" style="anyStyle" use="anyUse"/>
+ <operation name="echoVoid"/>
+ <operation name="echoStrings"/>
+ <operation name="echoInts"/>
+ <operation name="echoDoubles"/>
+ <operation name="echoBase64"/>
+ <operation name="receiveStrings"/>
+ <operation name="receiveInts"/>
+ <operation name="receiveDoubles"/>
+ <operation name="receiveBase64"/>
+ <operation name="sendStrings"/>
+ <operation name="sendInts"/>
+ <operation name="sendDoubles"/>
+ <operation name="sendBase64"/>
</service>
Modified: webservices/axis/trunk/java/modules/samples/src/java/userguide/sample1/service.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/java/userguide/sample1/service.xml?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/java/userguide/sample1/service.xml (original)
+++ webservices/axis/trunk/java/modules/samples/src/java/userguide/sample1/service.xml Sun Feb 20 08:32:19 2005
@@ -1,4 +1,4 @@
-<service provider="org.apache.axis.providers.RawXMLProvider" style="xsd:anyURI" contextPath="xsd:anycontextPath" >
+<service provider="org.apache.axis.providers.RawXMLProvider" style="rpc" contextPath="services">
<java:implementation class="userguide.sample1.EchoXML" xmlns:java="http://ws.apache.org/axis2/deployment/java"/>
- <operation name="echo" qname="echo"/>
+ <operation name="echo"/>
</service>
Modified: webservices/axis/trunk/java/modules/wsdl/src/java/org/apache/wsdl/WSDLOperation.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/src/java/org/apache/wsdl/WSDLOperation.java?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/wsdl/src/java/org/apache/wsdl/WSDLOperation.java (original)
+++ webservices/axis/trunk/java/modules/wsdl/src/java/org/apache/wsdl/WSDLOperation.java Sun Feb 20 08:32:19 2005
@@ -120,19 +120,8 @@
*/
public void setSafety(boolean safe);
- /**
- * Method getStyle
- *
- * @return
- */
- public int getStyle();
-
- /**
- * Method setStyle
- *
- * @param style
- */
- public void setStyle(int style);
+ public String getStyle();
+ public void setStyle(String style);
/**
* Method getTargetnemespace
Modified: webservices/axis/trunk/java/modules/wsdl/src/java/org/apache/wsdl/WSDLService.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/src/java/org/apache/wsdl/WSDLService.java?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/wsdl/src/java/org/apache/wsdl/WSDLService.java (original)
+++ webservices/axis/trunk/java/modules/wsdl/src/java/org/apache/wsdl/WSDLService.java Sun Feb 20 08:32:19 2005
@@ -22,6 +22,9 @@
* @author chathura@opensource.lk
*/
public interface WSDLService extends Component {
+ public static final String STYLE_RPC = "rpc";
+ public static final String STYLE_DOC = "doc";
+ public static final String STYLE_MSG = "msg";
/**
* Method getEndpoints
*
Modified: webservices/axis/trunk/java/modules/wsdl/src/java/org/apache/wsdl/impl/WSDLOperationImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/src/java/org/apache/wsdl/impl/WSDLOperationImpl.java?view=diff&r1=154520&r2=154521
==============================================================================
--- webservices/axis/trunk/java/modules/wsdl/src/java/org/apache/wsdl/impl/WSDLOperationImpl.java (original)
+++ webservices/axis/trunk/java/modules/wsdl/src/java/org/apache/wsdl/impl/WSDLOperationImpl.java Sun Feb 20 08:32:19 2005
@@ -62,7 +62,7 @@
/**
* Field style
*/
- private int style;
+ private String style;
/**
* Field safety
@@ -195,21 +195,11 @@
this.safety = safe;
}
- /**
- * Method getStyle
- *
- * @return
- */
- public int getStyle() {
+ public String getStyle() {
return style;
}
- /**
- * Method setStyle
- *
- * @param style
- */
- public void setStyle(int style) {
+ public void setStyle(String style) {
this.style = style;
}