I compiled those code and run in eclipse:
run as --> run on server[jboss 5.1]
Now, i can see that the web service is deployed successfully and i can visit
http://127.0.0.1:8080/PolymorphismEJBWebService/EJBWebServiceBean?wsdl
I got the wsdl:
- http://ejbws.ybxiang.com/";
xmlns="http://sch
The client code:
Create a new java project WSClient.
Animal.java and Human.java are copied from server part.
package com.ybxiang.ejbws;
import javax.xml.bind.annotation.XmlSeeAlso;
@XmlSeeAlso({Human.class})
public class Animal implements java.io.Serializable{
private String name;
Printed result:
Server:
18:05:26,120 WARN [StatelessBeanContext] EJBTHREE-1337: do not get
WebServiceContext property from stateless bean context, it should already have
been injected
18:05:26,120 INFO [STDOUT] String is got:Test string
18:05:26,120 WARN [StatelessBeanContext] EJB
Obviously, the result is NOT what i want!!!
Please help me!!! I am really painfull now.
Thank you in advance!!! Please!!!
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4263895#4263895
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&
=sorry, i will rearrange the code by
|
|
|
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4263897#4263897
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4263897
__
package com.ybxiang.ejbws;
|
| import javax.xml.bind.annotation.XmlSeeAlso;
|
| @XmlSeeAlso({Human.class})
| public class Animal implements java.io.Serializable{
| private String name;
| private Long age;
| public String getName() {
| return name;
|
package com.ybxiang.ejbws;
|
| public class Human extends Animal implements java.io.Serializable{
| private String email;
|
| public void setEmail(String email) {
| this.email = email;
| }
|
| public String getEmail() {
| return email;
package com.ybxiang.ejbws;
|
| import java.util.ArrayList;
| import java.util.Iterator;
|
| import javax.jws.WebMethod;
|
| public interface EJBWebServiceInterface {
| public void passParameter1(String s);
| public void passParameter2(Animal a);
| public void p
below codes are for Client test
below codes are for Client test
below codes are for Client test
| /**
| * EJBWebServiceBean.java
| *
| * This file was auto-generated from WSDL
| * by the Apache Axis 1.4
== result from JBoss AS==
| 18:05:01,199 DEBUG [ManagerBase] Start expire sessions StandardManager at
1257329101199 sessioncount 0
| 18:05:01,199 DEBUG [ManagerBase] End expire sessions StandardManager
processingTime 0 expired sessions: 0
| 18:05:07,230 FINE [tcp]
18:05:26,151 INFO [STDOUT] ArrayList is got:
| 18:05:26,151 INFO [STDOUT] One Animal is got:Animal-->name:Animal.1,age:1
| 18:05:26,151 WARN [StatelessBeanContext] EJBTHREE-1337: do not get
WebServiceContext property from
| stateless bean context, it should already have been
Nobody know how to do???
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4263954#4263954
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4263954
___
jboss-user mailing list
jboss
I find that if jbossws-native is replaced by JBOssws-METRO, the same jar
works!!!
There must be something wrong with jbossws-native!
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4265771#4265771
Reply to the post :
http://www.jboss.org/index.html?module=bb&
"xiangyingbing" wrote : Dear JBoss developers,
| please give me an simple example about polymorphism webservice.
| Thanks!!! I DO need it.
Download native source distro.
I found these tests there:
| [/home/opalka][/home/opalka/svn/jbossws/framework/trunk/testsuite]>grep -r
XmlSeeAlso * |
14 matches
Mail list logo