Author: veithen Date: Mon Jun 25 19:26:58 2012 New Revision: 1353707 URL: http://svn.apache.org/viewvc?rev=1353707&view=rev Log: (Partially) reverted AXIS2-4197 (r1052896) to solve AXIS2-5147: the changes caused the JAXBRI databinding to produce invalid messages (i.e. messages that don't conform to the WSDL).
Modified: axis/axis2/java/core/trunk/modules/jaxbri/src/main/resources/org/apache/axis2/jaxbri/template/JaxbRIDatabindingTemplate.xsl axis/axis2/java/core/trunk/modules/jaxbri/src/test/java/org/apache/axis2/jaxbri/processor/ProcessorTest.java axis/axis2/java/core/trunk/modules/jaxbri/src/test/resources/org/apache/axis2/jaxbri/processor/response.xml Modified: axis/axis2/java/core/trunk/modules/jaxbri/src/main/resources/org/apache/axis2/jaxbri/template/JaxbRIDatabindingTemplate.xsl URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxbri/src/main/resources/org/apache/axis2/jaxbri/template/JaxbRIDatabindingTemplate.xsl?rev=1353707&r1=1353706&r2=1353707&view=diff ============================================================================== --- axis/axis2/java/core/trunk/modules/jaxbri/src/main/resources/org/apache/axis2/jaxbri/template/JaxbRIDatabindingTemplate.xsl (original) +++ axis/axis2/java/core/trunk/modules/jaxbri/src/main/resources/org/apache/axis2/jaxbri/template/JaxbRIDatabindingTemplate.xsl Mon Jun 25 19:26:58 2012 @@ -61,20 +61,6 @@ <xsl:for-each select="param[not(@type = preceding-sibling::param/@type)]"> <xsl:if test="@type!=''"> - private org.apache.axiom.om.OMElement toOM(<xsl:value-of select="@type"/> param, boolean optimizeContent, javax.xml.namespace.QName methodQName) - throws org.apache.axis2.AxisFault { - org.apache.axiom.om.OMFactory factory = org.apache.axiom.om.OMAbstractFactory.getOMFactory(); - - org.apache.axis2.jaxbri.JaxbRIDataSource source = new org.apache.axis2.jaxbri.JaxbRIDataSource( wsContext, - <xsl:value-of select="@type"/>.class, - param, - methodQName.getNamespaceURI(), - methodQName.getLocalPart()); - org.apache.axiom.om.OMNamespace namespace = factory.createOMNamespace(methodQName.getNamespaceURI(), - null); - return factory.createOMElement(source, methodQName.getLocalPart(), namespace); - } - private org.apache.axiom.om.OMElement toOM(<xsl:value-of select="@type"/> param, boolean optimizeContent) throws org.apache.axis2.AxisFault { org.apache.axiom.om.OMFactory factory = org.apache.axiom.om.OMAbstractFactory.getOMFactory(); @@ -91,7 +77,7 @@ private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, <xsl:value-of select="@type"/> param, boolean optimizeContent, javax.xml.namespace.QName methodQName) throws org.apache.axis2.AxisFault { org.apache.axiom.soap.SOAPEnvelope envelope = factory.getDefaultEnvelope(); - envelope.getBody().addChild(toOM(param, optimizeContent, methodQName)); + envelope.getBody().addChild(toOM(param, optimizeContent)); return envelope; } Modified: axis/axis2/java/core/trunk/modules/jaxbri/src/test/java/org/apache/axis2/jaxbri/processor/ProcessorTest.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxbri/src/test/java/org/apache/axis2/jaxbri/processor/ProcessorTest.java?rev=1353707&r1=1353706&r2=1353707&view=diff ============================================================================== --- axis/axis2/java/core/trunk/modules/jaxbri/src/test/java/org/apache/axis2/jaxbri/processor/ProcessorTest.java (original) +++ axis/axis2/java/core/trunk/modules/jaxbri/src/test/java/org/apache/axis2/jaxbri/processor/ProcessorTest.java Mon Jun 25 19:26:58 2012 @@ -43,7 +43,6 @@ import org.apache.axis2.testutils.UtilSe import org.custommonkey.xmlunit.XMLAssert; import org.junit.AfterClass; import org.junit.BeforeClass; -import org.junit.Ignore; import org.junit.Test; import org.w3c.dom.Document; @@ -77,7 +76,6 @@ public class ProcessorTest { assertEquals("PROCESSED", reply.getReplyData()); } - @Ignore @Test public void testServiceClient() throws Exception { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); Modified: axis/axis2/java/core/trunk/modules/jaxbri/src/test/resources/org/apache/axis2/jaxbri/processor/response.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxbri/src/test/resources/org/apache/axis2/jaxbri/processor/response.xml?rev=1353707&r1=1353706&r2=1353707&view=diff ============================================================================== --- axis/axis2/java/core/trunk/modules/jaxbri/src/test/resources/org/apache/axis2/jaxbri/processor/response.xml (original) +++ axis/axis2/java/core/trunk/modules/jaxbri/src/test/resources/org/apache/axis2/jaxbri/processor/response.xml Mon Jun 25 19:26:58 2012 @@ -17,7 +17,4 @@ ~ specific language governing permissions and limitations ~ under the License. --> -<replyMessage xmlns="http://www.example.org/data"> - <replyID>00I64913.1</replyID> - <replyData>PROCESSED</replyData> -</replyMessage> \ No newline at end of file +<replyMessage xmlns="http://www.example.org/data"><replyID>00I64913.1</replyID><replyData>PROCESSED</replyData></replyMessage> \ No newline at end of file