[jboss-user] [JBossWS] - Possible bug in handling of wsdl fault names

pure do-not-reply at jboss.com
Tue Jul 11 06:33:48 EDT 2006


When i try to generate code with wstools for the following wsdl file i get this problem:  The fault classes are generated as they should but when they are used in the _PortType the Fault suffix is removed. If i rename the Fault's in the wsdl file to something else it seems to work.

wsdl:

  | <?xml version="1.0" ?>
  | <definitions name="GS4Extension" 
  | 	targetNamespace="http://com.mtcrapmore.gs4extension"
  | 	xmlns:gs4extensionNS="http://com.mtcrapmore.gs4extension" 
  | 	xmlns="http://schemas.xmlsoap.org/wsdl/"
  | 	xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
  | 	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
  | 
  | 	<types>
  |         <schema targetNamespace="http://com.mtcrapmore.gs4extension"
  | 				xmlns:gs4extensionNS="http://com.mtcrapmore.gs4extension"
  | 				xmlns="http://www.w3.org/2001/XMLSchema">
  | 			
  | 		<!--
  | 			Define all the types of the protocol
  | 		-->
  | 			
  | 		<complexType name="GameRoundRequest">
  | 			<sequence>
  | 				<element name="sessionID"             type="xsd:long"    nillable="true" />
  | 				<element name="externalGameSessionID" type="xsd:string"  nillable="true" />
  | 			</sequence>
  | 		</complexType>
  | 			
  | 		<complexType name="GameRound">
  | 			<sequence>
  | 				<element name="gameRoundID"              type="xsd:string"   nillable="true" />
  |         		<element name="startTime"                type="xsd:string"   nillable="true" />
  |        			<element name="endTime"                  type="xsd:string"   nillable="true" />
  |         		<element name="totalBetAmount"           type="xsd:decimal"  nillable="false" />
  |         		<element name="totalWinAmount"           type="xsd:decimal"  nillable="false" />
  |         		<element name="totalOpeningBalance"      type="xsd:decimal"  nillable="false" />
  |         		<element name="totalClosingBalance"      type="xsd:decimal"  nillable="false" />
  |         		<element name="realMoneyOpeningBalance"  type="xsd:decimal"  nillable="false" />
  |         		<element name="realMoneyClosingBalance"  type="xsd:decimal"  nillable="false" />
  |         		<element name="bonusMoneyOpeningBalance" type="xsd:decimal"  nillable="false" />
  |         		<element name="bonusMoneyClosingBalance" type="xsd:decimal"  nillable="false" />
  | 			</sequence>
  | 		</complexType>
  | 
  | 		<complexType name="GameRoundList">
  | 			<sequence>
  | 				<element    name="gameRounds" 
  | 							type="gs4extensionNS:GameRound"  
  | 						    nillable="true" 
  | 						    minOccurs="0" maxOccurs="unbounded" />
  | 			</sequence>
  | 		</complexType>
  | 		
  | 		<complexType name="InvalidSessionFault">
  | 			<sequence>
  | 				<element name="message" type="xsd:string" nillable="true" />
  | 			</sequence>
  | 		</complexType>
  | 		
  | 		<complexType name="AccessFault">
  | 			<sequence>
  | 				<element name="message" type="xsd:string" nillable="true" />
  | 			</sequence>
  | 		</complexType>
  | 		
  | 		<complexType name="ArgumentFault">
  | 			<sequence>
  | 				<element name="message" type="xsd:string" nillable="true" />
  | 			</sequence>
  | 		</complexType>
  | 		
  | 		<complexType name="SystemFault">
  | 			<sequence>
  | 				<element name="message" type="xsd:string" nillable="true" />
  | 			</sequence>
  | 		</complexType>
  | 
  | 		<!--
  | 			Element declarations of each complex type
  | 		-->
  | 		
  | 		<element name="GameRoundRequest"     type="gs4extensionNS:GameRoundRequest" />
  | 		<element name="GameRoundList"        type="gs4extensionNS:GameRoundList" />
  | 		<element name="InvalidSessionFault"  type="gs4extensionNS:InvalidSessionFault" />
  | 		<element name="AccessFault"          type="gs4extensionNS:AccessFault" />
  | 		<element name="ArgumentFault"        type="gs4extensionNS:ArgumentFault" />
  | 		<element name="SystemFault"        type="gs4extensionNS:SystemFault" />
  | 	</schema>
  | 	</types>
  | 
  | 	<message name="GameRoundRequest"><part name="GameRoundRequest" element="gs4extensionNS:GameRoundRequest" /></message>
  | 	<message name="GameRoundList"><part name="GameRoundList" element="gs4extensionNS:GameRoundList" /></message>
  | 	
  | 	<message name="InvalidSessionFault">
  | 		<part name="InvalidSessionFault" element="gs4extensionNS:InvalidSessionFault" />
  | 	</message>
  | 	
  | 	<message name="AccessFault">
  | 		<part name="AccessFault" element="gs4extensionNS:AccessFault" />
  | 	</message>
  | 	
  | 	<message name="ArgumentFault">
  | 		<part name="ArgumentFault" element="gs4extensionNS:ArgumentFault" />
  | 	</message>
  | 	
  | 	<message name="SystemFault">
  | 		<part name="SystemFault" element="gs4extensionNS:SystemFault" />
  | 	</message>
  | 
  | 	<!--
  | 		The port section of the wsdl document.
  | 	-->
  | 	<portType name="GS4ExtensionPortType">
  |       
  | 		<operation name="GetGameRounds">
  | 			<input message="gs4extensionNS:GameRoundRequest" />
  | 			<output message="gs4extensionNS:GameRoundList" />
  | 			<fault name="InvalidSessionFault" message="gs4extensionNS:InvalidSessionFault" />
  | 			<fault name="AccessFault" message="gs4extensionNS:AccessFault" />
  | 			<fault name="ArgumentFault" message="gs4extensionNS:ArgumentFault" />
  | 			<fault name="SystemFault" message="gs4extensionNS:SystemFault" />
  | 		</operation>
  |       
  |     </portType>
  | 
  |     <binding name="GS4ExtensionBinding" type="gs4extensionNS:GS4ExtensionPortType">
  | 		
  |     	<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
  | 		
  | 		<operation name="GetGameRounds">
  | 			<soap:operation soapAction=""/> 
  | 			<input><soap:body use="literal" /></input>
  | 			<output><soap:body use="literal" /></output>
  | 			<fault name="InvalidSessionFault">
  |         		<soap:fault name="InvalidSessionFault" use="literal"/>
  |       		</fault>
  |       		<fault name="AccessFault">
  |         		<soap:fault name="AccessFault" use="literal"/>
  |       		</fault>
  |       		<fault name="ArgumentFault">
  |         		<soap:fault name="ArgumentFault" use="literal"/>
  |       		</fault>
  |       		<fault name="SystemFault">
  |         		<soap:fault name="SystemFault" use="literal"/>
  |       		</fault>
  | 		</operation>
  | 			
  |     </binding>
  | 
  |     <service name="GS4Extension">
  |       <port name="GS4ExtensionPort" binding="gs4extensionNS:GS4ExtensionBinding">
  |         <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
  |       </port>
  |     </service>
  |     
  | </definitions>
  | 

config:

  | <configuration>
  | 	<wsdl-java file="test.wsdl">
  | 		<mapping file="jaxrpc-mapping.xml" />
  | 	</wsdl-java>
  | </configuration>
  | 

Here is the code for the PortType  that is generated.. As you can see the exceptions do not end with Fault as stated in the WSDL file. The exception
classes that are generated does have the Fault suffix.

  | package com.mtcrapmore;
  | public interface  GS4Extension_PortType extends java.rmi.Remote
  | {
  | 
  |   public com.mtcrapmore.GameRoundList  getGameRounds(com.mtcrapmore.GameRoundRequest gameRoundRequest) throws com.mtcrapmore.Argument,com.mtcrapmore.InvalidSession,com.mtcrapmore.System,com.mtcrapmore.Access, java.rmi.RemoteException;
  | }
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3956939#3956939

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3956939



More information about the jboss-user mailing list