axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r398925 - in /webservices/axis2/trunk/java/modules: codegen/src/org/apache/axis2/rpc/receivers/ core/src/org/apache/axis2/deployment/util/ core/src/org/apache/axis2/description/ integration/test/org/apache/axis2/engine/ integration/test/org...
Date Tue, 02 May 2006 12:10:49 GMT
Author: deepal
Date: Tue May  2 05:09:31 2006
New Revision: 398925

URL: http://svn.apache.org/viewcvs?rev=398925&view=rev
Log:
-fixed the name space validation in RPCMessageReciver

Modified:
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCInOnlyMessageReceiver.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCInOutAsyncMessageReceiver.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/util/Utils.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisMessage.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/ServiceCreateTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/WSDLClientTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/TestingUtils.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/MultirefTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/RPCCallTest.java
    webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/SchemaGenerator.java

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCInOnlyMessageReceiver.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCInOnlyMessageReceiver.java?rev=398925&r1=398924&r2=398925&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCInOnlyMessageReceiver.java
(original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCInOnlyMessageReceiver.java
Tue May  2 05:09:31 2006
@@ -1,11 +1,14 @@
 package org.apache.axis2.rpc.receivers;
 
 import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMNamespace;
 import org.apache.axis2.AxisFault;
+import org.apache.axis2.wsdl.WSDLConstants;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.databinding.utils.BeanUtil;
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.AxisMessage;
 import org.apache.axis2.engine.DependencyManager;
 import org.apache.axis2.receivers.AbstractInMessageReceiver;
 
@@ -45,7 +48,14 @@
             OMElement methodElement = inMessage.getEnvelope().getBody()
                     .getFirstElement();
 
-            if (!service.getSchematargetNamespace().equals(methodElement.getNamespace().getName()))
{
+            AxisMessage inaxisMessage = op.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
+            String messageNameSpace = null;
+            if (inaxisMessage != null) {
+                messageNameSpace = inaxisMessage.getElementQName().getNamespaceURI();
+            }
+
+            OMNamespace namespace = methodElement.getNamespace();
+            if (namespace == null || !messageNameSpace.equals(namespace.getName())) {
                 throw new AxisFault("namespace mismatch require " +
                         service.getSchematargetNamespace() +
                         " found " + methodElement.getNamespace().getName());

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCInOutAsyncMessageReceiver.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCInOutAsyncMessageReceiver.java?rev=398925&r1=398924&r2=398925&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCInOutAsyncMessageReceiver.java
(original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCInOutAsyncMessageReceiver.java
Tue May  2 05:09:31 2006
@@ -5,9 +5,11 @@
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axis2.AxisFault;
+import org.apache.axis2.wsdl.WSDLConstants;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.AxisMessage;
 import org.apache.axis2.engine.DependencyManager;
 import org.apache.axis2.receivers.AbstractInOutAsyncMessageReceiver;
 
@@ -71,8 +73,14 @@
             OMElement methodElement = inMessage.getEnvelope().getBody()
                     .getFirstElement();
 
+           AxisMessage inaxisMessage = op.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
+            String messageNameSpace = null;
+            if (inaxisMessage != null) {
+                messageNameSpace = inaxisMessage.getElementQName().getNamespaceURI();
+            }
+
             OMNamespace namespace = methodElement.getNamespace();
-            if (namespace == null || !service.getSchematargetNamespace().equals(namespace.getName()))
{
+            if (namespace == null || !messageNameSpace.equals(namespace.getName())) {
                 throw new AxisFault("namespace mismatch require " +
                         service.getSchematargetNamespace() +
                         " found " + methodElement.getNamespace().getName());

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java?rev=398925&r1=398924&r2=398925&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java
(original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java
Tue May  2 05:09:31 2006
@@ -27,10 +27,13 @@
 import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.description.AxisMessage;
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.AxisService;
 import org.apache.axis2.engine.DependencyManager;
 import org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver;
+import org.apache.axis2.wsdl.WSDLConstants;
+import org.apache.axis2.wsdl.util.CommandLineOptionConstants;
 
 import javax.xml.namespace.QName;
 import java.lang.reflect.Method;
@@ -75,11 +78,16 @@
             AxisService service = inMessage.getAxisService();
             OMElement methodElement = inMessage.getEnvelope().getBody()
                     .getFirstElement();
+            AxisMessage inaxisMessage = op.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
+            String messageNameSpace = null;
+            if (inaxisMessage != null) {
+                messageNameSpace = inaxisMessage.getElementQName().getNamespaceURI();
+            }
 
             OMNamespace namespace = methodElement.getNamespace();
-            if (namespace == null || !service.getSchematargetNamespace().equals(namespace.getName()))
{
+            if (namespace == null || !messageNameSpace.equals(namespace.getName())) {
                 throw new AxisFault("namespace mismatch require " +
-                        service.getSchematargetNamespace() +
+                        messageNameSpace +
                         " found " + methodElement.getNamespace().getName());
             }
             String methodName = op.getName().getLocalPart();
@@ -102,7 +110,12 @@
             SOAPFactory fac = getSOAPFactory(inMessage);
 
             // Handling the response
-            OMNamespace ns = fac.createOMNamespace(service.getSchematargetNamespace(),
+            AxisMessage outaxisMessage = op.getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
+            if (inaxisMessage != null) {
+                messageNameSpace = outaxisMessage.getElementQName().getNamespaceURI();
+            }
+
+            OMNamespace ns = fac.createOMNamespace(messageNameSpace,
                     service.getSchematargetNamespacePrefix());
             SOAPEnvelope envelope = fac.getDefaultEnvelope();
             OMElement bodyContent = null;

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/util/Utils.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/util/Utils.java?rev=398925&r1=398924&r2=398925&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/util/Utils.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/util/Utils.java
Tue May  2 05:09:31 2006
@@ -25,6 +25,7 @@
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.Collection;
 
 /*
 * Copyright 2004,2005 The Apache Software Foundation.
@@ -171,7 +172,8 @@
                 serviceClass.trim(), axisService.getSchematargetNamespace(),
                 axisService.getSchematargetNamespacePrefix());
         schemaGenerator.setExcludeMethods(excludeOperations);
-        axisService.addSchema(schemaGenerator.generateSchema());
+        Collection schemas = schemaGenerator.generateSchema();
+        axisService.addSchema(schemas);
 
         JMethod [] method = schemaGenerator.getMethods();
         TypeTable table = schemaGenerator.getTypeTable();

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisMessage.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisMessage.java?rev=398925&r1=398924&r2=398925&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisMessage.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisMessage.java
Tue May  2 05:09:31 2006
@@ -106,7 +106,7 @@
                     Object item = scheamItms.next();
                     if (item instanceof XmlSchemaElement) {
                         XmlSchemaElement xmlSchemaElement = (XmlSchemaElement) item;
-                        if (xmlSchemaElement.getName().equals(getElementQName().getLocalPart()))
{
+                        if (xmlSchemaElement.getQName().equals(getElementQName())) {
                             return xmlSchemaElement;
                         }
                     }

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/ServiceCreateTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/ServiceCreateTest.java?rev=398925&r1=398924&r2=398925&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/ServiceCreateTest.java
(original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/ServiceCreateTest.java
Tue May  2 05:09:31 2006
@@ -82,7 +82,7 @@
         args.add("100");
         args.add("200");
 
-        OMElement response = client.invokeBlocking(new QName("http://org.apache.axis2/xsd",
"add", "ns1"), args.toArray());
+        OMElement response = client.invokeBlocking(new QName("http://engine.axis2.apache.org/xsd",
"add", "ns1"), args.toArray());
         assertEquals(Integer.parseInt(response.getFirstElement().getText()), 300);
     }
 }

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/WSDLClientTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/WSDLClientTest.java?rev=398925&r1=398924&r2=398925&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/WSDLClientTest.java
(original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/WSDLClientTest.java
Tue May  2 05:09:31 2006
@@ -58,9 +58,9 @@
             ServiceClient serviceClient = new ServiceClient(null, wsdlURL,
                     new QName("http://ws.apache.org/axis2", "EchoXMLService"),
                     "EchoXMLServiceSOAP11port0");
-            OMElement payload = TestingUtils.createDummyOMElement();
+            OMElement payload = TestingUtils.createDummyOMElement("http://engine.axis2.apache.org/xsd");
             OMElement response = serviceClient.sendReceive(
-                    new QName("http://org.apache.axis2/xsd", "echoOM"), payload);
+                    new QName("http://engine.axis2.apache.org/xsd", "echoOM"), payload);
             assertNotNull(response);
             String textValue = response.getFirstElement().getFirstElement().getText();
             assertEquals(textValue, "Isaac Asimov, The Foundation Trilogy");

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/TestingUtils.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/TestingUtils.java?rev=398925&r1=398924&r2=398925&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/TestingUtils.java
(original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/TestingUtils.java
Tue May  2 05:09:31 2006
@@ -34,6 +34,18 @@
         return method;
     }
 
+    public static OMElement createDummyOMElement(String nameSpace) {
+        OMFactory fac = OMAbstractFactory.getOMFactory();
+        OMNamespace omNs = fac.createOMNamespace(nameSpace, "ns1");
+        OMElement method = fac.createOMElement("echoOM", omNs);
+        OMElement value = fac.createOMElement("myValue", omNs);
+        value.addChild(
+                fac.createOMText(value, "Isaac Asimov, The Foundation Trilogy"));
+        method.addChild(value);
+        return method;
+    }
+
+
     public static void campareWithCreatedOMElement(OMElement element) {
         OMElement firstChild = element.getFirstElement();
         TestCase.assertNotNull(firstChild);

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/MultirefTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/MultirefTest.java?rev=398925&r1=398924&r2=398925&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/MultirefTest.java
(original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/MultirefTest.java
Tue May  2 05:09:31 2006
@@ -68,8 +68,8 @@
                     + "/axis2/services/EchoXMLService/concat");
     protected Log log = LogFactory.getLog(getClass());
     protected QName serviceName = new QName("EchoXMLService");
-    protected QName operationName = new QName("http://org.apache.axis2/xsd", "concat");
-    protected QName transportName = new QName("http://org.apache.axis2/xsd",
+    protected QName operationName = new QName(NAMESPACE, "concat");
+    protected QName transportName = new QName(NAMESPACE,
             "NullTransport");
 
     protected AxisConfiguration engineRegistry;
@@ -78,6 +78,7 @@
     protected AxisService service;
 
     protected boolean finish = false;
+    public static final String NAMESPACE = "http://rpc.axis2.apache.org/xsd";
 
     public static Test suite() {
         return getTestSetup(new TestSuite(MultirefTest.class));
@@ -97,15 +98,11 @@
                         + (UtilServer.TESTING_PORT)
                         + "/axis2/services/EchoXMLService/" + opName);
         String className = "org.apache.axis2.rpc.RPCServiceClass";
-        operationName = new QName("http://org.apache.axis2/xsd", opName, "req");
-        AxisService service = new AxisService(serviceName.getLocalPart());
+        operationName = new QName("http://rpc.axis2.apache.org/xsd", opName, "req");
+        AxisService service = AxisService.createService(
+                className,UtilServer.getConfigurationContext().getAxisConfiguration());
+        service.setName("EchoXMLService");
         service.setClassLoader(Thread.currentThread().getContextClassLoader());
-        service.addParameter(new Parameter(AbstractMessageReceiver.SERVICE_CLASS,
-                className));
-        AxisOperation axisOp = new InOutAxisOperation(operationName);
-        axisOp.setMessageReceiver(new RPCMessageReceiver());
-        axisOp.setStyle(WSDLConstants.STYLE_RPC);
-        service.addOperation(axisOp);
         UtilServer.deployService(service);
     }
 
@@ -113,7 +110,7 @@
         configureSystem("echoString");
         OMFactory fac = OMAbstractFactory.getOMFactory();
 
-        OMNamespace omNs = fac.createOMNamespace("http://org.apache.axis2/xsd", "my");
+        OMNamespace omNs = fac.createOMNamespace(NAMESPACE, "my");
         OMElement method = fac.createOMElement("echoString", omNs);
         OMElement value = fac.createOMElement("arg0", null);
         value.addAttribute(fac.createOMAttribute("href", null, "#1"));
@@ -157,7 +154,7 @@
         configureSystem("add");
         OMFactory fac = OMAbstractFactory.getOMFactory();
 
-        OMNamespace omNs = fac.createOMNamespace("http://org.apache.axis2/xsd", "my");
+        OMNamespace omNs = fac.createOMNamespace(NAMESPACE, "my");
         OMElement method = fac.createOMElement("add", omNs);
         OMElement value = fac.createOMElement("arg0", null);
         value.addAttribute(fac.createOMAttribute("href", null, "#1"));
@@ -210,7 +207,7 @@
         configureSystem("add");
         OMFactory fac = OMAbstractFactory.getOMFactory();
 
-        OMNamespace omNs = fac.createOMNamespace("http://org.apache.axis2/xsd", "my");
+        OMNamespace omNs = fac.createOMNamespace(NAMESPACE, "my");
         OMElement method = fac.createOMElement("add", omNs);
         OMElement value = fac.createOMElement("arg0", null);
         value.addAttribute(fac.createOMAttribute("href", null, "#1"));
@@ -257,7 +254,7 @@
             configureSystem("add");
             OMFactory fac = OMAbstractFactory.getOMFactory();
 
-            OMNamespace omNs = fac.createOMNamespace("http://org.apache.axis2/xsd", "my");
+            OMNamespace omNs = fac.createOMNamespace(NAMESPACE, "my");
             OMElement method = fac.createOMElement("add", omNs);
             OMElement value = fac.createOMElement("arg0", null);
             value.addAttribute(fac.createOMAttribute("href", null, "#1"));
@@ -314,7 +311,7 @@
         configureSystem("editBean");
         OMFactory fac = OMAbstractFactory.getOMFactory();
 
-        OMNamespace omNs = fac.createOMNamespace("http://org.apache.axis2/xsd", "my");
+        OMNamespace omNs = fac.createOMNamespace(NAMESPACE, "my");
         OMElement method = fac.createOMElement("editBean", omNs);
         OMElement value = fac.createOMElement("arg0", null);
         value.addAttribute(fac.createOMAttribute("href", null, "#1"));
@@ -374,7 +371,7 @@
         configureSystem("beanOM");
         OMFactory fac = OMAbstractFactory.getOMFactory();
 
-        OMNamespace omNs = fac.createOMNamespace("http://org.apache.axis2/xsd", "my");
+        OMNamespace omNs = fac.createOMNamespace(NAMESPACE, "my");
         OMElement method = fac.createOMElement("beanOM", omNs);
         OMElement value = fac.createOMElement("arg0", null);
         value.addAttribute(fac.createOMAttribute("href", null, "#1"));
@@ -434,7 +431,7 @@
         configureSystem("omrefs");
         OMFactory fac = OMAbstractFactory.getOMFactory();
 
-        OMNamespace omNs = fac.createOMNamespace("http://org.apache.axis2/xsd", "my");
+        OMNamespace omNs = fac.createOMNamespace(NAMESPACE, "my");
         OMElement method = fac.createOMElement("omrefs", omNs);
 
         OMElement value = fac.createOMElement("arg0", null);
@@ -514,7 +511,7 @@
         configureSystem("echoEmployee");
         OMFactory fac = OMAbstractFactory.getOMFactory();
 
-        OMNamespace omNs = fac.createOMNamespace("http://org.apache.axis2/xsd", "my");
+        OMNamespace omNs = fac.createOMNamespace(NAMESPACE, "my");
         OMElement method = fac.createOMElement("echoEmployee", omNs);
 
         OMElement value = fac.createOMElement("arg0", null);
@@ -568,7 +565,7 @@
         configureSystem("handleArrayList");
         OMFactory fac = OMAbstractFactory.getOMFactory();
 
-        OMNamespace omNs = fac.createOMNamespace("http://org.apache.axis2/xsd", "my");
+        OMNamespace omNs = fac.createOMNamespace(NAMESPACE, "my");
         OMElement method = fac.createOMElement("handleArrayList", omNs);
 
         OMElement value = fac.createOMElement("arg0", null);

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/RPCCallTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/RPCCallTest.java?rev=398925&r1=398924&r2=398925&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/RPCCallTest.java
(original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/RPCCallTest.java
Tue May  2 05:09:31 2006
@@ -21,8 +21,8 @@
 import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
-import org.apache.axiom.om.util.StAXUtils;
 import org.apache.axiom.om.impl.builder.StAXOMBuilder;
+import org.apache.axiom.om.util.StAXUtils;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.EndpointReference;
@@ -35,11 +35,9 @@
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.AxisService;
 import org.apache.axis2.description.InOutAxisOperation;
-import org.apache.axis2.description.Parameter;
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.integration.UtilServer;
 import org.apache.axis2.integration.UtilServerBasedTestCase;
-import org.apache.axis2.receivers.AbstractMessageReceiver;
 import org.apache.axis2.rpc.client.RPCServiceClient;
 import org.apache.axis2.rpc.receivers.RPCMessageReceiver;
 import org.apache.axis2.wsdl.WSDLConstants;
@@ -48,7 +46,6 @@
 
 import javax.xml.namespace.QName;
 import javax.xml.stream.FactoryConfigurationError;
-import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
 import java.io.ByteArrayInputStream;
@@ -93,10 +90,10 @@
 
     protected void setUp() throws Exception {
         String className = "org.apache.axis2.rpc.RPCServiceClass";
-        service = new AxisService(serviceName.getLocalPart());
+        service = AxisService.createService(
+                className, UtilServer.getConfigurationContext().getAxisConfiguration());
+        service.setName("EchoXMLService");
         service.setClassLoader(Thread.currentThread().getContextClassLoader());
-        service.addParameter(new Parameter(AbstractMessageReceiver.SERVICE_CLASS,
-                className));
         UtilServer.start();
         UtilServer.deployService(service);
     }
@@ -143,7 +140,7 @@
                 new EndpointReference("http://127.0.0.1:"
                         + (UtilServer.TESTING_PORT)
                         + "/axis2/services/EchoXMLService/" + opName);
-        operationName = new QName("http://org.apache.axis2/xsd", opName, "req");
+        operationName = new QName("http://rpc.axis2.apache.org/xsd", opName, "req");
         AxisOperation axisOp = new InOutAxisOperation(operationName);
         axisOp.setMessageReceiver(new RPCMessageReceiver());
         axisOp.setStyle(WSDLConstants.STYLE_RPC);
@@ -675,7 +672,7 @@
 
     public void testomElementArray() throws AxisFault {
         configureSystem("omElementArray");
-        String str = "<req:omElementArray xmlns:req=\"http://org.apache.axis2/xsd\">\n"
+
+        String str = "<req:omElementArray xmlns:req=\"http://rpc.axis2.apache.org/xsd\">\n"
+
                 "    <arg0><abc>vaue1</abc></arg0>\n" +
                 "    <arg0><abc>vaue2</abc></arg0>\n" +
                 "    <arg0><abc>vaue3</abc></arg0>\n" +
@@ -708,7 +705,7 @@
     }
 
     private OMElement getpayLoad() throws AxisFault {
-        String str = "<req:handleArrayList xmlns:req=\"http://org.apache.axis2/xsd\">\n"
+
+        String str = "<req:handleArrayList xmlns:req=\"http://rpc.axis2.apache.org/xsd\">\n"
+
                 "  <arg0>\n" +
                 "    <item0>abc</item0>\n" +
                 "    <item0>def</item0>\n" +

Modified: webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/SchemaGenerator.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/SchemaGenerator.java?rev=398925&r1=398924&r2=398925&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/SchemaGenerator.java
(original)
+++ webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/SchemaGenerator.java
Tue May  2 05:09:31 2006
@@ -238,6 +238,7 @@
         // adding this type to the table
         QName elementName = new QName(this.schemaTargetNameSpace, eltOuter
                 .getName(), this.schema_namespace_prefix);
+        eltOuter.setQName(elementName);
         typeTable.addComplexSchema(methodName, elementName);
         xmlSchema.getItems().add(eltOuter);
         xmlSchema.getElements().add(elementName, eltOuter);



Mime
View raw message