Author: veithen
Date: Mon Sep 18 22:46:27 2017
New Revision: 1808789

URL: http://svn.apache.org/viewvc?rev=1808789&view=rev
Log:
AXIS2-5887: Roll back bogus change in ADBBeanTemplate-bean.xsl introduced in 
r1536050.

Added:
    
axis/axis2/java/core/trunk/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5887/
    
axis/axis2/java/core/trunk/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5887/ParseTest.java
   (with props)
    axis/axis2/java/core/trunk/modules/adb-tests/src/test/resources/
    axis/axis2/java/core/trunk/modules/adb-tests/src/test/resources/org/
    axis/axis2/java/core/trunk/modules/adb-tests/src/test/resources/org/apache/
    
axis/axis2/java/core/trunk/modules/adb-tests/src/test/resources/org/apache/axis2/
    
axis/axis2/java/core/trunk/modules/adb-tests/src/test/resources/org/apache/axis2/databinding/
    
axis/axis2/java/core/trunk/modules/adb-tests/src/test/resources/org/apache/axis2/databinding/axis2_5887/
    
axis/axis2/java/core/trunk/modules/adb-tests/src/test/resources/org/apache/axis2/databinding/axis2_5887/getOrdersByStatus_response.xml
   (with props)
    axis/axis2/java/core/trunk/modules/adb-tests/src/test/wsdl/AXIS2-5887.wsdl
Modified:
    
axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl
    axis/axis2/java/core/trunk/modules/adb-tests/pom.xml

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=1808789&r1=1808788&r2=1808789&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 Sep 18 22:46:27 2017
@@ -2162,7 +2162,6 @@
                             <xsl:variable name="particleClassType" 
select="@particleClassType"></xsl:variable>
 
                             <xsl:variable name="propQName">new 
javax.xml.namespace.QName("<xsl:value-of select="$namespace"/>","<xsl:value-of 
select="$propertyName"/>")</xsl:variable>
-                            <xsl:variable name="propQName2">new 
javax.xml.namespace.QName("","<xsl:value-of 
select="$propertyName"/>")</xsl:variable>
 
                            <xsl:choose>
                                 <xsl:when test="$unordered and not($choice and 
$hasParticleType)">  <!-- One property per iteration if unordered -->
@@ -2187,7 +2186,7 @@
                                          we have to sollow an excpetions : 
todo find a better solsution-->
                                          try{
                                     </xsl:if>
-                                    if (reader.isStartElement() <xsl:if 
test="$simple"> || reader.hasText()</xsl:if> <xsl:if test="not($simple) and 
not($particleClassType)">&amp;&amp; <xsl:value-of 
select="$propQName"/>.equals(reader.getName()) || <xsl:value-of 
select="$propQName2"/>.equals(reader.getName()) </xsl:if>){
+                                    if (reader.isStartElement() <xsl:if 
test="$simple"> || reader.hasText()</xsl:if> <xsl:if test="not($simple) and 
not($particleClassType)">&amp;&amp; <xsl:value-of 
select="$propQName"/>.equals(reader.getName())</xsl:if>){
                                 </xsl:otherwise>
                             </xsl:choose>
 

Modified: axis/axis2/java/core/trunk/modules/adb-tests/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb-tests/pom.xml?rev=1808789&r1=1808788&r2=1808789&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/adb-tests/pom.xml (original)
+++ axis/axis2/java/core/trunk/modules/adb-tests/pom.xml Mon Sep 18 22:46:27 
2017
@@ -321,6 +321,25 @@
                             
<outputDirectory>${project.build.directory}/wsdl2code/AXIS2-5809</outputDirectory>
                         </configuration>
                     </execution>
+                    <execution>
+                        <id>wsdl2code-axis2-5887</id>
+                        <goals>
+                            <goal>generate-test-sources</goal>
+                        </goals>
+                        <configuration>
+                            <wsdlFile>src/test/wsdl/AXIS2-5887.wsdl</wsdlFile>
+                            <syncMode>sync</syncMode>
+                            <unpackClasses>true</unpackClasses>
+                            <namespaceMappings>
+                                <namespaceMapping>
+                                    
<uri>webservice/xtc/plugins/Speed4Trade/com</uri>
+                                    
<packageName>org.apache.axis2.databinding.axis2_5887.client</packageName>
+                                </namespaceMapping>
+                            </namespaceMappings>
+                            
<packageName>org.apache.axis2.databinding.axis2_5887.client</packageName>
+                            
<outputDirectory>${project.build.directory}/wsdl2code/AXIS2-5887</outputDirectory>
+                        </configuration>
+                    </execution>
                 </executions>
                 <configuration>
                     <databindingName>adb</databindingName>

Added: 
axis/axis2/java/core/trunk/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5887/ParseTest.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5887/ParseTest.java?rev=1808789&view=auto
==============================================================================
--- 
axis/axis2/java/core/trunk/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5887/ParseTest.java
 (added)
+++ 
axis/axis2/java/core/trunk/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5887/ParseTest.java
 Mon Sep 18 22:46:27 2017
@@ -0,0 +1,45 @@
+/*
+ * 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.databinding.axis2_5887;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import java.io.InputStream;
+
+import org.apache.axiom.om.OMXMLBuilderFactory;
+import org.apache.axiom.soap.SOAPEnvelope;
+import 
org.apache.axis2.databinding.axis2_5887.client.GetOrdersByStatusResponse;
+import org.junit.Test;
+
+public class ParseTest {
+    @Test
+    public void test() throws Exception {
+        GetOrdersByStatusResponse response;
+        InputStream in = 
ParseTest.class.getResourceAsStream("getOrdersByStatus_response.xml");
+        try {
+            SOAPEnvelope envelope = 
OMXMLBuilderFactory.createSOAPModelBuilder(in, null).getSOAPEnvelope();
+            response = GetOrdersByStatusResponse.Factory.parse(
+                    
envelope.getBody().getFirstElement().getXMLStreamReader(false));
+        } finally {
+            in.close();
+        }
+        assertThat(response.getOrders()).isNotNull();
+        assertThat(response.getOrders().getOrders()).isNull();
+    }
+}

Propchange: 
axis/axis2/java/core/trunk/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5887/ParseTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 
axis/axis2/java/core/trunk/modules/adb-tests/src/test/resources/org/apache/axis2/databinding/axis2_5887/getOrdersByStatus_response.xml
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb-tests/src/test/resources/org/apache/axis2/databinding/axis2_5887/getOrdersByStatus_response.xml?rev=1808789&view=auto
==============================================================================
--- 
axis/axis2/java/core/trunk/modules/adb-tests/src/test/resources/org/apache/axis2/databinding/axis2_5887/getOrdersByStatus_response.xml
 (added)
+++ 
axis/axis2/java/core/trunk/modules/adb-tests/src/test/resources/org/apache/axis2/databinding/axis2_5887/getOrdersByStatus_response.xml
 Mon Sep 18 22:46:27 2017
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:ns1="webservice/xtc/plugins/Speed4Trade/com">
+       <SOAP-ENV:Body>
+               <ns1:getOrdersByStatusResponse>
+                       <orders/>
+               </ns1:getOrdersByStatusResponse>
+       </SOAP-ENV:Body>
+</SOAP-ENV:Envelope>

Propchange: 
axis/axis2/java/core/trunk/modules/adb-tests/src/test/resources/org/apache/axis2/databinding/axis2_5887/getOrdersByStatus_response.xml
------------------------------------------------------------------------------
    svn:eol-style = native


Reply via email to