svn commit: r1230917 - /axis/axis2/java/core/trunk/src/site/xdoc/docs/quickstartguide.xml
Author: sagara Date: Fri Jan 13 08:37:47 2012 New Revision: 1230917 URL: http://svn.apache.org/viewvc?rev=1230917&view=rev Log: Applied patch for AXIS2-5149. Modified: axis/axis2/java/core/trunk/src/site/xdoc/docs/quickstartguide.xml Modified: axis/axis2/java/core/trunk/src/site/xdoc/docs/quickstartguide.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/src/site/xdoc/docs/quickstartguide.xml?rev=1230917&r1=1230916&r2=1230917&view=diff == --- axis/axis2/java/core/trunk/src/site/xdoc/docs/quickstartguide.xml (original) +++ axis/axis2/java/core/trunk/src/site/xdoc/docs/quickstartguide.xml Fri Jan 13 08:37:47 2012 @@ -135,10 +135,10 @@ steps: Create and compile the Java class. (Windows) -%AXIS2_HOME%\bin\java2wsdl -cp . -cn samples.quickstart.service.pojo.StockQuoteService -of StockQuoteService.wsdl +%AXIS2_HOME%\bin\java2wsdl.bat -cp . -cn samples.quickstart.service.pojo.StockQuoteService -of StockQuoteService.wsdl (Linux) -$AXIS2_HOME/bin/java2wsdl -cp . -cn samples.quickstart.service.pojo.StockQuoteService -of StockQuoteService.wsdl +$AXIS2_HOME/bin/java2wsdl.sh -cp . -cn samples.quickstart.service.pojo.StockQuoteService -of StockQuoteService.wsdl Generate the WSDL using the command: @@ -475,10 +475,10 @@ Framework (ADB), execute the following s following in the Axis2_HOME/samples/quickstartadb directory: (Windows) -%AXIS2_HOME%\bin\wsdl2java -uri resources\META-INF\StockQuoteService.wsdl -p samples.quickstart.service.adb -d adb -s -ss -sd -ssi -o build\service +%AXIS2_HOME%\bin\wsdl2java.bat -uri resources\META-INF\StockQuoteService.wsdl -p samples.quickstart.service.adb -d adb -s -ss -sd -ssi -o build\service (Linux) -$AXIS2_HOME/bin/wsdl2java -uri resources/META-INF/StockQuoteService.wsdl -p samples.quickstart.service.adb -d adb -s -ss -sd -ssi -o build/service +$AXIS2_HOME/bin/wsdl2java.sh -uri resources/META-INF/StockQuoteService.wsdl -p samples.quickstart.service.adb -d adb -s -ss -sd -ssi -o build/service Else, simply type ant generate.service in the @@ -507,7 +507,7 @@ import samples.quickstart.service.adb.xs import java.util.HashMap; -public class StockQuoteServiceSkeleton { +public class StockQuoteServiceSkeleton implements StockQuoteServiceSkeletonInterface { private static HashMap map; @@ -560,7 +560,7 @@ steps. following in the Axis2_HOME/samples/quickstartxmlbeans directory. -%AXIS2_HOME%\bin\wsdl2java -uri resources\META-INF\StockQuoteService.wsdl -p samples.quickstart.service.xmlbeans -d xmlbeans -s -ss -sd -ssi -o build\service +%AXIS2_HOME%\bin\wsdl2java.bat -uri resources\META-INF\StockQuoteService.wsdl -p samples.quickstart.service.xmlbeans -d xmlbeans -s -ss -sd -ssi -o build\service Else simply type ant generate.service in the Axis2_HOME/samples/quickstartxmlbeans directory. @@ -645,7 +645,7 @@ steps. following at a console in the Axis2_HOME/samples/quickstartjibx directory: -%AXIS2_HOME%\bin\wsdl2java -uri resources\META-INF\StockQuoteService.wsdl -p samples.quickstart.service.jibx -d jibx -s -ss -sd -ssi -uw -o build\service +%AXIS2_HOME%\bin\wsdl2java.bat -uri resources\META-INF\StockQuoteService.wsdl -p samples.quickstart.service.jibx -d jibx -s -ss -sd -ssi -uw -o build\service Else, simply type "ant generate.service" in the Axis2_HOME/samples/quickstartjibx directory. @@ -836,10 +836,10 @@ Current price of WSO: 123.42 Generating a Client using ADB To build a client using Axis Data Binding (ADB), execute the following steps. -Generate the client databings by typing the following in the +Generate the client data bindings by typing the following in the Axis2_HOME/samples/quickstartadb directory: -%AXIS2_HOME%\bin\wsdl2java -uri resources\META-INF\StockQuoteService.wsdl -p samples.quickstart.clients -d adb -s -o build\client +%AXIS2_HOME%\bin\wsdl2java.bat -uri resources\META-INF\StockQuoteService.wsdl -p samples.quickstart.clients -d adb -s -o build\client Else, simply type ant generate.client in the Axis2_HOME/samples/quickstartadb directory. @@ -924,7 +924,7 @@ following steps. Generate the databings by typing the following in the xmlbeansClient directory. -%AXIS2_HOME%\bin\wsdl2java -uri resources\META-INF\StockQuoteService.wsdl -p samples.quickstart.service.xmlbeans -d xmlbeans -s -o build\client +%AXIS2_HOME%\bin\wsdl2java.bat -uri resources\META-INF\StockQuoteService.wsdl -p samples.quickstart.service.xmlbeans -d xmlbeans -s -o build\client Else, simply type ant generate.client in the Axis2_HOME/samples/quickstartxmlbeans directory. @@ -1016,7 +1016,7 @@ price updated Generate the client stub by typing the following at a console in the Axis2_HOME/samples/quickstartjibx directory. -%AXIS2_HOME%\bin\wsdl2java -uri resources\META-INF\StockQuoteService.wsdl -p samples.quickstart.clients -d jibx -s -uw -o build\client +%AXIS2_HOME%\bin\wsdl2java.bat -uri resources\META-INF\StockQuoteServic
svn commit: r1230918 - /axis/axis2/java/core/trunk/modules/samples/quickstartxmlbeans/build.xml
Author: sagara Date: Fri Jan 13 08:39:42 2012 New Revision: 1230918 URL: http://svn.apache.org/viewvc?rev=1230918&view=rev Log: Applied patch for AXIS2-5148. Modified: axis/axis2/java/core/trunk/modules/samples/quickstartxmlbeans/build.xml Modified: axis/axis2/java/core/trunk/modules/samples/quickstartxmlbeans/build.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/samples/quickstartxmlbeans/build.xml?rev=1230918&r1=1230917&r2=1230918&view=diff == --- axis/axis2/java/core/trunk/modules/samples/quickstartxmlbeans/build.xml (original) +++ axis/axis2/java/core/trunk/modules/samples/quickstartxmlbeans/build.xml Fri Jan 13 08:39:42 2012 @@ -107,7 +107,7 @@ - +
svn commit: r1231009 - in /axis/axis2/java/core/trunk/modules/spring/src/org/apache/axis2/extensions/spring: receivers/SpringAppContextAwareObjectSupplier.java util/ util/ApplicationContextUtil.java
Author: sagara Date: Fri Jan 13 11:24:50 2012 New Revision: 1231009 URL: http://svn.apache.org/viewvc?rev=1231009&view=rev Log: Applied patch for AXIS2-5231 with few changes. Added: axis/axis2/java/core/trunk/modules/spring/src/org/apache/axis2/extensions/spring/util/ axis/axis2/java/core/trunk/modules/spring/src/org/apache/axis2/extensions/spring/util/ApplicationContextUtil.java (with props) Modified: axis/axis2/java/core/trunk/modules/spring/src/org/apache/axis2/extensions/spring/receivers/SpringAppContextAwareObjectSupplier.java Modified: axis/axis2/java/core/trunk/modules/spring/src/org/apache/axis2/extensions/spring/receivers/SpringAppContextAwareObjectSupplier.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/spring/src/org/apache/axis2/extensions/spring/receivers/SpringAppContextAwareObjectSupplier.java?rev=1231009&r1=1231008&r2=1231009&view=diff == --- axis/axis2/java/core/trunk/modules/spring/src/org/apache/axis2/extensions/spring/receivers/SpringAppContextAwareObjectSupplier.java (original) +++ axis/axis2/java/core/trunk/modules/spring/src/org/apache/axis2/extensions/spring/receivers/SpringAppContextAwareObjectSupplier.java Fri Jan 13 11:24:50 2012 @@ -23,41 +23,45 @@ import org.apache.axis2.AxisFault; import org.apache.axis2.ServiceObjectSupplier; import org.apache.axis2.description.AxisService; import org.apache.axis2.description.Parameter; +import org.apache.axis2.extensions.spring.util.ApplicationContextUtil; import org.apache.axis2.i18n.Messages; -import org.springframework.context.ApplicationContext; +import org.springframework.context.support.GenericApplicationContext; public class SpringAppContextAwareObjectSupplier implements ServiceObjectSupplier { public static final String SERVICE_SPRING_BEANNAME = "SpringBeanName"; /** - * Method getServiceObject that is Spring aware via Spring interface ApplicationContextAware. + * Method getServiceObject used to get the spring beans from the spring application context + * for the given spring service * - * @param axisService - * @return Returns Object. + * @param axisService - spring service + * @return Object * @throws AxisFault */ - public Object getServiceObject(AxisService axisService) throws AxisFault { try { +// Get the Spring Context based on service, the context is set as parameter to the +// spring service in SpringServiceDeployer when service deployed. +GenericApplicationContext aCtx = ApplicationContextUtil. +getSpringApplicationContext(axisService); + // Name of spring aware bean to be injected, taken from services.xml // via 'SERVICE_SPRING_BEANNAME ' . The Bean and its properties are pre-configured // as normally done in a spring type of way and subsequently loaded by Spring. // Axis2 just assumes that the bean is configured and is in the classloader. Parameter implBeanParam = axisService.getParameter(SERVICE_SPRING_BEANNAME); -String beanName = ((String)implBeanParam.getValue()).trim(); -if (beanName != null) { -// ApplicationContextHolder implements Spring interface ApplicationContextAware -ApplicationContext aCtx = ApplicationContextHolder.getContext(); +if (implBeanParam != null) { +String beanName = ((String) implBeanParam.getValue()).trim(); if (aCtx == null) { -throw new Exception("Axis2 Can't find Spring's ApplicationContext"); +throw new AxisFault("Axis2 Can't find Spring's ApplicationContext"); } else if (aCtx.getBean(beanName) == null) { -throw new Exception("Axis2 Can't find Spring Bean: " + beanName); +throw new AxisFault("Axis2 Can't find Spring Bean: " + beanName); } return aCtx.getBean(beanName); } else { throw new AxisFault( -Messages.getMessage("paramIsNotSpecified", "SERVICE_SPRING_BEANNAME")); +Messages.getMessage("paramIsNotSpecified", SERVICE_SPRING_BEANNAME)); } } catch (Exception e) { throw AxisFault.makeFault(e); Added: axis/axis2/java/core/trunk/modules/spring/src/org/apache/axis2/extensions/spring/util/ApplicationContextUtil.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/spring/src/org/apache/axis2/extensions/spring/util/ApplicationContextUtil.java?rev=1231009&view=auto == --- axis/axis2/java/core/trunk/modules/spring/src/org/apache/axis2/extensions/spring/util/ApplicationContextUtil.java (added) +++ axis/axis2/java/core/t
svn commit: r1231015 - in /axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/ejb: EJB3InOnlyMessageReceiver.java EJB3MessageReceiver.java EJB3Util.java
Author: sagara Date: Fri Jan 13 11:41:11 2012 New Revision: 1231015 URL: http://svn.apache.org/viewvc?rev=1231015&view=rev Log: Applied patch for AXIS2-5204. Added: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/ejb/EJB3InOnlyMessageReceiver.java (with props) axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/ejb/EJB3MessageReceiver.java (with props) axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/ejb/EJB3Util.java (with props) Added: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/ejb/EJB3InOnlyMessageReceiver.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/ejb/EJB3InOnlyMessageReceiver.java?rev=1231015&view=auto == --- axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/ejb/EJB3InOnlyMessageReceiver.java (added) +++ axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/ejb/EJB3InOnlyMessageReceiver.java Fri Jan 13 11:41:11 2012 @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.axis2.rpc.receivers.ejb; + +import org.apache.axis2.AxisFault; +import org.apache.axis2.context.MessageContext; +import org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver; + +public class EJB3InOnlyMessageReceiver extends RPCInOnlyMessageReceiver { + +protected Object makeNewServiceObject(MessageContext msgContext) throws AxisFault { +return EJB3Util.makeNewServiceObject(msgContext); +} +} Propchange: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/ejb/EJB3InOnlyMessageReceiver.java -- svn:eol-style = native Added: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/ejb/EJB3MessageReceiver.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/ejb/EJB3MessageReceiver.java?rev=1231015&view=auto == --- axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/ejb/EJB3MessageReceiver.java (added) +++ axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/ejb/EJB3MessageReceiver.java Fri Jan 13 11:41:11 2012 @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.axis2.rpc.receivers.ejb; + +import org.apache.axis2.AxisFault; +import org.apache.axis2.context.MessageContext; +import org.apache.axis2.rpc.receivers.RPCMessageReceiver; + +public class EJB3MessageReceiver extends RPCMessageReceiver { + +protected Object makeNewServiceObject(MessageContext msgContext) throws AxisFault { +return EJB3Util.makeNewServiceObject(msgContext); +} +} Propchange: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/ejb/EJB3MessageReceiver.java -- svn:eol-style = native Added: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/ejb/EJB3Util.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/ejb/EJB3Util.java?rev=1231015&view=auto =
svn commit: r1231152 - /axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/spring/SpringServiceTest.java
Author: sagara Date: Fri Jan 13 16:13:08 2012 New Revision: 1231152 URL: http://svn.apache.org/viewvc?rev=1231152&view=rev Log: Modified test case according to AXIS2-5231 changes. Modified: axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/spring/SpringServiceTest.java Modified: axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/spring/SpringServiceTest.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/spring/SpringServiceTest.java?rev=1231152&r1=1231151&r2=1231152&view=diff == --- axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/spring/SpringServiceTest.java (original) +++ axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/spring/SpringServiceTest.java Fri Jan 13 16:13:08 2012 @@ -41,11 +41,11 @@ import org.apache.axis2.description.Para import org.apache.axis2.engine.AxisConfiguration; import org.apache.axis2.engine.MessageReceiver; import org.apache.axis2.extensions.spring.receivers.SpringAppContextAwareObjectSupplier; +import org.apache.axis2.extensions.spring.util.ApplicationContextUtil; import org.apache.axis2.integration.UtilServer; import org.apache.axis2.integration.UtilServerBasedTestCase; import org.apache.axis2.receivers.RawXMLINOutMessageReceiver; import org.apache.axis2.wsdl.WSDLConstants; -import org.springframework.context.support.ClassPathXmlApplicationContext; import javax.xml.namespace.QName; import javax.xml.stream.XMLOutputFactory; @@ -57,8 +57,6 @@ public class SpringServiceTest extends U "NullTransport"); EndpointReference targetEPR = new EndpointReference( "http://127.0.0.1:"; + (UtilServer.TESTING_PORT) -//"http://127.0.0.1:"; + 5556 -// + "/axis2/services/EchoXMLService/echoOMElement"); + "/axis2/services/SpringExample/getValue"); protected AxisConfiguration engineRegistry; @@ -79,8 +77,7 @@ public class SpringServiceTest extends U createSpringService(springServiceName, new RawXMLINOutMessageReceiver(), "org.apache.axis2.extensions.spring.receivers.SpringAppContextAwareObjectSupplier", "springAwareService", -springOperationName); -createSpringAppCtx(service.getClassLoader()); +springOperationName); UtilServer.deployService(service); } @@ -141,6 +138,8 @@ public class SpringServiceTest extends U service.addParameter(new Parameter(Constants.SERVICE_TCCL, Constants.TCCL_COMPOSITE)); service.addParameter(new Parameter( SpringAppContextAwareObjectSupplier.SERVICE_SPRING_BEANNAME, beanName)); +service.addParameter(new Parameter( +ApplicationContextUtil.SPRING_APPLICATION_CONTEXT_LOCATION , "/spring/applicationContext.xml")); AxisOperation axisOp = new InOutAxisOperation(opName); @@ -174,14 +173,5 @@ public class SpringServiceTest extends U service.addOperation(axisOp); return service; -} - -public void createSpringAppCtx(ClassLoader cl) -throws Exception { - -ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext( -new String[] { "/spring/applicationContext.xml" }, false); -ctx.setClassLoader(cl); -ctx.refresh(); -} +} }