axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From barre...@apache.org
Subject svn commit: r464648 - in /webservices/axis2/trunk/java/modules/jaxws: ./ src/org/apache/axis2/jaxws/marshaller/impl/ test-resources/wsdl/ test/org/apache/axis2/jaxws/framework/ test/org/apache/axis2/jaxws/nonanonymous/ test/org/apache/axis2/jaxws/nonan...
Date Mon, 16 Oct 2006 20:14:28 GMT
Author: barrettj
Date: Mon Oct 16 13:14:26 2006
New Revision: 464648

URL: http://svn.apache.org/viewvc?view=rev&rev=464648
Log:
AXIS2-1378
Contributed by Nikhil Thaker

Added:
    webservices/axis2/trunk/java/modules/jaxws/test-resources/wsdl/EchoMessage.wsdl
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/nonanonymous/
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/nonanonymous/complextype/
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/nonanonymous/complextype/EchoMessageImpl.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/nonanonymous/complextype/META-INF/
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/nonanonymous/complextype/META-INF/EchoMessage.wsdl
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/nonanonymous/complextype/META-INF/services.xml
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/nonanonymous/complextype/NonAnonymousComplexTypeTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/nonanonymous/complextype/sei/
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/nonanonymous/complextype/sei/EchoMessagePortType.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/nonanonymous/complextype/sei/EchoMessageService.java
Modified:
    webservices/axis2/trunk/java/modules/jaxws/maven.xml
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/MethodMarshallerImpl.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/framework/JAXWSTest.java

Modified: webservices/axis2/trunk/java/modules/jaxws/maven.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/maven.xml?view=diff&rev=464648&r1=464647&r2=464648
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/maven.xml (original)
+++ webservices/axis2/trunk/java/modules/jaxws/maven.xml Mon Oct 16 13:14:26 2006
@@ -112,7 +112,14 @@
             <classpath refid="maven.dependency.classpath"/>
             <classpath location="${compiled.classes.dir}"/>
             <arg line="-d ${schema.generated.src.dir} -quiet -wsdl ${wsdl.source.dir}/doclitbare.wsdl"/>
-        </java>    	
+        </java>
+    	<ant:echo>Generating java from EchoMessage.wsdl for javabean endpoint support</ant:echo>
+    	        <java classname="com.sun.tools.xjc.Driver" fork="true"> 
+    	            <jvmarg line="${maven.junit.jvmargs}"/>
+    	            <classpath refid="maven.dependency.classpath"/>
+    	            <classpath location="${compiled.classes.dir}"/>
+    	            <arg line="-d ${schema.generated.src.dir} -quiet -wsdl ${wsdl.source.dir}/EchoMessage.wsdl"/>
+    	        </java>  
     	<!-- Compile the generated classes -->
     	<ant:echo>Compiling generated schema</ant:echo>
         <javac destdir="${schema.generated.classes.dir}" srcdir="${schema.generated.src.dir}">
@@ -302,6 +309,17 @@
 			   <ant:include name="org/apache/axis2/jaxws/sample/doclitbare/**"/>
 			</ant:fileset>
 			<ant:fileset dir="test/org/apache/axis2/jaxws/sample/doclitbare">
+			   <ant:include name="META-INF/**"/>
+			</ant:fileset>
+			<ant:fileset dir="target/classes">
+			   <ant:include name="org/apache/axis2/jaxws/server/**"/>
+			</ant:fileset>
+		</ant:copy>
+		<ant:copy toDir="target/test-classes/services/EchoMessageService/">
+			<ant:fileset dir="target/test-classes">
+			   <ant:include name="org/apache/axis2/jaxws/nonanonymous/complextype/**"/>
+			</ant:fileset>
+			<ant:fileset dir="test/org/apache/axis2/jaxws/nonanonymous/complextype">
 			   <ant:include name="META-INF/**"/>
 			</ant:fileset>
 			<ant:fileset dir="target/classes">

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/MethodMarshallerImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/MethodMarshallerImpl.java?view=diff&rev=464648&r1=464647&r2=464648
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/MethodMarshallerImpl.java
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/MethodMarshallerImpl.java
Mon Oct 16 13:14:26 2006
@@ -33,6 +33,7 @@
 import javax.xml.bind.JAXBIntrospector;
 import javax.xml.bind.Unmarshaller;
 import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamException;
@@ -328,13 +329,22 @@
 		}
 		else{
 			//Create JAXBElement then use that to create JAXBBlock.
-			Class clazz = jaxbObject.getClass();
-			JAXBElement<Object> element = new JAXBElement<Object>(new QName(targetNamespace,
name), clazz, jaxbObject);
+			Class objectType = jaxbObject.getClass();
+			String xmlName = readXMLTypeName(objectType);
+			JAXBElement<Object> element = null;
+			if(xmlName !=null){
+				element = new JAXBElement<Object>(new QName(targetNamespace, xmlName), objectType,
jaxbObject);
+			}
+			else{
+				element = new JAXBElement<Object>(new QName(targetNamespace, name), objectType,
jaxbObject);
+			}
+			
 			JAXBBlockFactory factory = (JAXBBlockFactory)FactoryRegistry.getFactory(JAXBBlockFactory.class);
 			return factory.createFrom(element,context ,null);
 		}
 		
 	}
+	
 	protected Block createJAXBBlock(OMElement om, JAXBContext context)throws javax.xml.stream.XMLStreamException{
 		JAXBBlockFactory factory = (JAXBBlockFactory)FactoryRegistry.getFactory(JAXBBlockFactory.class);
 		return factory.createFrom(om,context,null);
@@ -345,6 +355,14 @@
 		String emptyBody = "";
 		XMLStringBlockFactory stringFactory = (XMLStringBlockFactory) FactoryRegistry.getFactory(XMLStringBlockFactory.class);
 		return stringFactory.createFrom(emptyBody, null, SOAPENV_QNAME);
+	}
+	
+	protected String readXMLTypeName(Class jaxbClazz){
+		XmlType type = (XmlType)jaxbClazz.getAnnotation(XmlType.class);
+		if(type !=null){
+			return type.name();
+		}
+		return null;
 	}
 	
 	protected JAXBContext createJAXBContext(String wrapperClazzName) throws ClassNotFoundException,
JAXBException {

Added: webservices/axis2/trunk/java/modules/jaxws/test-resources/wsdl/EchoMessage.wsdl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test-resources/wsdl/EchoMessage.wsdl?view=auto&rev=464648
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test-resources/wsdl/EchoMessage.wsdl (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test-resources/wsdl/EchoMessage.wsdl Mon Oct
16 13:14:26 2006
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<definitions targetNamespace="http://nonanonymous.complextype.test.org" 
+      xmlns:tns="http://nonanonymous.complextype.test.org"
+      xmlns="http://schemas.xmlsoap.org/wsdl/" 
+      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+      xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+
+   <types>
+      <xsd:schema targetNamespace="http://nonanonymous.complextype.test.org"
+         xmlns:ts="http://nonanonymous.complextype.test.org/xsd"
+         xmlns="http://www.w3.org/2001/XMLSchema"
+         elementFormDefault="qualified">
+
+         <complexType name="echoMessage">
+            <sequence>
+               <element name="request" type="xsd:string"/>
+            </sequence>
+         </complexType>
+
+         <complexType name="echoMessageResponse">
+            <sequence>
+               <element name="response" type="xsd:string"/>
+            </sequence>
+         </complexType>
+
+         <element name="echoMessage" type="tns:echoMessage"/>
+         <element name="echoMessageResponse" type="tns:echoMessageResponse"/>
+
+      </xsd:schema>
+   </types>
+
+   <message name="echoMessage">
+      <part name="message" element="tns:echoMessage"/>
+   </message>
+
+   <message name="echoMessageResponse">
+      <part name="result" element="tns:echoMessageResponse"/>
+   </message>
+
+   <portType name="EchoMessagePortType">
+      <operation name="echoMessage">
+         <input message="tns:echoMessage" />
+         <output message="tns:echoMessageResponse" />
+      </operation>
+   </portType>
+
+   <binding name="EchoMessageBinding" type="tns:EchoMessagePortType">
+      <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+      <operation name="echoMessage">
+         <soap:operation soapAction=""/>
+         <input>
+            <soap:body use="literal"/>
+         </input>
+
+         <output>
+            <soap:body use="literal"/>
+         </output>
+      </operation>
+   </binding>
+
+   <service name="EchoMessageService">
+      <port binding="tns:EchoMessageBinding" name="EchoMessagePort">
+         <soap:address location="http://localhost:8080/EchoMessageService/EchoMessageService"/>
+      </port>
+
+   </service>
+
+</definitions>

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/framework/JAXWSTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/framework/JAXWSTest.java?view=diff&rev=464648&r1=464647&r2=464648
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/framework/JAXWSTest.java
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/framework/JAXWSTest.java
Mon Oct 16 13:14:26 2006
@@ -40,6 +40,7 @@
 import org.apache.axis2.jaxws.message.SAAJConverterTests;
 import org.apache.axis2.jaxws.message.SOAP12Tests;
 import org.apache.axis2.jaxws.message.XMLStreamReaderSplitterTests;
+import org.apache.axis2.jaxws.nonanonymous.complextype.NonAnonymousComplexTypeTests;
 import org.apache.axis2.jaxws.provider.*;
 import org.apache.axis2.jaxws.sample.AddNumbersTests;
 import org.apache.axis2.jaxws.sample.AddressBookTests;
@@ -95,6 +96,7 @@
         suite.addTestSuite(MtomSampleTests.class);
         suite.addTestSuite(NonWrapTests.class);
         suite.addTestSuite(WrapTests.class);
+        suite.addTestSuite(NonAnonymousComplexTypeTests.class);
         suite.addTestSuite(AddNumbersTests.class);
         
         // Start (and stop) the server only once for all the tests

Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/nonanonymous/complextype/EchoMessageImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/nonanonymous/complextype/EchoMessageImpl.java?view=auto&rev=464648
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/nonanonymous/complextype/EchoMessageImpl.java
(added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/nonanonymous/complextype/EchoMessageImpl.java
Mon Oct 16 13:14:26 2006
@@ -0,0 +1,34 @@
+/**
+ * 
+ */
+package org.apache.axis2.jaxws.nonanonymous.complextype;
+
+import javax.jws.WebService;
+
+import org.apache.axis2.jaxws.nonanonymous.complextype.sei.EchoMessagePortType;
+
+@WebService(targetNamespace="http://testApp.jaxws",
+            endpointInterface="org.apache.axis2.jaxws.nonanonymous.complextype.sei.EchoMessagePortType")
+
+public class EchoMessageImpl implements EchoMessagePortType {
+
+	/**
+	 * 
+	 */
+	public EchoMessageImpl() {
+		super();
+		// TODO Auto-generated constructor stub
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.axis2.jaxws.nonanonymous.complextype.sei.EchoMessagePortType#echoMessage(java.lang.String)
+	 */
+	public String echoMessage(String request) {
+		String response = null;
+
+        response = request.replaceAll("Server", "Client");
+        return response;
+
+	}
+
+}

Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/nonanonymous/complextype/META-INF/EchoMessage.wsdl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/nonanonymous/complextype/META-INF/EchoMessage.wsdl?view=auto&rev=464648
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/nonanonymous/complextype/META-INF/EchoMessage.wsdl
(added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/nonanonymous/complextype/META-INF/EchoMessage.wsdl
Mon Oct 16 13:14:26 2006
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<definitions targetNamespace="http://nonanonymous.complextype.test.org" 
+      xmlns:tns="http://nonanonymous.complextype.test.org"
+      xmlns="http://schemas.xmlsoap.org/wsdl/" 
+      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+      xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+
+   <types>
+      <xsd:schema targetNamespace="http://nonanonymous.complextype.test.org"
+         xmlns:ts="http://nonanonymous.complextype.test.org/xsd"
+         xmlns="http://www.w3.org/2001/XMLSchema"
+         elementFormDefault="qualified">
+
+         <complexType name="echoMessage">
+            <sequence>
+               <element name="request" type="xsd:string"/>
+            </sequence>
+         </complexType>
+
+         <complexType name="echoMessageResponse">
+            <sequence>
+               <element name="response" type="xsd:string"/>
+            </sequence>
+         </complexType>
+
+         <element name="echoMessage" type="tns:echoMessage"/>
+         <element name="echoMessageResponse" type="tns:echoMessageResponse"/>
+
+      </xsd:schema>
+   </types>
+
+   <message name="echoMessage">
+      <part name="message" element="tns:echoMessage"/>
+   </message>
+
+   <message name="echoMessageResponse">
+      <part name="result" element="tns:echoMessageResponse"/>
+   </message>
+
+   <portType name="EchoMessagePortType">
+      <operation name="echoMessage">
+         <input message="tns:echoMessage" />
+         <output message="tns:echoMessageResponse" />
+      </operation>
+   </portType>
+
+   <binding name="EchoMessageBinding" type="tns:EchoMessagePortType">
+      <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+      <operation name="echoMessage">
+         <soap:operation soapAction=""/>
+         <input>
+            <soap:body use="literal"/>
+         </input>
+
+         <output>
+            <soap:body use="literal"/>
+         </output>
+      </operation>
+   </binding>
+
+   <service name="EchoMessageService">
+      <port binding="tns:EchoMessageBinding" name="EchoMessagePort">
+         <soap:address location="http://localhost:8080/axis2/services/EchoMessageService"/>
+      </port>
+
+   </service>
+
+</definitions>

Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/nonanonymous/complextype/META-INF/services.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/nonanonymous/complextype/META-INF/services.xml?view=auto&rev=464648
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/nonanonymous/complextype/META-INF/services.xml
(added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/nonanonymous/complextype/META-INF/services.xml
Mon Oct 16 13:14:26 2006
@@ -0,0 +1,9 @@
+<serviceGroup>
+ <service name="EchoMessageService">
+  <messageReceivers>
+   <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out" class="org.apache.axis2.jaxws.server.JAXWSMessageReceiver"/>
+  </messageReceivers>
+  <parameter locked="false" name="ServiceClass">org.apache.axis2.jaxws.nonanonymous.complextype.EchoMessageImpl</parameter>
+ </service>
+</serviceGroup>
+

Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/nonanonymous/complextype/NonAnonymousComplexTypeTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/nonanonymous/complextype/NonAnonymousComplexTypeTests.java?view=auto&rev=464648
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/nonanonymous/complextype/NonAnonymousComplexTypeTests.java
(added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/nonanonymous/complextype/NonAnonymousComplexTypeTests.java
Mon Oct 16 13:14:26 2006
@@ -0,0 +1,52 @@
+/**
+ * 
+ */
+package org.apache.axis2.jaxws.nonanonymous.complextype;
+
+import javax.xml.ws.WebServiceException;
+
+import org.apache.axis2.jaxws.nonanonymous.complextype.sei.EchoMessagePortType;
+import org.apache.axis2.jaxws.nonanonymous.complextype.sei.EchoMessageService;
+
+import junit.framework.TestCase;
+
+/**
+ * @author nvthaker
+ *
+ */
+public class NonAnonymousComplexTypeTests extends TestCase {
+
+	/**
+	 * 
+	 */
+	public NonAnonymousComplexTypeTests() {
+		super();
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * @param arg0
+	 */
+	public NonAnonymousComplexTypeTests(String arg0) {
+		super(arg0);
+		// TODO Auto-generated constructor stub
+	}
+	public void testSimpleProxy() {
+		System.out.println("------------------------------");
+		System.out.println("Test : "+getName());
+		try {
+			String msg = "Hello Server";
+		    EchoMessagePortType myPort = (new EchoMessageService()).getEchoMessagePort();
+		    String response = myPort.echoMessage(msg);
+		    System.out.println(response);
+		    System.out.println("------------------------------");
+		} catch (WebServiceException webEx) {
+			webEx.printStackTrace();
+			fail();
+		}
+	}
+
+		    
+
+
+}

Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/nonanonymous/complextype/sei/EchoMessagePortType.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/nonanonymous/complextype/sei/EchoMessagePortType.java?view=auto&rev=464648
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/nonanonymous/complextype/sei/EchoMessagePortType.java
(added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/nonanonymous/complextype/sei/EchoMessagePortType.java
Mon Oct 16 13:14:26 2006
@@ -0,0 +1,36 @@
+
+package org.apache.axis2.jaxws.nonanonymous.complextype.sei;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
+
+/**
+ * This class was generated by the JAXWS SI.
+ * JAX-WS RI 2.0_01-b15-fcs
+ * Generated source version: 2.0
+ * 
+ */
+@WebService(name = "EchoMessagePortType", targetNamespace = "http://nonanonymous.complextype.test.org")
+public interface EchoMessagePortType {
+
+
+    /**
+     * 
+     * @param request
+     * @return
+     *     returns java.lang.String
+     */
+    @WebMethod
+    @WebResult(name = "response", targetNamespace = "http://nonanonymous.complextype.test.org")
+    @RequestWrapper(localName = "echoMessage", targetNamespace = "http://nonanonymous.complextype.test.org",
className = "org.test.complextype.nonanonymous.EchoMessage")
+    @ResponseWrapper(localName = "echoMessageResponse", targetNamespace = "http://nonanonymous.complextype.test.org",
className = "org.test.complextype.nonanonymous.EchoMessageResponse")
+    public String echoMessage(
+        @WebParam(name = "request", targetNamespace = "http://nonanonymous.complextype.test.org")
+        String request);
+
+}

Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/nonanonymous/complextype/sei/EchoMessageService.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/nonanonymous/complextype/sei/EchoMessageService.java?view=auto&rev=464648
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/nonanonymous/complextype/sei/EchoMessageService.java
(added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/nonanonymous/complextype/sei/EchoMessageService.java
Mon Oct 16 13:14:26 2006
@@ -0,0 +1,62 @@
+
+package org.apache.axis2.jaxws.nonanonymous.complextype.sei;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+
+
+/**
+ * This class was generated by the JAXWS SI.
+ * JAX-WS RI 2.0_01-b15-fcs
+ * Generated source version: 2.0
+ * 
+ */
+@WebServiceClient(name = "EchoMessageService", targetNamespace = "http://nonanonymous.complextype.test.org",
wsdlLocation = "EchoMessage.wsdl")
+public class EchoMessageService
+    extends Service
+{
+
+    private final static URL ECHOMESSAGESERVICE_WSDL_LOCATION;
+
+    private static String wsdlLocation="/test/org/apache/axis2/jaxws/nonanonymous/complextype/META-INF/EchoMessage.wsdl";
+    static {
+        URL url = null;
+        try {
+        	try{
+	        	String baseDir = new File(".").getCanonicalPath();
+	        	wsdlLocation = new File(baseDir + wsdlLocation).getAbsolutePath();
+        	}catch(Exception e){
+        		e.printStackTrace();
+        	}
+        	File file = new File(wsdlLocation);
+        	url = file.toURL();
+        } catch (MalformedURLException e) {
+            e.printStackTrace();
+        }
+        ECHOMESSAGESERVICE_WSDL_LOCATION = url;
+    }
+
+    public EchoMessageService(URL wsdlLocation, QName serviceName) {
+        super(wsdlLocation, serviceName);
+    }
+
+    public EchoMessageService() {
+        super(ECHOMESSAGESERVICE_WSDL_LOCATION, new QName("http://nonanonymous.complextype.test.org",
"EchoMessageService"));
+    }
+
+    /**
+     * 
+     * @return
+     *     returns EchoMessagePortType
+     */
+    @WebEndpoint(name = "EchoMessagePort")
+    public EchoMessagePortType getEchoMessagePort() {
+        return (EchoMessagePortType)super.getPort(new QName("http://nonanonymous.complextype.test.org",
"EchoMessagePort"), EchoMessagePortType.class);
+    }
+
+}



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


Mime
View raw message