axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ngalla...@apache.org
Subject svn commit: r449530 - in /webservices/axis2/trunk/java/modules/jaxws: ./ src/org/apache/axis2/jaxws/client/proxy/ src/org/apache/axis2/jaxws/server/dispatcher/ test-resources/wsdl/ test/org/apache/axis2/jaxws/framework/ test/org/apache/axis2/jaxws/samp...
Date Mon, 25 Sep 2006 00:16:48 GMT
Author: ngallardo
Date: Sun Sep 24 17:16:47 2006
New Revision: 449530

URL: http://svn.apache.org/viewvc?view=rev&rev=449530
Log:
AXIS2-1223
Contributor: Nikhil Thaker

A patch with tests fixing some issues related to marshalling of simple types.

Added:
    webservices/axis2/trunk/java/modules/jaxws/test-resources/wsdl/doclitbare.wsdl
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/BareTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/DocLitBarePortTypeImpl.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/META-INF/
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/META-INF/doclitbare.wsdl
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/META-INF/services.xml
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/sei/
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/sei/BareDocLitService.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/sei/DocLitBarePortType.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/sei/FaultBeanWithWrapper.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/sei/SimpleFault.java
Modified:
    webservices/axis2/trunk/java/modules/jaxws/maven.xml
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/proxy/DocLitProxyHandler.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/JavaBeanDispatcher.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/MapperImpl.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=449530&r1=449529&r2=449530
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/maven.xml (original)
+++ webservices/axis2/trunk/java/modules/jaxws/maven.xml Sun Sep 24 17:16:47 2006
@@ -106,7 +106,14 @@
 			<classpath location="${compiled.classes.dir}"/>
 			<arg line="-d ${schema.generated.src.dir} -quiet -wsdl ${wsdl.source.dir}/doclitwrap.wsdl"/>
 		</java>
-       <!-- Compile the generated classes -->
+		<ant:echo>Generating java from doclitbare.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}/doclitbare.wsdl"/>
+        </java>    	
+    	<!-- Compile the generated classes -->
     	<ant:echo>Compiling generated schema</ant:echo>
         <javac destdir="${schema.generated.classes.dir}" srcdir="${schema.generated.src.dir}">
             <classpath refid="maven.dependency.classpath"></classpath>
@@ -284,6 +291,17 @@
 			   <ant:include name="org/apache/axis2/jaxws/sample/addnumbers/**"/>
 			</ant:fileset>
 			<ant:fileset dir="test/org/apache/axis2/jaxws/sample/addnumbers">
+			   <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/BareDocLitService/">
+			<ant:fileset dir="target/test-classes">
+			   <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">

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/proxy/DocLitProxyHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/proxy/DocLitProxyHandler.java?view=diff&rev=449530&r1=449529&r2=449530
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/proxy/DocLitProxyHandler.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/proxy/DocLitProxyHandler.java Sun Sep 24 17:16:47 2006
@@ -17,6 +17,9 @@
 package org.apache.axis2.jaxws.client.proxy;
 
 import java.beans.IntrospectionException;
+import java.io.ByteArrayInputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.util.ArrayList;
@@ -25,8 +28,15 @@
 import java.util.Map;
 
 import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
 import javax.xml.bind.JAXBException;
+import javax.xml.bind.JAXBIntrospector;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
 import javax.xml.ws.AsyncHandler;
 
 import org.apache.axiom.om.OMElement;
@@ -39,6 +49,7 @@
 import org.apache.axis2.jaxws.message.Protocol;
 import org.apache.axis2.jaxws.message.factory.JAXBBlockFactory;
 import org.apache.axis2.jaxws.message.factory.MessageFactory;
+import org.apache.axis2.jaxws.message.factory.XMLStringBlockFactory;
 import org.apache.axis2.jaxws.registry.FactoryRegistry;
 import org.apache.axis2.jaxws.spi.ServiceDelegate;
 import org.apache.axis2.jaxws.wrapper.JAXBWrapperTool;
@@ -52,6 +63,7 @@
 	private static Log log = LogFactory.getLog(DocLitProxyHandler.class);
 	private static int SIZE = 1;
 	private static String DEFAULT_ARG="arg";
+	private static QName SOAPENV_QNAME= new QName("http://schemas.xmlsoap.org/soap/envelop/", "Envelope");
 	private ArrayList<Object> argList = null;
 	/**
 	 * @param pd
@@ -114,7 +126,7 @@
 		
 		Class wrapperClazz = proxyDescriptor.getRequestWrapperClass(isAsync());
 		ArrayList<String> names = getParamNames(objects);
-		String localName = proxyDescriptor.getResponseWrapperLocalName();
+		String localName = proxyDescriptor.getRequestWrapperLocalName();
 		Map<String, Object> values = getParamValues(objects, names);
 		JAXBWrapperTool wrapTool = new JAXBWrapperToolImpl();
 		if (log.isDebugEnabled()) {
@@ -131,10 +143,22 @@
 		if (log.isDebugEnabled()) {
             log.debug("Attempting to create Block");
         }
-		Block reqBlock = createJAXBBlock(jaxbObject, ctx);
-		if (log.isDebugEnabled()) {
-            log.debug("JAXBBlock Created");
-        }
+		XmlRootElement root = null;
+		Block reqBlock = null;
+		root =(XmlRootElement) wrapperClazz.getAnnotation(XmlRootElement.class);
+		if(root != null){
+		 reqBlock = createJAXBBlock(jaxbObject, ctx);
+		 if (log.isDebugEnabled()) {
+	            log.debug("JAXBBlock Created");
+	        }
+		}
+		else{
+			reqBlock = createJAXBBlock(localName, jaxbObject, ctx);
+			if (log.isDebugEnabled()) {
+	            log.debug("JAXBBlock Created");
+	        }
+		}
+		
 		MessageContext requestCtx = initializeRequest(reqBlock);
 		return requestCtx;
 		
@@ -150,8 +174,8 @@
 	 * @return
 	 */
 	private MessageContext createDocLitNONWrappedRequest(Method method, Object[] objects) throws JAXBException, MessageException, XMLStreamException{
-		JAXBContext ctx = null;
-		Object requestObject = null;
+		MessageContext requestCtx = null;
+		
 		ArrayList<String> names = getParamNames(objects);
 		Map<String, Object> values = getParamValues(objects, names);
 		if(names.size()> SIZE || values.size() > SIZE){
@@ -160,25 +184,35 @@
 	        }
 			throw ExceptionFactory.makeWebServiceException(Messages.getMessage("DocLitProxyHandlerErr1"));
 		}
-		for(String name:names){
-			requestObject = values.get(name);
-			if(requestObject == null){
-				if (log.isDebugEnabled()) {
-		            log.debug("Method Input parameter for NON Wrapped Request cannot be null");
-		        }
-				throw ExceptionFactory.makeWebServiceException(Messages.getMessage("DocLitProxyHandlerErr2"));
+		if(names.size() !=0){
+			JAXBContext ctx = null;
+			Object requestObject = null;
+			String requestObjectName = null;
+			for(String name:names){
+				requestObject = values.get(name);
+				requestObjectName = name;
+				if(requestObject == null){
+					if (log.isDebugEnabled()) {
+			            log.debug("Method Input parameter for NON Wrapped Request cannot be null");
+			        }
+					throw ExceptionFactory.makeWebServiceException(Messages.getMessage("DocLitProxyHandlerErr2"));
+				}
 			}
+				
+			ctx = JAXBContext.newInstance(new Class[]{requestObject.getClass()});
+			if (log.isDebugEnabled()) {
+	            log.debug("Attempting to create Block");
+	        }
+			Block reqBlock = createJAXBBlock(requestObjectName, requestObject, ctx);
+			if (log.isDebugEnabled()) {
+	            log.debug("Block Created");
+	        }
+			requestCtx = initializeRequest(reqBlock);
+		}
+		if(names.size() == 0){
+			Block emptyBodyBlock = createEmptyBodyBlock();
+			requestCtx = initializeRequest(emptyBodyBlock);
 		}
-			
-		ctx = JAXBContext.newInstance(new Class[]{requestObject.getClass()});
-		if (log.isDebugEnabled()) {
-            log.debug("Attempting to create Block");
-        }
-		Block reqBlock = createJAXBBlock(requestObject, ctx);
-		if (log.isDebugEnabled()) {
-            log.debug("Block Created");
-        }
-		MessageContext requestCtx = initializeRequest(reqBlock);
 		return requestCtx;
 	}
 	
@@ -237,7 +271,21 @@
 		JAXBContext ctx = JAXBContext.newInstance(returnType);
 		JAXBBlockFactory factory = (JAXBBlockFactory)FactoryRegistry.getFactory(JAXBBlockFactory.class);
 		Block resBlock = responseMsg.getBodyBlock(0, ctx, factory);
-		Object bo = resBlock.getBusinessObject(true);
+		Object bo = null;
+		try{
+			 bo = resBlock.getBusinessObject(true);
+		}catch(Exception e){
+			//FIXME: this is the bare case where child of body is not a method but a primitive data type. Reader from Block is throwing exception.
+			OMElement om = resBlock.getOMElement();
+			
+			XMLInputFactory xmlFactory = XMLInputFactory.newInstance();
+			
+			Unmarshaller u = ctx.createUnmarshaller();
+			Reader inputReader = new InputStreamReader(new ByteArrayInputStream(om.toString().getBytes()));
+			XMLStreamReader sr = xmlFactory.createXMLStreamReader(inputReader);
+			JAXBElement o =u.unmarshal(sr, returnType);
+			bo = o.getValue();
+		}
 		if(returnType.isAssignableFrom(bo.getClass())){
 			return bo;
 		}
@@ -250,6 +298,26 @@
 		JAXBBlockFactory factory = (JAXBBlockFactory)FactoryRegistry.getFactory(JAXBBlockFactory.class);
 		return factory.createFrom(jaxbObject,context,null);
 		
+	}
+	
+	private Block createJAXBBlock(String name, Object jaxbObject, JAXBContext context) throws MessageException{
+		JAXBBlockFactory factory = (JAXBBlockFactory)FactoryRegistry.getFactory(JAXBBlockFactory.class);
+		JAXBIntrospector introspector = context.createJAXBIntrospector();
+		if(introspector.isElement(jaxbObject)){
+			return factory.createFrom(jaxbObject, context, null);
+		}
+		else{
+			Class clazz = jaxbObject.getClass();
+			JAXBElement<Object> element = new JAXBElement<Object>(new QName(name), clazz, jaxbObject);
+			return factory.createFrom(element,context,null);
+		}
+		
+	}
+	
+	private Block createEmptyBodyBlock() throws MessageException{
+		String emptyBody = "";
+		XMLStringBlockFactory stringFactory = (XMLStringBlockFactory) FactoryRegistry.getFactory(XMLStringBlockFactory.class);
+		return stringFactory.createFrom(emptyBody, null, SOAPENV_QNAME);
 	}
 	
 	private Block createJAXBBlock(OMElement om, JAXBContext context)throws javax.xml.stream.XMLStreamException{

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/JavaBeanDispatcher.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/JavaBeanDispatcher.java?view=diff&rev=449530&r1=449529&r2=449530
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/JavaBeanDispatcher.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/JavaBeanDispatcher.java Sun Sep 24 17:16:47 2006
@@ -18,6 +18,7 @@
 
 import java.lang.reflect.Method;
 
+import javax.xml.ws.Holder;
 import javax.xml.ws.soap.SOAPBinding;
 
 import org.apache.axis2.jaxws.core.MessageContext;
@@ -65,7 +66,13 @@
         Mapper mapper = new MapperImpl();
         Method target = mapper.getJavaMethod(mc, serviceImplClass);
         Object[] params = mapper.getInputParameterData(mc, target);
-
+        if(params!=null){
+        	for(Object param:params){
+        		if(param!=null && param instanceof Holder){
+        			throw new UnsupportedOperationException("Holders not supported yet");
+        		}
+        	}
+        }
         //At this point, we have the method that is going to be invoked and
         //the parameter data to invoke it with, so create an instance and 
         //do the invoke.
@@ -74,11 +81,12 @@
         
         if(opDesc.isOneWay()){
         	//Dont return response message context if its a one way operation.
-        	return null;
         }
+        
+        //TODO:Support Holders 
         if(!opDesc.isOneWay() && target.getReturnType().getName().equals("void")){
-        	//look for holders
-        	throw new UnsupportedOperationException("Holders not supported yet");
+        	//process everything that does not have holders two way with void is empty responsewrapper in soap body
+        	
         }
         Block responseBlock = mapper.getOutputParameterBlock(mc, response, target);
        

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/MapperImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/MapperImpl.java?view=diff&rev=449530&r1=449529&r2=449530
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/MapperImpl.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/MapperImpl.java Sun Sep 24 17:16:47 2006
@@ -16,6 +16,11 @@
  */
 package org.apache.axis2.jaxws.server.dispatcher;
 
+import java.io.BufferedOutputStream;
+import java.io.ByteArrayInputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.Reader;
 import java.lang.reflect.Method;
 import java.lang.reflect.ParameterizedType;
 import java.lang.reflect.Type;
@@ -27,12 +32,20 @@
 
 import javax.jws.soap.SOAPBinding;
 import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
 import javax.xml.bind.JAXBException;
+import javax.xml.bind.JAXBIntrospector;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.bind.JAXBElement.GlobalScope;
+import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.namespace.QName;
+import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
 import javax.xml.ws.AsyncHandler;
 import javax.xml.ws.Response;
 
+import org.apache.axiom.om.OMElement;
 import org.apache.axis2.jaxws.ExceptionFactory;
 import org.apache.axis2.jaxws.core.MessageContext;
 import org.apache.axis2.jaxws.description.EndpointDescription;
@@ -53,6 +66,7 @@
 
 public class MapperImpl implements Mapper {
 	private static int SIZE = 1;
+	private static String DEFAULT_NAME="arg";
 	private static final Log log = LogFactory.getLog(MapperImpl.class);
 	public MapperImpl() {
 		super();
@@ -67,6 +81,8 @@
 		Message msg = mc.getMessage();
 		EndpointDescription ed = getEndpointDescription(mc);
 		Class[] paramTypes = javaMethod.getParameterTypes();
+		OperationDescription opDesc = mc.getOperationDescription();
+		String paramName[] = opDesc.getWebParamNames();
 		if(paramTypes == null){
 			//Method has no input parameters.
 			return null;
@@ -83,18 +99,40 @@
 				throw ExceptionFactory.makeWebServiceException("As per WS-I compliance, Multi part WSDL not allowed for Doc/Lit NON Wrapped request, Method invoked has multiple input parameter");
 			}
 			if(paramTypes !=null){
-				JAXBContext ctx = JAXBContext.newInstance(new Class[]{paramTypes[0]});
+				Class paramType = paramTypes[0];
+				
+				JAXBContext ctx = JAXBContext.newInstance(new Class[]{paramType});
+				
 				BlockFactory factory = (BlockFactory) FactoryRegistry.getFactory(JAXBBlockFactory.class);
-				Block block = msg.getBodyBlock(0, ctx, factory);
-				Object obj = block.getBusinessObject(true);
-				return new Object[]{obj};
+				try{
+				
+					Block block = msg.getBodyBlock(0, ctx,factory);
+					return new Object[]{block.getBusinessObject(true)};
+					
+				}catch(Exception e){
+					//FIXME: this is the bare case where child of body is not a method but a primitive data type. Reader from Block is throwing exception.
+					Block block = msg.getBodyBlock(0, ctx,factory);
+					OMElement om = block.getOMElement();
+					
+					XMLInputFactory xmlFactory = XMLInputFactory.newInstance();
+					
+					Unmarshaller u = ctx.createUnmarshaller();
+					Reader inputReader = new InputStreamReader(new ByteArrayInputStream(om.toString().getBytes()));
+					XMLStreamReader sr = xmlFactory.createXMLStreamReader(inputReader);
+					JAXBElement o =u.unmarshal(sr, paramTypes[0]);
+					return new Object[]{o.getValue()};
+				}
+				
+				
+				//Object obj = block.getBusinessObject(true);
+				//return new Object[]{obj};
 			}
 		}
 		
 		if(isSEIDocLitWrapped(ed)){
-			OperationDescription opDesc = mc.getOperationDescription();
-            
-            JAXBContext jbc = createJAXBContext(opDesc);
+			
+            String requestWrapperClassName = opDesc.getRequestWrapperClassName();
+            JAXBContext jbc = createJAXBContext(requestWrapperClassName);
             BlockFactory factory = (BlockFactory) FactoryRegistry.getFactory(JAXBBlockFactory.class);
         
             Block wrapper = msg.getBodyBlock(0, jbc, factory);
@@ -124,8 +162,14 @@
 				BlockFactory bfactory = (BlockFactory) FactoryRegistry.getFactory(
 						JAXBBlockFactory.class);
 				JAXBContext ctx = JAXBContext.newInstance(new Class[]{returnType});
-				Block block = bfactory.createFrom(response, ctx, null);
-				return block;
+				if(!isXmlRootElementDefined(returnType)){
+					String returnTypeName = opDesc.getWebResultName();
+					return createJAXBBlock(returnTypeName,response,ctx);
+				}
+				else{
+					return createJAXBBlock(response, ctx);
+					
+				}
 			}
 			else{
 				String webResult = opDesc.getWebResultName();
@@ -149,7 +193,8 @@
 		if(isSEIDocLitWrapped(ed)){
 			
 	            //We'll need a JAXBContext to marshall the response object(s).
-	            JAXBContext jbc = createJAXBContext(opDesc);
+				String responseWrapperClazzName = opDesc.getResponseWrapperClassName();
+	            JAXBContext jbc = createJAXBContext(responseWrapperClazzName);
 	            BlockFactory bfactory = (BlockFactory) FactoryRegistry.getFactory(
 	                    JAXBBlockFactory.class);
 	            
@@ -242,13 +287,13 @@
 		return style == SOAPBinding.ParameterStyle.WRAPPED;
 	} 
 	
-	private JAXBContext createJAXBContext(OperationDescription opDesc) {
+	private JAXBContext createJAXBContext(String wrapperClassName) {
         // This will only support Doc/Lit Wrapped params for now.
         try {
-            String wrapperClass = opDesc.getRequestWrapperClassName();
-            if (wrapperClass != null) {
-                String wrapperPkg = wrapperClass.substring(0, wrapperClass.lastIndexOf("."));
-                JAXBContext jbc = JAXBContext.newInstance(wrapperPkg);
+            
+            if (wrapperClassName != null) {
+            	Class WrapperClazz = Class.forName(wrapperClassName, true, Thread.currentThread().getContextClassLoader());
+                JAXBContext jbc = JAXBContext.newInstance(new Class[]{WrapperClazz});
                 return jbc;
             }
             else {
@@ -256,6 +301,8 @@
             }
         } catch (JAXBException e) {
             throw ExceptionFactory.makeWebServiceException(e);
+        }catch(ClassNotFoundException e){
+        	throw ExceptionFactory.makeWebServiceException(e);
         }
     }
 	
@@ -301,5 +348,30 @@
 		
 		
 		return returnType;	
+	}
+	private Block createJAXBBlock(String name, Object jaxbObject, JAXBContext context) throws MessageException{
+		
+		JAXBIntrospector introspector = context.createJAXBIntrospector();
+		if(introspector.isElement(jaxbObject)){
+			return createJAXBBlock(jaxbObject, context);
+		}
+		else{
+			//Create JAXBElement then use that to create JAXBBlock.
+			Class clazz = jaxbObject.getClass();
+			JAXBElement<Object> element = new JAXBElement<Object>(new QName(name), clazz, jaxbObject);
+			JAXBBlockFactory factory = (JAXBBlockFactory)FactoryRegistry.getFactory(JAXBBlockFactory.class);
+			return factory.createFrom(element,context ,null);
+		}
+		
+	}
+	
+	protected Block createJAXBBlock(Object jaxbObject, JAXBContext context) throws MessageException{
+		JAXBBlockFactory factory = (JAXBBlockFactory)FactoryRegistry.getFactory(JAXBBlockFactory.class);
+		return factory.createFrom(jaxbObject,context,null);
+		
+	}
+	private boolean isXmlRootElementDefined(Class jaxbClass){
+		XmlRootElement root = (XmlRootElement) jaxbClass.getAnnotation(XmlRootElement.class);
+		return root !=null;
 	}
 }

Added: webservices/axis2/trunk/java/modules/jaxws/test-resources/wsdl/doclitbare.wsdl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test-resources/wsdl/doclitbare.wsdl?view=auto&rev=449530
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test-resources/wsdl/doclitbare.wsdl (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test-resources/wsdl/doclitbare.wsdl Sun Sep 24 17:16:47 2006
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+	xmlns:tns="http://doclitbare.sample.test.org"
+	xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="DoclitBare"
+	targetNamespace="http://doclitbare.sample.test.org">
+	
+	<wsdl:types>
+		<xsd:schema
+			targetNamespace="http://doclitbare.sample.test.org"
+			xmlns:tns="http://doclitbare.sample.test.org"
+			xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+		
+		<xsd:element name="String" type="xsd:string" />
+		<xsd:element name="Integer" type="xsd:int" />		
+
+		<xsd:element name="Composite">		
+			<xsd:complexType>
+				<xsd:sequence>
+					<xsd:element name="myElement" type="xsd:string" />
+				</xsd:sequence>
+			</xsd:complexType>
+		</xsd:element>
+
+		<!-- basic fault test, this should be mapped into message part
+		     of the generated faultBean
+		  -->
+		<xsd:element name="MyFault" type="xsd:string" />
+
+		<!-- wrapper exception and polymorphic fault test
+		     This bean should have an associated exception
+		  -->
+		<xsd:element name="MyBaseFaultBean" type="tns:BaseFault" />		
+
+		<xsd:complexType name="BaseFault">
+			<xsd:sequence>
+				<xsd:element name="message" type="xsd:string" />
+				<xsd:element name="error_code" type="xsd:int" />					
+			</xsd:sequence>
+		</xsd:complexType>
+
+		<xsd:complexType name="ExtendedFault">
+			<xsd:complexContent>
+			  <xsd:extension base="tns:BaseFault">
+			    <xsd:sequence>
+				<xsd:element name="another_message" type="xsd:string" />
+				<xsd:element name="another_error_code" type="xsd:int" />					
+			    </xsd:sequence>
+              </xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+
+		</xsd:schema>
+	</wsdl:types>
+
+	<wsdl:message name="NoParam" />
+
+	<wsdl:message name="SingleParam">
+		<wsdl:part name="allByMyself" element="tns:String" />
+	</wsdl:message>
+
+	<wsdl:message name="SingleParamInt">
+		<wsdl:part name="allByMyself" element="tns:Integer" />
+	</wsdl:message>
+	
+	<wsdl:message name="SingleParamOther">
+		<wsdl:part name="allByMyself" element="tns:Composite" />
+	</wsdl:message>	
+
+	<wsdl:message name="SimpleFault">
+		<wsdl:part name="description" element="tns:MyFault" />	
+	</wsdl:message>	
+
+	<wsdl:message name="FaultBeanWithWrapper">
+		<wsdl:part name="description" element="tns:MyBaseFaultBean" />	
+	</wsdl:message>	
+
+	<wsdl:portType name="DocLitBarePortType">
+		
+		<wsdl:operation name="oneWayEmpty">
+			<wsdl:input message="tns:NoParam" />
+		</wsdl:operation>
+		
+		<wsdl:operation name="oneWay">
+			<wsdl:input message="tns:SingleParam" />
+		</wsdl:operation>		
+		
+		<wsdl:operation name="twoWaySimple">
+			<wsdl:input message="tns:SingleParamInt" />
+			<wsdl:output message="tns:SingleParam" />
+		</wsdl:operation>
+		
+		<wsdl:operation name="twoWayHolder">
+			<wsdl:input message="tns:SingleParamOther" />
+			<wsdl:output message="tns:SingleParamOther" />
+			<wsdl:fault message="tns:SimpleFault" name="twoWayFault"/>
+			<wsdl:fault message="tns:FaultBeanWithWrapper" name="wrapperFault"/>
+		</wsdl:operation>
+			
+	</wsdl:portType>
+	
+	<wsdl:binding name="DocLitBare" type="tns:DocLitBarePortType">
+		<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="twoWaySimple">
+			<soap:operation soapAction="http://doclitbare.sample.test.org/twoWaySimple" />
+			<wsdl:input>
+				<soap:body use="literal"  />
+			</wsdl:input>
+			<wsdl:output>
+				<soap:body use="literal"  />
+			</wsdl:output>
+		</wsdl:operation>	
+		
+		<wsdl:operation name="twoWayHolder">
+			<soap:operation soapAction="http://doclitbare.sample.test.org/twoWayReturn" />
+			<wsdl:input>
+				<soap:body use="literal"  />
+			</wsdl:input>
+			<wsdl:output>
+				<soap:body use="literal"  />
+			</wsdl:output>
+			<wsdl:fault name="twoWayFault">
+				<soap:fault use="literal" name="twoWayFault" />
+			</wsdl:fault>			
+			<wsdl:fault name="wrapperFault">
+				<soap:fault use="literal" name="wrapperFault" />
+			</wsdl:fault>				
+		</wsdl:operation>
+		
+	
+	</wsdl:binding>
+	
+	<wsdl:service name="BareDocLitService">
+		<wsdl:port binding="tns:DocLitBare" name="BareDocLitPort">
+			<soap:address location="http://localhost:8080/axis2/services/BareDocLitService" />
+		</wsdl:port>
+	</wsdl:service>
+	
+</wsdl: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=449530&r1=449529&r2=449530
==============================================================================
--- 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 Sun Sep 24 17:16:47 2006
@@ -41,6 +41,7 @@
 import org.apache.axis2.jaxws.provider.*;
 import org.apache.axis2.jaxws.sample.AddNumbersTests;
 import org.apache.axis2.jaxws.sample.AddressBookTests;
+import org.apache.axis2.jaxws.sample.BareTests;
 import org.apache.axis2.jaxws.sample.MtomSampleTests;
 import org.apache.axis2.jaxws.sample.NonWrapTests;
 import org.apache.axis2.jaxws.sample.WrapTests;
@@ -91,6 +92,7 @@
         suite.addTestSuite(NonWrapTests.class);
         suite.addTestSuite(WrapTests.class);
         suite.addTestSuite(AddNumbersTests.class);
+        suite.addTestSuite(BareTests.class);
         
         // Start (and stop) the server only once for all the tests
         TestSetup testSetup = new TestSetup(suite) {

Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/BareTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/BareTests.java?view=auto&rev=449530
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/BareTests.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/BareTests.java Sun Sep 24 17:16:47 2006
@@ -0,0 +1,35 @@
+/**
+ * 
+ */
+package org.apache.axis2.jaxws.sample;
+
+import javax.xml.ws.BindingProvider;
+
+import junit.framework.TestCase;
+
+import org.apache.axis2.jaxws.sample.doclitbare.sei.BareDocLitService;
+import org.apache.axis2.jaxws.sample.doclitbare.sei.DocLitBarePortType;
+
+
+public class BareTests extends TestCase {
+	
+	public void testTwoWaySync(){
+		System.out.println("------------------------------");
+		System.out.println("Test : "+getName());
+		try{
+			
+			BareDocLitService service = new BareDocLitService();
+			DocLitBarePortType proxy = service.getBareDocLitPort();
+			 BindingProvider p = (BindingProvider) proxy;
+	            p.getRequestContext().put(
+	                    BindingProvider.SOAPACTION_URI_PROPERTY, new Boolean(true));
+	            p.getRequestContext().put(
+	                    BindingProvider.SOAPACTION_URI_PROPERTY, "twoWaySimple");
+			String response = proxy.twoWaySimple(10);
+			System.out.println("Sync Response =" + response);
+			System.out.println("------------------------------");
+		}catch(Exception e){
+			e.printStackTrace();
+		}
+	}
+}

Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/DocLitBarePortTypeImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/DocLitBarePortTypeImpl.java?view=auto&rev=449530
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/DocLitBarePortTypeImpl.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/DocLitBarePortTypeImpl.java Sun Sep 24 17:16:47 2006
@@ -0,0 +1,51 @@
+/**
+ * 
+ */
+package org.apache.axis2.jaxws.sample.doclitbare;
+
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.jws.WebParam.Mode;
+import javax.xml.ws.Holder;
+
+import org.apache.axis2.jaxws.sample.doclitbare.sei.DocLitBarePortType;
+import org.apache.axis2.jaxws.sample.doclitbare.sei.FaultBeanWithWrapper;
+import org.apache.axis2.jaxws.sample.doclitbare.sei.SimpleFault;
+import org.test.sample.doclitbare.Composite;
+
+@WebService(endpointInterface="org.apache.axis2.jaxws.sample.doclitbare.sei.DocLitBarePortType")
+public class DocLitBarePortTypeImpl implements DocLitBarePortType {
+
+	/* (non-Javadoc)
+	 * @see org.apache.axis2.jaxws.sample.doclitbare.sei.DocLitBarePortType#oneWayEmpty()
+	 */
+	public void oneWayEmpty() {
+		String retValue = "Running One way call";
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.axis2.jaxws.sample.doclitbare.sei.DocLitBarePortType#oneWay(java.lang.String)
+	 */
+	public void oneWay(String allByMyself) {
+		// TODO Auto-generated method stub
+		String retValue = "Running One way call with String input" + allByMyself;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.axis2.jaxws.sample.doclitbare.sei.DocLitBarePortType#twoWaySimple(int)
+	 */
+	public String twoWaySimple(int allByMyself) {
+		// TODO Auto-generated method stub
+		String retValue = "Acknowledgement: received input value as integer:"+ allByMyself;
+		return retValue;
+	}
+	
+	public void twoWayHolder(
+	        @WebParam(name = "Composite", targetNamespace = "http://org.test.sample.doclitbare", mode = Mode.INOUT, partName = "allByMyself")
+	        Holder<Composite> allByMyself)
+	        throws FaultBeanWithWrapper, SimpleFault{
+		
+	}
+	    
+}

Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/META-INF/doclitbare.wsdl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/META-INF/doclitbare.wsdl?view=auto&rev=449530
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/META-INF/doclitbare.wsdl (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/META-INF/doclitbare.wsdl Sun Sep 24 17:16:47 2006
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+	xmlns:tns="http://doclitbare.sample.test.org"
+	xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="DoclitBare"
+	targetNamespace="http://doclitbare.sample.test.org">
+	
+	<wsdl:types>
+		<xsd:schema
+			targetNamespace="http://doclitbare.sample.test.org"
+			xmlns:tns="http://doclitbare.sample.test.org"
+			xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+		
+		<xsd:element name="String" type="xsd:string" />
+		<xsd:element name="Integer" type="xsd:int" />		
+
+		<xsd:element name="Composite">		
+			<xsd:complexType>
+				<xsd:sequence>
+					<xsd:element name="myElement" type="xsd:string" />
+				</xsd:sequence>
+			</xsd:complexType>
+		</xsd:element>
+
+		<!-- basic fault test, this should be mapped into message part
+		     of the generated faultBean
+		  -->
+		<xsd:element name="MyFault" type="xsd:string" />
+
+		<!-- wrapper exception and polymorphic fault test
+		     This bean should have an associated exception
+		  -->
+		<xsd:element name="MyBaseFaultBean" type="tns:BaseFault" />		
+
+		<xsd:complexType name="BaseFault">
+			<xsd:sequence>
+				<xsd:element name="message" type="xsd:string" />
+				<xsd:element name="error_code" type="xsd:int" />					
+			</xsd:sequence>
+		</xsd:complexType>
+
+		<xsd:complexType name="ExtendedFault">
+			<xsd:complexContent>
+			  <xsd:extension base="tns:BaseFault">
+			    <xsd:sequence>
+				<xsd:element name="another_message" type="xsd:string" />
+				<xsd:element name="another_error_code" type="xsd:int" />					
+			    </xsd:sequence>
+              </xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+
+		</xsd:schema>
+	</wsdl:types>
+
+	<wsdl:message name="NoParam" />
+
+	<wsdl:message name="SingleParam">
+		<wsdl:part name="allByMyself" element="tns:String" />
+	</wsdl:message>
+
+	<wsdl:message name="SingleParamInt">
+		<wsdl:part name="allByMyself" element="tns:Integer" />
+	</wsdl:message>
+	
+	<wsdl:message name="SingleParamOther">
+		<wsdl:part name="allByMyself" element="tns:Composite" />
+	</wsdl:message>	
+
+	<wsdl:message name="SimpleFault">
+		<wsdl:part name="description" element="tns:MyFault" />	
+	</wsdl:message>	
+
+	<wsdl:message name="FaultBeanWithWrapper">
+		<wsdl:part name="description" element="tns:MyBaseFaultBean" />	
+	</wsdl:message>	
+
+	<wsdl:portType name="DocLitBarePortType">
+		
+		<wsdl:operation name="oneWayEmpty">
+			<wsdl:input message="tns:NoParam" />
+		</wsdl:operation>
+		
+		<wsdl:operation name="oneWay">
+			<wsdl:input message="tns:SingleParam" />
+		</wsdl:operation>		
+		
+		<wsdl:operation name="twoWaySimple">
+			<wsdl:input message="tns:SingleParamInt" />
+			<wsdl:output message="tns:SingleParam" />
+		</wsdl:operation>
+		
+		<wsdl:operation name="twoWayHolder">
+			<wsdl:input message="tns:SingleParamOther" />
+			<wsdl:output message="tns:SingleParamOther" />
+			<wsdl:fault message="tns:SimpleFault" name="twoWayFault"/>
+			<wsdl:fault message="tns:FaultBeanWithWrapper" name="wrapperFault"/>
+		</wsdl:operation>
+			
+	</wsdl:portType>
+	
+	<wsdl:binding name="DocLitBare" type="tns:DocLitBarePortType">
+		<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="twoWaySimple">
+			<soap:operation soapAction="twoWaySimple" />
+			<wsdl:input>
+				<soap:body use="literal"  />
+			</wsdl:input>
+			<wsdl:output>
+				<soap:body use="literal"  />
+			</wsdl:output>
+		</wsdl:operation>	
+		
+		<wsdl:operation name="twoWayHolder">
+			<soap:operation soapAction="http://doclitbare.sample.test.org/twoWayReturn" />
+			<wsdl:input>
+				<soap:body use="literal"  />
+			</wsdl:input>
+			<wsdl:output>
+				<soap:body use="literal"  />
+			</wsdl:output>
+			<wsdl:fault name="twoWayFault">
+				<soap:fault use="literal" name="twoWayFault" />
+			</wsdl:fault>			
+			<wsdl:fault name="wrapperFault">
+				<soap:fault use="literal" name="wrapperFault" />
+			</wsdl:fault>				
+		</wsdl:operation>
+		
+	
+	</wsdl:binding>
+	
+	<wsdl:service name="BareDocLitService">
+		<wsdl:port binding="tns:DocLitBare" name="BareDocLitPort">
+			<soap:address location="http://localhost:8080/axis2/services/BareDocLitService" />
+		</wsdl:port>
+	</wsdl:service>
+	
+</wsdl:definitions>

Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/META-INF/services.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/META-INF/services.xml?view=auto&rev=449530
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/META-INF/services.xml (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/META-INF/services.xml Sun Sep 24 17:16:47 2006
@@ -0,0 +1,10 @@
+<serviceGroup>
+ <service name="BareDocLitService">
+  <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.sample.doclitbare.DocLitBarePortTypeImpl</parameter>
+    <actionMapping/>
+ </service>
+</serviceGroup>
+

Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/sei/BareDocLitService.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/sei/BareDocLitService.java?view=auto&rev=449530
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/sei/BareDocLitService.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/sei/BareDocLitService.java Sun Sep 24 17:16:47 2006
@@ -0,0 +1,62 @@
+
+package org.apache.axis2.jaxws.sample.doclitbare.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 = "BareDocLitService", targetNamespace = "http://org.test.sample.doclitbare", wsdlLocation = "proxy_doclit.wsdl")
+public class BareDocLitService
+    extends Service
+{
+
+    private final static URL BAREDOCLITSERVICE_WSDL_LOCATION;
+
+    private static String wsdlLocation="/test/org/apache/axis2/jaxws/sample/doclitbare/META-INF/doclitbare.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();
+        }
+        BAREDOCLITSERVICE_WSDL_LOCATION = url;
+    }
+
+    public BareDocLitService(URL wsdlLocation, QName serviceName) {
+        super(wsdlLocation, serviceName);
+    }
+
+    public BareDocLitService() {
+        super(BAREDOCLITSERVICE_WSDL_LOCATION, new QName("http://doclitbare.sample.test.org", "BareDocLitService"));
+    }
+
+    /**
+     * 
+     * @return
+     *     returns DocLitBarePortType
+     */
+    @WebEndpoint(name = "BareDocLitPort")
+    public DocLitBarePortType getBareDocLitPort() {
+        return (DocLitBarePortType)super.getPort(new QName("http://doclitbare.sample.test.org", "BareDocLitPort"), DocLitBarePortType.class);
+    }
+
+}

Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/sei/DocLitBarePortType.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/sei/DocLitBarePortType.java?view=auto&rev=449530
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/sei/DocLitBarePortType.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/sei/DocLitBarePortType.java Sun Sep 24 17:16:47 2006
@@ -0,0 +1,70 @@
+
+package org.apache.axis2.jaxws.sample.doclitbare.sei;
+
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebParam.Mode;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.ParameterStyle;
+import javax.xml.ws.Holder;
+
+import org.test.sample.doclitbare.Composite;
+
+
+/**
+ * This class was generated by the JAXWS SI.
+ * JAX-WS RI 2.0_01-b15-fcs
+ * Generated source version: 2.0
+ * 
+ */
+@WebService(name = "DocLitBarePortType", targetNamespace = "http://doclitbare.sample.test.org")
+@SOAPBinding(parameterStyle = ParameterStyle.BARE)
+public interface DocLitBarePortType {
+
+
+    /**
+     * 
+     */
+    @WebMethod(action = "http://doclitbare.sample.test.org/oneWayEmpty")
+    @Oneway
+    public void oneWayEmpty();
+
+    /**
+     * 
+     * @param allByMyself
+     */
+    @WebMethod(action = "http://doclitbare.sample.test.org/oneWay")
+    @Oneway
+    public void oneWay(
+        @WebParam(name = "String", targetNamespace = "http://doclitbare.sample.test.org", partName = "allByMyself")
+        String allByMyself);
+
+    /**
+     * 
+     * @param allByMyself
+     * @return
+     *     returns java.lang.String
+     */
+    @WebMethod(action = "http://doclitbare.sample.test.org/twoWaySimple")
+    @WebResult(name = "String", targetNamespace = "http://doclitbare.sample.test.org", partName = "allByMyself")
+    public String twoWaySimple(
+        @WebParam(name = "Integer", targetNamespace = "http://doclitbare.sample.test.org", partName = "allByMyself")
+        int allByMyself);
+
+    /**
+     * 
+     * @param allByMyself
+     * @throws FaultBeanWithWrapper
+     * @throws SimpleFault
+     */
+    @WebMethod(action = "http://doclitbare.sample.test.org/twoWayReturn")
+    public void twoWayHolder(
+        @WebParam(name = "Composite", targetNamespace = "http://doclitbare.sample.test.org", mode = Mode.INOUT, partName = "allByMyself")
+        Holder<Composite> allByMyself)
+        throws FaultBeanWithWrapper, SimpleFault
+    ;
+
+}

Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/sei/FaultBeanWithWrapper.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/sei/FaultBeanWithWrapper.java?view=auto&rev=449530
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/sei/FaultBeanWithWrapper.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/sei/FaultBeanWithWrapper.java Sun Sep 24 17:16:47 2006
@@ -0,0 +1,56 @@
+
+package org.apache.axis2.jaxws.sample.doclitbare.sei;
+
+import javax.xml.ws.WebFault;
+
+import org.test.sample.doclitbare.BaseFault;
+
+
+/**
+ * This class was generated by the JAXWS SI.
+ * JAX-WS RI 2.0_01-b15-fcs
+ * Generated source version: 2.0
+ * 
+ */
+@WebFault(name = "MyBaseFaultBean", faultBean="", targetNamespace = "http://doclitbare.sample.test.org")
+public class FaultBeanWithWrapper
+    extends Exception
+{
+
+    /**
+     * Java type that goes as soapenv:Fault detail element.
+     * 
+     */
+    private BaseFault faultInfo;
+
+    /**
+     * 
+     * @param faultInfo
+     * @param message
+     */
+    public FaultBeanWithWrapper(String message, BaseFault faultInfo) {
+        super(message);
+        this.faultInfo = faultInfo;
+    }
+
+    /**
+     * 
+     * @param faultInfo
+     * @param message
+     * @param cause
+     */
+    public FaultBeanWithWrapper(String message, BaseFault faultInfo, Throwable cause) {
+        super(message, cause);
+        this.faultInfo = faultInfo;
+    }
+
+    /**
+     * 
+     * @return
+     *     returns fault bean: org.test.sample.doclitbare.BaseFault
+     */
+    public BaseFault getFaultInfo() {
+        return faultInfo;
+    }
+
+}

Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/sei/SimpleFault.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/sei/SimpleFault.java?view=auto&rev=449530
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/sei/SimpleFault.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/doclitbare/sei/SimpleFault.java Sun Sep 24 17:16:47 2006
@@ -0,0 +1,54 @@
+
+package org.apache.axis2.jaxws.sample.doclitbare.sei;
+
+import javax.xml.ws.WebFault;
+
+
+/**
+ * This class was generated by the JAXWS SI.
+ * JAX-WS RI 2.0_01-b15-fcs
+ * Generated source version: 2.0
+ * 
+ */
+@WebFault(name = "MyFault", faultBean="", targetNamespace = "http://doclitbare.sample.test.org")
+public class SimpleFault
+    extends Exception
+{
+
+    /**
+     * Java type that goes as soapenv:Fault detail element.
+     * 
+     */
+    private String faultInfo;
+
+    /**
+     * 
+     * @param faultInfo
+     * @param message
+     */
+    public SimpleFault(String message, String faultInfo) {
+        super(message);
+        this.faultInfo = faultInfo;
+    }
+
+    /**
+     * 
+     * @param faultInfo
+     * @param message
+     * @param cause
+     */
+    public SimpleFault(String message, String faultInfo, Throwable cause) {
+        super(message, cause);
+        this.faultInfo = faultInfo;
+    }
+
+    /**
+     * 
+     * @return
+     *     returns fault bean: java.lang.String
+     */
+    public String getFaultInfo() {
+        return faultInfo;
+    }
+
+}



---------------------------------------------------------------------
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