[JBossWS] - Problem with inheritance and JBossWS
by fambad
I have a problem with the new JBossWS-1.2.1.GA in JBoss 4.2.0.GA and inheritance.
To describe this problem first I have to describe my code structure:
For an example I have three classes (ClassA, ClassB and ClassC). ClassC inherits of ClassB and ClassB inherits of ClassA (ClassA --> ClassB --> ClassC). Now I have a webservice method that returns ClassB. In this method an instance of ClassC is being created and returned. This was not a problem in the former JBossWS version (and also in the other J2EE 4 styled webservices) but now in JBossWS 1.2 I only get returned an object of ClassB but I supposed to get an obejct of ClassC.
| public class ClassA {
| private String propA;
|
| // here setter and getter for propA
| ......
| }
|
| public class ClassB extends ClassA {
|
| private String propB;
| // here setter and getter for propB
| ......
| }
|
| public class ClassC extends ClassC {
| private String propC;
| // here setter and getter for propC
| ......
| }
|
| @WebService
| @SOAPBinding( style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED )
| public class MyWebService {
|
| @WebMethod()
| public ClassB getClassB() {
| ClassC classC = new ClassC();
| classC.setPropA("propA");
| return classC;
| }
|
| /**
| * --> this method is only used to publish ClassC otherwise it is not known
| * in this webservice
| */
| @WebMethod()
| public ClassC getClassC() {
| ClassC classC = new ClassC();
| classC.setPropA("propA");
| return classC;
| }
|
| }
|
| }
Now I call getClassB() and the result that I got is an object of ClassB and not of ClassC.
What can I do to get an object of ClassC. I also looked at the returned SOAP message and there you can see that only informations about the ClassB instance are submitted. In JBoss 4.0.5 (JBossWS1.0.3) the SOAP message contains the type of the returned object and all data are being submitted correctly.
I also tried the SOAP parameter style BARE but nothing changed. And whenI use RPC/Literal then I get an error in the .NET Client that an instance of ClassB was expected but got an instance of ClassC. I also tried it with a JAVA client but there was the same occurance.
Any help would be appreciated!
Marco.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4051611#4051611
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4051611
18Â years, 10Â months
[Installation, Configuration & Deployment] - Isolated EAR deployment and endorsed jars
by jardia
Hi
Currently trying to deploy two ears into jboss (they deploy fine in weblogic).
I have followed the steps on the wiki to ensure that i have two isolated deployments (ear-deployer, call-by-value, jbossweb etc).
One of the ears uses fop/batik to generate pdfs. In order for this to work, we have always had to upgrade the xml libraries in the jdk (by creating jre/lib/endorsed or using endorsed.dirs system property).
I've tried everything i can think of to get this working in JBoss but have so far failed. Here is what i've tried:
- put our new xml jars in jboss/lib/endorsed
- delete jboss/lib/endorsed and comment out in run.bat and create JAVA_HOME/jre/lib/endorsed and put the xml jars there
I always get the fop/batik error indicating wrong xml jar versions.
THE THING IS, if i turn of isolated deployments (ear-deployer) then it all works as expected (although i get all sorts of other errors because the ears are no longer isolated).
Question: do you expect what i'm trying to do to work?
Question: any ideas how to solve/workround the problem?
Cheers
Oliver
JBoss 4.2.0.GA
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4051610#4051610
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4051610
18Â years, 10Â months
[JBoss Portal] - Re: from hibernate to sybase
by Sonal K.
Hello,
Now I m getting Connection refused error.
Errors------
--- MBeans waiting for other MBeans ---
ObjectName: portal:service=Hibernate
State: FAILED
Reason: org.jboss.util.NestedSQLException: Could not create connection; - nest
ed throwable: (java.sql.SQLException: JZ006: Caught IOException: java.net.Connec
tException: Connection refused: connect); - nested throwable: (org.jboss.resourc
e.JBossResourceException: Could not create connection; - nested throwable: (java
.sql.SQLException: JZ006: Caught IOException: java.net.ConnectException: Connect
ion refused: connect))
I Depend On:
jboss.jca:name=PortalDS,service=DataSourceBinding
Depends On Me:
portal:service=Module,type=IdentityServiceController
ObjectName: portal:service=Hibernate,type=Instance
State: FAILED
Reason: org.jboss.util.NestedSQLException: Could not create connection; - nest
ed throwable: (java.sql.SQLException: JZ006: Caught IOException: java.net.Connec
tException: Connection refused: connect); - nested throwable: (org.jboss.resourc
e.JBossResourceException: Could not create connection; - nested throwable: (java
.sql.SQLException: JZ006: Caught IOException: java.net.ConnectException: Connect
ion refused: connect))
I Depend On:
jboss.jca:name=PortalDS,service=DataSourceBinding
Depends On Me:
portal:container=Instance
ObjectName: portal:service=Hibernate,type=PortalObject
State: FAILED
Reason: org.jboss.util.NestedSQLException: Could not create connection; - nest
ed throwable: (java.sql.SQLException: JZ006: Caught IOException: java.net.Connec
tException: Connection refused: connect); - nested throwable: (org.jboss.resourc
e.JBossResourceException: Could not create connection; - nested throwable: (java
.sql.SQLException: JZ006: Caught IOException: java.net.ConnectException: Connect
ion refused: connect))
I Depend On:
jboss.jca:name=PortalDS,service=DataSourceBinding
Depends On Me:
portal:container=PortalObject
ObjectName: portal:service=Hibernate,type=Portlet
State: FAILED
Reason: org.jboss.util.NestedSQLException: Could not create connection; - nest
ed throwable: (java.sql.SQLException: JZ006: Caught IOException: java.net.Connec
tException: Connection refused: connect); - nested throwable: (org.jboss.resourc
e.JBossResourceException: Could not create connection; - nested throwable: (java
.sql.SQLException: JZ006: Caught IOException: java.net.ConnectException: Connect
ion refused: connect))
I Depend On:
jboss.jca:name=PortalDS,service=DataSourceBinding
Depends On Me:
portal:service=PersistenceManager,type=Producer
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: portal:service=Hibernate
State: FAILED
Reason: org.jboss.util.NestedSQLException: Could not create connection; - nest
ed throwable: (java.sql.SQLException: JZ006: Caught IOException: java.net.Connec
tException: Connection refused: connect); - nested throwable: (org.jboss.resourc
e.JBossResourceException: Could not create connection; - nested throwable: (java
.sql.SQLException: JZ006: Caught IOException: java.net.ConnectException: Connect
ion refused: connect))
I Depend On:
jboss.jca:name=PortalDS,service=DataSourceBinding
Depends On Me:
portal:service=Module,type=IdentityServiceController
ObjectName: portal:service=Hibernate,type=PortalObject
State: FAILED
Reason: org.jboss.util.NestedSQLException: Could not create connection; - nest
ed throwable: (java.sql.SQLException: JZ006: Caught IOException: java.net.Connec
tException: Connection refused: connect); - nested throwable: (org.jboss.resourc
e.JBossResourceException: Could not create connection; - nested throwable: (java
.sql.SQLException: JZ006: Caught IOException: java.net.ConnectException: Connect
ion refused: connect))
I Depend On:
jboss.jca:name=PortalDS,service=DataSourceBinding
Depends On Me:
portal:container=PortalObject
ObjectName: portal:service=Hibernate,type=Portlet
State: FAILED
Reason: org.jboss.util.NestedSQLException: Could not create connection; - nest
ed throwable: (java.sql.SQLException: JZ006: Caught IOException: java.net.Connec
tException: Connection refused: connect); - nested throwable: (org.jboss.resourc
e.JBossResourceException: Could not create connection; - nested throwable: (java
.sql.SQLException: JZ006: Caught IOException: java.net.ConnectException: Connect
ion refused: connect))
I Depend On:
jboss.jca:name=PortalDS,service=DataSourceBinding
Depends On Me:
portal:service=PersistenceManager,type=Producer
ObjectName: portal:service=Hibernate,type=Instance
State: FAILED
Reason: org.jboss.util.NestedSQLException: Could not create connection; - nest
ed throwable: (java.sql.SQLException: JZ006: Caught IOException: java.net.Connec
tException: Connection refused: connect); - nested throwable: (org.jboss.resourc
e.JBossResourceException: Could not create connection; - nested throwable: (java
.sql.SQLException: JZ006: Caught IOException: java.net.ConnectException: Connect
ion refused: connect))
I Depend On:
jboss.jca:name=PortalDS,service=DataSourceBinding
Depends On Me:
portal:container=Instance
Why is that coming??
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4051608#4051608
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4051608
18Â years, 10Â months