You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sc...@apache.org on 2008/03/31 18:23:47 UTC

svn commit: r643047 - in /webservices/axis2/trunk/java/modules: jaxws-integration/test-resources/wsdl/ jaxws-integration/test/org/apache/axis2/jaxws/proxy/doclitwrapped/ jaxws-integration/test/org/apache/axis2/jaxws/sample/ jaxws-integration/test/org/a...

Author: scheu
Date: Mon Mar 31 09:23:39 2008
New Revision: 643047

URL: http://svn.apache.org/viewvc?rev=643047&view=rev
Log:
Updated the doc/lit wrapper and doc/lit bare tests to have a simple string "echo" test.
These operations are then tested with strings that require xml escape characters.  (<<<3>>>3>>>3) to ensure
that JAXWS/JAXB/parser/writer are all insync and properly escaping and unescaping text.

Thanks,
Rich

Modified:
    webservices/axis2/trunk/java/modules/jaxws-integration/test-resources/wsdl/doclitbare.wsdl
    webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/proxy/doclitwrapped/DocLitWrappedProxyImpl.java
    webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/BareTests.java
    webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/WrapTests.java
    webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/doclitbare/DocLitBarePortTypeImpl.java
    webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/doclitbare/META-INF/doclitbare.wsdl
    webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/doclitbare/sei/DocLitBarePortType.java
    webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/wrap/DocLitWrapImpl.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/jaxb/wrapper/WrapperToolTest.java

Modified: webservices/axis2/trunk/java/modules/jaxws-integration/test-resources/wsdl/doclitbare.wsdl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-integration/test-resources/wsdl/doclitbare.wsdl?rev=643047&r1=643046&r2=643047&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws-integration/test-resources/wsdl/doclitbare.wsdl (original)
+++ webservices/axis2/trunk/java/modules/jaxws-integration/test-resources/wsdl/doclitbare.wsdl Mon Mar 31 09:23:39 2008
@@ -75,6 +75,14 @@
 
 	<wsdl:message name="NoParam" />
 
+    <wsdl:message name="echoStringIn">
+		<wsdl:part name="echoStringIn" element="tns:String" />
+	</wsdl:message>
+	
+	<wsdl:message name="echoStringOut">
+		<wsdl:part name="echoStringOut" element="tns:String" />
+	</wsdl:message>
+	
 	<wsdl:message name="SingleParam">
 		<wsdl:part name="allByMyself" element="tns:String" />
 	</wsdl:message>
@@ -103,6 +111,11 @@
 		
 		<wsdl:operation name="oneWay">
 			<wsdl:input message="tns:SingleParam" />
+		</wsdl:operation>
+		
+		<wsdl:operation name="echoString">
+			<wsdl:input message="tns:echoStringIn" />
+			<wsdl:output message="tns:echoStringOut" />
 		</wsdl:operation>		
 		
 		<wsdl:operation name="twoWaySimple">
@@ -123,21 +136,27 @@
 		<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
 
 		<wsdl:operation name="oneWayEmpty">
-			<soap:operation soapAction="http://doclitbare.sample.test.org/oneWayEmpty" />
 			<wsdl:input>
 				<soap:body use="literal"  />
 			</wsdl:input>
 		</wsdl:operation>
 		
 		<wsdl:operation name="oneWay">
-			<soap:operation soapAction="http://doclitbare.sample.test.org/oneWay" />
 			<wsdl:input>
 				<soap:body use="literal"  />
 			</wsdl:input>
 		</wsdl:operation>
 		
+		<wsdl:operation name="echoString">
+		    <wsdl:input>
+				<soap:body use="literal"  />
+			</wsdl:input>
+			<wsdl:output>
+				<soap:body use="literal"  />
+			</wsdl:output>
+		</wsdl:operation>	
+		
 		<wsdl:operation name="twoWaySimple">
-			<soap:operation soapAction="twoWaySimple" />
 			<wsdl:input>
 				<soap:body use="literal"  />
 			</wsdl:input>
@@ -147,7 +166,6 @@
 		</wsdl:operation>	
 		
 		<wsdl:operation name="twoWayHolder">
-			<soap:operation soapAction="http://doclitbare.sample.test.org/twoWayReturn" />
 			<wsdl:input>
 				<soap:body use="literal"  />
 			</wsdl:input>

Modified: webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/proxy/doclitwrapped/DocLitWrappedProxyImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/proxy/doclitwrapped/DocLitWrappedProxyImpl.java?rev=643047&r1=643046&r2=643047&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/proxy/doclitwrapped/DocLitWrappedProxyImpl.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/proxy/doclitwrapped/DocLitWrappedProxyImpl.java Mon Mar 31 09:23:39 2008
@@ -33,9 +33,9 @@
 @BindingType(SOAPBinding.SOAP11HTTP_BINDING)
 public class DocLitWrappedProxyImpl implements Provider<String> {
 
-	public String invoke(String invoke_str) {
-		// TODO Auto-generated method stub
+    public String invoke(String invoke_str) {
+        // TODO Auto-generated method stub
         TestLogger.logger.debug("End point called with String value =" + invoke_str);
-		return new String("<ns2:ReturnType xmlns:ns2=\"http://doclitwrapped.proxy.test.org\"><return_str>some response</return_str></ns2:ReturnType>");
-	}
+        return new String("<ns2:ReturnType xmlns:ns2=\"http://doclitwrapped.proxy.test.org\"><return_str>some response</return_str></ns2:ReturnType>");
+    }
 }

Modified: webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/BareTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/BareTests.java?rev=643047&r1=643046&r2=643047&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/BareTests.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/BareTests.java Mon Mar 31 09:23:39 2008
@@ -32,47 +32,94 @@
 import javax.xml.ws.BindingProvider;
 
 public class BareTests extends AbstractTestCase {
-    
-	String axisEndpoint = "http://localhost:6060/axis2/services/BareDocLitService.DocLitBarePortTypeImplPort";
+
+    static final String ENDPOINT_URL = 
+        "http://localhost:6060/axis2/services/BareDocLitService.DocLitBarePortTypeImplPort";
+
+    // String containing some characters that require XML encoding
+    private static String XMLCHARS = ">><<<3>>>3>>>3";
     
     public static Test suite() {
         return getTestSetup(new TestSuite(BareTests.class));
     }
-    	
-	public void testTwoWaySync(){
+
+    public void testEchoString() throws Exception {
+        TestLogger.logger.debug("------------------------------");
+        TestLogger.logger.debug("Test : " + getName());
+
+
+        BareDocLitService service = new BareDocLitService();
+        DocLitBarePortType proxy = service.getBareDocLitPort();
+        BindingProvider p = (BindingProvider) proxy;
+        p.getRequestContext().put(
+                                  BindingProvider.SOAPACTION_USE_PROPERTY, Boolean.TRUE);
+        p.getRequestContext().put(
+                                  BindingProvider.SOAPACTION_URI_PROPERTY, "echoString");
+        p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, ENDPOINT_URL);
+
+        String request = "Hello World";
+        String response = proxy.echoString(request);
+        assertTrue(request.equals(response));
+
+        TestLogger.logger.debug("------------------------------");
+
+    }
+    
+    public void testEchoString_xmlencode() throws Exception {
+        TestLogger.logger.debug("------------------------------");
+        TestLogger.logger.debug("Test : " + getName());
+
+        BareDocLitService service = new BareDocLitService();
+        DocLitBarePortType proxy = service.getBareDocLitPort();
+        BindingProvider p = (BindingProvider) proxy;
+        p.getRequestContext().put(
+                                  BindingProvider.SOAPACTION_USE_PROPERTY, Boolean.TRUE);
+        p.getRequestContext().put(
+                                  BindingProvider.SOAPACTION_URI_PROPERTY, "echoString");
+        p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, ENDPOINT_URL);
+
+        String request = XMLCHARS;
+        String response = proxy.echoString(request);
+        assertTrue(request.equals(response));
+
+        TestLogger.logger.debug("------------------------------");
+
+    }
+    
+    public void testTwoWaySync(){
         TestLogger.logger.debug("------------------------------");
         TestLogger.logger.debug("Test : " + getName());
-		
-		try{
-			
-			BareDocLitService service = new BareDocLitService();
-			DocLitBarePortType proxy = service.getBareDocLitPort();
-			 BindingProvider p = (BindingProvider) proxy;
-	            p.getRequestContext().put(
-	                    BindingProvider.SOAPACTION_USE_PROPERTY, Boolean.TRUE);
-	            p.getRequestContext().put(
-	                    BindingProvider.SOAPACTION_URI_PROPERTY, "twoWaySimple");
-	            p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, axisEndpoint);
 
-			String response = proxy.twoWaySimple(10);
+        try{
+
+            BareDocLitService service = new BareDocLitService();
+            DocLitBarePortType proxy = service.getBareDocLitPort();
+            BindingProvider p = (BindingProvider) proxy;
+            p.getRequestContext().put(
+                                      BindingProvider.SOAPACTION_USE_PROPERTY, Boolean.TRUE);
+            p.getRequestContext().put(
+                                      BindingProvider.SOAPACTION_URI_PROPERTY, "twoWaySimple");
+            p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, ENDPOINT_URL);
+
+            String response = proxy.twoWaySimple(10);
             TestLogger.logger.debug("Sync Response =" + response);
             TestLogger.logger.debug("------------------------------");
-		}catch(Exception e){
-			e.printStackTrace();
-			fail();
-		}
-	}
-	
+        }catch(Exception e){
+            e.printStackTrace();
+            fail();
+        }
+    }
+
     public void testTwoWaySyncWithBodyRouting(){
         TestLogger.logger.debug("------------------------------");
         TestLogger.logger.debug("Test : " + getName());
-        
+
         try{
-            
+
             BareDocLitService service = new BareDocLitService();
             DocLitBarePortType proxy = service.getBareDocLitPort();
-			BindingProvider p = (BindingProvider) proxy;
-	        p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, axisEndpoint);
+            BindingProvider p = (BindingProvider) proxy;
+            p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, ENDPOINT_URL);
 
             String response = proxy.twoWaySimple(10);
             TestLogger.logger.debug("Sync Response =" + response);
@@ -86,25 +133,25 @@
     public void testOneWayEmpty(){
         TestLogger.logger.debug("------------------------------");
         TestLogger.logger.debug("Test : " + getName());
-		
-		try{
-			
-			BareDocLitService service = new BareDocLitService();
-			DocLitBarePortType proxy = service.getBareDocLitPort();
-			BindingProvider p = (BindingProvider) proxy;
-
-			p.getRequestContext().put(BindingProvider.SOAPACTION_USE_PROPERTY,
-					Boolean.TRUE);
-			p.getRequestContext().put(BindingProvider.SOAPACTION_URI_PROPERTY,
-					"oneWayEmpty");
-			p.getRequestContext().put(
-					BindingProvider.ENDPOINT_ADDRESS_PROPERTY, axisEndpoint);
-			proxy.oneWayEmpty();
+
+        try{
+
+            BareDocLitService service = new BareDocLitService();
+            DocLitBarePortType proxy = service.getBareDocLitPort();
+            BindingProvider p = (BindingProvider) proxy;
+
+            p.getRequestContext().put(BindingProvider.SOAPACTION_USE_PROPERTY,
+                                      Boolean.TRUE);
+            p.getRequestContext().put(BindingProvider.SOAPACTION_URI_PROPERTY,
+            "oneWayEmpty");
+            p.getRequestContext().put(
+                                      BindingProvider.ENDPOINT_ADDRESS_PROPERTY, ENDPOINT_URL);
+            proxy.oneWayEmpty();
 
             TestLogger.logger.debug("------------------------------");
-		}catch(Exception e){
-			e.printStackTrace();
-			fail();
-		}
-	}
+        }catch(Exception e){
+            e.printStackTrace();
+            fail();
+        }
+    }
 }

Modified: webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/WrapTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/WrapTests.java?rev=643047&r1=643046&r2=643047&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/WrapTests.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/WrapTests.java Mon Mar 31 09:23:39 2008
@@ -42,6 +42,9 @@
 
     String axisEndpoint = "http://localhost:6060/axis2/services/DocLitWrapService.DocLitWrapImplPort";
 	
+    // String containing some characters that require XML encoding
+    private static String XMLCHARS = "<<<3>>>3>>>3";
+    
     public static Test suite() {
         return getTestSetup(new TestSuite(WrapTests.class));
     }
@@ -152,6 +155,25 @@
         }
 
         /**
+         * This is a test of a doc/lit echo test
+         */
+        public void testEchoString() {
+            TestLogger.logger.debug("------------------------------");
+            TestLogger.logger.debug("Test : " + getName());
+            try{
+                String request = "hello world";
+
+                DocLitWrap proxy = getProxy();
+                String response = proxy.echoStringWSGEN1(request);
+                assertTrue(response.equals(request));
+                TestLogger.logger.debug("------------------------------");
+            }catch(Exception e){
+                e.printStackTrace();
+                fail();
+            }
+        }
+        
+        /**
          * This is a test of a doc/lit method that passes the 
          * request in a header.  This can only be reproduced via
          * annotations and WSGEN.  WSImport will not allow this.
@@ -194,6 +216,67 @@
             }
         }
         
+        /**
+         * This is a test of a doc/lit echo test with xml chars.
+         */
+        public void testEchoString_xmlchars() {
+            TestLogger.logger.debug("------------------------------");
+            TestLogger.logger.debug("Test : " + getName());
+            try{
+                String request = XMLCHARS;
+
+                DocLitWrap proxy = getProxy();
+                String response = proxy.echoStringWSGEN1(request);
+                assertTrue(response.equals(request));
+                TestLogger.logger.debug("------------------------------");
+            }catch(Exception e){
+                e.printStackTrace();
+                fail();
+            }
+        }
+        
+        /**
+         * This is a test of a doc/lit method that passes the 
+         * request in a header.  This can only be reproduced via
+         * annotations and WSGEN.  WSImport will not allow this.
+         */
+        public void testEchoStringWSGEN1_xmlchars() {
+            TestLogger.logger.debug("------------------------------");
+            TestLogger.logger.debug("Test : " + getName());
+            try{
+                String request = XMLCHARS;
+
+                DocLitWrap proxy = getProxy();
+                String response = proxy.echoStringWSGEN1(request);
+                assertTrue(response.equals(request));
+                TestLogger.logger.debug("------------------------------");
+            }catch(Exception e){
+                e.printStackTrace();
+                fail();
+            }
+        }
+
+        /**
+         * This is a test of a doc/lit method that passes the 
+         * response in a header.  This can only be reproduced via
+         * annotations and WSGEN.  WSImport will not allow this.
+         */
+
+        public void testEchoStringWSGEN2_xmlchars() {
+            TestLogger.logger.debug("------------------------------");
+            TestLogger.logger.debug("Test : " + getName());
+            try{
+                String request = XMLCHARS;
+
+                DocLitWrap proxy = getProxy();
+                String response = proxy.echoStringWSGEN2(request);
+                assertTrue(response.equals(request));
+                TestLogger.logger.debug("------------------------------");
+            }catch(Exception e){
+                e.printStackTrace();
+                fail();
+            }
+        }
         /**
          * Test to validate whether a JAXBCustomBuilder is plugged in
          * on the server.

Modified: webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/doclitbare/DocLitBarePortTypeImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/doclitbare/DocLitBarePortTypeImpl.java?rev=643047&r1=643046&r2=643047&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/doclitbare/DocLitBarePortTypeImpl.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/doclitbare/DocLitBarePortTypeImpl.java Mon Mar 31 09:23:39 2008
@@ -27,7 +27,9 @@
 import org.apache.axis2.jaxws.sample.doclitbare.sei.SimpleFault;
 import org.test.sample.doclitbare.Composite;
 
+import javax.jws.WebMethod;
 import javax.jws.WebParam;
+import javax.jws.WebResult;
 import javax.jws.WebParam.Mode;
 import javax.jws.WebService;
 import javax.xml.ws.Holder;
@@ -51,6 +53,12 @@
 		// TODO Auto-generated method stub
 		String retValue = "Running One way call with String input" + allByMyself;
 	}
+        
+         
+	public String echoString(String echoStringIn) {
+	    return echoStringIn;
+	}
+
 
 	/* (non-Javadoc)
 	 * @see org.apache.axis2.jaxws.sample.doclitbare.sei.DocLitBarePortType#twoWaySimple(int)

Modified: webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/doclitbare/META-INF/doclitbare.wsdl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/doclitbare/META-INF/doclitbare.wsdl?rev=643047&r1=643046&r2=643047&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/doclitbare/META-INF/doclitbare.wsdl (original)
+++ webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/doclitbare/META-INF/doclitbare.wsdl Mon Mar 31 09:23:39 2008
@@ -75,6 +75,14 @@
 
 	<wsdl:message name="NoParam" />
 
+    <wsdl:message name="echoStringIn">
+		<wsdl:part name="echoStringIn" element="tns:String" />
+	</wsdl:message>
+	
+	<wsdl:message name="echoStringOut">
+		<wsdl:part name="echoStringOut" element="tns:String" />
+	</wsdl:message>
+	
 	<wsdl:message name="SingleParam">
 		<wsdl:part name="allByMyself" element="tns:String" />
 	</wsdl:message>
@@ -103,6 +111,11 @@
 		
 		<wsdl:operation name="oneWay">
 			<wsdl:input message="tns:SingleParam" />
+		</wsdl:operation>
+		
+		<wsdl:operation name="echoString">
+			<wsdl:input message="tns:echoStringIn" />
+			<wsdl:output message="tns:echoStringOut" />
 		</wsdl:operation>		
 		
 		<wsdl:operation name="twoWaySimple">
@@ -133,6 +146,15 @@
 				<soap:body use="literal"  />
 			</wsdl:input>
 		</wsdl:operation>
+		
+		<wsdl:operation name="echoString">
+		    <wsdl:input>
+				<soap:body use="literal"  />
+			</wsdl:input>
+			<wsdl:output>
+				<soap:body use="literal"  />
+			</wsdl:output>
+		</wsdl:operation>	
 		
 		<wsdl:operation name="twoWaySimple">
 			<wsdl:input>

Modified: webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/doclitbare/sei/DocLitBarePortType.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/doclitbare/sei/DocLitBarePortType.java?rev=643047&r1=643046&r2=643047&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/doclitbare/sei/DocLitBarePortType.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/doclitbare/sei/DocLitBarePortType.java Mon Mar 31 09:23:39 2008
@@ -61,6 +61,13 @@
         @WebParam(name = "String", targetNamespace = "http://doclitbare.sample.test.org", partName = "allByMyself")
         String allByMyself);
 
+    
+    @WebMethod
+    @WebResult(name = "String", targetNamespace = "http://doclitbare.sample.test.org", partName = "echoStringIn")
+    public String echoString(
+        @WebParam(name = "String", targetNamespace = "http://doclitbare.sample.test.org", partName = "echoStringOut")
+        String echoStringIn);
+    
     /**
      * 
      * @param allByMyself

Modified: webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/wrap/DocLitWrapImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/wrap/DocLitWrapImpl.java?rev=643047&r1=643046&r2=643047&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/wrap/DocLitWrapImpl.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/wrap/DocLitWrapImpl.java Mon Mar 31 09:23:39 2008
@@ -115,32 +115,31 @@
             }
         }
 
-	/* (non-Javadoc)
-	 * @see org.apache.axis2.jaxws.sample.wrap.sei.DocLitWrap#invoke(java.lang.String)
-	 */
-	public String invoke(String invokeStr) {
-		// TODO Auto-generated method stub
-		return null;
-	}
-	
-    public HeaderResponse header(Header payload, Holder<HeaderPart0> header0, HeaderPart1 header1){
-    	
-    	HeaderPart0 hpo= (HeaderPart0)header0.value;
-    	hpo = new HeaderPart0();
-    	hpo.setHeaderType("Header Type from Endpoint implementation");
-    	header0.value = hpo;
-    	//hpo.setHeaderType("");
-    	HeaderResponse response = new HeaderResponse();
-    	response.setOut(1000);
-    	return response;
-    }
+        /* (non-Javadoc)
+         * @see org.apache.axis2.jaxws.sample.wrap.sei.DocLitWrap#invoke(java.lang.String)
+         */
+        public String invoke(String invokeStr) {
+            return invokeStr;
+        }
 
-    public String echoStringWSGEN1(String headerValue) {
-        return headerValue;
-    }
-    
-    public String echoStringWSGEN2(String data) {
-        return data;
-    }
+        public HeaderResponse header(Header payload, Holder<HeaderPart0> header0, HeaderPart1 header1){
+
+            HeaderPart0 hpo= (HeaderPart0)header0.value;
+            hpo = new HeaderPart0();
+            hpo.setHeaderType("Header Type from Endpoint implementation");
+            header0.value = hpo;
+            //hpo.setHeaderType("");
+            HeaderResponse response = new HeaderResponse();
+            response.setOut(1000);
+            return response;
+        }
+
+        public String echoStringWSGEN1(String headerValue) {
+            return headerValue;
+        }
+
+        public String echoStringWSGEN2(String data) {
+            return data;
+        }
 
 }

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/jaxb/wrapper/WrapperToolTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/jaxb/wrapper/WrapperToolTest.java?rev=643047&r1=643046&r2=643047&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/jaxb/wrapper/WrapperToolTest.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/jaxb/wrapper/WrapperToolTest.java Mon Mar 31 09:23:39 2008
@@ -29,108 +29,108 @@
 import java.util.WeakHashMap;
 
 public class WrapperToolTest extends TestCase {
-	public void testWrapStockQuote(){
-		try{
-			JAXBWrapperTool wrapper = new JAXBWrapperToolImpl();
-			
-			String jaxbClassName = "org.test.stock2.GetPrice";
+    public void testWrapStockQuote(){
+        try{
+            JAXBWrapperTool wrapper = new JAXBWrapperToolImpl();
+
+            String jaxbClassName = "org.test.stock2.GetPrice";
             Class jaxbClass;
             try {
                 jaxbClass = Class.forName(jaxbClassName, false, ClassLoader.getSystemClassLoader());
             } catch (Exception e){
                 jaxbClass = Class.forName(jaxbClassName, false, this.getClass().getClassLoader());
             }
-			ArrayList<String> childNames = new ArrayList<String>();
-			String childName = "symbol";
-			childNames.add(childName);
-			String symbolObj = new String("IBM");
-			Map<String, Object> childObjects= new WeakHashMap<String, Object>();
-			childObjects.put(childName, symbolObj);
-			Object jaxbObject = wrapper.wrap(jaxbClass, childNames, childObjects);
-			org.test.stock2.GetPrice getPrice = (org.test.stock2.GetPrice)jaxbObject;
-			
-		}catch(JAXBWrapperException e){
-			e.printStackTrace();
-		}catch(ClassNotFoundException e){
-			e.printStackTrace();
-		}
-	}
-	
-	public void testUnwrapStockQuote(){
-		try{
-			JAXBWrapperTool wrapper = new JAXBWrapperToolImpl();
-			org.test.stock2.GetPrice price = new org.test.stock2.GetPrice();
-			price.setSymbol("IBM");
-			
-			ArrayList<String> childNames = new ArrayList<String>();
-			String childName = "symbol";
-			childNames.add(childName);
-			
-			Object[] jaxbObjects = wrapper.unWrap(price, childNames);
-		
-		}catch(JAXBWrapperException e){
-			e.printStackTrace();
-		}
-	}
-	
-	public void testWrapMFQuote(){
-		try{
-			JAXBWrapperTool wrapper = new JAXBWrapperToolImpl();
-			
-			String jaxbClassName = "org.test.stock1.GetPrice";
-			Class jaxbClass;
+            ArrayList<String> childNames = new ArrayList<String>();
+            String childName = "symbol";
+            childNames.add(childName);
+            String symbolObj = new String("IBM");
+            Map<String, Object> childObjects= new WeakHashMap<String, Object>();
+            childObjects.put(childName, symbolObj);
+            Object jaxbObject = wrapper.wrap(jaxbClass, childNames, childObjects);
+            org.test.stock2.GetPrice getPrice = (org.test.stock2.GetPrice)jaxbObject;
+
+        }catch(JAXBWrapperException e){
+            e.printStackTrace();
+        }catch(ClassNotFoundException e){
+            e.printStackTrace();
+        }
+    }
+
+    public void testUnwrapStockQuote(){
+        try{
+            JAXBWrapperTool wrapper = new JAXBWrapperToolImpl();
+            org.test.stock2.GetPrice price = new org.test.stock2.GetPrice();
+            price.setSymbol("IBM");
+
+            ArrayList<String> childNames = new ArrayList<String>();
+            String childName = "symbol";
+            childNames.add(childName);
+
+            Object[] jaxbObjects = wrapper.unWrap(price, childNames);
+
+        }catch(JAXBWrapperException e){
+            e.printStackTrace();
+        }
+    }
+
+    public void testWrapMFQuote(){
+        try{
+            JAXBWrapperTool wrapper = new JAXBWrapperToolImpl();
+
+            String jaxbClassName = "org.test.stock1.GetPrice";
+            Class jaxbClass;
             try {
                 jaxbClass = Class.forName(jaxbClassName, false, ClassLoader.getSystemClassLoader());
             } catch (Exception e){
                 jaxbClass = Class.forName(jaxbClassName, false, this.getClass().getClassLoader());
             }
             ArrayList<String> childNames = new ArrayList<String>();
-			String fund ="fund";
-			String fundName = new String("PRGFX");
-			String holding = "holdings.";
-			String topHolding = new String("GE");
-			String nav ="nav";
-			String navInMillion = new String("700");
-			
-			childNames.add(fund);
-			childNames.add(holding);
-			childNames.add(nav);
-			
-			Map<String, Object> childObjects= new WeakHashMap<String, Object>();
-			
-			childObjects.put(fund, fundName);
-			childObjects.put(holding, topHolding);
-			childObjects.put(nav, navInMillion);
-			
-			Object jaxbObject = wrapper.wrap(jaxbClass, childNames, childObjects);
-			org.test.stock1.GetPrice getPrice = (org.test.stock1.GetPrice)jaxbObject;
-			
-		}catch(JAXBWrapperException e){
-			e.printStackTrace();
-		}catch(ClassNotFoundException e){
-			e.printStackTrace();
-		}
-	}
-	
-	public void testUnwrapMFQuote(){
-		try{
-			JAXBWrapperTool wrapper = new JAXBWrapperToolImpl();
-			org.test.stock1.GetPrice price = new org.test.stock1.GetPrice();
-			price.setFund("PRGFX");
-			price.setHoldings("GE");
-			price.setNav("700");
-			
-			ArrayList<String> childNames = new ArrayList<String>();
-			String fund ="fund";
-			childNames.add(fund);
-			String holding = "holdings.";
-			childNames.add(holding);
-			String nav ="nav";
-			childNames.add(nav);
-			
-			Object[] jaxbObjects = wrapper.unWrap(price, childNames);
-		}catch(JAXBWrapperException e){
-			e.printStackTrace();
-		}
-	}
+            String fund ="fund";
+            String fundName = new String("PRGFX");
+            String holding = "holdings.";
+            String topHolding = new String("GE");
+            String nav ="nav";
+            String navInMillion = new String("700");
+
+            childNames.add(fund);
+            childNames.add(holding);
+            childNames.add(nav);
+
+            Map<String, Object> childObjects= new WeakHashMap<String, Object>();
+
+            childObjects.put(fund, fundName);
+            childObjects.put(holding, topHolding);
+            childObjects.put(nav, navInMillion);
+
+            Object jaxbObject = wrapper.wrap(jaxbClass, childNames, childObjects);
+            org.test.stock1.GetPrice getPrice = (org.test.stock1.GetPrice)jaxbObject;
+
+        }catch(JAXBWrapperException e){
+            e.printStackTrace();
+        }catch(ClassNotFoundException e){
+            e.printStackTrace();
+        }
+    }
+
+    public void testUnwrapMFQuote(){
+        try{
+            JAXBWrapperTool wrapper = new JAXBWrapperToolImpl();
+            org.test.stock1.GetPrice price = new org.test.stock1.GetPrice();
+            price.setFund("PRGFX");
+            price.setHoldings("GE");
+            price.setNav("700");
+
+            ArrayList<String> childNames = new ArrayList<String>();
+            String fund ="fund";
+            childNames.add(fund);
+            String holding = "holdings.";
+            childNames.add(holding);
+            String nav ="nav";
+            childNames.add(nav);
+
+            Object[] jaxbObjects = wrapper.unWrap(price, childNames);
+        }catch(JAXBWrapperException e){
+            e.printStackTrace();
+        }
+    }
 }



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