[jboss-svn-commits] JBossWS SVN: r854 - in branches/jbossws-1.0/src: main/java/org/jboss/ws/tools test/java/org/jboss/test/ws/tools/jbws_206/tests/UserException test/resources/tools/jbws-206/wscompileArtifacts/UserException/sei test/resources/tools/jbws-206/wscompileArtifacts/UserException/usertypes test/resources/tools/jbws-206/wsdlFixture/UserException

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Aug 30 05:48:55 EDT 2006


Author: darran.lofthouse at jboss.com
Date: 2006-08-30 05:48:48 -0400 (Wed, 30 Aug 2006)
New Revision: 854

Added:
   branches/jbossws-1.0/src/test/resources/tools/jbws-206/wscompileArtifacts/UserException/usertypes/AnonymousException.java
Modified:
   branches/jbossws-1.0/src/main/java/org/jboss/ws/tools/WSDLToJava.java
   branches/jbossws-1.0/src/test/java/org/jboss/test/ws/tools/jbws_206/tests/UserException/UserExceptionWSDL2JavaTestCase.java
   branches/jbossws-1.0/src/test/resources/tools/jbws-206/wscompileArtifacts/UserException/sei/UserExceptionSEI.java
   branches/jbossws-1.0/src/test/resources/tools/jbws-206/wsdlFixture/UserException/UserExceptionService_RPC_11.wsdl
Log:
JBWS-1151 - Fixing wsdl-java generation for fault using anonymous complexType.


Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/tools/WSDLToJava.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/tools/WSDLToJava.java	2006-08-29 05:09:25 UTC (rev 853)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/tools/WSDLToJava.java	2006-08-30 09:48:48 UTC (rev 854)
@@ -450,7 +450,7 @@
 
             Class cl = getJavaType(faultXMLType, false);
             if (cl == null)
-               buf.append(seiPkgName + "." + cleanUpFaultName(faultXMLType.getLocalPart()));
+               buf.append(seiPkgName + "." + cleanUpFaultName(faultXMLName.getLocalPart()));
             else
                buf.append( cl.getName());
             buf.append( "," );
@@ -616,6 +616,9 @@
             faultname = faultname.substring(0, index);
          }
       }
+      
+      faultname = utils.firstLetterUpperCase(faultname);
+      
       return faultname;
    }
 

Modified: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/tools/jbws_206/tests/UserException/UserExceptionWSDL2JavaTestCase.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/tools/jbws_206/tests/UserException/UserExceptionWSDL2JavaTestCase.java	2006-08-29 05:09:25 UTC (rev 853)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/tools/jbws_206/tests/UserException/UserExceptionWSDL2JavaTestCase.java	2006-08-30 09:48:48 UTC (rev 854)
@@ -54,5 +54,6 @@
    {  
       checkUserType( "CustomException.java");
       checkUserType( "MyException.java"); 
+      checkUserType( "AnonymousException.java");
    } 
 }

Modified: branches/jbossws-1.0/src/test/resources/tools/jbws-206/wscompileArtifacts/UserException/sei/UserExceptionSEI.java
===================================================================
--- branches/jbossws-1.0/src/test/resources/tools/jbws-206/wscompileArtifacts/UserException/sei/UserExceptionSEI.java	2006-08-29 05:09:25 UTC (rev 853)
+++ branches/jbossws-1.0/src/test/resources/tools/jbws-206/wscompileArtifacts/UserException/sei/UserExceptionSEI.java	2006-08-30 09:48:48 UTC (rev 854)
@@ -10,4 +10,6 @@
         org.jboss.test.webservice.userexception.CustomException,  java.rmi.RemoteException;
     public void testUserException(java.lang.String string_1) throws 
         org.jboss.test.webservice.userexception.MyException,  java.rmi.RemoteException;
+    public void testAnonymousException(java.lang.String string_1) throws 
+        org.jboss.test.webservice.userexception.AnonymousException,  java.rmi.RemoteException;
 }

Added: branches/jbossws-1.0/src/test/resources/tools/jbws-206/wscompileArtifacts/UserException/usertypes/AnonymousException.java
===================================================================
--- branches/jbossws-1.0/src/test/resources/tools/jbws-206/wscompileArtifacts/UserException/usertypes/AnonymousException.java	2006-08-29 05:09:25 UTC (rev 853)
+++ branches/jbossws-1.0/src/test/resources/tools/jbws-206/wscompileArtifacts/UserException/usertypes/AnonymousException.java	2006-08-30 09:48:48 UTC (rev 854)
@@ -0,0 +1,21 @@
+// This class was generated by the JAXRPC SI, do not edit.
+// Contents subject to change without notice.
+// JAX-RPC Standard Implementation (1.1.3, build R1)
+// Generated source version: 1.1.3
+
+package org.jboss.test.webservice.userexception;
+
+
+public class AnonymousException extends java.lang.Exception {
+    private java.lang.String message;
+    
+    
+    public AnonymousException(java.lang.String message) {
+        super(message);
+        this.message = message;
+    }
+    
+    public java.lang.String getMessage() {
+        return message;
+    }
+}


Property changes on: branches/jbossws-1.0/src/test/resources/tools/jbws-206/wscompileArtifacts/UserException/usertypes/AnonymousException.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Modified: branches/jbossws-1.0/src/test/resources/tools/jbws-206/wsdlFixture/UserException/UserExceptionService_RPC_11.wsdl
===================================================================
--- branches/jbossws-1.0/src/test/resources/tools/jbws-206/wsdlFixture/UserException/UserExceptionService_RPC_11.wsdl	2006-08-29 05:09:25 UTC (rev 853)
+++ branches/jbossws-1.0/src/test/resources/tools/jbws-206/wsdlFixture/UserException/UserExceptionService_RPC_11.wsdl	2006-08-30 09:48:48 UTC (rev 854)
@@ -24,6 +24,13 @@
 			</complexType>
 			<element name="CustomException" type="tns:CustomException" />
 			<element name="MyException" type="tns:MyException" />
+			<element name="anonymousException">
+				<complexType>
+					<sequence>
+						<element type="string" name="message"/>
+					</sequence>
+				</complexType>
+			</element>
 		</schema>
 	</types>
 	<message name="UserExceptionSEI_testCustomException" />
@@ -38,6 +45,13 @@
 	<message name="MyException">
 		<part name="MyException" element="ns2:MyException" />
 	</message>
+	<message name="UserExceptionSEI_testAnonymousException">
+		<part name="String_1" type="xsd:string" />
+	</message>
+      <message name="UserExceptionSEI_testAnonymousExceptionResponse" />
+      <message name="AnonymousException">
+            <part name="AnonymousException" element="ns2:anonymousException"/>
+      </message>
 	<portType name="UserExceptionSEI">
 		<operation name="testCustomException">
 			<input message="tns:UserExceptionSEI_testCustomException" />
@@ -51,6 +65,12 @@
 				message="tns:UserExceptionSEI_testUserExceptionResponse" />
 			<fault name="MyException" message="tns:MyException" />
 		</operation>
+		<operation name="testAnonymousException" parameterOrder="String_1">
+			<input message="tns:UserExceptionSEI_testAnonymousException" />
+			<output
+				message="tns:UserExceptionSEI_testAnonymousExceptionResponse" />
+			<fault name="AnonymousException" message="tns:AnonymousException" />
+		</operation>
 	</portType>
 	<binding name="UserExceptionSEIBinding"
 		type="tns:UserExceptionSEI">
@@ -84,6 +104,20 @@
 				<soap:fault name="MyException" use="literal" />
 			</fault>
 		</operation>
+		<operation name="testAnonymousException">
+			<soap:operation soapAction="" />
+			<input>
+				<soap:body use="literal"
+					namespace="http://org.jboss.ws" />
+			</input>
+			<output>
+				<soap:body use="literal"
+					namespace="http://org.jboss.ws" />
+			</output>
+			<fault name="AnonymousException">
+				<soap:fault name="AnonymousException" use="literal" />
+			</fault>
+		</operation>
 	</binding>
 	<service name="UserExceptionService">
 		<port name="UserExceptionSEIPort"




More information about the jboss-svn-commits mailing list