cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r551524 - in /incubator/cxf/trunk: rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/ rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/ to...
Date Thu, 28 Jun 2007 10:11:40 GMT
Author: ema
Date: Thu Jun 28 03:11:39 2007
New Revision: 551524

URL: http://svn.apache.org/viewvc?view=rev&rev=551524
Log:
Fixed issue CXF-751, corrected the fault element and message element when a exception specified
the WebFault annotation

Modified:
    incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
    incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/hello_soap12.wsdl
    incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/hello_world_fault_expected.wsdl
    incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/my_hello_soap12.wsdl
    incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_hello_world_doc_lit.wsdl

Modified: incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java?view=diff&rev=551524&r1=551523&r2=551524
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
(original)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
Thu Jun 28 03:11:39 2007
@@ -77,7 +77,8 @@
         JaxBeanInfo<?> beanInfo = context.getBeanInfo(clazz);
         if (beanInfo == null) {
             if (Exception.class.isAssignableFrom(clazz)) {
-                QName name = part.getMessageInfo().getName();
+                QName name = (QName)part.getMessageInfo().getProperty("elementName");
+                System.out.println("---name --- " + name);
                 part.setElementQName(name);
                 buildExceptionType(part, clazz);
             }
@@ -184,8 +185,8 @@
         MessagePartInfo part = fault.getMessageParts().get(0); 
         Class<?> cls = part.getTypeClass();
         Class<?> cl2 = (Class)fault.getProperty(Class.class.getName());
-        if (cls != cl2) {
-            QName name = fault.getFaultName();
+        if (cls != cl2) {            
+            QName name = (QName)fault.getProperty("elementName");
             part.setElementQName(name);           
             JaxBeanInfo<?> beanInfo = context.getBeanInfo(cls);
             SchemaInfo schemaInfo = null;

Modified: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?view=diff&rev=551524&r1=551523&r2=551524
==============================================================================
--- incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
(original)
+++ incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
Thu Jun 28 03:11:39 2007
@@ -1080,9 +1080,10 @@
         }
 
         QName faultName = getFaultName(service, op, exClass, beanClass);
-        FaultInfo fi = op.addFault(faultName, 
-                                   new QName(op.getName().getNamespaceURI(), faultName.getLocalPart()));
+        FaultInfo fi = op.addFault(new QName(op.getName().getNamespaceURI(), exClass.getSimpleName()),
+                                   new QName(op.getName().getNamespaceURI(), exClass.getSimpleName()));
         fi.setProperty(Class.class.getName(), exClass);
+        fi.setProperty("elementName", faultName);
         MessagePartInfo mpi = fi.addMessagePart(new QName(faultName.getNamespaceURI(), "fault"));
         mpi.setTypeClass(beanClass);
         return fi;

Modified: incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/hello_soap12.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/hello_soap12.wsdl?view=diff&rev=551524&r1=551523&r2=551524
==============================================================================
--- incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/hello_soap12.wsdl
(original)
+++ incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/hello_soap12.wsdl
Thu Jun 28 03:11:39 2007
@@ -54,7 +54,7 @@
     <wsdl:part name="parameters" element="ns2:sayHiResponse">
     </wsdl:part>
   </wsdl:message>
-  <wsdl:message name="faultDetail">
+  <wsdl:message name="PingMeFault">
     <wsdl:part name="fault" element="ns2:faultDetail">
     </wsdl:part>
   </wsdl:message>
@@ -78,7 +78,7 @@
     </wsdl:input>
       <wsdl:output name="pingMeResponse" message="ns1:pingMeResponse">
     </wsdl:output>
-      <wsdl:fault name="faultDetail" message="ns1:faultDetail">
+      <wsdl:fault name="PingMeFault" message="ns1:PingMeFault">
     </wsdl:fault>
     </wsdl:operation>
   </wsdl:portType>
@@ -101,8 +101,8 @@
       <wsdl:output name="pingMeResponse">
         <soap12:body use="literal"/>
       </wsdl:output>
-      <wsdl:fault name="faultDetail">
-        <soap12:fault name="faultDetail" use="literal"/>
+      <wsdl:fault name="PingMeFault">
+        <soap12:fault name="PingMeFault" use="literal"/>
       </wsdl:fault>
     </wsdl:operation>
   </wsdl:binding>

Modified: incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/hello_world_fault_expected.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/hello_world_fault_expected.wsdl?view=diff&rev=551524&r1=551523&r2=551524
==============================================================================
--- incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/hello_world_fault_expected.wsdl
(original)
+++ incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/hello_world_fault_expected.wsdl
Thu Jun 28 03:11:39 2007
@@ -66,7 +66,7 @@
 </xs:complexType>
 </xs:schema>
   </wsdl:types>
-  <wsdl:message name="BadRecordLit">
+  <wsdl:message name="BadRecordLitFault">
     <wsdl:part name="fault" element="ns2:BadRecordLit">
     </wsdl:part>
   </wsdl:message>
@@ -82,7 +82,7 @@
     <wsdl:part name="parameters" element="ns2:testDocLitFaultResponse">
     </wsdl:part>
   </wsdl:message>
-  <wsdl:message name="NoSuchCodeLit">
+  <wsdl:message name="NoSuchCodeLitFault">
     <wsdl:part name="fault" element="ns2:NoSuchCodeLit">
     </wsdl:part>
   </wsdl:message>
@@ -96,7 +96,7 @@
     </wsdl:input>
       <wsdl:output name="greetMeResponse" message="ns1:greetMeResponse">
     </wsdl:output>
-      <wsdl:fault name="NoSuchCodeLit" message="ns1:NoSuchCodeLit">
+      <wsdl:fault name="NoSuchCodeLitFault" message="ns1:NoSuchCodeLitFault">
     </wsdl:fault>
     </wsdl:operation>
     <wsdl:operation name="testDocLitFault">
@@ -104,9 +104,9 @@
     </wsdl:input>
       <wsdl:output name="testDocLitFaultResponse" message="ns1:testDocLitFaultResponse">
     </wsdl:output>
-      <wsdl:fault name="NoSuchCodeLit" message="ns1:NoSuchCodeLit">
+      <wsdl:fault name="NoSuchCodeLitFault" message="ns1:NoSuchCodeLitFault">
     </wsdl:fault>
-      <wsdl:fault name="BadRecordLit" message="ns1:BadRecordLit">
+      <wsdl:fault name="BadRecordLitFault" message="ns1:BadRecordLitFault">
     </wsdl:fault>
     </wsdl:operation>
   </wsdl:portType>
@@ -120,8 +120,8 @@
       <wsdl:output name="greetMeResponse">
         <soap:body use="literal"/>
       </wsdl:output>
-      <wsdl:fault name="NoSuchCodeLit">
-        <soap:fault name="NoSuchCodeLit" use="literal"/>
+      <wsdl:fault name="NoSuchCodeLitFault">
+        <soap:fault name="NoSuchCodeLitFault" use="literal"/>
       </wsdl:fault>
     </wsdl:operation>
     <wsdl:operation name="testDocLitFault">
@@ -132,11 +132,11 @@
       <wsdl:output name="testDocLitFaultResponse">
         <soap:body use="literal"/>
       </wsdl:output>
-      <wsdl:fault name="NoSuchCodeLit">
-        <soap:fault name="NoSuchCodeLit" use="literal"/>
+      <wsdl:fault name="NoSuchCodeLitFault">
+        <soap:fault name="NoSuchCodeLitFault" use="literal"/>
       </wsdl:fault>
-      <wsdl:fault name="BadRecordLit">
-        <soap:fault name="BadRecordLit" use="literal"/>
+      <wsdl:fault name="BadRecordLitFault">
+        <soap:fault name="BadRecordLitFault" use="literal"/>
       </wsdl:fault>
     </wsdl:operation>
   </wsdl:binding>

Modified: incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/my_hello_soap12.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/my_hello_soap12.wsdl?view=diff&rev=551524&r1=551523&r2=551524
==============================================================================
--- incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/my_hello_soap12.wsdl
(original)
+++ incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/my_hello_soap12.wsdl
Thu Jun 28 03:11:39 2007
@@ -54,7 +54,7 @@
     <wsdl:part name="parameters" element="ns2:sayHiResponse">
     </wsdl:part>
   </wsdl:message>
-  <wsdl:message name="faultDetail">
+  <wsdl:message name="PingMeFault">
     <wsdl:part name="fault" element="ns2:faultDetail">
     </wsdl:part>
   </wsdl:message>
@@ -78,7 +78,7 @@
     </wsdl:input>
       <wsdl:output name="pingMeResponse" message="ns1:pingMeResponse">
     </wsdl:output>
-      <wsdl:fault name="faultDetail" message="ns1:faultDetail">
+      <wsdl:fault name="PingMeFault" message="ns1:PingMeFault">
     </wsdl:fault>
     </wsdl:operation>
   </wsdl:portType>
@@ -101,8 +101,8 @@
       <wsdl:output name="pingMeResponse">
         <soap12:body use="literal"/>
       </wsdl:output>
-      <wsdl:fault name="faultDetail">
-        <soap12:fault name="faultDetail" use="literal"/>
+      <wsdl:fault name="PingMeFault">
+        <soap12:fault name="PingMeFault" use="literal"/>
       </wsdl:fault>
     </wsdl:operation>
   </wsdl:binding>

Modified: incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_hello_world_doc_lit.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_hello_world_doc_lit.wsdl?view=diff&rev=551524&r1=551523&r2=551524
==============================================================================
--- incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_hello_world_doc_lit.wsdl
(original)
+++ incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_hello_world_doc_lit.wsdl
Thu Jun 28 03:11:39 2007
@@ -67,7 +67,7 @@
 </xs:element>
 </xs:schema>
   </wsdl:types>
-  <wsdl:message name="faultDetail">
+  <wsdl:message name="PingMeFault">
     <wsdl:part name="fault" element="ns2:faultDetail">
     </wsdl:part>
   </wsdl:message>
@@ -121,7 +121,7 @@
     </wsdl:input>
       <wsdl:output name="pingMeResponse" message="ns1:pingMeResponse">
     </wsdl:output>
-      <wsdl:fault name="faultDetail" message="ns1:faultDetail">
+      <wsdl:fault name="PingMeFault" message="ns1:PingMeFault">
     </wsdl:fault>
     </wsdl:operation>
   </wsdl:portType>
@@ -159,8 +159,8 @@
       <wsdl:output name="pingMeResponse">
         <soap:body use="literal"/>
       </wsdl:output>
-      <wsdl:fault name="faultDetail">
-        <soap:fault name="faultDetail" use="literal"/>
+      <wsdl:fault name="PingMeFault">
+        <soap:fault name="PingMeFault" use="literal"/>
       </wsdl:fault>
     </wsdl:operation>
   </wsdl:binding>



Mime
View raw message