[JBossWS] - Possible bug in handling of wsdl fault names
by pure
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
18 years, 6 months
[JBoss Seam] - Re: JBoss Seam is just a toy in front of the user using Spri
by bfo81
Well, I've been trying out the AppFuse framework which includes JSF+Spring+Hibernate before I started to use Seam. And it was a good decision to switch. Even the author of AppFuse, Matt Raible, says that Seam is great.
Of course, like everytime you start learning something from scratch, Seam sometimes makes you learn the hard way. But hey, developing web applications in J2EE never goes like reading, trying, adapting, finished. It's not a picnic ;). And learning Spring+Hibernate was - in my opinion - much more confusing.
Seam closes the gap between JSF and EJB3 (which is much easier than EJB2 was). JSF+Spring+Hibernate means a lot of glue code, but in Seam everything fits >seamlessly< together ;). Just have a look at the examples.
I believe Seam is the very next step in J2EE webapps and it will surely lead to some sort of official and standardized Java stuff (namely "web beans").
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3956937#3956937
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3956937
18 years, 6 months
[EJB 3.0] - NullPointerException in HelloWorld
by qbacomarch
Hi,
I'am using NetBeans5.5 Beta, and latest JBoss 4.0.4GA Patch1.
My problem is, when trying to run simple HelloWorld application I have NPE message.
What do I do wrong or what should I do more?
here is
enterprise bean class:
package hello;
import javax.ejb.Stateless;
@Stateless
public class HelloBean implements hello.HelloRemote {
public HelloBean() {}
public String komunikat() {
return "HelloWorld";
}
}
remote interface:
package hello;
import javax.ejb.Remote;
@Remote
public interface HelloRemote {
public String komunikat();
}
application client:
package hellojb;
import javax.annotation.EJB;
import hello.HelloRemote;
public class Main {
@EJB
private static HelloRemote bin;
public Main() {
}
public static void main(String[] args) {
System.out.println("HERE: " + bin.komunikat()); //<----this line makes exception
}
}
log:
Applicaton Deployed
Operation start started
run-deploy:
run-tool:
run-jar:
Exception in thread "main" java.lang.NullPointerException
at hellojb.Main.main(Main.java:35)
Java Result: 1
run-display-browser:
run:
BUILD SUCCESSFUL (total time: 1 second)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3956932#3956932
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3956932
18 years, 6 months