svn commit: r916680 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
Author: amilas Date: Fri Feb 26 13:44:57 2010 New Revision: 916680 URL: http://svn.apache.org/viewvc?rev=916680&view=rev Log: isWrapped is used with the RPCMessage receiver. Its' meaning is whether the generated elements from an POJO wrapped with the method name or not. if we set the wrapped here based on the wsdl is rpc/lit type or not then that may cause problems if some one put a generated wsdl into a .aar file with the rpc message receiver. Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java?rev=916680&r1=916679&r2=916680&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java Fri Feb 26 13:44:57 2010 @@ -688,7 +688,6 @@ if (isSetMessageQNames) { BindingOperationEntry boe = find(wrappableBOEs, wsdl4jBindingOperation); boolean isWrapped = (boe == null) ? false : boe.isWrappedInput(); -axisInMessage.setWrapped(isWrapped); addQNameReference(axisInMessage, wsdl4jOperation, wsdl4jBindingInput, isWrapped);
svn commit: r916949 - /axis/axis2/java/sandesha/trunk/modules/core/src/main/java/org/apache/sandesha2/util/FaultManager.java
Author: amilas Date: Sat Feb 27 13:03:58 2010 New Revision: 916949 URL: http://svn.apache.org/viewvc?rev=916949&view=rev Log: commit the patch for SANDESHA2-199 Modified: axis/axis2/java/sandesha/trunk/modules/core/src/main/java/org/apache/sandesha2/util/FaultManager.java Modified: axis/axis2/java/sandesha/trunk/modules/core/src/main/java/org/apache/sandesha2/util/FaultManager.java URL: http://svn.apache.org/viewvc/axis/axis2/java/sandesha/trunk/modules/core/src/main/java/org/apache/sandesha2/util/FaultManager.java?rev=916949&r1=916948&r2=916949&view=diff == --- axis/axis2/java/sandesha/trunk/modules/core/src/main/java/org/apache/sandesha2/util/FaultManager.java (original) +++ axis/axis2/java/sandesha/trunk/modules/core/src/main/java/org/apache/sandesha2/util/FaultManager.java Sat Feb 27 13:03:58 2010 @@ -1079,7 +1079,20 @@ ((AxisCallback)callback).onError(fault); } - } +// this is actually to support synapse. Synpase Axis Operation does not have a callBackMessageReceiver + // synapse AxisOperation always has the synapse message receiver. And also to be send in the synapse + // fault mediators we need to set the SENDING_FAULT property as well. +} else if (msgReceiver != null) { +try { +//since there is no reponse we set this message as the fault reply +context.getOptions().setRelationships(new RelatesTo[]{new RelatesTo(context.getMessageID())}); +context.setProperty("SENDING_FAULT", Boolean.TRUE); +msgReceiver.receive(context); +} catch (AxisFault axisFault) { +log.error(axisFault.getMessage()); +throw new SandeshaException("Can not invoke the message receiver ", axisFault); +} +} } } }
svn commit: r919041 - in /axis/axis2/java/core/trunk/modules: codegen/src/org/apache/axis2/wsdl/i18n/resource.properties kernel/src/org/apache/axis2/util/CommandLineOptionConstants.java
Author: amilas Date: Thu Mar 4 15:58:47 2010 New Revision: 919041 URL: http://svn.apache.org/viewvc?rev=919041&view=rev Log: fixed a spelling mistake. Modified: axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/i18n/resource.properties axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/util/CommandLineOptionConstants.java Modified: axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/i18n/resource.properties URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/i18n/resource.properties?rev=919041&r1=919040&r2=919041&view=diff == --- axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/i18n/resource.properties (original) +++ axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/i18n/resource.properties Thu Mar 4 15:58:47 2010 @@ -83,7 +83,7 @@ wsdl2code.arg46= \t\t\t -EbindingFileName (for jaxbri) - specify the file path for the episode file wsdl2code.arg47= -oaa -change the absolute http addresses to local file addresses generated by wsdl2java tool wsdl2code.arg48= -ebc -generated Exceptions are inherited from this exception rather than the java.lang.Exception class -wsdl2code.arg49= -uom -by default the first letter of the generated method name changeed to lowercase. This option stops that and make it same as operation name +wsdl2code.arg49= -uon -by default the first letter of the generated method name changeed to lowercase. This option stops that and make it same as operation name ## prop file loader # propfileload.frameworkMismatch=Number of frameworks and extension names do not match! Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/util/CommandLineOptionConstants.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/util/CommandLineOptionConstants.java?rev=919041&r1=919040&r2=919041&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/util/CommandLineOptionConstants.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/util/CommandLineOptionConstants.java Thu Mar 4 15:58:47 2010 @@ -88,7 +88,7 @@ String EXCLUDE_PAKAGES_OPTION_LONG = "exclude-packages"; String SKELTON_INTERFACE_NAME_OPTION = "sin"; String SKELTON_INTERFACE_NAME_OPTION_LONG = "skelton-interface-name"; -String USE_OPERATION_NAME = "uom"; +String USE_OPERATION_NAME = "uon"; String USE_OPERATION_NAME_LONG = "use-operation-name"; String SKELTON_CLASS_NAME_OPTION = "scn"; String SKELTON_CLASS_NAME_OPTION_LONG = "skelton-class-name";
svn commit: r919960 - /axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java
Author: amilas Date: Sun Mar 7 10:08:38 2010 New Revision: 919960 URL: http://svn.apache.org/viewvc?rev=919960&view=rev Log: always transport out should not be taken from the Http transport. Most of the time correct transport out is set in the message context itself. so first should be look at it and then InCommingtransport name. http transport out can be looked only if nothing is there. Modified: axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java Modified: axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java?rev=919960&r1=919959&r2=919960&view=diff == --- axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java (original) +++ axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java Sun Mar 7 10:08:38 2010 @@ -22,6 +22,7 @@ import org.apache.axiom.om.OMOutputFormat; import org.apache.axis2.AxisFault; import org.apache.axis2.Constants; +import org.apache.axis2.engine.AxisConfiguration; import org.apache.axis2.addressing.EndpointReference; import org.apache.axis2.client.ServiceClient; import org.apache.axis2.context.ConfigurationContext; @@ -30,6 +31,7 @@ import org.apache.axis2.description.Parameter; import org.apache.axis2.description.TransportOutDescription; import org.apache.axis2.description.InOutAxisOperation; +import org.apache.axis2.description.WSDL2Constants; import org.apache.axis2.handlers.AbstractHandler; import org.apache.axis2.transport.MessageFormatter; import org.apache.axis2.transport.OutTransportInfo; @@ -165,8 +167,18 @@ format.setMimeBoundary((String) mimeBoundaryProperty); } -TransportOutDescription transportOut = msgContext.getConfigurationContext(). - getAxisConfiguration().getTransportOut(Constants.TRANSPORT_HTTP); +AxisConfiguration axisConfiguration = msgContext.getConfigurationContext().getAxisConfiguration(); +TransportOutDescription transportOut = null; +if (msgContext.getTransportOut() != null){ + transportOut = msgContext.getTransportOut(); +} else if (msgContext.getIncomingTransportName() != null){ +transportOut = axisConfiguration.getTransportOut(msgContext.getIncomingTransportName()); +} else if (msgContext.getOperationContext().getMessageContext(WSDL2Constants.MESSAGE_LABEL_IN) != null){ +String transportName = msgContext.getOperationContext().getMessageContext(WSDL2Constants.MESSAGE_LABEL_IN).getIncomingTransportName(); +transportOut = msgContext.getConfigurationContext().getAxisConfiguration().getTransportOut(transportName); +} else { +transportOut = msgContext.getConfigurationContext().getAxisConfiguration().getTransportOut(Constants.TRANSPORT_HTTP); +} // set the timeout properteies
svn commit: r919967 - /axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java
Author: amilas Date: Sun Mar 7 11:16:14 2010 New Revision: 919967 URL: http://svn.apache.org/viewvc?rev=919967&view=rev Log: fixing the issue AXIS2-4641. added a null check for message context. Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java?rev=919967&r1=919966&r2=919967&view=diff == --- axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java (original) +++ axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java Sun Mar 7 11:16:14 2010 @@ -293,12 +293,13 @@ SimpleDateFormat zulu = new SimpleDateFormat("-MM-dd"); MessageContext messageContext = MessageContext.getCurrentMessageContext(); -AxisService axisServce = messageContext.getAxisService(); -// if the user has given a pirticualr timezone we use it. -if (axisServce.getParameter("TimeZone") != null){ - zulu.setTimeZone(TimeZone.getTimeZone((String)axisServce.getParameter("TimeZone").getValue())); +if (messageContext != null) { +AxisService axisServce = messageContext.getAxisService(); +// if the user has given a pirticualr timezone we use it. +if (axisServce.getParameter("TimeZone") != null) { +zulu.setTimeZone(TimeZone.getTimeZone((String) axisServce.getParameter("TimeZone").getValue())); +} } - return zulu.format(obj); } return obj.toString();
svn commit: r919972 - /axis/axis2/java/core/trunk/modules/osgi/resources/org/apache/axis2/osgi/deployment/axis2.xml
Author: amilas Date: Sun Mar 7 11:34:23 2010 New Revision: 919972 URL: http://svn.apache.org/viewvc?rev=919972&view=rev Log: fixing issue AXIS2-4639 Modified: axis/axis2/java/core/trunk/modules/osgi/resources/org/apache/axis2/osgi/deployment/axis2.xml Modified: axis/axis2/java/core/trunk/modules/osgi/resources/org/apache/axis2/osgi/deployment/axis2.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/osgi/resources/org/apache/axis2/osgi/deployment/axis2.xml?rev=919972&r1=919971&r2=919972&view=diff == --- axis/axis2/java/core/trunk/modules/osgi/resources/org/apache/axis2/osgi/deployment/axis2.xml (original) +++ axis/axis2/java/core/trunk/modules/osgi/resources/org/apache/axis2/osgi/deployment/axis2.xml Sun Mar 7 11:34:23 2010 @@ -332,6 +332,7 @@ +
svn commit: r921460 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/Version.java
Author: amilas Date: Wed Mar 10 17:24:50 2010 New Revision: 921460 URL: http://svn.apache.org/viewvc?rev=921460&view=rev Log: adding support to module files ending with .SNAPSHOT Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/Version.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/Version.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/Version.java?rev=921460&r1=921459&r2=921460&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/Version.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/Version.java Wed Mar 10 17:24:50 2010 @@ -65,6 +65,9 @@ public class Version implements Serializ if (dashIndex != -1) { qualifier = versionString.substring(dashIndex + 1); versionString = versionString.substring(0, dashIndex); +} else if (versionString.endsWith(".SNAPSHOT")){ +qualifier = "SNAPSHOT"; +versionString = versionString.substring(0,versionString.indexOf(".SNAPSHOT")); } else { qualifier = null; }
svn commit: r921685 - in /axis/axis2/java/core/trunk/modules: integration/test/org/apache/axis2/engine/ kernel/src/org/apache/axis2/client/ kernel/src/org/apache/axis2/context/ kernel/src/org/apache/a
Author: amilas Date: Thu Mar 11 04:21:41 2010 New Revision: 921685 URL: http://svn.apache.org/viewvc?rev=921685&view=rev Log: removing ListnerManager.defaultConfigurationContext and use the MessageConget.getCurrentMessageContext inorder to get the configuration context for clients running inside the axis2 server Modified: axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/engine/OperationContextSaveTest.java axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/client/ServiceClient.java axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/ServiceContext.java axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/engine/ListenerManager.java axis/axis2/java/core/trunk/modules/osgi/src/org/apache/axis2/osgi/deployment/OSGiConfigurationContextFactory.java axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/AxisServlet.java Modified: axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/engine/OperationContextSaveTest.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/engine/OperationContextSaveTest.java?rev=921685&r1=921684&r2=921685&view=diff == --- axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/engine/OperationContextSaveTest.java (original) +++ axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/engine/OperationContextSaveTest.java Thu Mar 11 04:21:41 2010 @@ -329,12 +329,7 @@ public class OperationContextSaveTest ex assertTrue(comparesOk); ServiceContext restored_srvCtx = opctx_restored.getServiceContext(); -comparesOk = restored_srvCtx.isEquivalent(serviceContext); -log.debug( -"OperationContextSaveTest:testSaveAndRestore(): ServiceContext equivalency [" + -comparesOk + "]"); -assertTrue(comparesOk); - + ServiceGroupContext restored_sgCtx = restored_srvCtx.getServiceGroupContext(); comparesOk = restored_sgCtx.isEquivalent(serviceGroupContext); log.debug( Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/client/ServiceClient.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/client/ServiceClient.java?rev=921685&r1=921684&r2=921685&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/client/ServiceClient.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/client/ServiceClient.java Thu Mar 11 04:21:41 2010 @@ -147,13 +147,12 @@ public class ServiceClient { private void configureServiceClient(ConfigurationContext configContext, AxisService axisService) throws AxisFault { if (configContext == null) { -if (ListenerManager.defaultConfigurationContext == null) { +if (MessageContext.getCurrentMessageContext() == null) { configContext = ConfigurationContextFactory. createConfigurationContextFromFileSystem(null, null); -ListenerManager.defaultConfigurationContext = configContext; createConfigCtx = true; } else { -configContext = ListenerManager.defaultConfigurationContext; +configContext = MessageContext.getCurrentMessageContext().getConfigurationContext(); } } this.configContext = configContext; Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/ServiceContext.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/ServiceContext.java?rev=921685&r1=921684&r2=921685&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/ServiceContext.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/ServiceContext.java Thu Mar 11 04:21:41 2010 @@ -224,22 +224,6 @@ public class ServiceContext extends Abst this.targetEPR = targetEPR; } -public EndpointReference getMyEPR() { -if (myEPR == null) { -try { -if (ListenerManager.defaultConfigurationContext != null) { -ListenerManager listenerManager = - ListenerManager.defaultConfigurationContext.getListenerManager(); -myEPR = listenerManager.getEPRforService(axisService.getName(), null, null); -} -} catch (A
svn commit: r921694 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
Author: amilas Date: Thu Mar 11 05:19:48 2010 New Revision: 921694 URL: http://svn.apache.org/viewvc?rev=921694&view=rev Log: fixed issue AXIS2-4650 Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java?rev=921694&r1=921693&r2=921694&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java Thu Mar 11 05:19:48 2010 @@ -629,7 +629,7 @@ public class DefaultSchemaGenerator impl throws Exception { String propertyName; if (isArrayType) { -propertyName = type.getComponentType().getName(); +propertyName = getClassName(type.getComponentType()); if (type.getComponentType().isArray()) { // this is a double array element Class simpleType = type.getComponentType(); @@ -689,7 +689,7 @@ public class DefaultSchemaGenerator impl return; } } else { -propertyName = type.getName(); +propertyName = getClassName(type); } if (isArrayType && "byte".equals(propertyName)) { propertyName = "base64Binary";
svn commit: r924637 - /axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
Author: amilas Date: Thu Mar 18 05:20:12 2010 New Revision: 924637 URL: http://svn.apache.org/viewvc?rev=924637&view=rev Log: Currently adb parsing avoids the local part check for the parts comes after an array. For those part elements if the part is not there becase of minOccurszero then those parts pase with the wrong class type. so need to check the class type as above Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java?rev=924637&r1=924636&r2=924637&view=diff == --- axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java (original) +++ axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java Thu Mar 18 05:20:12 2010 @@ -574,12 +574,34 @@ public class BeanUtil { omElement = ProcessElement(classType, omElement, helper, parts, currentLocalName, retObjs, count, objectSupplier, genericType); while (omElement != null) { -count ++; -omElement = ProcessElement((Class)javaTypes[count], omElement, +count++; +// if the local part is not match. this means element is not present +// due to min occurs zero. +// we need to hard code arg and item since that has been used in RPCService client +// and some test cases +while ((parameterNames != null) && + (!omElement.getQName().getLocalPart().startsWith("arg")) && + (!omElement.getQName().getLocalPart().startsWith("item")) && + !omElement.getQName().getLocalPart().equals(parameterNames[count])) { +// POJO handles OMElement in a differnt way so need this check for OMElement +Class paramClassType = (Class) javaTypes[count]; +if (!paramClassType.getName().equals(OMElement.class.getName())) { +count++; +} else { +break; +} +} + +currentLocalName = omElement.getLocalName(); +classType = (Class) javaTypes[count]; +if (genericParameterTypes != null) { +genericType = genericParameterTypes[count]; +} +omElement = ProcessElement((Class) javaTypes[count], omElement, helper, parts, omElement.getLocalName(), retObjs, count, objectSupplier, genericType); } -count ++; +count++; } // Ensure that we have at least a zero element array
svn commit: r931186 - /axis/axis2/java/core/scratch/java/amila/
Author: amilas Date: Tue Apr 6 15:32:47 2010 New Revision: 931186 URL: http://svn.apache.org/viewvc?rev=931186&view=rev Log: creating a scratch directory Added: axis/axis2/java/core/scratch/java/amila/
svn commit: r931191 - /axis/axis2/java/core/scratch/java/amila/axis2-spring/pom.xml
Author: amilas Date: Tue Apr 6 15:50:45 2010 New Revision: 931191 URL: http://svn.apache.org/viewvc?rev=931191&view=rev Log: increase the jdk version to support anotations Modified: axis/axis2/java/core/scratch/java/amila/axis2-spring/pom.xml Modified: axis/axis2/java/core/scratch/java/amila/axis2-spring/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/scratch/java/amila/axis2-spring/pom.xml?rev=931191&r1=931190&r2=931191&view=diff == --- axis/axis2/java/core/scratch/java/amila/axis2-spring/pom.xml (original) +++ axis/axis2/java/core/scratch/java/amila/axis2-spring/pom.xml Tue Apr 6 15:50:45 2010 @@ -70,7 +70,18 @@ - + + + +maven-compiler-plugin +true + +1.5 +1.5 + + + + 2.5.6 SNAPSHOT
svn commit: r935122 - /axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
Author: amilas Date: Sat Apr 17 04:46:26 2010 New Revision: 935122 URL: http://svn.apache.org/viewvc?rev=935122&view=rev Log: added a null check. otherwise stub throws a null pointer exception other than the original one Modified: axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl Modified: axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl?rev=935122&r1=935121&r2=935122&view=diff == --- axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl (original) +++ axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl Sat Apr 17 04:46:26 2010 @@ -571,7 +571,9 @@ throw f; } } finally { - _messageContext.getTransportOut().getSender().cleanup(_messageContext); +if (_messageContext.getTransportOut() != null) { + _messageContext.getTransportOut().getSender().cleanup(_messageContext); +} } } @@ -1098,11 +1100,15 @@ throw f; } } finally { - _messageContext.getTransportOut().getSender().cleanup(_messageContext); +if (_messageContext.getTransportOut() != null) { + _messageContext.getTransportOut().getSender().cleanup(_messageContext); +} } - _messageContext.getTransportOut().getSender().cleanup(_messageContext); + if (_messageContext.getTransportOut() != null) { + _messageContext.getTransportOut().getSender().cleanup(_messageContext); + } return; }
svn commit: r935124 - in /axis/axis2/java/core/trunk/modules: kernel/src/org/apache/axis2/transport/TransportUtils.java transport/http/src/org/apache/axis2/transport/http/util/RESTUtil.java
Author: amilas Date: Sat Apr 17 04:49:56 2010 New Revision: 935124 URL: http://svn.apache.org/viewvc?rev=935124&view=rev Log: set the message type for empty envelops Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/util/RESTUtil.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java?rev=935124&r1=935123&r2=935124&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java Sat Apr 17 04:49:56 2010 @@ -169,27 +169,7 @@ public class TransportUtils { OMElement documentElement = null; String type = null; if (contentType != null) { -int index = contentType.indexOf(';'); -if (index > 0) { -type = contentType.substring(0, index); -} else { -type = contentType; -} -// Some services send REST responces as text/xml. We should convert it to -// application/xml if its a REST response, if not it will try to use the SOAPMessageBuilder. -// isDoingREST should already be properly set by HTTPTransportUtils.initializeMessageContext -if (msgContext.isDoingREST() && HTTPConstants.MEDIA_TYPE_TEXT_XML.equals(type)) { -//if (HTTPConstants.MEDIA_TYPE_TEXT_XML.equals(type)) { -if (msgContext.isServerSide()) { -if (msgContext.getSoapAction() == null) { -type = HTTPConstants.MEDIA_TYPE_APPLICATION_XML; -} -//} else if (msgContext.isDoingREST() && -// !msgContext.isPropertyTrue(Constants.Configuration.SOAP_RESPONSE_MEP)) { -} else if (!msgContext.isPropertyTrue(Constants.Configuration.SOAP_RESPONSE_MEP)) { -type = HTTPConstants.MEDIA_TYPE_APPLICATION_XML; -} -} +type = getContentType(contentType, msgContext); Builder builder = BuilderUtil.getBuilderFromSelector(type, msgContext); if (builder != null) { if (log.isDebugEnabled()) { @@ -221,6 +201,29 @@ public class TransportUtils { return documentElement; } +public static String getContentType(String contentType, MessageContext msgContext) { +String type; +int index = contentType.indexOf(';'); +if (index > 0) { +type = contentType.substring(0, index); +} else { +type = contentType; +} +// Some services send REST responces as text/xml. We should convert it to +// application/xml if its a REST response, if not it will try to use the SOAPMessageBuilder. +// isDoingREST should already be properly set by HTTPTransportUtils.initializeMessageContext +if (msgContext.isDoingREST() && HTTPConstants.MEDIA_TYPE_TEXT_XML.equals(type)) { +if (msgContext.isServerSide()) { +if (msgContext.getSoapAction() == null) { +type = HTTPConstants.MEDIA_TYPE_APPLICATION_XML; +} +} else if (!msgContext.isPropertyTrue(Constants.Configuration.SOAP_RESPONSE_MEP)) { +type = HTTPConstants.MEDIA_TYPE_APPLICATION_XML; +} +} +return type; +} + /** * Extracts and returns the character set encoding from the * Content-type header Modified: axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/util/RESTUtil.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/util/RESTUtil.java?rev=935124&r1=935123&r2=935124&view=diff == --- axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/util/RESTUtil.java (original) +++ axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/util/RESTUtil.java Sat Apr 17 04:49:56 2010 @@ -110,6 +110,7 @@ public class RESTUtil { SOAPEnvelope soapEnvelope; if (msgContext.getAxisService() == null) { soapEnvelope = TransportUtils.createSOAPEnvelope(null); +msgContext.setProperty(Constants.Configuration.MESSAGE_TYPE, TransportUtils.getContentType(contentType, msgContext));
svn commit: r935846 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
Author: amilas Date: Tue Apr 20 09:37:51 2010 New Revision: 935846 URL: http://svn.apache.org/viewvc?rev=935846&view=rev Log: if the package name is started with java.util then index of it returns 0 and hence the condition won't evaluate to false. It is enough to check index of < 0. Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java?rev=935846&r1=935845&r2=935846&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java Tue Apr 20 09:37:51 2010 @@ -511,9 +511,9 @@ public class DefaultSchemaGenerator impl eltOuter.setQName(schemaTypeName); Class sup = javaType.getSuperclass(); -if ((sup != null) && !("java.lang.Object".compareTo(sup.getName()) == 0) && - !(getQualifiedName(sup.getPackage()).indexOf("org.apache.axis2") > 0) -&& !(getQualifiedName(sup.getPackage()).indexOf("java.util") > 0)) +if ((sup != null) && ("java.lang.Object".compareTo(sup.getName()) != 0) && + (getQualifiedName(sup.getPackage()).indexOf("org.apache.axis2") < 0) +&& (getQualifiedName(sup.getPackage()).indexOf("java.util") < 0)) { String superClassName = sup.getName(); String superclassname = getSimpleClassName(sup);
svn commit: r937237 - in /axis/axis2/java/core/trunk/modules: kernel/src/org/apache/axis2/description/AxisService.java transport/http/src/org/apache/axis2/transport/http/ListingAgent.java
Author: amilas Date: Fri Apr 23 10:34:41 2010 New Revision: 937237 URL: http://svn.apache.org/viewvc?rev=937237&view=rev Log: apply the patch for AXIS2-4642 Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService.java axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/ListingAgent.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService.java?rev=937237&r1=937236&r2=937237&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService.java Fri Apr 23 10:34:41 2010 @@ -922,6 +922,12 @@ public class AxisService extends AxisDes httpLocationDispatcherMap.put(string, axisOperation); } + /** +* Prints the schema to the given output stream. +* @param out The output stream for the data to be written. NOTE: the stream is not closed after the operation, +*it is the responsibility of the caller to close the stream after usage. +* @throws AxisFault +*/ public void printSchema(OutputStream out) throws AxisFault { for (int i = 0; i < schemaList.size(); i++) { XmlSchema schema = addNameSpaces(i); @@ -1052,6 +1058,15 @@ public class AxisService extends AxisDes return eprs; } + /** +* Prints the given definition object. +* @param definition The definition. +* @param out The output stream the data to be written to. NOTE: the stream is not closed after the operation, +*it is the responsibility of the caller to close the stream after usage. +* @param requestIP The host IP address. +* @throws AxisFault +* @throws WSDLException +*/ private void printDefinitionObject(Definition definition, OutputStream out, String requestIP) throws AxisFault, WSDLException { if (isModifyUserWSDLPortAddress()) { @@ -1070,6 +1085,14 @@ public class AxisService extends AxisDes printUserWSDL(out, wsdlName, null); } + /** +* Prints the user WSDL. +* @param out The output stream for the data to be written. NOTE: the stream is not closed after the operation, +*it is the responsibility of the caller to close the stream after usage. +* @param wsdlName The name of the WSDL. +* @param ip The host IP address. +* @throws AxisFault +*/ public void printUserWSDL(OutputStream out, String wsdlName, String ip) throws AxisFault { Definition definition = null; @@ -1255,7 +1278,8 @@ public class AxisService extends AxisDes * OutputStream. * * @param out -*destination stream. +*destination stream, NOTE: the stream is not closed after the operation, +*it is the responsibility of the caller to close the stream after usage. * @param xsd *schema name * @return -1 implies not found, 0 implies redirect to root, 1 implies @@ -1272,7 +1296,6 @@ public class AxisService extends AxisDes updateSchemaLocation(schema); schema.write(new OutputStreamWriter(out, "UTF8")); out.flush(); - out.close(); return 1; } } @@ -1296,7 +1319,6 @@ public class AxisService extends AxisDes // schema is there - pump it outs schema.write(new OutputStreamWriter(out, "UTF8")); out.flush(); - out.close(); } else { // make sure we are only serving .xsd files and ignore requests with // ".." in the name. @@ -1328,7 +1350,6 @@ public class AxisService extends AxisDes if (schema != null) { schema.write(new OutputStreamWriter(out, "UTF8")); out.flush(); - out.close(); } } else { String xsdNotFound = "
svn commit: r937758 - in /axis/axis2/java/core/trunk/modules: integration/test-resources/ integration/test-resources/ComplexDataTypes/ integration/test-resources/generics/ integration/test-resources/w
Author: amilas Date: Sun Apr 25 07:57:34 2010 New Revision: 937758 URL: http://svn.apache.org/viewvc?rev=937758&view=rev Log: fixed the issue AXIS2-4687. Note that earlier patch has failed since wrong wsdl files are hard coded and checked against the correct ones. Modified: axis/axis2/java/core/trunk/modules/integration/test-resources/BaseDataTypes.wsdl axis/axis2/java/core/trunk/modules/integration/test-resources/ComplexDataTypes/ComplexDataTypes.wsdl axis/axis2/java/core/trunk/modules/integration/test-resources/generics/generics.wsdl axis/axis2/java/core/trunk/modules/integration/test-resources/wsdl/Version.wsdl axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL11.java Modified: axis/axis2/java/core/trunk/modules/integration/test-resources/BaseDataTypes.wsdl URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/integration/test-resources/BaseDataTypes.wsdl?rev=937758&r1=937757&r2=937758&view=diff == --- axis/axis2/java/core/trunk/modules/integration/test-resources/BaseDataTypes.wsdl (original) +++ axis/axis2/java/core/trunk/modules/integration/test-resources/BaseDataTypes.wsdl Sun Apr 25 07:57:34 2010 @@ -961,199 +961,199 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + Modified: axis/axis2/java/core/trunk/modules/integration/test-resources/ComplexDataTypes/ComplexDa
svn commit: r939200 - in /axis/axis2/java/core/trunk/modules: adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.ja
Author: amilas Date: Thu Apr 29 05:29:06 2010 New Revision: 939200 URL: http://svn.apache.org/viewvc?rev=939200&view=rev Log: commiting the patch AXIS2-4408. This handles the exception properly Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java?rev=939200&r1=939199&r2=939200&view=diff == --- axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java (original) +++ axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java Thu Apr 29 05:29:06 2010 @@ -25,9 +25,14 @@ package org.apache.axis2.rpc.receivers; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNamespace; +import org.apache.axiom.om.OMAbstractFactory; +import org.apache.axiom.om.impl.builder.StAXOMBuilder; +import org.apache.axiom.om.impl.llom.factory.OMXMLBuilderFactory; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; import org.apache.axis2.AxisFault; +import org.apache.axis2.util.StreamWrapper; +import org.apache.axis2.databinding.utils.BeanUtil; import org.apache.axis2.context.MessageContext; import org.apache.axis2.description.AxisMessage; import org.apache.axis2.description.AxisOperation; @@ -35,11 +40,14 @@ import org.apache.axis2.description.Axis import org.apache.axis2.description.Parameter; import org.apache.axis2.description.WSDL2Constants; import org.apache.axis2.description.java2wsdl.Java2WSDLConstants; +import org.apache.axis2.description.java2wsdl.TypeTable; import org.apache.axis2.receivers.AbstractInOutMessageReceiver; import org.apache.axis2.wsdl.WSDLConstants; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamReader; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; @@ -154,6 +162,40 @@ public class RPCMessageReceiver extends log.debug(msg, cause); throw (AxisFault)cause; } + +Class[] exceptionTypes = method.getExceptionTypes(); +for (Class exceptionType : exceptionTypes){ +if (exceptionType.getName().equals(cause.getClass().getName())){ +// this is an bussiness logic exception so handle it properly +String partQName = getSimpleClassName(exceptionType); +TypeTable typeTable = inMessage.getAxisService().getTypeTable(); +QName elementQName = typeTable.getQNamefortheType(partQName); +SOAPFactory fac = getSOAPFactory(inMessage); +OMElement exceptionElement = fac.createOMElement(elementQName); + +if (exceptionType.getName().equals(Exception.class.getName())){ +// this is an exception class. so create a element by hand and add the message + OMElement innterExceptionElement = fac.createOMElement(elementQName); + OMElement messageElement = fac.createOMElement("Message", inMessage.getAxisService().getTargetNamespace(), null); + messageElement.setText(cause.getMessage()); + + innterExceptionElement.addChild(messageElement); + exceptionElement.addChild(innterExceptionElement); +} else { +// if it is a normal bussiness exception we need to generate the schema assuming it is a pojo +XMLStreamReader xr = BeanUtil.getPullParser(cause, +elementQName, typeTable, true, false); +StAXOMBuilder stAXOMBuilder = new StAXOMBuilder(OMAbstractFactory.getOMFactory(), new StreamWrapper(xr)); +OMElement documentElement = stAXOMBuilder.getDocumentElement(); +exceptionElement.addChild(documentElement); +} + +AxisFault axisFault = new AxisFault(cause.getMessage()); +axisFault.setDetail(exceptionElement); +throw axisFault; +} +} + log.error(msg, e); throw new AxisFault(msg, e); } catch(RuntimeException e) { @@ -166,4 +208,14 @@ public class RPCMessageReceiver extends throw AxisFault.makeFault(e); } } + + private String getSimpleClassName(Cla
svn commit: r939310 - /axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
Author: amilas Date: Thu Apr 29 13:59:56 2010 New Revision: 939310 URL: http://svn.apache.org/viewvc?rev=939310&view=rev Log: fixed the issue AXIS2-4615 Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java?rev=939310&r1=939309&r2=939310&view=diff == --- axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java (original) +++ axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java Thu Apr 29 13:59:56 2010 @@ -303,7 +303,15 @@ public class BeanUtil { ArrayList valueList = new ArrayList(); Class arrayClassType = beanClass.getComponentType(); if ("byte".equals(arrayClassType.getName())) { -return Base64.decode(beanElement.getFirstElement().getText()); +// find the part first and decode it +OMElement partElement = null; +for (Iterator iter = beanElement.getChildElements(); iter.hasNext();){ +partElement = (OMElement) iter.next(); +if (partElement.getLocalName().equals(arrayLocalName)){ +break; +} +} +return Base64.decode(partElement.getText()); } else { Iterator parts = beanElement.getChildElements(); OMElement omElement;
svn commit: r939693 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
Author: amilas Date: Fri Apr 30 14:46:04 2010 New Revision: 939693 URL: http://svn.apache.org/viewvc?rev=939693&view=rev Log: applied the patch for AXIS2-4579 Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java?rev=939693&r1=939692&r2=939693&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java Fri Apr 30 14:46:04 2010 @@ -1339,7 +1339,7 @@ public class WSDL11ToAxisServiceBuilder if (null != message) { outMessage.setName(message.getQName().getLocalPart()); - copyExtensionAttributes(wsdl4jInputMessage.getExtensionAttributes(), + copyExtensionAttributes(wsdl4jOutputMessage.getExtensionAttributes(), outMessage, PORT_TYPE_OPERATION_OUTPUT); // wsdl:portType -> wsdl:operation -> wsdl:output @@ -2275,6 +2275,7 @@ public class WSDL11ToAxisServiceBuilder wsdl4jExtensibilityElement.getElementType().getNamespaceURI().equals( org.apache.axis2.namespace.Constants.FORMAT_BINDING)) { Element typeMapping = unknown.getElement(); + NodeList typeMaps = typeMapping.getElementsByTagNameNS( org.apache.axis2.namespace.Constants.FORMAT_BINDING, "typeMap");
svn commit: r939924 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService.java
Author: amilas Date: Sat May 1 05:11:59 2010 New Revision: 939924 URL: http://svn.apache.org/viewvc?rev=939924&view=rev Log: reformat the code Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService.java?rev=939924&r1=939923&r2=939924&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService.java Sat May 1 05:11:59 2010 @@ -1306,36 +1306,36 @@ public class AxisService extends AxisDes ArrayList schemas = getSchema(); // a name is present - try to pump the requested schema - if (!"".equals(xsd)) { - XmlSchema schema = (XmlSchema) schemaMappingtable.get(xsd); - if (schema == null) { - int dotIndex = xsd.indexOf('.'); - if (dotIndex > 0) { - String schemaKey = xsd.substring(0, dotIndex); - schema = (XmlSchema) schemaMappingtable.get(schemaKey); - } - } - if (schema != null) { - // schema is there - pump it outs - schema.write(new OutputStreamWriter(out, "UTF8")); - out.flush(); - } else { -// make sure we are only serving .xsd files and ignore requests with -// ".." in the name. -if (xsd.endsWith(".xsd") && xsd.indexOf("..") == -1) { - InputStream in = getClassLoader().getResourceAsStream( - DeploymentConstants.META_INF + "/" + xsd); - if (in != null) { -IOUtils.copy(in, out, true); - } else { -// Can't find the schema -return -1; - } -} else { -// bad schema request -return -1; -} - } +if (!"".equals(xsd)) { +XmlSchema schema = (XmlSchema) schemaMappingtable.get(xsd); +if (schema == null) { +int dotIndex = xsd.indexOf('.'); +if (dotIndex > 0) { +String schemaKey = xsd.substring(0, dotIndex); +schema = (XmlSchema) schemaMappingtable.get(schemaKey); +} +} +if (schema != null) { +// schema is there - pump it outs +schema.write(new OutputStreamWriter(out, "UTF8")); +out.flush(); +} else { +// make sure we are only serving .xsd files and ignore requests with +// ".." in the name. +if (xsd.endsWith(".xsd") && xsd.indexOf("..") == -1) { +InputStream in = getClassLoader().getResourceAsStream( +DeploymentConstants.META_INF + "/" + xsd); +if (in != null) { +IOUtils.copy(in, out, true); +} else { +// Can't find the schema +return -1; +} +} else { +// bad schema request +return -1; +} +} } else if (schemas.size() > 1) { // multiple schemas are present and the user specified // no name - in this case we cannot possibly pump a schema
svn commit: r939926 - /axis/axis2/java/core/trunk/modules/jibx/src/org/apache/axis2/jibx/CodeGenerationUtility.java
Author: amilas Date: Sat May 1 05:35:44 2010 New Revision: 939926 URL: http://svn.apache.org/viewvc?rev=939926&view=rev Log: applied the patch for AXIS2-4140 Modified: axis/axis2/java/core/trunk/modules/jibx/src/org/apache/axis2/jibx/CodeGenerationUtility.java Modified: axis/axis2/java/core/trunk/modules/jibx/src/org/apache/axis2/jibx/CodeGenerationUtility.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jibx/src/org/apache/axis2/jibx/CodeGenerationUtility.java?rev=939926&r1=939925&r2=939926&view=diff == --- axis/axis2/java/core/trunk/modules/jibx/src/org/apache/axis2/jibx/CodeGenerationUtility.java (original) +++ axis/axis2/java/core/trunk/modules/jibx/src/org/apache/axis2/jibx/CodeGenerationUtility.java Sat May 1 05:35:44 2010 @@ -1074,8 +1074,10 @@ public class CodeGenerationUtility { // recurse to process included binding definitions IncludeElement include = (IncludeElement)child; -collectTopLevelComponents(include.getBinding(), defaultns, - elementMap, complexTypeMap, simpleTypeMap, bindingMap); +if(include.getBinding() != null) { +collectTopLevelComponents(include.getBinding(), defaultns, +elementMap, complexTypeMap, simpleTypeMap, bindingMap); +} } else if (child.type() == ElementBase.FORMAT_ELEMENT) {
svn commit: r939927 - /axis/axis2/java/core/trunk/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingOutHandlerTest.java
Author: amilas Date: Sat May 1 06:00:35 2010 New Revision: 939927 URL: http://svn.apache.org/viewvc?rev=939927&view=rev Log: applied the patch for AXIS2-3461 Modified: axis/axis2/java/core/trunk/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingOutHandlerTest.java Modified: axis/axis2/java/core/trunk/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingOutHandlerTest.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingOutHandlerTest.java?rev=939927&r1=939926&r2=939927&view=diff == --- axis/axis2/java/core/trunk/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingOutHandlerTest.java (original) +++ axis/axis2/java/core/trunk/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingOutHandlerTest.java Sat May 1 06:00:35 2010 @@ -39,6 +39,8 @@ import org.apache.axis2.description.Axis import org.apache.axis2.description.Parameter; import org.apache.axis2.engine.AxisConfiguration; import org.apache.axis2.handlers.util.TestUtil; +import org.custommonkey.xmlunit.XMLTestCase; +import org.custommonkey.xmlunit.XMLUnit; import javax.xml.namespace.QName; @@ -47,7 +49,7 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; -public class AddressingOutHandlerTest extends TestCase implements AddressingConstants { +public class AddressingOutHandlerTest extends XMLTestCase implements AddressingConstants { private AddressingOutHandler outHandler; private MessageContext msgCtxt; private TestUtil testUtil; @@ -106,11 +108,8 @@ public class AddressingOutHandlerTest ex StAXSOAPModelBuilder omBuilder = testUtil.getOMBuilder("eprTest.xml"); -XMLComparator xmlComparator = new XMLComparator(); - -assertTrue( -xmlComparator.compare(omBuilder.getDocumentElement(), - defaultEnvelope)); +XMLUnit.setIgnoreWhitespace(true); +assertXMLEqual(omBuilder.getDocumentElement().toString(), defaultEnvelope.toString()); } @@ -149,11 +148,10 @@ public class AddressingOutHandlerTest ex OMAbstractFactory.getSOAP11Factory().getDefaultEnvelope()); outHandler.invoke(msgCtxt); -XMLComparator xmlComparator = new XMLComparator(); -assertTrue( -xmlComparator.compare(msgCtxt.getEnvelope(), - testUtil.getOMBuilder("OutHandlerTest.xml") - .getDocumentElement())); +XMLUnit.setIgnoreWhitespace(true); +assertXMLEqual(msgCtxt.getEnvelope().toString(), +testUtil.getOMBuilder("OutHandlerTest.xml") +.getDocumentElement().toString()); } public void testMustUnderstandSupport() throws Exception { @@ -194,11 +192,10 @@ public class AddressingOutHandlerTest ex OMAbstractFactory.getSOAP11Factory().getDefaultEnvelope()); outHandler.invoke(msgCtxt); -XMLComparator xmlComparator = new XMLComparator(); -assertTrue( -xmlComparator.compare(msgCtxt.getEnvelope(), - testUtil.getOMBuilder("mustUnderstandTest.xml") - .getDocumentElement())); +XMLUnit.setIgnoreWhitespace(true); +assertXMLEqual(msgCtxt.getEnvelope().toString(), +testUtil.getOMBuilder("mustUnderstandTest.xml") +.getDocumentElement().toString()); } public void testSOAPRoleSupport() throws Exception { @@ -239,11 +236,9 @@ public class AddressingOutHandlerTest ex OMAbstractFactory.getSOAP11Factory().getDefaultEnvelope()); outHandler.invoke(msgCtxt); -XMLComparator xmlComparator = new XMLComparator(); -assertTrue( -xmlComparator.compare(msgCtxt.getEnvelope(), - testUtil.getOMBuilder("soap11roleTest.xml") - .getDocumentElement())); +XMLUnit.setIgnoreWhitespace(true); +assertXMLEqual(msgCtxt.getEnvelope().toString(), + testUtil.getOMBuilder("soap11roleTest.xml").getDocumentElement().toString()); } public void testSOAP12RoleSupport() throws Exception { @@ -284,11 +279,10 @@ public class AddressingOutHandlerTest ex OMAbstractFactory.getSOAP12Factory().getDefaultEnvelope()); outHandler.invoke(msgCtxt); -XMLComparator xmlComparator = new XMLComparator(); -assertTrue( -xmlComparator.compare(msgCtxt.getEnvelope(), - testUtil.getOMBuilder(&q
svn commit: r940182 - /axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java
Author: amilas Date: Sun May 2 09:40:01 2010 New Revision: 940182 URL: http://svn.apache.org/viewvc?rev=940182&view=rev Log: adding the support to Date type as given in the AXIS2-4695 Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java?rev=940182&r1=940181&r2=940182&view=diff == --- axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java (original) +++ axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java Sun May 2 09:40:01 2010 @@ -1146,7 +1146,7 @@ public class ConverterUtil { for (int i = 0; i < listSize; i++) { Object o = objectList.get(i); if (o != null) { -if (o instanceof String){ +if (o instanceof String) { array[i] = ConverterUtil.convertToDateTime(o.toString()); } else if (o instanceof Calendar) { array[i] = (Calendar) o; @@ -1154,6 +1154,19 @@ public class ConverterUtil { } } returnArray = array; +} else if (Date.class.equals(baseArrayClass)) { +Date[] array = new Date[listSize]; +for (int i = 0; i < listSize; i++) { +Object o = objectList.get(i); +if (o != null) { +if (o instanceof String) { +array[i] = ConverterUtil.convertToDate(o.toString()); +} else if (o instanceof Date) { +array[i] = (Date) o; +} +} +} +returnArray = array; } else { returnArray = Array.newInstance(baseArrayClass, listSize); ConvertToArbitraryObjectArray(returnArray, baseArrayClass, objectList);
svn commit: r940239 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/util/PhasesInfo.java
Author: amilas Date: Sun May 2 14:47:32 2010 New Revision: 940239 URL: http://svn.apache.org/viewvc?rev=940239&view=rev Log: fixed the issue AXIS2-4616 Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/util/PhasesInfo.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/util/PhasesInfo.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/util/PhasesInfo.java?rev=940239&r1=940238&r2=940239&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/util/PhasesInfo.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/util/PhasesInfo.java Sun May 2 14:47:32 2010 @@ -135,7 +135,7 @@ public class PhasesInfo { globalPhaseList.add(copyPhase(phase)); } } else { -globalPhaseList.add(copyPhase(phase)); +globalPhaseList.add(phase); } } return globalPhaseList;
svn commit: r942405 - /axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/HTTPWorker.java
Author: amilas Date: Sat May 8 15:45:58 2010 New Revision: 942405 URL: http://svn.apache.org/viewvc?rev=942405&view=rev Log: applied the patch for AXIS2-3820 Modified: axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/HTTPWorker.java Modified: axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/HTTPWorker.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/HTTPWorker.java?rev=942405&r1=942404&r2=942405&view=diff == --- axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/HTTPWorker.java (original) +++ axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/HTTPWorker.java Sat May 8 15:45:58 2010 @@ -154,8 +154,10 @@ public class HTTPWorker implements Worke } //cater for named xsds - check for the xsd name if (uri.indexOf("?xsd=") > 0) { + // fix for imported schemas + String[] uriParts = uri.split("[?]xsd="); String serviceName = -uri.substring(uri.lastIndexOf("/") + 1, uri.lastIndexOf("?xsd=")); +uri.substring(uriParts[0].lastIndexOf("/") + 1, uriParts[0].length()); String schemaName = uri.substring(uri.lastIndexOf("=") + 1); HashMap services = configurationContext.getAxisConfiguration().getServices();
svn commit: r942422 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
Author: amilas Date: Sat May 8 17:43:17 2010 New Revision: 942422 URL: http://svn.apache.org/viewvc?rev=942422&view=rev Log: fixed the issue AXIS2-4548 Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java?rev=942422&r1=942421&r2=942422&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java Sat May 8 17:43:17 2010 @@ -663,85 +663,170 @@ public class WSDL11ToAxisServiceBuilder BindingInput wsdl4jBindingInput = wsdl4jBindingOperation.getBindingInput(); -if (wsdl4jBindingInput != null && - WSDLUtil.isInputPresentForMEP(axisOperation.getMessageExchangePattern())) { -AxisBindingMessage axisBindingInMessage = new AxisBindingMessage(); -axisBindingInMessage.setParent(axisBindingOperation); -addDocumentation(axisBindingInMessage, wsdl4jBindingInput.getDocumentationElement()); - copyExtensibleElements(wsdl4jBindingInput.getExtensibilityElements(), - wsdl4jDefinition, - axisBindingInMessage, BINDING_OPERATION_INPUT); - -AxisMessage axisInMessage = - axisOperation.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE); -//This is a hack to get AXIS2-2771 working , I had to copy soap headers -// from binding message to AxisMessage -List soapHeaders = (List) axisBindingInMessage.getProperty( -WSDL2Constants.ATTR_WSOAP_HEADER); -if (soapHeaders != null) { -for (int i = 0; i < soapHeaders.size(); i++) { -SOAPHeaderMessage headerMessage = (SOAPHeaderMessage) soapHeaders.get(i); -axisInMessage.addSoapHeader(headerMessage); +if (isServerSide) { +if (wsdl4jBindingInput != null && + WSDLUtil.isInputPresentForMEP(axisOperation.getMessageExchangePattern())) { +AxisBindingMessage axisBindingInMessage = new AxisBindingMessage(); +axisBindingInMessage.setParent(axisBindingOperation); +addDocumentation(axisBindingInMessage, wsdl4jBindingInput.getDocumentationElement()); + copyExtensibleElements(wsdl4jBindingInput.getExtensibilityElements(), +wsdl4jDefinition, +axisBindingInMessage, BINDING_OPERATION_INPUT); + +AxisMessage axisInMessage = + axisOperation.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE); +//This is a hack to get AXIS2-2771 working , I had to copy soap headers +// from binding message to AxisMessage +List soapHeaders = (List) axisBindingInMessage.getProperty( +WSDL2Constants.ATTR_WSOAP_HEADER); +if (soapHeaders != null) { +for (int i = 0; i < soapHeaders.size(); i++) { +SOAPHeaderMessage headerMessage = (SOAPHeaderMessage) soapHeaders.get(i); +axisInMessage.addSoapHeader(headerMessage); +} +} + +if (isSetMessageQNames) { +BindingOperationEntry boe = find(wrappableBOEs, wsdl4jBindingOperation); +boolean isWrapped = (boe == null) ? false : boe.isWrappedInput(); +addQNameReference(axisInMessage, wsdl4jOperation, +wsdl4jBindingInput, +isWrapped); } + +axisBindingInMessage.setAxisMessage(axisInMessage); +axisBindingInMessage.setName(axisInMessage.getName()); + axisBindingInMessage.setDirection(axisInMessage.getDirection()); + +axisBindingOperation +.addChild(WSDLConstants.MESSAGE_LABEL_IN_VALUE, axisBindingInMessage); } +} else { +if (wsdl4jBindingInput != null && + WSDLUtil.isOutputPresentForMEP(axisOperation.getMessageExchangePattern())) { +AxisBindingMessage a
svn commit: r942491 - /axis/axis2/java/core/trunk/modules/parent/pom.xml
Author: amilas Date: Sun May 9 04:54:39 2010 New Revision: 942491 URL: http://svn.apache.org/viewvc?rev=942491&view=rev Log: upgrading the xml schema version to 1.4.6 Modified: axis/axis2/java/core/trunk/modules/parent/pom.xml Modified: axis/axis2/java/core/trunk/modules/parent/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/parent/pom.xml?rev=942491&r1=942490&r2=942491&view=diff == --- axis/axis2/java/core/trunk/modules/parent/pom.xml (original) +++ axis/axis2/java/core/trunk/modules/parent/pom.xml Sun May 9 04:54:39 2010 @@ -85,7 +85,7 @@ 1.2.9-SNAPSHOT 3.0.0-SNAPSHOT -1.4.6-SNAPSHOT +1.4.6 1.0-SNAPSHOT 1.5
svn commit: r942492 - /axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java
Author: amilas Date: Sun May 9 06:01:05 2010 New Revision: 942492 URL: http://svn.apache.org/viewvc?rev=942492&view=rev Log: use toPlainString method as given in the AXIS2-4036 Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java?rev=942492&r1=942491&r2=942492&view=diff == --- axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java (original) +++ axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java Sun May 9 06:01:05 2010 @@ -1427,7 +1427,7 @@ public class ConverterUtil { } else if (value instanceof Short) { serializeAnyType("short", value.toString(), xmlStreamWriter); } else if (value instanceof BigDecimal) { -serializeAnyType("decimal", value.toString(), xmlStreamWriter); +serializeAnyType("decimal", ((BigDecimal)value).toPlainString(), xmlStreamWriter); } else if (value instanceof DataHandler) { addTypeAttribute(xmlStreamWriter,"base64Binary"); try { @@ -1643,4 +1643,5 @@ public class ConverterUtil { } } + }
svn commit: r944582 - /axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/HTTPSender.java
Author: amilas Date: Sat May 15 07:12:21 2010 New Revision: 944582 URL: http://svn.apache.org/viewvc?rev=944582&view=rev Log: apply the patch for AXIS2-4714 Modified: axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/HTTPSender.java Modified: axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/HTTPSender.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/HTTPSender.java?rev=944582&r1=944581&r2=944582&view=diff == --- axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/HTTPSender.java (original) +++ axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/HTTPSender.java Sat May 15 07:12:21 2010 @@ -273,6 +273,10 @@ public class HTTPSender extends Abstract if (statusCode == HttpStatus.SC_OK) { processResponse(method, msgContext); } else if (statusCode == HttpStatus.SC_ACCEPTED) { + /* When an HTTP 202 Accepted code has been received, this will be the case of an execution +* of an in-only operation. In such a scenario, the HTTP response headers should be returned, +* i.e. session cookies. */ + obtainHTTPHeaderInformation(method, msgContext); } else if (statusCode == HttpStatus.SC_INTERNAL_SERVER_ERROR || statusCode == HttpStatus.SC_BAD_REQUEST) { Header contenttypeHeader =
svn commit: r947267 - in /axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding: types/Time.java utils/ConverterUtil.java
Author: amilas Date: Sat May 22 08:01:19 2010 New Revision: 947267 URL: http://svn.apache.org/viewvc?rev=947267&view=rev Log: fixed the issue AXIS2-4719 Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/types/Time.java axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/types/Time.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/types/Time.java?rev=947267&r1=947266&r2=947267&view=diff == --- axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/types/Time.java (original) +++ axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/types/Time.java Sat May 22 08:01:19 2010 @@ -197,7 +197,11 @@ public class Time implements java.io.Ser } calendar.set(Calendar.MILLISECOND, (int)miliSecond); calendar.set(Calendar.ZONE_OFFSET, timeZoneOffSet); -calendar.set(Calendar.DST_OFFSET, 0); + +// set the day light off set only if time zone +if (source.length() > 8) { +calendar.set(Calendar.DST_OFFSET, 0); +} return calendar; } Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java?rev=947267&r1=947266&r2=947267&view=diff == --- axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java (original) +++ axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java Sat May 22 08:01:19 2010 @@ -611,7 +611,11 @@ public class ConverterUtil { calendar.set(Calendar.MONTH, month - 1); calendar.set(Calendar.DAY_OF_MONTH, day); calendar.set(Calendar.ZONE_OFFSET, timeZoneOffSet); -calendar.set(Calendar.DST_OFFSET, 0); + +// set the day light off set only if time zone +if (source.length() >= 10) { +calendar.set(Calendar.DST_OFFSET, 0); +} calendar.getTimeInMillis(); if (bc){ calendar.set(Calendar.ERA, GregorianCalendar.BC); @@ -981,8 +985,10 @@ public class ConverterUtil { } calendar.set(Calendar.MILLISECOND, (int)miliSecond); calendar.set(Calendar.ZONE_OFFSET, timeZoneOffSet); -calendar.set(Calendar.DST_OFFSET, 0); - +// set the day light offset only if the time zone is present +if (source.length() > 19){ +calendar.set(Calendar.DST_OFFSET, 0); +} } else {
svn commit: r949414 - /axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/src/main/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojo.java
Author: amilas Date: Sat May 29 16:27:51 2010 New Revision: 949414 URL: http://svn.apache.org/viewvc?rev=949414&view=rev Log: fixed the issue AXIS2-4681 Modified: axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/src/main/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojo.java Modified: axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/src/main/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojo.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/src/main/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojo.java?rev=949414&r1=949413&r2=949414&view=diff == --- axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/src/main/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojo.java (original) +++ axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/src/main/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojo.java Sat May 29 16:27:51 2010 @@ -246,6 +246,15 @@ public class WSDL2CodeMojo extends Abstr //WSDL file name +// here we need to set the project base uri to relative paths. +if (wsdlFile.indexOf(":") == -1){ + //i.e this is not a uri + File file = new File(wsdlFile); + if (!file.isAbsolute()){ + wsdlFile = project.getBasedir() + File.separator + wsdlFile; + } +} + optionMap.put( CommandLineOptionConstants.WSDL2JavaConstants.WSDL_LOCATION_URI_OPTION, new CommandLineOption(
svn commit: r949782 - in /axis/axis2/java/core/trunk/modules/adb-codegen: src/org/apache/axis2/schema/SchemaCompiler.java test-resources/testsuite/chameleon_include.xsd
Author: amilas Date: Mon May 31 16:04:36 2010 New Revision: 949782 URL: http://svn.apache.org/viewvc?rev=949782&view=rev Log: Xmlschema searches within the imported and included schema, if QName is given. However adb code gen need to check only that element exists within the given schema. Changed the schema compiler to provide the local part of the qname. Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java axis/axis2/java/core/trunk/modules/adb-codegen/test-resources/testsuite/chameleon_include.xsd Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java?rev=949782&r1=949781&r2=949782&view=diff == --- axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java (original) +++ axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java Mon May 31 16:04:36 2010 @@ -722,6 +722,7 @@ public class SchemaCompiler { // here what we want is to set the schema type name for the element if ((referencedElement.getSchemaType() != null) && (referencedElement.getSchemaType().getQName() != null)){ + // i.e this element refers to an complex type name if (!this.processedElementRefMap.containsKey(referencedElement.getQName())) { if (this.baseSchemaTypeMap.containsKey(referencedElement.getSchemaTypeName())) { @@ -2728,11 +2729,11 @@ public class SchemaCompiler { boolean isExists = false; switch (componetType) { case COMPONENT_TYPE : { -isExists = (schema.getTypeByName(componentQName) != null); +isExists = (schema.getTypeByName(componentQName.getLocalPart()) != null); break; } case COMPONENT_ELEMENT : { -isExists = (schema.getElementByName(componentQName) != null); +isExists = (schema.getElementByName(componentQName.getLocalPart()) != null); break; } case COMPONENT_ATTRIBUTE : { Modified: axis/axis2/java/core/trunk/modules/adb-codegen/test-resources/testsuite/chameleon_include.xsd URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb-codegen/test-resources/testsuite/chameleon_include.xsd?rev=949782&r1=949781&r2=949782&view=diff == --- axis/axis2/java/core/trunk/modules/adb-codegen/test-resources/testsuite/chameleon_include.xsd (original) +++ axis/axis2/java/core/trunk/modules/adb-codegen/test-resources/testsuite/chameleon_include.xsd Mon May 31 16:04:36 2010 @@ -18,6 +18,7 @@ ~ under the License. --> http://www.w3.org/2001/XMLSchema"; +targetNamespace="http://apache.org/axis2/schema/chameleon"; elementFormDefault="qualified">
svn commit: r953942 - in /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2: addressing/i18n/resource.properties i18n/resource.properties
Author: amilas Date: Sat Jun 12 05:56:57 2010 New Revision: 953942 URL: http://svn.apache.org/viewvc?rev=953942&view=rev Log: Applied the patch for AXIS2-4737 Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/addressing/i18n/resource.properties axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/i18n/resource.properties Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/addressing/i18n/resource.properties URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/addressing/i18n/resource.properties?rev=953942&r1=953941&r2=953942&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/addressing/i18n/resource.properties (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/addressing/i18n/resource.properties Sat Jun 12 05:56:57 2010 @@ -31,6 +31,11 @@ # and may contain translation instructions. They need not be # translated unless your translated file, rather than this file, # will serve as a base for other translators. +# +# Do not remove the following comment line. It is a variable used by a translation tool. +#NLS_MESSAGEFORMAT_VAR +#NLS_ENCODING=UNICODE +#ISMESSAGEFILE TRUE outboundNoAction=Unable to determine wsa:Action for outbound message referenceParameterError=An error occurred while attempting to add a reference parameter as a SOAP header. @@ -62,4 +67,3 @@ spec.final.FAULT_ADDRESSING_DESTINATION_ spec.submission.FAULT_ADDRESSING_DESTINATION_UNREACHABLE_REASON=No route can be determined to reach the destination role defined by the WS-Addressing To. spec.submission.FAULT_INVALID_HEADER_REASON=A message information header is not valid and the message cannot be processed. The validity failure can be either structural or semantic, e.g. a [destination] that is not a URI or a [relationship] to a [message id] that was never issued. spec.submission.FAULT_ADDRESSING_HEADER_REQUIRED_REASON=A required message information header, To, MessageID, or Action, is not present. - \ No newline at end of file Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/i18n/resource.properties URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/i18n/resource.properties?rev=953942&r1=953941&r2=953942&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/i18n/resource.properties (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/i18n/resource.properties Sat Jun 12 05:56:57 2010 @@ -34,6 +34,8 @@ # # Do not remove the following comment line. It is a variable used by a translation tool. # NLS_MESSAGEFORMAT_VAR +# NLS_ENCODING=UNICODE +# ISMESSAGEFILE TRUE # # DO NOT TOUCH THESE PROPERTIES - THEY ARE AUTOMATICALLY UPDATED BY THE BUILD @@ -121,7 +123,7 @@ confignotfound=The system cannot find th pathtoconfigcanotnull=The path to axis2.xml file cannot be NULL. modulevalfailed=Module validation failed: {0} invalidphase=Did not find the desired phase ''{0}'' while deploying handler ''{1}''. -dispatchPhaseNotFoundOnInflow=The '"Dispatch'" phase is not found on the global '"InFlow'" phase of the axis2.xml file. Make sure the phase is within the axis2.xml file. +dispatchPhaseNotFoundOnInflow=The 'Dispatch' phase is not found on the global 'InFlow' phase of the axis2.xml file. Make sure the phase is within the axis2.xml file. #invalidmoduleref=The {0} service refers to the {1} module, which is not valid. invalidmodulerefbyop={0} operation refers to the {1} module, which is not valid. addingnewmodule=Adding new module @@ -235,7 +237,7 @@ clusterImplNotFound=Clustering implement contextManagerListenerIsNull=Cluster ContextManager entry not found in axis2.xml configurationManagerListenerIsNull=Cluster ConfigurationManager entry not found in axis2.xml cannotLoadClusterImpl=Cluster implementation cannot be loaded -classAttributeNotFound=The element {0} must have a attribute with the name ''class'' +classAttributeNotFound=The element {0} must have an attribute with the name ''class'' #Policy emptypolicy=The Policy ID is either null or empty. @@ -282,4 +284,4 @@ mismatchedModuleVersions=Tried to deploy deployingexception=Deploying Exception Occured with {0} stroringfaultyservice=Exception occured and made the service faulty with {0} jaxwsjarsmissing=JAXWS jars are missing in the classpath with {0}, switching to annongen -faultyserviceremoval=Predicting faulty service with {0}, and removing it \ No newline at end of file +faultyserviceremoval=Predicting faulty service with {0}, and removing it
svn commit: r953943 - /axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties
Author: amilas Date: Sat Jun 12 05:58:58 2010 New Revision: 953943 URL: http://svn.apache.org/viewvc?rev=953943&view=rev Log: Applied the patch for AXIS2-4737 Modified: axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties Modified: axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties?rev=953943&r1=953942&r2=953943&view=diff == --- axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties (original) +++ axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties Sat Jun 12 05:58:58 2010 @@ -34,7 +34,9 @@ # will serve as a base for other translators. # # Do not remove the following comment line. It is a variable used by a translation tool. -# NLS_MESSAGEFORMAT_VAR +#NLS_MESSAGEFORMAT_VAR +#NLS_ENCODING=UNICODE +#ISMESSAGEFILE TRUE # # DO NOT TOUCH THESE PROPERTIES - THEY ARE AUTOMATICALLY UPDATED BY THE BUILD @@ -51,7 +53,7 @@ exceptionDuringExceptionFlow=An exceptio serviceClientCreateError=The ServiceClient cannot be created. cannotSetExcutorToNull=An attempt was made to set the Executor to a null value. This is not allowed. getPortInvalidSEI=An attempt was made to call getPort with the {0} port and {1} service endpoint interface (SEI). However, this call is not allowed. -createDispatchFail0=Dispatch creation failed. The QName port cannot be null. +createDispatchFail0=Dispatch creation failed. The port QName cannot be null. createDispatchFail1=Dispatch creation failed. The {0} port cannot be found. Verify that the port has been added to the service. createDispatchFail2=Dispatch creation failed. The service cannot find Port data for the {0} port. addPortDup=An attempt was made to add the {0} port to the ServiceDelegate. The port already exists. @@ -198,10 +200,10 @@ endpointDescriptionErr1=EndpointDescript endpointDescriptionErr2=Caught {0} attempting to complete configuration on AxisService for ServiceDesription: {1} endpointDescriptionErr3=EndpointDescription.EndpointDescription: parents DBC is null endpointDescriptionErr4=EndpointDescription: Unable to add parameters to AxisService -endpointDescriptionErr5=Can't add AxisService param: {0} +endpointDescriptionErr5=Cannot add AxisService param: {0} endpointDescriptionErr6=Either WebService or WebServiceProvider annotation must be present on {0} endpointDescriptionErr7=Both WebService or WebServiceProvider annotations cannot be presenton {0} -endpointDescriptionErr8=Can't create SEI class: +endpointDescriptionErr8=Cannot create SEI class: RespectBindingConfiguratorErr1=Client side RespectBindingConfiguration failed, EndpointDescription was NULL. RespectBindingConfiguratorErr2=Client side RespectBindingConfiguration failed, EndpointDescriptionWSDL was NULL. operationDescriptionErr1=OperationDescription: Unable to add parameters to AxisOperation @@ -225,9 +227,9 @@ createAxisOprErr3=Could not setup Doc/Li seiMethodErr=Can not set an SEI method once it has been set. regMUHeadersErr=Unable to add Parameter for header QNames to AxisOperation {0} genParamTypesErr=OperationDescriptionImpl.getParameterActualGenericType not supported for DBC. -updateEPDescrErr1=ServiceDescription.updateEndpointDescription: Can not do a getPort on a port added via addPort(). PortQN: {0} -updateEPDescrErr2=ServiceDescription.updateEndpointDescription: Can not do a getPort with a null SEI. PortQN: {0} -updateEPDescrErr3=ServiceDescription.updateEndpointDescription: Can't do a getPort() specifiying a different SEI than the previous getPort(). PortQN: {0}; current SEI: {1}; previous SEI: {2} +updateEPDescrErr1=ServiceDescription.updateEndpointDescription: Cannot do a getPort on a port added via addPort(). PortQN: {0} +updateEPDescrErr2=ServiceDescription.updateEndpointDescription: Cannot do a getPort with a null SEI. PortQN: {0} +updateEPDescrErr3=ServiceDescription.updateEndpointDescription: Cannot do a getPort() specifying a different SEI than the previous getPort(). PortQN: {0}; current SEI: {1}; previous SEI: {2} dbclIntegrityErr=Validation phase 1 failure: {0}; Failing composite: {1} validateIntegrityErr1=Validation error: This is a Provider based endpoint that does not contain a WebServiceProvider annotation. Provider class: {0} validateIntegrityErr2=Validation error: WebService annotation and WebServiceProvider annotation cannot coexist. Implementation class: {0} @@ -295,7 +297,7 @@ serviceDescErr5=The dynamic port {0} can serviceDescErr6=Can not specify a sparse composite when calling Service.createDispatch. endpointDescErr1=Axis
svn commit: r953944 - in /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2: Constants.java receivers/AbstractMessageReceiver.java
Author: amilas Date: Sat Jun 12 06:09:55 2010 New Revision: 953944 URL: http://svn.apache.org/viewvc?rev=953944&view=rev Log: applied the patch for AXIS2-4735 Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/Constants.java axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/receivers/AbstractMessageReceiver.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/Constants.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/Constants.java?rev=953944&r1=953943&r2=953944&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/Constants.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/Constants.java Sat Jun 12 06:09:55 2010 @@ -306,6 +306,8 @@ public class Constants extends org.apach public static final String USER_TRANSACTION = "UserTransaction"; public static final String TRANSACTION_MANAGER = "TransactionManager"; public static final String SUSPENDED_TRANSACTION = "SuspendedTransaction"; +/** A message level property indicating a request to rollback the transaction associated with the message */ +public static final String SET_ROLLBACK_ONLY = "SET_ROLLBACK_ONLY"; public static final String JSR311_ANNOTATIONS="JAXRSAnnotaion"; Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/receivers/AbstractMessageReceiver.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/receivers/AbstractMessageReceiver.java?rev=953944&r1=953943&r2=953944&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/receivers/AbstractMessageReceiver.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/receivers/AbstractMessageReceiver.java Sat Jun 12 06:09:55 2010 @@ -109,6 +109,8 @@ public abstract class AbstractMessageRec try { invokeBusinessLogic(messageCtx); } catch (AxisFault fault) { +// signal the transport to rollback the tx, if any +messageCtx.setProperty(Constants.SET_ROLLBACK_ONLY, true); // If we're in-only, eat this. Otherwise, toss it upwards! if ((messageCtx.getAxisOperation() instanceof InOnlyAxisOperation) && !WSDL2Constants.MEP_URI_ROBUST_IN_ONLY.equals(messageCtx.getAxisOperation().getMessageExchangePattern())) {
svn commit: r953949 - in /axis/axis2/java/core/trunk/modules/all: ./ pom.xml
Author: amilas Date: Sat Jun 12 07:24:29 2010 New Revision: 953949 URL: http://svn.apache.org/viewvc?rev=953949&view=rev Log: added an osgi bundle which contain all the axis2 related packages Added: axis/axis2/java/core/trunk/modules/all/ axis/axis2/java/core/trunk/modules/all/pom.xml Added: axis/axis2/java/core/trunk/modules/all/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/all/pom.xml?rev=953949&view=auto == --- axis/axis2/java/core/trunk/modules/all/pom.xml (added) +++ axis/axis2/java/core/trunk/modules/all/pom.xml Sat Jun 12 07:24:29 2010 @@ -0,0 +1,215 @@ +http://maven.apache.org/POM/4.0.0"; + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";> + + +org.apache.axis2 +axis2-parent +SNAPSHOT +../parent/pom.xml + + +4.0.0 +org.apache.axis2 +axis2-all +bundle +axis2-all + +This bundle exports all the axis2 packages; + +1.6-SNAPSHOT + + + + +org.apache.axis2 +axis2-adb +${version} + + + +org.apache.axis2 +axis2-adb-codegen +${version} + + + +org.apache.axis2 +axis2-clustering +${version} + + + +org.apache.axis2 +axis2-codegen +${version} + + + +org.apache.axis2 +axis2-corba +${version} + + + +org.apache.axis2 +axis2-fastinfoset +${version} + + + +org.apache.axis2 +axis2-fastinfoset +${version} + + + +org.apache.axis2 +axis2-java2wsdl +${version} + + + +org.apache.axis2 +axis2-jaxbri +${version} + + + +org.apache.axis2 +axis2-jaxws +${version} + + + +org.apache.axis2 +axis2-jibx +${version} + + + +org.apache.axis2 +axis2-json +${version} + + + +org.apache.axis2 +axis2-kernel +${version} + + + +org.apache.axis2 +axis2-metadata +${version} + + + +org.apache.axis2 +axis2-mtompolicy +${version} + + + +org.apache.axis2 +axis2-saaj +${version} + + + +org.apache.axis2 +axis2-spring +${version} + + + +org.apache.axis2 +axis2-transport-http +${version} + + + +org.apache.axis2 +axis2-transport-local +${version} + + + +org.apache.axis2 +axis2-xmlbeans +${version} + + + +org.apache.axis2 +mex +jar +${version} +impl + + + +org.apache.felix +org.apache.felix.framework +1.0.3 +provided + + + +org.apache.felix +org.osgi.core +1.0.0 +provided + + + +org.apache.xmlbeans +xmlbeans +${xmlbeans.version} + + + + + + + +org.apache.felix +maven-bundle-plugin +1.4.0 +true + + + ${pom.artifactId} +${pom.artifactId} + +org.apache.axis2.*; version="${version}", +org.apache.ws.java2wsdl.*; version="${version}", +javax.xml.ws.*; version=1.0.0, +org.apache.xmlbeans.*; version=${xmlbeans.version}, + + +!org.apache.axis2.*; version="${version}", +!org.apache.ws.java2wsdl.*; version="${version}", +!javax.xml.ws.*; version=1.0.0, +org.apache.axiom.*; version="${axiom.version}", +org.apache.neethi.*; version="${neethi.version}", +javax.servlet; version=2.4.0, +javax.servlet.http; version=2.4.0, +
svn commit: r953953 - in /axis/axis2/java/core/trunk/modules/adb-codegen: src/org/apache/axis2/schema/SchemaCompiler.java test-resources/testsuite/chameleon_include.xsd
Author: amilas Date: Sat Jun 12 08:25:46 2010 New Revision: 953953 URL: http://svn.apache.org/viewvc?rev=953953&view=rev Log: added support to chemeleon pattern Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java axis/axis2/java/core/trunk/modules/adb-codegen/test-resources/testsuite/chameleon_include.xsd Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java?rev=953953&r1=953952&r2=953953&view=diff == --- axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java (original) +++ axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java Sat Jun 12 08:25:46 2010 @@ -371,7 +371,17 @@ public class SchemaCompiler { } if (o instanceof XmlSchemaInclude) { XmlSchema schema1 = ((XmlSchemaInclude) o).getSchema(); -if (schema1 != null) compile(schema1, isPartofGroup); +if (schema1 != null){ +if (schema1.getTargetNamespace() == null){ +// the target namespace of an included shchema should be same +// as the parent schema however if the schema uses the chemalon pattern +// target namespace can be null. so set it here. +// http://www.xfront.com/ZeroOneOrManyNamespaces.html#mixed + schema1.setTargetNamespace(schema.getTargetNamespace()); +} +compile(schema1, isPartofGroup); +} + } } } Modified: axis/axis2/java/core/trunk/modules/adb-codegen/test-resources/testsuite/chameleon_include.xsd URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb-codegen/test-resources/testsuite/chameleon_include.xsd?rev=953953&r1=953952&r2=953953&view=diff == --- axis/axis2/java/core/trunk/modules/adb-codegen/test-resources/testsuite/chameleon_include.xsd (original) +++ axis/axis2/java/core/trunk/modules/adb-codegen/test-resources/testsuite/chameleon_include.xsd Sat Jun 12 08:25:46 2010 @@ -18,7 +18,6 @@ ~ under the License. --> http://www.w3.org/2001/XMLSchema"; -targetNamespace="http://apache.org/axis2/schema/chameleon"; elementFormDefault="qualified">
svn commit: r981253 - /axis/axis2/java/core/trunk/modules/all/pom.xml
Author: amilas Date: Sun Aug 1 16:04:38 2010 New Revision: 981253 URL: http://svn.apache.org/viewvc?rev=981253&view=rev Log: fixed the version and added the proper name Modified: axis/axis2/java/core/trunk/modules/all/pom.xml Modified: axis/axis2/java/core/trunk/modules/all/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/all/pom.xml?rev=981253&r1=981252&r2=981253&view=diff == --- axis/axis2/java/core/trunk/modules/all/pom.xml (original) +++ axis/axis2/java/core/trunk/modules/all/pom.xml Sun Aug 1 16:04:38 2010 @@ -13,11 +13,10 @@ org.apache.axis2 axis2-all bundle -axis2-all +Apache Axis2 - all This bundle exports all the axis2 packages; -1.6-SNAPSHOT
svn commit: r990778 - in /axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils: BeanUtil.java ConverterUtil.java
Author: amilas Date: Mon Aug 30 12:14:36 2010 New Revision: 990778 URL: http://svn.apache.org/viewvc?rev=990778&view=rev Log: getting java objects even if the case does not match. this is use full when using benaUtils to get java object from xml files. Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java?rev=990778&r1=990777&r2=990778&view=diff == --- axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java (original) +++ axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java Mon Aug 30 12:14:36 2010 @@ -338,7 +338,21 @@ public class BeanUtil { } else if ("java.lang.Object".equals(beanClass.getName())){ return beanElement.getFirstOMChild(); } -HashMap properties = new HashMap(); + +//use a comaprator to ignore the case of the bean element +//names eg. if the property descriptor is getServiceName it +//should accept child element with ServiceName as well. +//but currently accepts only serviceName +Comparator comparator = new Comparator() { +public int compare(Object o1, Object o2) { +String string1 = (String) o1; +String string2 = (String) o2; +return string1.compareToIgnoreCase(string2); +} +}; +Map properties = new TreeMap(comparator); + + BeanInfo beanInfo = Introspector.getBeanInfo(beanClass); PropertyDescriptor [] propDescs = beanInfo.getPropertyDescriptors(); for (PropertyDescriptor proprty : propDescs) { Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java?rev=990778&r1=990777&r2=990778&view=diff == --- axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java (original) +++ axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java Mon Aug 30 12:14:36 2010 @@ -1330,6 +1330,10 @@ public class ConverterUtil { return calendar.getTimeInMillis() - newCalendar.getTimeInMillis(); } +public static long compare(UnsignedLong unsignedLong, String value) { +return compare(unsignedLong.longValue(), value); +} + /** * Converts the given .datahandler to a string *
svn commit: r1042551 - /axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl
Author: amilas Date: Mon Dec 6 09:05:13 2010 New Revision: 1042551 URL: http://svn.apache.org/viewvc?rev=1042551&view=rev Log: remane the temp variable content to listContent inorder to avoid some compilation issues. Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl?rev=1042551&r1=1042550&r2=1042551&view=diff == --- axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl (original) +++ axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl Mon Dec 6 09:05:13 2010 @@ -2247,8 +2247,8 @@ -java.lang.String content = reader.getElementText(); -object = .Factory.fromString(reader,content); +java.lang.String listContent = reader.getElementText(); +object = .Factory.fromString(reader,listContent);
svn commit: r1051478 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java
Author: amilas Date: Tue Dec 21 12:49:59 2010 New Revision: 1051478 URL: http://svn.apache.org/viewvc?rev=1051478&view=rev Log: apply the patch for AXIS2-4792 Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java?rev=1051478&r1=1051477&r2=1051478&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java Tue Dec 21 12:49:59 2010 @@ -251,18 +251,7 @@ public class ConfigurationContext extend serviceGroupContext = getServiceGroupContextFromSoapSessionTable(serviceGroupContextId, messageContext); -if (serviceGroupContext == null) { -// TODO: Adding this code so that requests to services deployed in soapsession scope will work -// TODO: However, soapsession functionality is still broken -serviceGroupContext = -new ServiceGroupContext(this, - axisService.getAxisServiceGroup()); -serviceGroupContext.setId(serviceGroupContextId); - addServiceGroupContextIntoSoapSessionTable(serviceGroupContext); -//throw new AxisFault("Unable to find corresponding context" + -//" for the serviceGroupId: " + serviceGroupContextId); -} } else { AxisServiceGroup axisServiceGroup = axisService.getAxisServiceGroup(); serviceGroupContext = createServiceGroupContext(axisServiceGroup);
svn commit: r1051485 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/util/Utils.java
Author: amilas Date: Tue Dec 21 13:08:35 2010 New Revision: 1051485 URL: http://svn.apache.org/viewvc?rev=1051485&view=rev Log: make the uri based operation dispatch work even with the hierachical services Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/util/Utils.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/util/Utils.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/util/Utils.java?rev=1051485&r1=1051484&r2=1051485&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/util/Utils.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/util/Utils.java Tue Dec 21 13:08:35 2010 @@ -315,9 +315,9 @@ public class Utils { if (queryIndex > 0) { operationName = operationName.substring(0, queryIndex); } -//remove last '/' -if (operationName.endsWith("/")) { -operationName = operationName.substring(0, operationName.length() - 1); +//take the part upto / as the operation name +if (operationName.indexOf("/") != -1) { +operationName = operationName.substring(0, operationName.indexOf("/")); } } return operationName;
svn commit: r1052529 - in /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/resolver: AARBasedWSDLLocator.java AARFileBasedURIResolver.java
Author: amilas Date: Fri Dec 24 16:36:39 2010 New Revision: 1052529 URL: http://svn.apache.org/viewvc?rev=1052529&view=rev Log: applied to method suggested in AXIS2-3191 to fixe relative schema import problem Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/resolver/AARBasedWSDLLocator.java axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/resolver/AARFileBasedURIResolver.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/resolver/AARBasedWSDLLocator.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/resolver/AARBasedWSDLLocator.java?rev=1052529&r1=1052528&r2=1052529&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/resolver/AARBasedWSDLLocator.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/resolver/AARBasedWSDLLocator.java Fri Dec 24 16:36:39 2010 @@ -73,7 +73,7 @@ public class AARBasedWSDLLocator extends public InputSource getImportInputSource(String parentLocation, String importLocation) { lastImportLocation = URI.create(parentLocation).resolve(importLocation); -if (isAbsolute(importLocation)) { +if (isAbsolute(lastImportLocation.toString())) { return super.resolveEntity( null, importLocation, parentLocation); } else { Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/resolver/AARFileBasedURIResolver.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/resolver/AARFileBasedURIResolver.java?rev=1052529&r1=1052528&r2=1052529&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/resolver/AARFileBasedURIResolver.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/resolver/AARFileBasedURIResolver.java Fri Dec 24 16:36:39 2010 @@ -52,8 +52,12 @@ public class AARFileBasedURIResolver ext String targetNamespace, String schemaLocation, String baseUri) { -//no issue with -if (isAbsolute(schemaLocation)) { +//no issue with abloslute schemas +// this schema can be in a relative location for another base scheama. so first +// try to see the proper location + + lastImportLocation = URI.create(baseUri).resolve(schemaLocation); +if (isAbsolute(lastImportLocation.toString())) { return super.resolveEntity( targetNamespace, schemaLocation, baseUri); } else { @@ -63,7 +67,6 @@ public class AARFileBasedURIResolver ext "Unsupported schema location " + schemaLocation); } -lastImportLocation = URI.create(baseUri).resolve(schemaLocation); ZipInputStream zin = null; try { zin = new ZipInputStream(new FileInputStream(aarFile)); @@ -106,4 +109,5 @@ public class AARFileBasedURIResolver ext log.info("AARFileBasedURIResolver: Unable to resolve" + lastImportLocation); return null; } + }
svn commit: r1052745 - /axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl
Author: amilas Date: Sat Dec 25 03:33:34 2010 New Revision: 1052745 URL: http://svn.apache.org/viewvc?rev=1052745&view=rev Log: fixing the issue AXIS2-3034 Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl?rev=1052745&r1=1052744&r2=1052745&view=diff == --- axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl (original) +++ axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl Sat Dec 25 03:33:34 2010 @@ -2087,7 +2087,9 @@ -if (enumeration==null) throw new java.lang.IllegalArgumentException(); +if ((enumeration == null) && !((value == null) || (value.equals("" { +throw new java.lang.IllegalArgumentException(); +} return enumeration; } public static fromString(java.lang.String value,java.lang.String namespaceURI)
svn commit: r1052751 - /axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java
Author: amilas Date: Sat Dec 25 04:18:31 2010 New Revision: 1052751 URL: http://svn.apache.org/viewvc?rev=1052751&view=rev Log: fixed the issue AXIS2-3029 Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java?rev=1052751&r1=1052750&r2=1052751&view=diff == --- axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java (original) +++ axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java Sat Dec 25 04:18:31 2010 @@ -348,6 +348,13 @@ public class SchemaCompiler { //add the schema to the loaded schema list if (!loadedSchemaMap.containsKey(schema.getTargetNamespace())) { loadedSchemaMap.put(schema.getTargetNamespace(), schema); +// when the target name space is not given schema.getTargetNamesapce returns null. +// but when importing import namesapce location is given as "". +// this causese a problem in finding reference elements. see AXIS2-3029 +// kept the null entry as well to safe gaurd any thing which acess using null +if (schema.getTargetNamespace() == null){ +loadedSchemaMap.put("", schema); +} } // If we have/are loading a schema with a specific targetnamespace from a certain URI,
svn commit: r1052758 - /axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java
Author: amilas Date: Sat Dec 25 08:49:02 2010 New Revision: 1052758 URL: http://svn.apache.org/viewvc?rev=1052758&view=rev Log: fixed the issue AXIS2-3994 Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java?rev=1052758&r1=1052757&r2=1052758&view=diff == --- axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java (original) +++ axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java Sat Dec 25 08:49:02 2010 @@ -781,6 +781,29 @@ public class SchemaCompiler { javaClassName); xsElt.addMetaInfo(SchemaConstants.SchemaCompilerInfoHolder.CLASSNAME_KEY, javaClassName); +} else if (referencedElement.getSchemaTypeName() != null){ +QName schemaTypeName = referencedElement.getSchemaTypeName(); +XmlSchema newResolvedSchema = getParentSchema(resolvedSchema, schemaTypeName, COMPONENT_TYPE); +XmlSchemaType xmlSchemaType = newResolvedSchema.getTypeByName(schemaTypeName); +if (xmlSchemaType != null) { +if (!this.processedElementRefMap.containsKey(referencedElement.getQName())) { +// we know this is a named complex type +processSchema(referencedElement, xmlSchemaType, newResolvedSchema, false); +// if this is an anonomous complex type we have to set this + this.processedElementRefMap.put(referencedElement.getQName(), +this.processedTypemap.get(schemaTypeName)); + +} + +String javaClassName = this.processedTypemap.get(referencedElement.getSchemaTypeName()); + referencedElement.addMetaInfo(SchemaConstants.SchemaCompilerInfoHolder.CLASSNAME_KEY, +javaClassName); + xsElt.addMetaInfo(SchemaConstants.SchemaCompilerInfoHolder.CLASSNAME_KEY, +javaClassName); +} else { +throw new SchemaCompilationException(" Can not find the schema type with name " + schemaTypeName); +} + } // schema type name is present but not the schema type object
svn commit: r1052896 - in /axis/axis2/java/core/trunk: ./ modules/adb-codegen/src/org/apache/axis2/schema/template/ modules/codegen/src/org/apache/axis2/wsdl/template/java/ modules/jaxbri/src/org/apac
Author: amilas Date: Sun Dec 26 15:24:05 2010 New Revision: 1052896 URL: http://svn.apache.org/viewvc?rev=1052896&view=rev Log: AXIS2-4197 Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBDatabindingTemplate.xsl axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/template/java/MessageReceiverTemplate.xsl axis/axis2/java/core/trunk/modules/jaxbri/src/org/apache/axis2/jaxbri/template/JaxbRIDatabindingTemplate.xsl axis/axis2/java/core/trunk/modules/xmlbeans/src/org/apache/axis2/xmlbeans/template/XmlbeansDatabindingTemplate.xsl axis/axis2/java/core/trunk/pom.xml Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBDatabindingTemplate.xsl URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBDatabindingTemplate.xsl?rev=1052896&r1=1052895&r2=1052896&view=diff == --- axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBDatabindingTemplate.xsl (original) +++ axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBDatabindingTemplate.xsl Sun Dec 26 15:24:05 2010 @@ -135,7 +135,7 @@ -private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, param, boolean optimizeContent) +private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, param, boolean optimizeContent, javax.xml.namespace.QName methodQName) throws org.apache.axis2.AxisFault{ @@ -253,7 +253,7 @@ -private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, param, boolean optimizeContent) +private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, param, boolean optimizeContent, javax.xml.namespace.QName methodQName) throws org.apache.axis2.AxisFault{ try{ org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope(); Modified: axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl?rev=1052896&r1=1052895&r2=1052896&view=diff == --- axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl (original) +++ axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl Sun Dec 26 15:24:05 2010 @@ -374,7 +374,8 @@ env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()), , optimizeContent(new javax.xml.namespace.QName("", -""))); +"")), new javax.xml.namespace.QName("", +"")); @@ -662,7 +663,8 @@ env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()), , optimizeContent(new javax.xml.namespace.QName("", -""))); +"")), new javax.xml.namespace.QName("", +"")); @@ -980,7 +982,8 @@
svn commit: r1052902 - /axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl
Author: amilas Date: Sun Dec 26 15:38:41 2010 New Revision: 1052902 URL: http://svn.apache.org/viewvc?rev=1052902&view=rev Log: fixing issue AXIS2-4915 Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl?rev=1052902&r1=1052901&r2=1052902&view=diff == --- axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl (original) +++ axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl Sun Dec 26 15:38:41 2010 @@ -301,6 +301,11 @@ * in the serialized XML */ protected boolean = false ; + + public boolean isSpecified(){ + return ; + } + /**
svn commit: r1053017 - /axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl
Author: amilas Date: Mon Dec 27 07:55:23 2010 New Revision: 1053017 URL: http://svn.apache.org/viewvc?rev=1053017&view=rev Log: fixed the issue AXIS2-3764 Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl?rev=1053017&r1=1053016&r2=1053017&view=diff == --- axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl (original) +++ axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl Mon Dec 27 07:55:23 2010 @@ -281,8 +281,8 @@ public int hashCode() { return toString().hashCode();} public java.lang.String toString() { - -return + ""; + +return org.apache.axis2.databinding.utils.ConverterUtil.convertToString(); return .toString(); @@ -530,8 +530,8 @@ public java.lang.String toString(){ - -return + ""; + +return org.apache.axis2.databinding.utils.ConverterUtil.convertToString(); return .toString();
svn commit: r1053084 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
Author: amilas Date: Mon Dec 27 15:21:44 2010 New Revision: 1053084 URL: http://svn.apache.org/viewvc?rev=1053084&view=rev Log: fixed the issue AXIS2-4533. we need to use the fault part name of the operation as the fault name Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java?rev=1053084&r1=1053083&r2=1053084&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java Mon Dec 27 15:21:44 2010 @@ -852,7 +852,7 @@ public class WSDL11ToAxisServiceBuilder Message wsdl4jFaultMessge = wsdl4jFault.getMessage(); AxisMessage faultMessage = findFaultMessage( -wsdl4jFaultMessge.getQName().getLocalPart(), +wsdl4jFault.getName(), axisOperation.getFaultMessages()); AxisBindingMessage axisBindingFaultMessage = new AxisBindingMessage(); @@ -1526,7 +1526,7 @@ public class WSDL11ToAxisServiceBuilder Message faultMessage = fault.getMessage(); if (null != faultMessage) { axisFaultMessage -.setName(faultMessage.getQName().getLocalPart()); +.setName(fault.getName()); copyExtensibleElements(faultMessage.getExtensibilityElements(), dif, axisFaultMessage, PORT_TYPE_OPERATION_FAULT);
svn commit: r1053092 - /axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl
Author: amilas Date: Mon Dec 27 15:51:22 2010 New Revision: 1053092 URL: http://svn.apache.org/viewvc?rev=1053092&view=rev Log: renaming the localName variable to fix AXIS2-4849 Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl?rev=1053092&r1=1053091&r2=1053092&view=diff == --- axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl (original) +++ axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl Mon Dec 27 15:51:22 2010 @@ -1302,13 +1302,13 @@ java.lang.String namespace = ""; -java.lang.String localName = ""; +java.lang.String _localName = ""; java.lang.String namespace = parentQName.getNamespaceURI(); -java.lang.String localName = parentQName.getLocalPart(); +java.lang.String _localName = parentQName.getLocalPart(); -writeStartElement(null, namespace, localName, xmlWriter); +writeStartElement(null, namespace, _localName, xmlWriter); // add the type details if this is used in a simple type if (serializeType){
svn commit: r1053240 - /axis/axis2/java/core/trunk/modules/jibx/src/org/apache/axis2/jibx/template/JibXDatabindingTemplate.xsl
Author: amilas Date: Tue Dec 28 01:55:39 2010 New Revision: 1053240 URL: http://svn.apache.org/viewvc?rev=1053240&view=rev Log: appling to the toEnvelope fixe to jibx as well Modified: axis/axis2/java/core/trunk/modules/jibx/src/org/apache/axis2/jibx/template/JibXDatabindingTemplate.xsl Modified: axis/axis2/java/core/trunk/modules/jibx/src/org/apache/axis2/jibx/template/JibXDatabindingTemplate.xsl URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jibx/src/org/apache/axis2/jibx/template/JibXDatabindingTemplate.xsl?rev=1053240&r1=1053239&r2=1053240&view=diff == --- axis/axis2/java/core/trunk/modules/jibx/src/org/apache/axis2/jibx/template/JibXDatabindingTemplate.xsl (original) +++ axis/axis2/java/core/trunk/modules/jibx/src/org/apache/axis2/jibx/template/JibXDatabindingTemplate.xsl Tue Dec 28 01:55:39 2010 @@ -116,7 +116,7 @@ -private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, param, boolean optimizeContent) { +private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, param, boolean optimizeContent, javax.xml.namespace.QName methodQName) { org.apache.axiom.soap.SOAPEnvelope envelope = factory.getDefaultEnvelope(); if (param != null){ envelope.getBody().addChild(toOM(param, factory, optimizeContent));
svn commit: r1053264 - in /axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/template/java: InterfaceImplementationTemplate.xsl InterfaceTemplate.xsl
Author: amilas Date: Tue Dec 28 05:39:46 2010 New Revision: 1053264 URL: http://svn.apache.org/viewvc?rev=1053264&view=rev Log: fixing the issue AXIS2-4866 put the fixe to not display , to in only operations and at the interface Modified: axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceTemplate.xsl Modified: axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl?rev=1053264&r1=1053263&r2=1053264&view=diff == --- axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl (original) +++ axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl Tue Dec 28 05:39:46 2010 @@ -904,6 +904,8 @@ */ public void ( + + - , + , , Modified: axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceTemplate.xsl URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceTemplate.xsl?rev=1053264&r1=1053263&r2=1053264&view=diff == --- axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceTemplate.xsl (original) +++ axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceTemplate.xsl Tue Dec 28 05:39:46 2010 @@ -113,6 +113,8 @@ ( + + -, +, , ) @@ -202,11 +205,15 @@ */ public void ( + + + + - + @@ -221,7 +228,8 @@ - , + , ,
svn commit: r1053267 - /axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/i18n/resource.properties
Author: amilas Date: Tue Dec 28 05:59:13 2010 New Revision: 1053267 URL: http://svn.apache.org/viewvc?rev=1053267&view=rev Log: fixing issue AXIS2-4208 added more meaning full message Modified: axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/i18n/resource.properties Modified: axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/i18n/resource.properties URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/i18n/resource.properties?rev=1053267&r1=1053266&r2=1053267&view=diff == --- axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/i18n/resource.properties (original) +++ axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/i18n/resource.properties Tue Dec 28 05:59:13 2010 @@ -45,7 +45,7 @@ wsdl2code.arg7= -t wsdl2code.arg8= -ss Generate server side code (i.e. skeletons) (Default: off). wsdl2code.arg9= -sd Generate service descriptor (i.e. services.xml). (Default: off). Valid with -ss. wsdl2code.arg10= -d Valid databinding(s) are adb, xmlbeans, jibx and jaxbri (Default: adb). -wsdl2code.arg11= -g Generates all the classes. Valid only with -ss. +wsdl2code.arg11= -g Generates all the classes. It generates clases for both client side and server side including derived classes of the schema. wsdl2code.arg12= -pn Choose a specific port when there are multiple ports in the wsdl. wsdl2code.arg13= -snChoose a specific service when there are multiple services in the wsdl. wsdl2code.arg14= -u Unpacks the databinding classes
svn commit: r1054950 - in /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl: DefaultSchemaGenerator.java TypeTable.java
Author: amilas Date: Tue Jan 4 10:06:59 2011 New Revision: 1054950 URL: http://svn.apache.org/viewvc?rev=1054950&view=rev Log: use a map to keep the element qname and class name to support inheritance. see the issue AXIS2-4818 Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/TypeTable.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java?rev=1054950&r1=1054949&r2=1054950&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java Tue Jan 4 10:06:59 2011 @@ -168,9 +168,24 @@ public class DefaultSchemaGenerator impl if ((generateWrappedArrayTypes != null) && JavaUtils.isTrue(generateWrappedArrayTypes.getValue())){ isGenerateWrappedArrayTypes = true; } + +Parameter extraClassesParam = service.getParameter("extraClass"); +if (extraClassesParam != null){ +String extraClassesString = (String) extraClassesParam.getValue(); +String[] extraClassesArray = extraClassesString.split(","); +if (this.extraClasses == null){ +this.extraClasses = new ArrayList(); +} + +for (String extraClass : extraClassesArray){ +this.extraClasses.add(extraClass); +} +} } + + } //This will locad the custom schema file and add that into the schema map @@ -569,6 +584,8 @@ public class DefaultSchemaGenerator impl // adding this type's package to the table, to support inheritance. typeTable.addComplexSchema(getQualifiedName(javaType.getPackage()), eltOuter.getQName()); +typeTable.addClassNameForQName(eltOuter.getQName(), name); + BeanExcludeInfo beanExcludeInfo = null; if (service.getExcludeInfo() != null) { beanExcludeInfo = service.getExcludeInfo().getBeanExcludeInfoForClass(getClassName(javaType)); Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/TypeTable.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/TypeTable.java?rev=1054950&r1=1054949&r2=1054950&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/TypeTable.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/TypeTable.java Tue Jan 4 10:06:59 2011 @@ -28,6 +28,7 @@ import java.util.Hashtable; import java.util.List; import java.util.Map; import java.util.Vector; +import java.util.concurrent.ConcurrentHashMap; public class TypeTable { @@ -36,10 +37,16 @@ public class TypeTable { private HashMap complexTypeMap; +/** + * this map is used to keep the class names with the Qnames. + */ +private Map qNameToClassMap; + public TypeTable() { //complex type table is resetted every time this is //instantiated complexTypeMap = new HashMap(); +this.qNameToClassMap = new HashMap(); } /* statically populate the simple type map - this is not likely to @@ -188,6 +195,14 @@ public class TypeTable { return (QName) complexTypeMap.get(name); } +public String getClassNameForQName(QName qname) { +return this.qNameToClassMap.get(qname); +} + +public void addClassNameForQName(QName qname, String className) { +this.qNameToClassMap.put(qname, className); +} + /** * Get the qname for a type * first try the simple types if not try the complex types
svn commit: r1054954 - /axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
Author: amilas Date: Tue Jan 4 10:17:07 2011 New Revision: 1054954 URL: http://svn.apache.org/viewvc?rev=1054954&view=rev Log: getting the type from the xsi:type attribute and process correctly. sending the java class name with the xml request is not an inter operable method. see AXIS2-4818 Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java?rev=1054954&r1=1054953&r2=1054954&view=diff == --- axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java (original) +++ axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java Tue Jan 4 10:17:07 2011 @@ -41,13 +41,7 @@ import java.util.TreeMap; import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamReader; -import org.apache.axiom.om.OMAbstractFactory; -import org.apache.axiom.om.OMAttribute; -import org.apache.axiom.om.OMElement; -import org.apache.axiom.om.OMFactory; -import org.apache.axiom.om.OMText; -import org.apache.axiom.om.OMXMLBuilderFactory; -import org.apache.axiom.om.OMXMLParserWrapper; +import org.apache.axiom.om.*; import org.apache.axiom.om.util.Base64; import org.apache.axis2.AxisFault; import org.apache.axis2.context.MessageContext; @@ -333,12 +327,38 @@ public class BeanUtil { // to support polymorphism in POJO approach. // Retrieve the type name of the instance from the 'type' attribute // and retrieve the class. -String instanceTypeName = beanElement.getAttributeValue(new QName("type")); -if ((instanceTypeName != null) && (!beanClass.isArray())) { -try { -beanClass = Loader.loadClass(beanClass.getClassLoader(), instanceTypeName); -} catch (ClassNotFoundException ce) { -throw AxisFault.makeFault(ce); + +String instanceTypeName = beanElement.getAttributeValue(new QName(Constants.XSI_NAMESPACE, "type")); +if (instanceTypeName != null) { +MessageContext messageContext = MessageContext.getCurrentMessageContext(); +// we can have this support only at the server side. we need to find the axisservice +// to get the type table. +if (messageContext != null) { +AxisService axisService = messageContext.getAxisService(); +QName typeQName = null; +if (instanceTypeName.indexOf(":") > -1) { +String prefix = instanceTypeName.substring(0, instanceTypeName.indexOf(":")); +for (Iterator namespaceIter = beanElement.getAllDeclaredNamespaces(); namespaceIter.hasNext();) { +OMNamespace omNamespace = (OMNamespace) namespaceIter.next(); +if (omNamespace.getPrefix().equals(prefix)) { +typeQName = new QName(omNamespace.getNamespaceURI(), instanceTypeName.substring(instanceTypeName.indexOf(":") + 1)); +} +} +} else { +typeQName = new QName(instanceTypeName); +} + +TypeTable typeTable = axisService.getTypeTable(); +String className = typeTable.getClassNameForQName(typeQName); +if (className != null) { +try { +beanClass = Loader.loadClass(beanClass.getClassLoader(), className); +} catch (ClassNotFoundException ce) { +throw AxisFault.makeFault(ce); +} +} else { +throw new AxisFault("Unknow type " + typeQName); +} } }
svn commit: r1055302 - /axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
Author: amilas Date: Wed Jan 5 05:55:47 2011 New Revision: 1055302 URL: http://svn.apache.org/viewvc?rev=1055302&view=rev Log: use the efficient resolve Qname method Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java?rev=1055302&r1=1055301&r2=1055302&view=diff == --- axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java (original) +++ axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java Wed Jan 5 05:55:47 2011 @@ -335,19 +335,7 @@ public class BeanUtil { // to get the type table. if (messageContext != null) { AxisService axisService = messageContext.getAxisService(); -QName typeQName = null; -if (instanceTypeName.indexOf(":") > -1) { -String prefix = instanceTypeName.substring(0, instanceTypeName.indexOf(":")); -for (Iterator namespaceIter = beanElement.getAllDeclaredNamespaces(); namespaceIter.hasNext();) { -OMNamespace omNamespace = (OMNamespace) namespaceIter.next(); -if (omNamespace.getPrefix().equals(prefix)) { -typeQName = new QName(omNamespace.getNamespaceURI(), instanceTypeName.substring(instanceTypeName.indexOf(":") + 1)); -} -} -} else { -typeQName = new QName(instanceTypeName); -} - +QName typeQName = beanElement.resolveQName(instanceTypeName); TypeTable typeTable = axisService.getTypeTable(); String className = typeTable.getClassNameForQName(typeQName); if (className != null) {
svn commit: r1055310 - /axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java
Author: amilas Date: Wed Jan 5 06:45:27 2011 New Revision: 1055310 URL: http://svn.apache.org/viewvc?rev=1055310&view=rev Log: fixing the issue AXIS2-3397 Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java?rev=1055310&r1=1055309&r2=1055310&view=diff == --- axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java (original) +++ axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java Wed Jan 5 06:45:27 2011 @@ -31,6 +31,8 @@ import javax.activation.DataHandler; import javax.xml.namespace.QName; import java.text.SimpleDateFormat; import java.util.*; +import java.net.URI; +import java.net.URISyntaxException; public class SimpleTypeMapper { @@ -45,6 +47,7 @@ public class SimpleTypeMapper { private static final String W_FLOAT = "java.lang.Float"; private static final String W_CALENDAR = "java.util.Calendar"; private static final String W_DATE = "java.util.Date"; +private static final String W_URI = URI.class.getName(); private static final String INT = "int"; private static final String BOOLEAN = "boolean"; private static final String BYTE = "byte"; @@ -141,8 +144,13 @@ public class SimpleTypeMapper { } else if(name.equals(YEAR_MONTH)) { return new org.apache.axis2.databinding.types.YearMonth(text); -} -else { +} else if(name.equals(W_URI)) { +try { +return new URI(text); +} catch (URISyntaxException e) { +throw new RuntimeException(" Invalid URI " + text, e); +} +} else { return null; } } @@ -253,7 +261,12 @@ public class SimpleTypeMapper { return true; } else if (objClassName.equals(W_DATE)) { return true; -} /* +} else if (objClassName.equals(W_URI)) { +return true; +} + + +/* * consider BigDecimal, BigInteger, Day, Duration, Month * MonthDay, Time, Year, YearMonth as simple type */ @@ -301,6 +314,8 @@ public class SimpleTypeMapper { } } return zulu.format(obj); +} else if (obj instanceof URI){ +return obj.toString(); } return obj.toString(); }
svn commit: r1055388 - in /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl: DefaultSchemaGenerator.java TypeTable.java
Author: amilas Date: Wed Jan 5 09:57:41 2011 New Revision: 1055388 URL: http://svn.apache.org/viewvc?rev=1055388&view=rev Log: fixing the issue AXIS2-3444. Adding operation name wrapper in order to create a unique element for the operation request Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/TypeTable.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java?rev=1055388&r1=1055387&r2=1055388&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java Wed Jan 5 09:57:41 2011 @@ -352,14 +352,18 @@ public class DefaultSchemaGenerator impl parameterNames = methodTable.getParameterNames(methodName); // put the parameter names to use it for parsing service.addParameter(methodName, parameterNames); -sequence = new XmlSchemaSequence(); - -methodSchemaType = createSchemaTypeForMethodPart(methodName); -methodSchemaType.setParticle(sequence); - inMessage.setElementQName(typeTable.getQNamefortheType(methodName)); - service.addMessageElementQNameToOperationMapping(methodSchemaType.getQName(), -axisOperation); } + +// we need to add the method opration wrapper part even to +// empty parameter operations +sequence = new XmlSchemaSequence(); +methodSchemaType = createSchemaTypeForMethodPart(methodName); +methodSchemaType.setParticle(sequence); + inMessage.setElementQName(typeTable.getQNamefortheType(methodName)); + service.addMessageElementQNameToOperationMapping(methodSchemaType.getQName(), +axisOperation); + + Annotation[][] parameterAnnotation = jMethod.getParameterAnnotations(); Type[] genericParameterTypes = jMethod.getGenericParameterTypes(); Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/TypeTable.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/TypeTable.java?rev=1055388&r1=1055387&r2=1055388&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/TypeTable.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/TypeTable.java Wed Jan 5 09:57:41 2011 @@ -29,6 +29,7 @@ import java.util.List; import java.util.Map; import java.util.Vector; import java.util.concurrent.ConcurrentHashMap; +import java.net.URI; public class TypeTable { @@ -126,11 +127,10 @@ public class TypeTable { new QName(Java2WSDLConstants.URI_2001_SCHEMA_XSD, "gYear", "xs")); simpleTypetoxsd.put("org.apache.axis2.databinding.types.YearMonth", new QName(Java2WSDLConstants.URI_2001_SCHEMA_XSD, "gYearMonth", "xs")); +simpleTypetoxsd.put("java.lang.Object",ANY_TYPE); -simpleTypetoxsd.put("java.lang.Object", -ANY_TYPE); +simpleTypetoxsd.put(URI.class.getName(), new QName(Java2WSDLConstants.URI_2001_SCHEMA_XSD, "anyURI", "xs")); -// Any types simpleTypetoxsd.put(OMElement.class.getName(), ANY_TYPE); simpleTypetoxsd.put(ArrayList.class.getName(),
svn commit: r1055390 - /axis/axis2/java/core/trunk/modules/integration/test-resources/generics/generics.wsdl
Author: amilas Date: Wed Jan 5 09:58:30 2011 New Revision: 1055390 URL: http://svn.apache.org/viewvc?rev=1055390&view=rev Log: fixed the test case for AXIS2-3444 Modified: axis/axis2/java/core/trunk/modules/integration/test-resources/generics/generics.wsdl Modified: axis/axis2/java/core/trunk/modules/integration/test-resources/generics/generics.wsdl URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/integration/test-resources/generics/generics.wsdl?rev=1055390&r1=1055389&r2=1055390&view=diff == --- axis/axis2/java/core/trunk/modules/integration/test-resources/generics/generics.wsdl (original) +++ axis/axis2/java/core/trunk/modules/integration/test-resources/generics/generics.wsdl Wed Jan 5 09:58:30 2011 @@ -1,14 +1,7 @@ -http://schemas.xmlsoap.org/wsdl/"; xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"; - xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"; - xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"; xmlns:ns1="http://org.apache.axis2/xsd"; - xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"; - xmlns:ax21="http://generics.axis2.apache.org/xsd"; xmlns:ns="http://generics.axis2.apache.org"; - xmlns:xs="http://www.w3.org/2001/XMLSchema"; xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; - targetNamespace="http://generics.axis2.apache.org";> +http://schemas.xmlsoap.org/wsdl/"; xmlns:ns1="http://org.apache.axis2/xsd"; xmlns:ns="http://generics.axis2.apache.org"; xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"; xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"; xmlns:ax21="http://generics.axis2.apache.org/xsd"; xmlns:xs="http://www.w3.org/2001/XMLSchema"; xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"; xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"; targetNamespace="http://generics.axis2.apache.org";> -http://generics.axis2.apache.org/xsd"; attributeFormDefault="qualified" - elementFormDefault="qualified" targetNamespace="http://generics.axis2.apache.org";> +http://generics.axis2.apache.org/xsd"; attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://generics.axis2.apache.org";> http://generics.axis2.apache.org/xsd"/> @@ -39,18 +32,22 @@ - + - + + + + + + @@ -59,8 +56,7 @@ -http://generics.axis2.apache.org/xsd";> +http://generics.axis2.apache.org/xsd";> @@ -78,16 +74,18 @@ - - - - + + + + + + @@ -96,14 +94,14 @@ - - - - + + + + http://schemas.xmlsoap.org/soap/http"; style="document"/> @@ -122,8 +120,8 @@ - - + + @@ -131,8 +129,8 @@ - - + + @@ -158,8 +156,8 @@ - - + + @@ -167,8 +165,8 @@ - - + + @@ -194,8 +192,8 @@ - - + + @@ -203,8 +201,8 @@ - - + + @@ -224,4 +222,4 @@ http://localhost:8080/axis2/services/GenericService"/> - \ No newline at end of file +
svn commit: r1055743 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/engine/DependencyManager.java
Author: amilas Date: Thu Jan 6 04:34:17 2011 New Revision: 1055743 URL: http://svn.apache.org/viewvc?rev=1055743&view=rev Log: throwing the exceptions if there any if method invocation fails fixing AXIS2-3120 Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/engine/DependencyManager.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/engine/DependencyManager.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/engine/DependencyManager.java?rev=1055743&r1=1055742&r2=1055743&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/engine/DependencyManager.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/engine/DependencyManager.java Thu Jan 6 04:34:17 2011 @@ -83,8 +83,7 @@ public class DependencyManager { // We can not call classToLoad.getDeclaredMethed() , since there // can be insatnce where mutiple services extends using one class // just for init and other reflection methods -Method method = -null; +Method method = null; try { method = classToLoad.getMethod(SERVICE_INIT_METHOD, new Class[]{ServiceContext.class}); } catch (Exception e) { @@ -96,11 +95,14 @@ public class DependencyManager { try { method.invoke(obj, new Object[]{serviceContext}); } catch (IllegalAccessException e) { -log.info("Exception trying to call " + SERVICE_INIT_METHOD, e); +log.error("Exception trying to call " + SERVICE_INIT_METHOD, e); +throw new AxisFault("Can not access the method ", e); } catch (IllegalArgumentException e) { -log.info("Exception trying to call " + SERVICE_INIT_METHOD, e); +log.error("Exception trying to call " + SERVICE_INIT_METHOD, e); +throw new AxisFault(" Incorrect arguments ", e); } catch (InvocationTargetException e) { -log.info("Exception trying to call " + SERVICE_INIT_METHOD, e); +log.error("Exception trying to call " + SERVICE_INIT_METHOD, e); +throw new AxisFault(" problem in invocation the method ", e); } } }
svn commit: r1055761 - /axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl
Author: amilas Date: Thu Jan 6 06:46:31 2011 New Revision: 1055761 URL: http://svn.apache.org/viewvc?rev=1055761&view=rev Log: fixing issue AXIS2-3911 added the full qualified name. Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl?rev=1055761&r1=1055760&r2=1055761&view=diff == --- axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl (original) +++ axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl Thu Jan 6 06:46:31 2011 @@ -3101,7 +3101,7 @@ else{ // A start element we are not expecting indicates an invalid parameter was passed -throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName()); +throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getName()); } @@ -3117,7 +3117,7 @@ if (reader.isStartElement()) // A start element we are not expecting indicates a trailing invalid property -throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName()); +throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getName()); @@ -3126,7 +3126,7 @@ else{ // A start element we are not expecting indicates an invalid parameter was passed -throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName()); +throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getName()); } } else {
svn commit: r1055792 - /axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenerationEngine.java
Author: amilas Date: Thu Jan 6 08:46:39 2011 New Revision: 1055792 URL: http://svn.apache.org/viewvc?rev=1055792&view=rev Log: supporting redirect urls for jaxbri Modified: axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenerationEngine.java Modified: axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenerationEngine.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenerationEngine.java?rev=1055792&r1=1055791&r2=1055792&view=diff == --- axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenerationEngine.java (original) +++ axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenerationEngine.java Thu Jan 6 08:46:39 2011 @@ -48,6 +48,8 @@ import javax.xml.namespace.QName; import java.io.File; import java.io.IOException; import java.net.URISyntaxException; +import java.net.URL; +import java.net.HttpURLConnection; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -86,6 +88,21 @@ public class CodeGenerationEngine { (CommandLineOption)allOptions. get(CommandLineOptionConstants.WSDL2JavaConstants.WSDL_LOCATION_URI_OPTION); wsdlUri = option.getOptionValue(); + +// the redirected urls gives problems in code generation some times with jaxbri +// eg. https://www.paypal.com/wsdl/PayPalSvc.wsdl +// if there is a redirect url better to find it and use. +if (wsdlUri.startsWith("http")) { +URL url = new URL(wsdlUri); +HttpURLConnection connection = (HttpURLConnection) url.openConnection(); +connection.setInstanceFollowRedirects(false); +connection.getResponseCode(); +String newLocation = connection.getHeaderField("Location"); +if (newLocation != null){ +wsdlUri = newLocation; +} +} + configuration = new CodeGenConfiguration(allOptions);
svn commit: r1055839 - /axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCUtil.java
Author: amilas Date: Thu Jan 6 11:52:18 2011 New Revision: 1055839 URL: http://svn.apache.org/viewvc?rev=1055839&view=rev Log: add an null check to preserve the backword compatibility with empty soap messages to empty parameters Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCUtil.java Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCUtil.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCUtil.java?rev=1055839&r1=1055838&r2=1055839&view=diff == --- axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCUtil.java (original) +++ axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCUtil.java Thu Jan 6 11:52:18 2011 @@ -166,7 +166,14 @@ public class RPCUtil { OMElement methodElement, MessageContext inMessage) throws AxisFault, IllegalAccessException, InvocationTargetException { -if (inAxisMessage.getElementQName() == null) { + +//POJO was not WS-I complient since it does generate an empty soap message for in comming +//soap envelope when no input parameters are set. But now we have fixed this to include the +// the operation name wrapper. +// this causes problems with the clients generated with the earlier wsdls. in order to +// keep the back word compatibility we need to add this check. + +if ((inAxisMessage.getElementQName() == null) || (methodElement == null)) { // method accept empty SOAPbody return method.invoke(implObject); } else {
svn commit: r1055845 - /axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalTransportSender.java
Author: amilas Date: Thu Jan 6 12:14:57 2011 New Revision: 1055845 URL: http://svn.apache.org/viewvc?rev=1055845&view=rev Log: for in only operations we need to check whether the response is there Modified: axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalTransportSender.java Modified: axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalTransportSender.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalTransportSender.java?rev=1055845&r1=1055844&r2=1055845&view=diff == --- axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalTransportSender.java (original) +++ axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalTransportSender.java Thu Jan 6 12:14:57 2011 @@ -105,8 +105,10 @@ public class LocalTransportSender extend in.close(); out.close(); -in = new ByteArrayInputStream(response.toByteArray()); -msgContext.setProperty(MessageContext.TRANSPORT_IN, in); +if (response.size() > 0) { +in = new ByteArrayInputStream(response.toByteArray()); +msgContext.setProperty(MessageContext.TRANSPORT_IN, in); +} } catch (IOException e) { throw AxisFault.makeFault(e); }
svn commit: r1055890 - /axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties
Author: amilas Date: Thu Jan 6 14:22:04 2011 New Revision: 1055890 URL: http://svn.apache.org/viewvc?rev=1055890&view=rev Log: fixing issue AXIS2-4409 Modified: axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties Modified: axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties?rev=1055890&r1=1055889&r2=1055890&view=diff == --- axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties (original) +++ axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties Thu Jan 6 14:22:04 2011 @@ -117,7 +117,7 @@ SOAP12WithSAAJ12Err=A SOAP 1.2 message c dispatchNullParamMessageMode=The parameter cannot be a null value for a Dispatch invocation using the MESSAGE mode. dispatchNullParamHttpBinding=The parameter cannot be a null value for a Dispatch invocation using the XML/HTTP binding. dispatchInvalidParam=The parameter for the Dispatch invocation was not valid. -dispatchInvalidType=Unsupported Dispatch Type, Dispatch can only be of the java.lang.String, javax.xml.transform.Source, javax.xml.soap.SOAPMessage, or javax.xml.soap.SOAPEnvelope type. +dispatchInvalidType=Unsupported Dispatch Type, Dispatch can only be of the java.lang.String, javax.xml.transform.Source, javax.xml.soap.SOAPMessage, javax.xml.soap.SOAPEnvelope or org.apache.axiom.om.OMElement type. prepareRequestFail=An error occurred when the system was preparing the request message. checkUserName=Error: The javax.xml.ws.security.auth.username property was set, but no value was specified. NoMaintainSessionProperty=Error: Maintain Session is enabled but none of the session properties (Cookies, Over-written URL) are returned.
svn commit: r1056285 - /axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java
Author: amilas Date: Fri Jan 7 12:33:04 2011 New Revision: 1056285 URL: http://svn.apache.org/viewvc?rev=1056285&view=rev Log: fixed the issue AXIS2-4174 Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java?rev=1056285&r1=1056284&r2=1056285&view=diff == --- axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java (original) +++ axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java Fri Jan 7 12:33:04 2011 @@ -1652,6 +1652,7 @@ public class SchemaCompiler { String patternString = pattern.getValue().toString(); // replace backword slashes patternString = patternString.replaceAll("", ""); +patternString = patternString.replaceAll("\"","\""); if ((metaInfHolder.getPatternFacet() != null) && (metaInfHolder.getPatternFacet().trim().length() > 0)){ // i.e there is a pattern faceset
svn commit: r1060328 - in /axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local: LocalResponder.java LocalTransportSender.java
Author: amilas Date: Tue Jan 18 11:34:43 2011 New Revision: 1060328 URL: http://svn.apache.org/viewvc?rev=1060328&view=rev Log: applied the patch for AXIS2-4931 Modified: axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalResponder.java axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalTransportSender.java Modified: axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalResponder.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalResponder.java?rev=1060328&r1=1060327&r2=1060328&view=diff == --- axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalResponder.java (original) +++ axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalResponder.java Tue Jan 18 11:34:43 2011 @@ -79,9 +79,7 @@ public class LocalResponder extends Abst try { if (log.isDebugEnabled()) { -ByteArrayOutputStream os = new ByteArrayOutputStream(); -TransportUtils.writeMessage(msgContext, os); -log.debug("Response - " + new String(os.toByteArray())); +log.debug("Response - " + msgContext.getEnvelope().toString()); } if (epr != null) { Modified: axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalTransportSender.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalTransportSender.java?rev=1060328&r1=1060327&r2=1060328&view=diff == --- axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalTransportSender.java (original) +++ axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalTransportSender.java Tue Jan 18 11:34:43 2011 @@ -67,9 +67,7 @@ public class LocalTransportSender extend EndpointReference epr = msgContext.getTo(); if (log.isDebugEnabled()) { -ByteArrayOutputStream os = new ByteArrayOutputStream(); -TransportUtils.writeMessage(msgContext, os); -log.debug("Sending - " + new String(os.toByteArray())); +log.debug("Sending - " + msgContext.getEnvelope().toString()); } if (epr != null) {
svn commit: r1067415 - /axis/axis2/java/core/trunk/modules/jaxbri/src/org/apache/axis2/jaxbri/template/JaxbRIDatabindingTemplate.xsl
Author: amilas Date: Sat Feb 5 10:32:10 2011 New Revision: 1067415 URL: http://svn.apache.org/viewvc?rev=1067415&view=rev Log: readding the method without method name qname to support faults. faults need toOM method Modified: axis/axis2/java/core/trunk/modules/jaxbri/src/org/apache/axis2/jaxbri/template/JaxbRIDatabindingTemplate.xsl Modified: axis/axis2/java/core/trunk/modules/jaxbri/src/org/apache/axis2/jaxbri/template/JaxbRIDatabindingTemplate.xsl URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxbri/src/org/apache/axis2/jaxbri/template/JaxbRIDatabindingTemplate.xsl?rev=1067415&r1=1067414&r2=1067415&view=diff == --- axis/axis2/java/core/trunk/modules/jaxbri/src/org/apache/axis2/jaxbri/template/JaxbRIDatabindingTemplate.xsl (original) +++ axis/axis2/java/core/trunk/modules/jaxbri/src/org/apache/axis2/jaxbri/template/JaxbRIDatabindingTemplate.xsl Sat Feb 5 10:32:10 2011 @@ -83,6 +83,27 @@ } } +private org.apache.axiom.om.OMElement toOM( param, boolean optimizeContent) +throws org.apache.axis2.AxisFault { +try { +javax.xml.bind.JAXBContext context = wsContext; +javax.xml.bind.Marshaller marshaller = context.createMarshaller(); + marshaller.setProperty(javax.xml.bind.Marshaller.JAXB_FRAGMENT, Boolean.TRUE); + +org.apache.axiom.om.OMFactory factory = org.apache.axiom.om.OMAbstractFactory.getOMFactory(); + +JaxbRIDataSource source = new JaxbRIDataSource( .class, + param, + marshaller, + "", + ""); +org.apache.axiom.om.OMNamespace namespace = factory.createOMNamespace("", null); +return factory.createOMElement(source, "", namespace); +} catch (javax.xml.bind.JAXBException bex){ +throw org.apache.axis2.AxisFault.makeFault(bex); +} +} + private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, param, boolean optimizeContent, javax.xml.namespace.QName methodQName) throws org.apache.axis2.AxisFault { org.apache.axiom.soap.SOAPEnvelope envelope = factory.getDefaultEnvelope();
svn commit: r1067421 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/TypeTable.java
Author: amilas Date: Sat Feb 5 10:39:53 2011 New Revision: 1067421 URL: http://svn.apache.org/viewvc?rev=1067421&view=rev Log: Avoding and special behavior for exception classes at the java.lang package such as java.lang.ClassNotFoundException Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/TypeTable.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/TypeTable.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/TypeTable.java?rev=1067421&r1=1067420&r2=1067421&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/TypeTable.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/TypeTable.java Sat Feb 5 10:39:53 2011 @@ -156,10 +156,18 @@ public class TypeTable { public QName getSimpleSchemaTypeName(String typeName) { QName qName = (QName) simpleTypetoxsd.get(typeName); if(qName == null){ - if((typeName.startsWith("java.lang")||typeName.startsWith("javax.")) && -!Exception.class.getName().equals(typeName)){ + Class typeClass = null; +try { +typeClass = Class.forName(typeName); +} catch (ClassNotFoundException e) { +// we need to do this change only with the proper classes. this my gives +// the exceptions but that should be ok. +} +if ((typeName.startsWith("java.lang") || typeName.startsWith("javax.")) && +!Exception.class.isAssignableFrom(typeClass)) { return ANY_TYPE; } + } return qName; }
svn commit: r1067601 - in /axis/axis2/java/core/trunk/modules: adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.j
Author: amilas Date: Sun Feb 6 06:24:20 2011 New Revision: 1067601 URL: http://svn.apache.org/viewvc?rev=1067601&view=rev Log: append the operation name to the exception element. other wise if both the exception complex type and element name in the same schema, jaxbri code generation throws an exception Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java?rev=1067601&r1=1067600&r2=1067601&view=diff == --- axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java (original) +++ axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java Sun Feb 6 06:24:20 2011 @@ -174,7 +174,7 @@ public class RPCMessageReceiver extends for (Class exceptionType : exceptionTypes){ if (exceptionType.getName().equals(cause.getClass().getName())){ // this is an bussiness logic exception so handle it properly -String partQName = getSimpleClassName(exceptionType); +String partQName = method.getName() + getSimpleClassName(exceptionType); TypeTable typeTable = inMessage.getAxisService().getTypeTable(); QName elementQName = typeTable.getQNamefortheType(partQName); SOAPFactory fac = getSOAPFactory(inMessage); @@ -190,8 +190,9 @@ public class RPCMessageReceiver extends exceptionElement.addChild(innterExceptionElement); } else { // if it is a normal bussiness exception we need to generate the schema assuming it is a pojo +QName innerElementQName = new QName(elementQName.getNamespaceURI(), getSimpleClassName(exceptionType)); XMLStreamReader xr = BeanUtil.getPullParser(cause, -elementQName, typeTable, true, false); +innerElementQName, typeTable, true, false); StAXOMBuilder stAXOMBuilder = new StAXOMBuilder(OMAbstractFactory.getOMFactory(), new StreamWrapper(xr)); OMElement documentElement = stAXOMBuilder.getDocumentElement(); exceptionElement.addChild(documentElement); Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java?rev=1067601&r1=1067600&r2=1067601&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java Sun Feb 6 06:24:20 2011 @@ -443,7 +443,7 @@ public class DefaultSchemaGenerator impl if (AxisFault.class.getName().equals(extype.getName())) { continue; } -String partQname = getSimpleClassName(extype); +String partQname = jMethod.getName() + getSimpleClassName(extype); methodSchemaType = createSchemaTypeForFault(partQname); QName elementName = new QName(this.schemaTargetNameSpace, partQname, this.schema_namespace_prefix); @@ -473,7 +473,7 @@ public class DefaultSchemaGenerator impl continue; } AxisMessage faultMessage = new AxisMessage(); -faultMessage.setName(getSimpleClassName(extype)); +faultMessage.setName(jMethod.getName() + getSimpleClassName(extype)); faultMessage.setElementQName(typeTable.getQNamefortheType(partQname)); axisOperation.setFaultMessages(faultMessage); }
svn commit: r1067612 - in /axis/axis2/java/core/trunk/modules: codegen/src/org/apache/axis2/wsdl/codegen/emitter/ codegen/src/org/apache/axis2/wsdl/template/java/ kernel/src/org/apache/axis2/descripti
Author: amilas Date: Sun Feb 6 08:29:39 2011 New Revision: 1067612 URL: http://svn.apache.org/viewvc?rev=1067612&view=rev Log: apply the patch for AXIS2-4921 Modified: axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/template/java/SkeletonTemplate.xsl axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java Modified: axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java?rev=1067612&r1=1067611&r2=1067612&view=diff == --- axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java (original) +++ axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java Sun Feb 6 08:29:39 2011 @@ -3009,6 +3009,7 @@ public class AxisServiceBasedMultiLangua // This is the wrapped component - add the type mapping Element mainParameter = generateParamComponent(doc, +inputMessage.getDocumentation(), this.mapper.getParameterName( inputMessage.getElementQName()), this.mapper.getTypeMappingName( @@ -3052,9 +3053,11 @@ public class AxisServiceBasedMultiLangua wrapped_jaxws = true; //populate the parts list - this list is needed to generate multiple //parameters in the signatures +//todo documentation is kept empty(null) in this scenario for (int i = 0; i < partsList.size(); i++) { QName qName = (QName) partsList.get(i); mainParameter.appendChild(generateParamComponent(doc, +null, this.mapper.getParameterName( qName), this.mapper.getTypeMappingName( @@ -3091,11 +3094,12 @@ public class AxisServiceBasedMultiLangua * @return DOM Element */ protected Element generateParamComponent(Document doc, + String comment, String paramName, String paramType, QName operationName, QName paramQName) { -return generateParamComponent(doc, paramName, paramType, operationName, paramQName, null, +return generateParamComponent(doc, comment, paramName, paramType, operationName, paramQName, null, false, false); } @@ -3108,10 +3112,11 @@ public class AxisServiceBasedMultiLangua * @return DOM Element */ protected Element generateParamComponent(Document doc, + String comment, String paramName, String paramType, QName paramQName) { -return generateParamComponent(doc, paramName, paramType, null, paramQName, null, false, +return generateParamComponent(doc,comment, paramName, paramType, null, paramQName, null, false, false); } @@ -3141,6 +3146,7 @@ public class AxisServiceBasedMultiLangua * @param paramName */ protected Element generateParamComponent(Document doc, + String comment, String paramName, String paramType, QName opName, @@ -3152,6 +3158,10 @@ public class AxisServiceBasedMultiLangua addAttribute(doc, "name", paramName, paramElement); +addAttribute(doc, "comment", +(comment == null) ? "" : comment, +paramElement); + if (codeGenConfiguration.getOutputLanguage().equals("jax-ws") && useHolderClass_jaxws) { Class primitive = JavaUtils.getWrapperClass(paramType); if(primitive != null){ @@ -3225,12 +3235,15 @@ public class AxisServiceBasedMultiLangua } String parameterName; String typeMappingStr; +String comment = null; parameterName = this.mapper.getParameterName(outputMessage.getElementQName()); +comm
svn commit: r1070439 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/MessageContext.java
Author: amilas Date: Mon Feb 14 11:05:51 2011 New Revision: 1070439 URL: http://svn.apache.org/viewvc?rev=1070439&view=rev Log: commit the patch for AXIS2-4671 Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/MessageContext.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/MessageContext.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/MessageContext.java?rev=1070439&r1=1070438&r2=1070439&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/MessageContext.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/MessageContext.java Mon Feb 14 11:05:51 2011 @@ -1598,6 +1598,8 @@ public class MessageContext extends Abst AxisBindingMessage bindingMessage = (AxisBindingMessage) getProperty(Constants.AXIS_BINDING_MESSAGE); +AxisBinding binding; + // If AxisBindingMessage is not set, try to find the binding message from the AxisService if (bindingMessage == null) { bindingMessage = findBindingMessage(); @@ -1605,7 +1607,10 @@ public class MessageContext extends Abst if (bindingMessage != null) { return bindingMessage.getEffectivePolicy(); -// If we can't find the AxisBindingMessage, then try the AxisMessage +// If we can't find the AxisBindingMessage, then try the AxisBinding +} else if ((binding = findBinding()) != null) { +return binding.getEffectivePolicy(); +// If we can't find the AxisBindingMessage, then try the AxisMessage } else if (axisMessage != null) { return axisMessage.getEffectivePolicy(); } else { @@ -1621,6 +1626,19 @@ public class MessageContext extends Abst } } +private AxisBinding findBinding() { +if (axisService != null) { +if (axisService.getEndpointName() != null) { +AxisEndpoint axisEndpoint = axisService +.getEndpoint(axisService.getEndpointName()); +if (axisEndpoint != null) { +return axisEndpoint.getBinding(); +} +} +} +return null; +} + private AxisBindingMessage findBindingMessage() { if (axisService != null && axisOperation != null ) { if (axisService.getEndpointName() != null) {
svn commit: r1071949 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/builder/BuilderUtil.java
Author: amilas Date: Fri Feb 18 10:41:40 2011 New Revision: 1071949 URL: http://svn.apache.org/viewvc?rev=1071949&view=rev Log: ignoring the elements without a type and minoccurs zero Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/builder/BuilderUtil.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/builder/BuilderUtil.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/builder/BuilderUtil.java?rev=1071949&r1=1071948&r2=1071949&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/builder/BuilderUtil.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/builder/BuilderUtil.java Fri Feb 18 10:41:40 2011 @@ -139,6 +139,10 @@ public class BuilderUtil { while (iterator.hasNext()) { XmlSchemaElement innerElement = (XmlSchemaElement)iterator.next(); QName qName = innerElement.getQName(); +// ignoring the elements without proper type and minoccurs zero +if ((innerElement.getSchemaType() == null) && (innerElement.getMinOccurs() == 0)){ +continue; +} if (qName == null && innerElement.getSchemaTypeName() .equals(org.apache.ws.commons.schema.constants.Constants.XSD_ANYTYPE)) { createSOAPMessageWithoutSchema(soapFactory, bodyFirstChild,
svn commit: r1071959 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL11.java
Author: amilas Date: Fri Feb 18 10:58:08 2011 New Revision: 1071959 URL: http://svn.apache.org/viewvc?rev=1071959&view=rev Log: applied the patch for AXIS2-4956 Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL11.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL11.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL11.java?rev=1071959&r1=1071958&r2=1071959&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL11.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL11.java Fri Feb 18 10:58:08 2011 @@ -275,19 +275,53 @@ public class AxisService2WSDL11 implemen } // generate fault Messages - ArrayList faultyMessages = axisOperation.getFaultMessages(); + ArrayList faultyMessages = this.extractWSDL11FaultMessages(axisOperation); if (faultyMessages != null) { -for (Object faultyMessage : faultyMessages) { -AxisMessage axisMessage = (AxisMessage)faultyMessage; -String name = axisMessage.getName(); +for (AxisMessage faultyMessage : faultyMessages) { +String name = faultyMessage.getName(); if (faultMessageNames.add(name)) { -writeMessage(axisMessage, fac, defintions); -generateHeaderMessages(axisMessage, fac, defintions); +writeMessage(faultyMessage, fac, defintions); +generateHeaderMessages(faultyMessage, fac, defintions); } } } } } + + /** +* Checks if the given MEP is supported for containing fault messages. +*/ + private boolean isWSDL11FaultyMessagesValidForMEP(String mepURI) { + return !(WSDL2Constants.MEP_URI_IN_ONLY.equals(mepURI) || + WSDL2Constants.MEP_URI_ROBUST_IN_ONLY.equals(mepURI)); + } + + /** +* Return the fault messages only if it's not an in-only operation. +* For WSDL11 generation, the fault messages must be not present in the operation, +* as mentioned in http://www.w3.org/TR/wsdl#_one-way. +*/ + private ArrayList extractWSDL11FaultMessages(AxisOperation axisOperation) { + String mepURI = axisOperation.getMessageExchangePattern(); + if (this.isWSDL11FaultyMessagesValidForMEP(mepURI)) { + return axisOperation.getFaultMessages(); + } else { + return new ArrayList(); + } + } + + /** +* @see AxisService2WSDL11#extractWSDL11FaultMessages(AxisOperation) +*/ + private ArrayList extractWSDL11FaultMessages( + AxisBindingOperation axisBindingOperation) { + String mepURI = axisBindingOperation.getAxisOperation().getMessageExchangePattern(); + if (this.isWSDL11FaultyMessagesValidForMEP(mepURI)) { + return axisBindingOperation.getFaults(); + } else { + return new ArrayList(); + } + } private void generateHeaderMessages(AxisMessage axismessage, OMFactory fac, OMElement defintions) { @@ -421,21 +455,20 @@ public class AxisService2WSDL11 implemen } // generate fault Messages - ArrayList faultMessages = axisOperation.getFaultMessages(); + ArrayList faultMessages = this.extractWSDL11FaultMessages(axisOperation); if (faultMessages != null) { -for (Object faultMessage : faultMessages) { -AxisMessage faultyMessage = (AxisMessage)faultMessage; +for (AxisMessage faultMessage : faultMessages) { OMElement fault = fac.createOMElement(FAULT_LOCAL_NAME, wsdl); - WSDLSerializationUtil.addWSDLDocumentationElement(faultyMessage, + WSDLSerializationUtil.addWSDLDocumentationElement(faultMessage, fault, fac, wsdl); fault.addAttribute(MESSAGE_LOCA
svn commit: r1072255 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/builder/BuilderUtil.java
Author: amilas Date: Sat Feb 19 05:16:35 2011 New Revision: 1072255 URL: http://svn.apache.org/viewvc?rev=1072255&view=rev Log: fixing the issue with earlier patch. it should be innerElement.getSchemaTypeName(). if this is null it anyway casue a null pointer exception. now all the tests passed Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/builder/BuilderUtil.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/builder/BuilderUtil.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/builder/BuilderUtil.java?rev=1072255&r1=1072254&r2=1072255&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/builder/BuilderUtil.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/builder/BuilderUtil.java Sat Feb 19 05:16:35 2011 @@ -139,6 +139,10 @@ public class BuilderUtil { while (iterator.hasNext()) { XmlSchemaElement innerElement = (XmlSchemaElement)iterator.next(); QName qName = innerElement.getQName(); +// ignoring the elements without proper type and minoccurs zero +if ((innerElement.getSchemaTypeName() == null) && (innerElement.getMinOccurs() == 0)){ +continue; +} if (qName == null && innerElement.getSchemaTypeName() .equals(org.apache.ws.commons.schema.constants.Constants.XSD_ANYTYPE)) { createSOAPMessageWithoutSchema(soapFactory, bodyFirstChild,
svn commit: r1072499 - in /axis/axis2/java/core/trunk/modules: adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.j
Author: amilas Date: Sun Feb 20 05:12:10 2011 New Revision: 1072499 URL: http://svn.apache.org/viewvc?rev=1072499&view=rev Log: user service name to distinguish the exception element name. otherwise there will be an new element per method per exception Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java?rev=1072499&r1=1072498&r2=1072499&view=diff == --- axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java (original) +++ axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java Sun Feb 20 05:12:10 2011 @@ -174,7 +174,7 @@ public class RPCMessageReceiver extends for (Class exceptionType : exceptionTypes){ if (exceptionType.getName().equals(cause.getClass().getName())){ // this is an bussiness logic exception so handle it properly -String partQName = method.getName() + getSimpleClassName(exceptionType); +String partQName = inMessage.getAxisService().getName() + getSimpleClassName(exceptionType); TypeTable typeTable = inMessage.getAxisService().getTypeTable(); QName elementQName = typeTable.getQNamefortheType(partQName); SOAPFactory fac = getSOAPFactory(inMessage); Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java?rev=1072499&r1=1072498&r2=1072499&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java Sun Feb 20 05:12:10 2011 @@ -443,7 +443,7 @@ public class DefaultSchemaGenerator impl if (AxisFault.class.getName().equals(extype.getName())) { continue; } -String partQname = jMethod.getName() + getSimpleClassName(extype); +String partQname = this.service.getName() + getSimpleClassName(extype); methodSchemaType = createSchemaTypeForFault(partQname); QName elementName = new QName(this.schemaTargetNameSpace, partQname, this.schema_namespace_prefix); @@ -473,7 +473,7 @@ public class DefaultSchemaGenerator impl continue; } AxisMessage faultMessage = new AxisMessage(); -faultMessage.setName(jMethod.getName() + getSimpleClassName(extype)); +faultMessage.setName(this.service.getName() + getSimpleClassName(extype)); faultMessage.setElementQName(typeTable.getQNamefortheType(partQname)); axisOperation.setFaultMessages(faultMessage); }
svn commit: r1072510 - in /axis/axis2/java/core/trunk/modules/samples/faulthandling: client/src/example/BankClient.java service/src/example/BankServiceSkeleton.java
Author: amilas Date: Sun Feb 20 06:26:55 2011 New Revision: 1072510 URL: http://svn.apache.org/viewvc?rev=1072510&view=rev Log: fixing the fault handling sample Modified: axis/axis2/java/core/trunk/modules/samples/faulthandling/client/src/example/BankClient.java axis/axis2/java/core/trunk/modules/samples/faulthandling/service/src/example/BankServiceSkeleton.java Modified: axis/axis2/java/core/trunk/modules/samples/faulthandling/client/src/example/BankClient.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/samples/faulthandling/client/src/example/BankClient.java?rev=1072510&r1=1072509&r2=1072510&view=diff == --- axis/axis2/java/core/trunk/modules/samples/faulthandling/client/src/example/BankClient.java (original) +++ axis/axis2/java/core/trunk/modules/samples/faulthandling/client/src/example/BankClient.java Sun Feb 20 06:26:55 2011 @@ -51,10 +51,10 @@ public final class BankClient { final WithdrawResponse withdrawResponse = bankService.withdraw(withdrawRequest); System.out.println("Balance = " + withdrawResponse.getBalance()); -} catch (AccountNotExistFaultMessage e) { +} catch (AccountNotExistException e) { final AccountNotExistFault fault = e.getFaultMessage(); System.out.println("Account#" + fault.getAccount() + " does not exist"); -} catch (InsufficientFundFaultMessage e) { +} catch (InsufficientFundException e) { final InsufficientFundFault fault = e.getFaultMessage(); System.out.println("Account#" + fault.getAccount() + " has balance of " + fault.getBalance() + ". It cannot support withdrawal of " + fault.getRequestedFund()); } catch (RemoteException e) { Modified: axis/axis2/java/core/trunk/modules/samples/faulthandling/service/src/example/BankServiceSkeleton.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/samples/faulthandling/service/src/example/BankServiceSkeleton.java?rev=1072510&r1=1072509&r2=1072510&view=diff == --- axis/axis2/java/core/trunk/modules/samples/faulthandling/service/src/example/BankServiceSkeleton.java (original) +++ axis/axis2/java/core/trunk/modules/samples/faulthandling/service/src/example/BankServiceSkeleton.java Sun Feb 20 06:26:55 2011 @@ -35,12 +35,12 @@ */ public example.WithdrawResponse withdraw(example.Withdraw param0) - throws InsufficientFundFaultMessage,AccountNotExistFaultMessage{ + throws InsufficientFundException,AccountNotExistException{ final String account = param0.getAccount(); if (account.equals("13")) { final AccountNotExistFault fault = new AccountNotExistFault(); fault.setAccount(account); -AccountNotExistFaultMessage messageException = new AccountNotExistFaultMessage("Account does not exist!"); +AccountNotExistException messageException = new AccountNotExistException("Account does not exist!"); messageException.setFaultMessage(fault); throw messageException; } @@ -51,7 +51,7 @@ fault.setAccount(account); fault.setBalance(1000); fault.setRequestedFund(amount); -InsufficientFundFaultMessage messageException = new InsufficientFundFaultMessage("Insufficient funds"); +InsufficientFundException messageException = new InsufficientFundException("Insufficient funds"); messageException.setFaultMessage(fault); throw messageException; }
svn commit: r1073331 - in /axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local: LocalResponder.java LocalTransportReceiver.java LocalTransportSender.java NonBlockin
Author: amilas Date: Tue Feb 22 14:04:31 2011 New Revision: 1073331 URL: http://svn.apache.org/viewvc?rev=1073331&view=rev Log: applying the patch for AXIS2-4944 Added: axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/NonBlockingLocalTransportSender.java Modified: axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalResponder.java axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalTransportReceiver.java axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalTransportSender.java Modified: axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalResponder.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalResponder.java?rev=1073331&r1=1073330&r2=1073331&view=diff == --- axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalResponder.java (original) +++ axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalResponder.java Tue Feb 22 14:04:31 2011 @@ -20,32 +20,40 @@ package org.apache.axis2.transport.local; +import org.apache.axiom.om.OMXMLParserWrapper; +import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axis2.AxisFault; +import org.apache.axis2.Constants; import org.apache.axis2.addressing.EndpointReference; +import org.apache.axis2.addressing.RelatesTo; +import org.apache.axis2.builder.BuilderUtil; import org.apache.axis2.context.ConfigurationContext; import org.apache.axis2.context.MessageContext; import org.apache.axis2.description.TransportOutDescription; +import org.apache.axis2.description.WSDL2Constants; +import org.apache.axis2.engine.AxisEngine; import org.apache.axis2.handlers.AbstractHandler; import org.apache.axis2.transport.TransportSender; import org.apache.axis2.transport.TransportUtils; +import org.apache.axis2.wsdl.WSDLConstants; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import java.io.ByteArrayOutputStream; -import java.io.OutputStream; +import javax.xml.stream.XMLStreamException; +import java.io.*; +import java.util.Map; /** * LocalResponder */ public class LocalResponder extends AbstractHandler implements TransportSender { protected static final Log log = LogFactory.getLog(LocalResponder.class); - - + // fixed for Executing LocalTransport in MulthThread. private OutputStream out; public LocalResponder(OutputStream response) { -this.out = response; +this.out = response; } public void init(ConfigurationContext confContext, TransportOutDescription transportOut) @@ -87,13 +95,38 @@ public class LocalResponder extends Abst TransportUtils.writeMessage(msgContext, out); } } else { -out = (OutputStream) msgContext.getProperty(MessageContext.TRANSPORT_OUT); +if (/*(msgContext != null) &&*/ (msgContext.getOperationContext() != null) && +(msgContext.getOperationContext().getMessageContexts() != null)) { +MessageContext proxyInMessageContext = msgContext. + getOperationContext().getMessageContext(WSDL2Constants.MESSAGE_LABEL_IN); + +if (proxyInMessageContext != null) { +MessageContext initialMessageContext = (MessageContext) proxyInMessageContext. + getProperty(LocalTransportReceiver.IN_MESSAGE_CONTEXT); + +if (initialMessageContext != null) { +handleResponse(msgContext, initialMessageContext); +} else { +out = (OutputStream) msgContext.getProperty(MessageContext.TRANSPORT_OUT); + +if (out != null) { +TransportUtils.writeMessage(msgContext, out); +} else { +throw new AxisFault( +"Both the TO and Property MessageContext.TRANSPORT_OUT is Null, No where to send"); +} -if (out != null) { -TransportUtils.writeMessage(msgContext, out); +} +} } else { -throw new AxisFault( -"Both the TO and Property MessageContext.TRANSPORT_OUT is Null, No where to send"); +out = (OutputStream) msgContext.getProperty(MessageContext.TRANSPORT_OUT); + +if (out != null) {
svn commit: r1075091 - in /axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local: LocalTransportSender.java NonBlockingLocalTransportSender.java
Author: amilas Date: Sun Feb 27 17:25:34 2011 New Revision: 1075091 URL: http://svn.apache.org/viewvc?rev=1075091&view=rev Log: appliying the patch for AXIS2-4963 Modified: axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalTransportSender.java axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/NonBlockingLocalTransportSender.java Modified: axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalTransportSender.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalTransportSender.java?rev=1075091&r1=1075090&r2=1075091&view=diff == --- axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalTransportSender.java (original) +++ axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalTransportSender.java Sun Feb 27 17:25:34 2011 @@ -112,7 +112,7 @@ public class LocalTransportSender extend } } -private boolean isNonBlocking() { +protected boolean isNonBlocking() { return false; } } Modified: axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/NonBlockingLocalTransportSender.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/NonBlockingLocalTransportSender.java?rev=1075091&r1=1075090&r2=1075091&view=diff == --- axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/NonBlockingLocalTransportSender.java (original) +++ axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/NonBlockingLocalTransportSender.java Sun Feb 27 17:25:34 2011 @@ -21,7 +21,7 @@ package org.apache.axis2.transport.local public class NonBlockingLocalTransportSender extends LocalTransportSender { -private boolean isNonBlocking() { +protected boolean isNonBlocking() { return true; }
svn commit: r1075243 - in /axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local: LocalResponder.java LocalTransportReceiver.java LocalTransportSender.java
Author: amilas Date: Mon Feb 28 09:08:14 2011 New Revision: 1075243 URL: http://svn.apache.org/viewvc?rev=1075243&view=rev Log: appliying the patch for AXIS2-4961 Modified: axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalResponder.java axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalTransportReceiver.java axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalTransportSender.java Modified: axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalResponder.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalResponder.java?rev=1075243&r1=1075242&r2=1075243&view=diff == --- axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalResponder.java (original) +++ axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalResponder.java Mon Feb 28 09:08:14 2011 @@ -175,6 +175,27 @@ public class LocalResponder extends Abst inMessageContext.setTransportIn(initialMessageContext.getTransportIn()); inMessageContext.setTransportOut(initialMessageContext.getTransportOut()); +if (log.isDebugEnabled()) { +log.debug("Setting AxisServiceGroup - " + initialMessageContext.getAxisServiceGroup()); +log.debug("Setting AxisService - " + initialMessageContext.getAxisService()); +log.debug("Setting AxisOperation - " + initialMessageContext.getAxisOperation()); +log.debug("Setting AxisMessage - " + initialMessageContext.getAxisOperation(). +getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE)); +log.debug("Setting Incoming Transport name - " + Constants.TRANSPORT_LOCAL); +log.debug("Setting Service Context " + initialMessageContext.getServiceGroupContext().toString()); + +log.debug("Setting ServerSide to true"); +log.debug("Setting " + MessageContext.TRANSPORT_OUT + " property to " + + initialMessageContext.getProperty(MessageContext.TRANSPORT_OUT)); +log.debug("Setting " + Constants.OUT_TRANSPORT_INFO + " property to " + + initialMessageContext.getProperty(Constants.OUT_TRANSPORT_INFO)); +log.debug("Setting TransportIn - " + initialMessageContext.getTransportIn()); +log.debug("Setting TransportOut - " + initialMessageContext.getTransportOut()); + +log.debug("Setting ReplyTo - " + initialMessageContext.getReplyTo()); +log.debug("Setting FaultTo - " + initialMessageContext.getFaultTo()); +} + // copy the message type property that is used by the out message to the response message inMessageContext.setProperty(Constants.Configuration.MESSAGE_TYPE, initialMessageContext.getProperty(Constants.Configuration.MESSAGE_TYPE)); Modified: axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalTransportReceiver.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalTransportReceiver.java?rev=1075243&r1=1075242&r2=1075243&view=diff == --- axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalTransportReceiver.java (original) +++ axis/axis2/java/core/trunk/modules/transport/local/src/org/apache/axis2/transport/local/LocalTransportReceiver.java Mon Feb 28 09:08:14 2011 @@ -33,6 +33,8 @@ import org.apache.axis2.description.Tran import org.apache.axis2.engine.AxisEngine; import org.apache.axis2.transport.http.HTTPConstants; import org.apache.axis2.util.MessageContextBuilder; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import javax.xml.stream.XMLStreamException; import java.io.InputStream; @@ -40,6 +42,7 @@ import java.io.InputStreamReader; import java.io.OutputStream; public class LocalTransportReceiver { +protected static final Log log = LogFactory.getLog(LocalTransportReceiver.class); public static ConfigurationContext CONFIG_CONTEXT; private ConfigurationContext confContext; private MessageContext inMessageContext; @@ -90,16 +93,25 @@ public class LocalTransportReceiver { MessageContext msgCtx = confContext.createMessageContext(); if (this.nonBlocking) { +if (log.isDebugEnabled()) { +log.debug("Setting the
svn commit: r1075255 - in /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2: Constants.java builder/XFormURLEncodedBuilder.java
Author: amilas Date: Mon Feb 28 09:44:19 2011 New Revision: 1075255 URL: http://svn.apache.org/viewvc?rev=1075255&view=rev Log: saving the request parameter map so that it can be used by any other handler Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/Constants.java axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/builder/XFormURLEncodedBuilder.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/Constants.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/Constants.java?rev=1075255&r1=1075254&r2=1075255&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/Constants.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/Constants.java Mon Feb 28 09:44:19 2011 @@ -127,6 +127,7 @@ public class Constants extends org.apach public static final String TCCL_COMPOSITE = "composite"; public static final String TCCL_SERVICE = "service"; public static final String FAULT_NAME = "faultName"; +public static final String REQUEST_PARAMETER_MAP = "requestParameterMap"; /** * Field REQUEST_URL_PREFIX Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/builder/XFormURLEncodedBuilder.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/builder/XFormURLEncodedBuilder.java?rev=1075255&r1=1075254&r2=1075255&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/builder/XFormURLEncodedBuilder.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/builder/XFormURLEncodedBuilder.java Mon Feb 28 09:44:19 2011 @@ -114,6 +114,7 @@ public class XFormURLEncodedBuilder impl Constants.Configuration.CHARACTER_SET_ENCODING), inputStream); +messageContext.setProperty(Constants.REQUEST_PARAMETER_MAP, parameterMap); return BuilderUtil.buildsoapMessage(messageContext, parameterMap, soapFactory);
svn commit: r1100957 - in /axis/axis2/java/core/trunk/modules: adb/src/org/apache/axis2/databinding/ java2wsdl/src/org/apache/ws/java2wsdl/ java2wsdl/src/org/apache/ws/java2wsdl/utils/ kernel/src/org/
Author: amilas Date: Mon May 9 11:01:51 2011 New Revision: 1100957 URL: http://svn.apache.org/viewvc?rev=1100957&view=rev Log: adding an option to java2wsdl not to generate nillable true Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/ADBDataSource.java axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL.java axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLCodegenEngine.java axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/utils/Java2WSDLOptionsValidator.java axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/ADBDataSource.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/ADBDataSource.java?rev=1100957&r1=1100956&r2=1100957&view=diff == --- axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/ADBDataSource.java (original) +++ axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/ADBDataSource.java Mon May 9 11:01:51 2011 @@ -101,7 +101,7 @@ public class ADBDataSource implements OM MTOMAwareOMBuilder mtomAwareOMBuilder = new MTOMAwareOMBuilder(); serialize(mtomAwareOMBuilder); return mtomAwareOMBuilder.getOMElement().getXMLStreamReader(); -} +} /** * Returns the backing Object. Modified: axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL.java?rev=1100957&r1=1100956&r2=1100957&view=diff == --- axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL.java (original) +++ axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL.java Mon May 9 11:01:51 2011 @@ -61,6 +61,7 @@ public class Java2WSDL { System.out.println(" -xc class1 -xc class2...extra class(es) for which schematype must be generated. "); System.out.println(" -wv <1.1/2.0> wsdl version - defaults to 1.1 if not specified"); System.out.println(" -dlbgenerate schemas conforming to doc/lit/bare style"); +System.out.println(" -dnedisallow nillable elements in the generated schema"); System.exit(0); } Modified: axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java?rev=1100957&r1=1100956&r2=1100957&view=diff == --- axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java (original) +++ axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java Mon May 9 11:01:51 2011 @@ -67,6 +67,7 @@ public class Java2WSDLBuilder implements private String use = Java2WSDLConstants.LITERAL; private String locationUri; private ArrayList extraClasses; +private boolean nillableElementsAllowed = true; private String nsGenClassName = null; private Map pkg2nsMap = null; @@ -244,6 +245,11 @@ public class Java2WSDLBuilder implements inOutmessageReceiver); } AxisService service = new AxisService(); + +if (!nillableElementsAllowed) { + service.addParameter(Java2WSDLConstants.DISALLOW_NILLABLE_ELEMENTS_OPTION_LONG, "true"); +} + schemaGenerator.setAxisService(service); AxisService axisService = AxisService.createService(className, serviceName == null ? Java2WSDLUtils @@ -434,4 +440,12 @@ public class Java2WSDLBuilder implements public void setMappingFileLocation(String mappingFileLocation) { this.mappingFileLocation = mappingFileLocation; } + +public boolean isNillableElementsAllowed() { +return nillableElementsAllowed; +} + +public void setNillableElementsAllowed(boolean nillableElementsAllowed) { +this.nillableElementsAllowed = nillableEl
svn commit: r1101023 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
Author: amilas Date: Mon May 9 13:45:09 2011 New Revision: 1101023 URL: http://svn.apache.org/viewvc?rev=1101023&view=rev Log: making the complex type for abstract classes abstract Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java?rev=1101023&r1=1101022&r2=1101023&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java Mon May 9 13:45:09 2011 @@ -576,6 +576,10 @@ public class DefaultSchemaGenerator impl complexType.setName(simpleName); +if (Modifier.isAbstract(javaType.getModifiers())) { +complexType.setAbstract(true); +} + //xmlSchema.getItems().add(eltOuter); xmlSchema.getElements().add(schemaTypeName, eltOuter); eltOuter.setSchemaTypeName(complexType.getQName());
svn commit: r1101309 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
Author: amilas Date: Tue May 10 05:03:02 2011 New Revision: 1101309 URL: http://svn.apache.org/viewvc?rev=1101309&view=rev Log: fixed an issue with processing @WebResult name annotation Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java?rev=1101309&r1=1101308&r2=1101309&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java Tue May 10 05:03:02 2011 @@ -398,7 +398,7 @@ public class DefaultSchemaGenerator impl String returnName = "return"; if (returnAnnon != null) { returnName = returnAnnon.getName(); -if (returnName != null && !"".equals(returnName)) { +if (returnName == null || "".equals(returnName)) { returnName = "return"; } }
svn commit: r1101316 - in /axis/axis2/java/core/trunk/modules: java2wsdl/src/org/apache/ws/java2wsdl/ java2wsdl/src/org/apache/ws/java2wsdl/utils/ kernel/src/org/apache/axis2/description/java2wsdl/
Author: amilas Date: Tue May 10 05:39:31 2011 New Revision: 1101316 URL: http://svn.apache.org/viewvc?rev=1101316&view=rev Log: adding an option to disable soap11 soap12 and rest bindings from the java2wsdl tool Modified: axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLCodegenEngine.java axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/utils/Java2WSDLOptionsValidator.java axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java Modified: axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java?rev=1101316&r1=1101315&r2=1101316&view=diff == --- axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java (original) +++ axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java Tue May 10 05:39:31 2011 @@ -38,6 +38,7 @@ import org.apache.axis2.engine.AxisConfi import org.apache.axis2.engine.MessageReceiver; import org.apache.axis2.util.Loader; import org.apache.axis2.util.XMLPrettyPrinter; +import org.apache.axis2.Constants; import java.io.OutputStream; import java.lang.reflect.Constructor; @@ -82,6 +83,10 @@ public class Java2WSDLBuilder implements private String mappingFileLocation; private HashMap messageReceivers = null; +private boolean disableSOAP11 = false; +private boolean disableSOAP12 = false; +private boolean disableREST = false; + public Java2WSDLBuilder() { try { ConfigurationContext configCtx = ConfigurationContextFactory @@ -264,6 +269,19 @@ public class Java2WSDLBuilder implements axisService.setSchemaTargetNamespace(getSchemaTargetNamespace()); axisService .setSchemaTargetNamespacePrefix(getSchemaTargetNamespacePrefix()); + +if (disableREST) { +axisService.addParameter(Constants.Configuration.DISABLE_REST, disableREST); +} + +if (disableSOAP11) { +axisService.addParameter(Constants.Configuration.DISABLE_SOAP11, disableSOAP11); +} + +if (disableSOAP12) { +axisService.addParameter(Constants.Configuration.DISABLE_SOAP12, disableSOAP12); +} + String uri = locationUri; if (uri == null) { uri = DEFAULT_LOCATION_URL @@ -448,4 +466,28 @@ public class Java2WSDLBuilder implements public void setNillableElementsAllowed(boolean nillableElementsAllowed) { this.nillableElementsAllowed = nillableElementsAllowed; } + +public boolean isDisableREST() { +return disableREST; +} + +public void setDisableREST(boolean disableREST) { +this.disableREST = disableREST; +} + +public boolean isDisableSOAP12() { +return disableSOAP12; +} + +public void setDisableSOAP12(boolean disableSOAP12) { +this.disableSOAP12 = disableSOAP12; +} + +public boolean isDisableSOAP11() { +return disableSOAP11; +} + +public void setDisableSOAP11(boolean disableSOAP11) { +this.disableSOAP11 = disableSOAP11; +} } Modified: axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLCodegenEngine.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLCodegenEngine.java?rev=1101316&r1=1101315&r2=1101316&view=diff == --- axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLCodegenEngine.java (original) +++ axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLCodegenEngine.java Tue May 10 05:39:31 2011 @@ -244,6 +244,19 @@ public class Java2WSDLCodegenEngine impl if (option != null) { java2WsdlBuilder.setNillableElementsAllowed(false); } + +option = loadOption(Java2WSDLConstants.DISABLE_BINDING_SOAP11, null, optionsMap); +if (option != null) { +java2WsdlBuilder.setDisableSOAP11(true); +} +option = loadOption(Java2WSDLConstants.DISABLE_BINDING_SOAP12, null, optionsMap); +if (option != null) { +java2WsdlBuilder.setDisableSOAP12(true); +} +option = loadOption(Java2WSDLConstants.DISABLE_BINDING_REST, null, optionsMap); +if (option != null) { +java2WsdlBuilder.setDisableREST(true); +} } private Java2WSDLCommand
svn commit: r1101318 - /axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL.java
Author: amilas Date: Tue May 10 05:46:57 2011 New Revision: 1101318 URL: http://svn.apache.org/viewvc?rev=1101318&view=rev Log: adding options to display message Modified: axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL.java Modified: axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL.java?rev=1101318&r1=1101317&r2=1101318&view=diff == --- axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL.java (original) +++ axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL.java Tue May 10 05:46:57 2011 @@ -62,6 +62,9 @@ public class Java2WSDL { System.out.println(" -wv <1.1/2.0> wsdl version - defaults to 1.1 if not specified"); System.out.println(" -dlbgenerate schemas conforming to doc/lit/bare style"); System.out.println(" -dnedisallow nillable elements in the generated schema"); +System.out.println(" -disableSOAP11 disable binding generation for SOAP11"); +System.out.println(" -disableSOAP12 disable binding generation for SOAP12"); +System.out.println(" -disableRESTdisable binding generation for REST"); System.exit(0); }
svn commit: r1101330 - in /axis/axis2/java/core/trunk/modules: java2wsdl/src/org/apache/ws/java2wsdl/ java2wsdl/src/org/apache/ws/java2wsdl/utils/ kernel/src/org/apache/axis2/description/java2wsdl/
Author: amilas Date: Tue May 10 06:29:09 2011 New Revision: 1101330 URL: http://svn.apache.org/viewvc?rev=1101330&view=rev Log: add an option to give the message part name Modified: axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL.java axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLCodegenEngine.java axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/utils/Java2WSDLOptionsValidator.java axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java Modified: axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL.java?rev=1101330&r1=1101329&r2=1101330&view=diff == --- axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL.java (original) +++ axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL.java Tue May 10 06:29:09 2011 @@ -65,6 +65,7 @@ public class Java2WSDL { System.out.println(" -disableSOAP11 disable binding generation for SOAP11"); System.out.println(" -disableSOAP12 disable binding generation for SOAP12"); System.out.println(" -disableRESTdisable binding generation for REST"); +System.out.println(" -mpn change the part name of the generated wsdl messages"); System.exit(0); } Modified: axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java?rev=1101330&r1=1101329&r2=1101330&view=diff == --- axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java (original) +++ axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java Tue May 10 06:29:09 2011 @@ -87,6 +87,8 @@ public class Java2WSDLBuilder implements private boolean disableSOAP12 = false; private boolean disableREST = false; +private String messagePartName; + public Java2WSDLBuilder() { try { ConfigurationContext configCtx = ConfigurationContextFactory @@ -255,6 +257,10 @@ public class Java2WSDLBuilder implements service.addParameter(Java2WSDLConstants.DISALLOW_NILLABLE_ELEMENTS_OPTION_LONG, "true"); } +if (messagePartName != null){ + service.addParameter(Java2WSDLConstants.MESSAGE_PART_NAME_OPTION_LONG, messagePartName); +} + schemaGenerator.setAxisService(service); AxisService axisService = AxisService.createService(className, serviceName == null ? Java2WSDLUtils @@ -490,4 +496,12 @@ public class Java2WSDLBuilder implements public void setDisableSOAP11(boolean disableSOAP11) { this.disableSOAP11 = disableSOAP11; } + +public String getMessagePartName() { +return messagePartName; +} + +public void setMessagePartName(String messagePartName) { +this.messagePartName = messagePartName; +} } Modified: axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLCodegenEngine.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLCodegenEngine.java?rev=1101330&r1=1101329&r2=1101330&view=diff == --- axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLCodegenEngine.java (original) +++ axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLCodegenEngine.java Tue May 10 06:29:09 2011 @@ -257,6 +257,13 @@ public class Java2WSDLCodegenEngine impl if (option != null) { java2WsdlBuilder.setDisableREST(true); } + +option = loadOption(Java2WSDLConstants.MESSAGE_PART_NAME_OPTION, + Java2WSDLConstants.MESSAGE_PART_NAME_OPTION_LONG, + optionsMap); +if (option != null) { +java2WsdlBuilder.setMessagePartName(option.getOptionValue()); +} } private Java2WSDLCommandLine
svn commit: r1101368 - in /axis/axis2/java/core/trunk/modules: java2wsdl/src/org/apache/ws/java2wsdl/ java2wsdl/src/org/apache/ws/java2wsdl/utils/ kernel/src/org/apache/axis2/deployment/util/ kernel/s
Author: amilas Date: Tue May 10 08:56:09 2011 New Revision: 1101368 URL: http://svn.apache.org/viewvc?rev=1101368&view=rev Log: adding options to change the portName, soap11binding name, soap12binding name and rest binding name in a genearted wsdl of from the java2wsdl tool Modified: axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL.java axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLCodegenEngine.java axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/utils/Java2WSDLOptionsValidator.java axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL11.java axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java Modified: axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL.java?rev=1101368&r1=1101367&r2=1101368&view=diff == --- axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL.java (original) +++ axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL.java Tue May 10 08:56:09 2011 @@ -66,6 +66,10 @@ public class Java2WSDL { System.out.println(" -disableSOAP12 disable binding generation for SOAP12"); System.out.println(" -disableRESTdisable binding generation for REST"); System.out.println(" -mpn change the part name of the generated wsdl messages"); +System.out.println(" -ptn port Type name of the WSDL"); +System.out.println(" -soap11BindingName soap11 binding name of the WSDL"); +System.out.println(" -soap12BindingName soap 12 binding name of the WSDL"); +System.out.println(" -restBindingNamerest binding name of the WSDL"); System.exit(0); } Modified: axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java?rev=1101368&r1=1101367&r2=1101368&view=diff == --- axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java (original) +++ axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java Tue May 10 08:56:09 2011 @@ -89,6 +89,12 @@ public class Java2WSDLBuilder implements private String messagePartName; +private String portTypeName; + +private String soap11BindingName; +private String soap12BindingName; +private String restBindingName; + public Java2WSDLBuilder() { try { ConfigurationContext configCtx = ConfigurationContextFactory @@ -261,6 +267,26 @@ public class Java2WSDLBuilder implements service.addParameter(Java2WSDLConstants.MESSAGE_PART_NAME_OPTION_LONG, messagePartName); } +if (portTypeName != null){ + service.addParameter(Java2WSDLConstants.PORT_TYPE_NAME_OPTION_LONG, portTypeName); +} + +if (soap11BindingName != null){ + service.addParameter(Java2WSDLConstants.SOAP11_BINDING_NAME_OPTION_LONG, soap11BindingName); +} + +if (soap12BindingName != null){ + service.addParameter(Java2WSDLConstants.SOAP12_BINDING_NAME_OPTION_LONG, soap12BindingName); +} + +if (restBindingName != null){ + service.addParameter(Java2WSDLConstants.REST_BINDING_NAME_OPTION_LONG, restBindingName); +} + +if (messagePartName != null){ + service.addParameter(Java2WSDLConstants.MESSAGE_PART_NAME_OPTION_LONG, messagePartName); +} + schemaGenerator.setAxisService(service); AxisService axisService = AxisService.createService(className, serviceName == null ? Java2WSDLUtils @@ -504,4 +530,36 @@ public class Java2WSDLBuilder implements public void setMessagePartName(String messagePartName) { this.messagePartName = messagePartName; } + +public String getPortTypeName() { +return portTypeName; +} + +public void setPortTypeName(String portTypeName) { +this
svn commit: r1101401 - in /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2: deployment/util/ description/ description/java2wsdl/ jsr181/
Author: amilas Date: Tue May 10 10:56:28 2011 New Revision: 1101401 URL: http://svn.apache.org/viewvc?rev=1101401&view=rev Log: adding @WebMethod annotations operationName attribute Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService.java axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/jsr181/JSR181HelperImpl.java axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/jsr181/WebMethodAnnotation.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java?rev=1101401&r1=1101400&r2=1101401&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java Tue May 10 10:56:28 2011 @@ -521,14 +521,19 @@ public class Utils { .getAxisOperation(WSDLConstants.MEP_CONSTANT_IN_OUT); } String opName = method.getName(); -operation.setName(new QName(opName)); + WebMethodAnnotation methodAnnon = JSR181Helper.INSTANCE.getWebMethodAnnotation(method); if (methodAnnon != null) { String action = methodAnnon.getAction(); if (action != null && !"".equals(action)) { operation.setSoapAction(action); } +if (methodAnnon.getOperationName() != null){ +opName = methodAnnon.getOperationName(); +} } + +operation.setName(new QName(opName)); return operation; } Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService.java?rev=1101401&r1=1101400&r2=1101401&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService.java Tue May 10 10:56:28 2011 @@ -22,6 +22,8 @@ package org.apache.axis2.description; import org.apache.axiom.om.OMElement; import org.apache.axis2.AxisFault; import org.apache.axis2.Constants; +import org.apache.axis2.jsr181.WebMethodAnnotation; +import org.apache.axis2.jsr181.JSR181Helper; import org.apache.axis2.addressing.AddressingHelper; import org.apache.axis2.addressing.EndpointReference; import org.apache.axis2.addressing.AddressingConstants; @@ -2515,8 +2517,16 @@ public class AxisService extends AxisDes PhasesInfo pinfo = axisConfiguration.getPhasesInfo(); for (int i = 0; i < method.length; i++) { Method jmethod = method[i]; - AxisOperation operation = axisService.getOperation(new QName( - jmethod.getName())); + +String methodName = jmethod.getName(); +WebMethodAnnotation methodAnnon = JSR181Helper.INSTANCE.getWebMethodAnnotation(jmethod); +if (methodAnnon != null) { +if (methodAnnon.getOperationName() != null){ +methodName = methodAnnon.getOperationName(); +} +} + AxisOperation operation = axisService.getOperation(new QName(methodName)); + String mep = operation.getMessageExchangePattern(); MessageReceiver mr; if (messageReceiverClassMap != null) { Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java?rev=1101401&r1=1101400&r2=1101401&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java Tue May 10 10:56:28 2011 @@ -297,13 +297,18 @@ public class DefaultSchemaGenerator impl if (jMethod.isBridge()) { continue;
svn commit: r1101464 - in /axis/axis2/java/core/trunk/modules: java2wsdl/src/org/apache/ws/java2wsdl/ java2wsdl/src/org/apache/ws/java2wsdl/utils/ kernel/src/org/apache/axis2/description/java2wsdl/
Author: amilas Date: Tue May 10 13:53:30 2011 New Revision: 1101464 URL: http://svn.apache.org/viewvc?rev=1101464&view=rev Log: adding an options to add a suffix to request message Modified: axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL.java axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLCodegenEngine.java axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/utils/Java2WSDLOptionsValidator.java axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java Modified: axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL.java?rev=1101464&r1=1101463&r2=1101464&view=diff == --- axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL.java (original) +++ axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL.java Tue May 10 13:53:30 2011 @@ -70,6 +70,7 @@ public class Java2WSDL { System.out.println(" -soap11BindingName soap11 binding name of the WSDL"); System.out.println(" -soap12BindingName soap 12 binding name of the WSDL"); System.out.println(" -restBindingNamerest binding name of the WSDL"); +System.out.println(" -res Adds a suffix to the request elemment"); System.exit(0); } Modified: axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java?rev=1101464&r1=1101463&r2=1101464&view=diff == --- axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java (original) +++ axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java Tue May 10 13:53:30 2011 @@ -95,6 +95,8 @@ public class Java2WSDLBuilder implements private String soap12BindingName; private String restBindingName; +private String requestElementSuffix; + public Java2WSDLBuilder() { try { ConfigurationContext configCtx = ConfigurationContextFactory @@ -287,6 +289,10 @@ public class Java2WSDLBuilder implements service.addParameter(Java2WSDLConstants.MESSAGE_PART_NAME_OPTION_LONG, messagePartName); } +if (requestElementSuffix != null){ + service.addParameter(Java2WSDLConstants.REQUEST_ELEMENT_SUFFIX_OPTION_LONG, requestElementSuffix); +} + schemaGenerator.setAxisService(service); AxisService axisService = AxisService.createService(className, serviceName == null ? Java2WSDLUtils @@ -562,4 +568,12 @@ public class Java2WSDLBuilder implements public void setRestBindingName(String restBindingName) { this.restBindingName = restBindingName; } + +public String getRequestElementSuffix() { +return requestElementSuffix; +} + +public void setRequestElementSuffix(String requestElementSuffix) { +this.requestElementSuffix = requestElementSuffix; +} } Modified: axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLCodegenEngine.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLCodegenEngine.java?rev=1101464&r1=1101463&r2=1101464&view=diff == --- axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLCodegenEngine.java (original) +++ axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLCodegenEngine.java Tue May 10 13:53:30 2011 @@ -286,6 +286,13 @@ public class Java2WSDLCodegenEngine impl if (option != null) { java2WsdlBuilder.setRestBindingName(option.getOptionValue()); } + +option = loadOption(Java2WSDLConstants.REQUEST_ELEMENT_SUFFIX_OPTION, + Java2WSDLConstants.REQUEST_ELEMENT_SUFFIX_OPTION_LONG, + optionsMap); +if (option != null) { +java2WsdlBuilder.setRequestElementSuffix(option.getOptionValue()); +
svn commit: r1102212 - in /axis/axis2/java/core/trunk/modules: java2wsdl/src/org/apache/ws/java2wsdl/ java2wsdl/src/org/apache/ws/java2wsdl/utils/ kernel/src/org/apache/axis2/description/java2wsdl/
Author: amilas Date: Thu May 12 09:13:22 2011 New Revision: 1102212 URL: http://svn.apache.org/viewvc?rev=1102212&view=rev Log: added an option to generate named complex types for annonymous types Modified: axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL.java axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLCodegenEngine.java axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/utils/Java2WSDLOptionsValidator.java axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java Modified: axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL.java?rev=1102212&r1=1102211&r2=1102212&view=diff == --- axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL.java (original) +++ axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL.java Thu May 12 09:13:22 2011 @@ -71,6 +71,7 @@ public class Java2WSDL { System.out.println(" -soap12BindingName soap 12 binding name of the WSDL"); System.out.println(" -restBindingNamerest binding name of the WSDL"); System.out.println(" -res Adds a suffix to the request elemment"); +System.out.println(" -datCreates a named complex type for the annonymous complex type"); System.exit(0); } Modified: axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java?rev=1102212&r1=1102211&r2=1102212&view=diff == --- axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java (original) +++ axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java Thu May 12 09:13:22 2011 @@ -97,6 +97,8 @@ public class Java2WSDLBuilder implements private String requestElementSuffix; +private boolean anonymousTypesAllowed = true; + public Java2WSDLBuilder() { try { ConfigurationContext configCtx = ConfigurationContextFactory @@ -293,6 +295,10 @@ public class Java2WSDLBuilder implements service.addParameter(Java2WSDLConstants.REQUEST_ELEMENT_SUFFIX_OPTION_LONG, requestElementSuffix); } +if (!anonymousTypesAllowed) { + service.addParameter(Java2WSDLConstants.DISALLOW_ANON_TYPES_OPTION_LONG, "true"); +} + schemaGenerator.setAxisService(service); AxisService axisService = AxisService.createService(className, serviceName == null ? Java2WSDLUtils @@ -576,4 +582,12 @@ public class Java2WSDLBuilder implements public void setRequestElementSuffix(String requestElementSuffix) { this.requestElementSuffix = requestElementSuffix; } + +public boolean isAnonymousTypesAllowed() { +return anonymousTypesAllowed; +} + +public void setAnonymousTypesAllowed(boolean anonymousTypesAllowed) { +this.anonymousTypesAllowed = anonymousTypesAllowed; +} } Modified: axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLCodegenEngine.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLCodegenEngine.java?rev=1102212&r1=1102211&r2=1102212&view=diff == --- axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLCodegenEngine.java (original) +++ axis/axis2/java/core/trunk/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLCodegenEngine.java Thu May 12 09:13:22 2011 @@ -293,6 +293,14 @@ public class Java2WSDLCodegenEngine impl if (option != null) { java2WsdlBuilder.setRequestElementSuffix(option.getOptionValue()); } + +option = loadOption(Java2WSDLConstants.DISALLOW_ANON_TYPES_OPTION, +Java2WSDLConstants.DISALLOW_ANON_TYPES_OPTION_LONG, +optionsMap); +if (option != null) { +java2WsdlBuilder.setAnonymousTypesAllowed(false); +} + }
svn commit: r1153072 - /axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl
Author: amilas Date: Tue Aug 2 09:01:27 2011 New Revision: 1153072 URL: http://svn.apache.org/viewvc?rev=1153072&view=rev Log: applying the patch for AXIS2-5105 Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl?rev=1153072&r1=1153071&r2=1153072&view=diff == --- axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl (original) +++ axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl Tue Aug 2 09:01:27 2011 @@ -2970,6 +2970,15 @@ nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil";); if (!"true".equals(nillableValue) && !"1".equals(nillableValue)){ + + + +nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil";); +if ("true".equals(nillableValue) || "1".equals(nillableValue)){ +throw new org.apache.axis2.databinding.ADBException("The element: "+"" +" cannot be null"); +} + + java.lang.String content = reader.getElementText();
svn commit: r1157767 - /axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java
Author: amilas Date: Mon Aug 15 10:45:47 2011 New Revision: 1157767 URL: http://svn.apache.org/viewvc?rev=1157767&view=rev Log: if message name is null axiom gives an exception Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java?rev=1157767&r1=1157766&r2=1157767&view=diff == --- axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java (original) +++ axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java Mon Aug 15 10:45:47 2011 @@ -139,8 +139,10 @@ public class RPCMessageReceiver extends if (WSDL2Constants.MEP_URI_ROBUST_IN_ONLY.equals( op.getMessageExchangePattern())){ -OMElement bodyChild = fac.createOMElement(outMessage.getAxisMessage().getName(), ns); -envelope.getBody().addChild(bodyChild); +if (outMessage.getAxisMessage().getName() != null) { +OMElement bodyChild = fac.createOMElement(outMessage.getAxisMessage().getName(), ns); +envelope.getBody().addChild(bodyChild); +} outMessage.setEnvelope(envelope); return; }
svn commit: r1158146 - in /axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema: ExtensionUtility.java SchemaCompiler.java
Author: amilas Date: Tue Aug 16 08:21:32 2011 New Revision: 1158146 URL: http://svn.apache.org/viewvc?rev=1158146&view=rev Log: replace the existing schemas with the processed ones. for -uw option to work some metadata is required Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java?rev=1158146&r1=1158145&r2=1158146&view=diff == --- axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java (original) +++ axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java Tue Aug 16 08:21:32 2011 @@ -71,6 +71,7 @@ public class ExtensionUtility { // add all the schemas to the list for (AxisService service : configuration.getAxisServices()) { schemaList.addAll(service.getSchema()); + } //hashmap that keeps the targetnamespace and the xmlSchema object @@ -146,6 +147,28 @@ public class ExtensionUtility { } + +//replace the Axis2 schemas with the processed ones. +//otherwise it gives some problems if we try to code generate with multiple +//services with the -uw option. +//inorder to work for -uw option there must be some metadata with the schema list + +Map loadedSchemaMap = schemaCompiler.getLoadedSchemaMap(); +for (AxisService service : configuration.getAxisServices()) { +List serviceSchemaList = service.getSchema(); +List schemaListToAdd = new ArrayList(); +for (XmlSchema xmlSchema : serviceSchemaList){ +if (loadedSchemaMap.containsKey(xmlSchema.getTargetNamespace())){ + schemaListToAdd.add(loadedSchemaMap.get(xmlSchema.getTargetNamespace())); +} else { +schemaListToAdd.add(xmlSchema); +} +} +service.releaseSchemaList(); +service.addSchema(schemaListToAdd); +} + + //process the unwrapped parameters if (!configuration.isParametersWrapped()) { //figure out the unwrapped operations Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java?rev=1158146&r1=1158145&r2=1158146&view=diff == --- axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java (original) +++ axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java Tue Aug 16 08:21:32 2011 @@ -2809,4 +2809,8 @@ public class SchemaCompiler { } return isExists; } + +public Map getLoadedSchemaMap(){ +return this.loadedSchemaMap; +} }
svn commit: r1159105 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService.java
Author: amilas Date: Thu Aug 18 09:14:16 2011 New Revision: 1159105 URL: http://svn.apache.org/viewvc?rev=1159105&view=rev Log: when adding from the addSchema it checks for null targetnamespaces Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService.java?rev=1159105&r1=1159104&r2=1159105&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService.java Thu Aug 18 09:14:16 2011 @@ -2068,9 +2068,8 @@ public class AxisService extends AxisDes public void addSchema(Collection schemas) { Iterator iterator = schemas.iterator(); while (iterator.hasNext()) { - XmlSchema schema = (XmlSchema) iterator.next(); - schemaList.add(schema); - addSchemaNameSpace(schema); + XmlSchema schema = iterator.next(); +addSchema(schema); } }
svn commit: r1159110 - in /axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema: ExtensionUtility.java SchemaCompiler.java
Author: amilas Date: Thu Aug 18 09:23:46 2011 New Revision: 1159110 URL: http://svn.apache.org/viewvc?rev=1159110&view=rev Log: adding back the processed types since some meta data is required for -uw option Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java?rev=1159110&r1=1159109&r2=1159110&view=diff == --- axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java (original) +++ axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java Thu Aug 18 09:23:46 2011 @@ -146,6 +146,26 @@ public class ExtensionUtility { } +//replace the Axis2 schemas with the processed ones. +//otherwise it gives some problems if we try to code generate with multiple +//services with the -uw option. +//inorder to work for -uw option there must be some metadata with the schema list + +Map loadedSchemaMap = schemaCompiler.getLoadedSchemaMap(); +for (AxisService service : configuration.getAxisServices()) { +List serviceSchemaList = service.getSchema(); +List schemaListToAdd = new ArrayList(); +for (XmlSchema xmlSchema : serviceSchemaList){ +if (loadedSchemaMap.containsKey(xmlSchema.getTargetNamespace())){ + schemaListToAdd.add(loadedSchemaMap.get(xmlSchema.getTargetNamespace())); +} else { +schemaListToAdd.add(xmlSchema); +} +} +service.releaseSchemaList(); +service.addSchema(schemaListToAdd); +} + //process the unwrapped parameters if (!configuration.isParametersWrapped()) { //figure out the unwrapped operations Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java?rev=1159110&r1=1159109&r2=1159110&view=diff == --- axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java (original) +++ axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java Thu Aug 18 09:23:46 2011 @@ -2809,4 +2809,8 @@ public class SchemaCompiler { } return isExists; } + +public Map getLoadedSchemaMap(){ +return this.loadedSchemaMap; +} }
svn commit: r1159565 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL11.java
Author: amilas Date: Fri Aug 19 09:49:09 2011 New Revision: 1159565 URL: http://svn.apache.org/viewvc?rev=1159565&view=rev Log: fixing the issue AXIS2-5060 Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL11.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL11.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL11.java?rev=1159565&r1=1159564&r2=1159565&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL11.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL11.java Fri Aug 19 09:49:09 2011 @@ -1183,6 +1183,24 @@ public class AxisService2WSDL11 implemen } } } + +// generate fault Messages +ArrayList faultyMessages = axisBindingOperation.getFaults(); +if (faultyMessages != null) { +for (Object faultyMessage1 : faultyMessages) { +AxisBindingMessage bindingFaultyMessage = (AxisBindingMessage) faultyMessage1; +if (bindingFaultyMessage != null) { +AxisMessage faultyMessage = bindingFaultyMessage +.getAxisMessage(); +OMElement fault = fac.createOMElement(FAULT_LOCAL_NAME, +wsdl); +fault.addAttribute(ATTRIBUTE_NAME, faultyMessage +.getName(), null); +// add policies for fault messages +operation.addChild(fault); +} +} +} } }
svn commit: r1162649 - /axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/writer/JavaBeanWriter.java
Author: amilas Date: Mon Aug 29 05:50:10 2011 New Revision: 1162649 URL: http://svn.apache.org/viewvc?rev=1162649&view=rev Log: applying patch for AXIS2-5124 Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/writer/JavaBeanWriter.java Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/writer/JavaBeanWriter.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/writer/JavaBeanWriter.java?rev=1162649&r1=1162648&r2=1162649&view=diff == --- axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/writer/JavaBeanWriter.java (original) +++ axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/writer/JavaBeanWriter.java Mon Aug 29 05:50:10 2011 @@ -55,6 +55,7 @@ import java.io.IOException; import java.io.OutputStream; import java.net.URL; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -720,10 +721,11 @@ public class JavaBeanWriter implements B } else { qName = metainf.getQNameArray(); } - + for (int i = 0; i < qName.length; i++) { qNames.add(qName[i]); } + //adding missing QNames to the end, including elements & attributes. // for the simple types we have already add the parent elements // it is almost consider as an extension @@ -731,12 +733,27 @@ public class JavaBeanWriter implements B addMissingQNames(metainf, qNames, missingQNames); } + List parents=new ArrayList(); + BeanWriterMetaInfoHolder immediateParent=metainf.getParent(); + while(immediateParent != null){ + parents.add(immediateParent); + immediateParent=immediateParent.getParent(); + } + for (QName name : qNames) { Element property = XSLTUtils.addChildElement(model, "property", rootElt); String xmlName = name.getLocalPart(); + + String xmlNameNew=identifyUniqueNameForQName(parents,xmlName, metainf, name,name); + while(!xmlName.equalsIgnoreCase(xmlNameNew)){ + xmlName=xmlNameNew; + xmlNameNew=identifyUniqueNameForQName(parents,xmlNameNew, metainf, name,new QName(xmlNameNew)); + } + XSLTUtils.addAttribute(model, "name", xmlName, property); XSLTUtils.addAttribute(model, "nsuri", name.getNamespaceURI(), property); + String javaName; if (metainf.isJavaNameMappingAvailable(xmlName)) { @@ -796,7 +813,8 @@ public class JavaBeanWriter implements B metainf.getDefaultValueForQName(name), property); } } - + + //in the case the original element is an array but the derived one is not. if (parentMetaInf != null && metainf.isRestriction() && !missingQNames.contains(name) && (parentMetaInf.getArrayStatusForQName(name) && !metainf.getArrayStatusForQName(name))) { @@ -862,7 +880,6 @@ public class JavaBeanWriter implements B groupTypeMap, javaClassNameForElement); } - } // end of foo } @@ -1452,5 +1469,46 @@ public class JavaBeanWriter implements B } + +/** + * This method is used to generate a unique name for a given QName and a metainf. + * First we check the parents whether they have the given QName, If yes, then we check the java type for QName. + * If they are similar, no issue. If they are different, java name has to be changed. + * After changing also, we need to check whether the changed name contains in the parentinfs. + * @param parents + * @param xmlName + * @param metainf + * @param original + * @param modified + * @return + */ +private String identifyUniqueNameForQName(List parents, String xmlName,BeanWriterMetaInfoHolder metainf,QName original,QName modified){ + + int count=0; + for (BeanWriterMetaInfoHolder beanWriterMetaInfoHolder : parents) { + QName[] pQNmame = null; + if (beanWriterMetaInfoHolder.isOrdered()) { + pQNmame = beanWriterMetaInfoHolder.getOrderedQNameArray(); + } else { + pQNmame = beanWriterMetaInfoHolder.getQNameArray(); + } + + List pQNameList = null; + if (