From a8f36d58ded415de42f604c772eaee51508e19f7 Mon Sep 17 00:00:00 2001 From: nash Date: Thu, 18 Nov 2010 17:06:10 +0000 Subject: TUSCANY-3778: Fix WSDL generation and enable commented out tests git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1036533 13f79535-47bb-0310-9956-ffa450edef68 --- .../wsdlgen/src/test/java/helloworld/HttpTransportTestCase.java | 5 ++--- .../tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/sca-java-1.x/trunk/itest/wsdlgen/src/test/java/helloworld/HttpTransportTestCase.java b/sca-java-1.x/trunk/itest/wsdlgen/src/test/java/helloworld/HttpTransportTestCase.java index 8d1694d1d7..f18ded00dd 100644 --- a/sca-java-1.x/trunk/itest/wsdlgen/src/test/java/helloworld/HttpTransportTestCase.java +++ b/sca-java-1.x/trunk/itest/wsdlgen/src/test/java/helloworld/HttpTransportTestCase.java @@ -108,9 +108,9 @@ public class HttpTransportTestCase{ abean.setField3(bbean); assertEquals("Hello 3 4 1 2", wsProxy.getGreetingsDBean(abean)); -/* TUSCANY-3778 + String byteArrayString = "Hello World"; - assertEquals(byteArrayString, String.valueOf(wsProxy.getGreetingsByteArray(byteArrayString.getBytes()))); + assertEquals(byteArrayString, new String(wsProxy.getGreetingsByteArray(byteArrayString.getBytes()))); try { wsProxy.getGreetingsException("Fred"); @@ -118,7 +118,6 @@ public class HttpTransportTestCase{ } catch(Exception ex) { } -*/ } @Test diff --git a/sca-java-1.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java b/sca-java-1.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java index 4eb8a47752..c5dc4a833d 100644 --- a/sca-java-1.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java +++ b/sca-java-1.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java @@ -979,7 +979,7 @@ public class Interface2WSDLGenerator { Message faultMsg = definition.getMessage(faultName); if (faultMsg == null) { faultMsg = definition.createMessage(); - faultMsg.setQName(faultName); + faultMsg.setQName(new QName(namespaceURI, faultName.getLocalPart())); faultMsg.setUndefined(false); definition.addMessage(faultMsg); faultMsg.addPart(generatePart(definition, faultType.getLogical(), faultName.getLocalPart())); @@ -1107,7 +1107,7 @@ public class Interface2WSDLGenerator { } helpers.put(db, helper); } - TypeInfo typeInfo = helper.getTypeInfo(javaType.isArray() ? javaType.getComponentType() : javaType, + TypeInfo typeInfo = helper.getTypeInfo(byte[].class != javaType && javaType.isArray() ? javaType.getComponentType() : javaType, dataType.getLogical()); ElementInfo element = new ElementInfo(name, typeInfo); element.setMany(byte[].class != javaType && javaType.isArray()); -- cgit v1.2.3