[JBossWS] - No way to write a working client
by GenesisD
Hi all,
I'm going crazy!!!!!
I'm trying to write a f***ing client for a web service using:
jboss-4.0.5GA
jbossws-1.2.1.GA
the service I deployed is the "jax-ws/WebResult" of jbossws-samples-1.2.1.GA/jbossws-samples-1.2.1.GA" I downloaded for your site.
The service results correctly deployed.
NOW, instead of using the non-sense client tomas diesler wrote to consume that damned service, I tryied to write another one, more simple.
The client I wrote is:
| import java.net.URL;
|
| import javax.xml.namespace.QName;
|
| import org.jboss.test.ws.jaxws.samples.webresult.CustomerRecord;
| import org.jboss.test.ws.jaxws.samples.webresult.CustomerService;
| import org.jboss.test.ws.jaxws.samples.webresult.USAddress;
|
| public class Client {
| public static void main(String[] args) throws Exception {
| System.out.println("Start");
|
| javax.xml.ws.Service factoryTest = javax.xml.ws.Service.create(new URL("http://sviluppo-013:8080/jaxws-samples-webresult?wsdl"),
| new QName("http://webresult.samples.jaxws.ws.test.jboss.org/", "CustomerServiceImplService"));
| CustomerService proxyTest = (CustomerService)factoryTest.getPort(CustomerService.class);
| CustomerRecord ritorno = (CustomerRecord)proxyTest.locateCustomer("nome","cognome", new USAddress());
| System.out.println("ritorno del secondo servizio "+ritorno.getFirstName());
| }
| }
is some one able to tell me if it is correct or not?
the error that running this f***ing client shows is:
| Start
| Exception in thread "main" javax.xml.ws.WebServiceException: java.lang.NoSuchMethodError: org.jboss.ws.core.utils.JBossWSEntityResolver.getEntityMap()Ljava/util/Map;
| at javax.xml.ws.Service.create(Service.java:731)
| at uk.co.regdeveloper.webservice.Client.main(Client.java:35)
| Caused by: java.lang.NoSuchMethodError: org.jboss.ws.core.utils.JBossWSEntityResolver.getEntityMap()Ljava/util/Map;
| at org.jboss.ws.tools.JavaToXSD.resolveNamespaceURI(JavaToXSD.java:211)
| at org.jboss.ws.tools.JavaToXSD.parseSchema(JavaToXSD.java:172)
| at org.jboss.ws.tools.wsdl.WSDL11Reader.processTypes(WSDL11Reader.java:271)
| at org.jboss.ws.tools.wsdl.WSDL11Reader.processDefinition(WSDL11Reader.java:158)
| at org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:131)
| at org.jboss.ws.metadata.umdm.ServiceMetaData.getWsdlDefinitions(ServiceMetaData.java:321)
| at org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder.buildMetaData(JAXWSClientMetaDataBuilder.java:83)
| at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.<init>(ServiceDelegateImpl.java:140)
| at org.jboss.ws.core.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:61)
| at javax.xml.ws.Service.<init>(Service.java:83)
| at org.jboss.ws.core.jaxws.client.ServiceExt.<init>(ServiceExt.java:60)
| at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
| at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
| at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
| at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
| at javax.xml.ws.Service.create(Service.java:726)
| ... 1 more
|
What the hell does it means??????
I know well that org.jboss.ws.core.utils.JBossWSEntityResolver class has not that method... so WHY my client tryes to call it?
I read thousands of examples...hundreds of books and documantation, but I was not able to write a damned client for a very simple web service.
So I'm so sorry for my words, but I'm going crazy!!!!
Plz help me: in name of my mental health!!!!!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4063940#4063940
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4063940
19Â years
[JBoss jBPM] - Re: conditional transition behavior
by ricardomarques
Ok this is getting a weird behavior.
If u use decision node like this:
| <decision name="decisao">
| <transition name="repetir" to="decidir o destinatario">
| #{ contextInstance.variables.decisao == 'sim' }
| </transition>
| <transition name="fim" to="end">
| #{ contextInstance.variables.decisao == 'nao' }
| </transition>
| </decision>
|
It follow always the transition "repetir"
I tried to change the order to see if the problem continues, the definition stays like this:
| <decision name="decisao">
| <transition name="fim" to="end">
| #{ contextInstance.variables.decisao == 'nao' }
| </transition>
| <transition name="repetir" to="decidir o destinatario">
| #{ contextInstance.variables.decisao == 'sim' }
| </transition>
| </decision>
|
And on this case whatever the value of "decisao" the application breaks with a linkage error.
Any idea?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4063935#4063935
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4063935
19Â years
[Persistence, JBoss/CMP, Hibernate, Database] - mappedBy and inheritance
by denpet
I have a problem with extending entity classes and OneToMany relations.
(The problem is not the same as http://jboss.com/index.html?module=bb&op=viewtopic&t=111688)
My superclass, Inventory, has a column, station, which is used to map a relation with the Station entity
| public class Station implements Serializable {
| @OneToMany(cascade = ALL, mappedBy = "station")
| private Set<InventoryType1> inventory1 = new HashSet<InventoryType1>(0);
| }
|
| public class Inventory implements Serializable {
| /** Station */
| @ManyToOne
| @JoinColumn(name = "station_id")
| private Station station;
| }
|
| public class InventoryType1 extends Inventory implements Serializable {
| }
|
This fails with a
anonymous wrote : org.hibernate.AnnotationException: mappedBy reference an unknown target entity property: Inventory1.station in Station.inventory1
As Inventory1 has no station column. In my opinion is has, as it inherits the columns of Inventory.
I could probably work around this by moving the station_id to each sub entity, but it really belongs in the super class as it's common for all Inventory types.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4063933#4063933
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4063933
19Â years
[JNDI/Naming/Network] - NPE in java.io.ObjectStreamClass.getClassSignature on lookup
by ron.piterman
Hi,
I am trying to get jndi lookup to work and have the following exception on the lookup:
java.lang.NullPointerException:
| at java.io.ObjectStreamClass.getClassSignature(ObjectStreamClass.java:1402)
| at java.io.ObjectStreamField.<init>(ObjectStreamField.java:119)
| at java.io.ObjectStreamClass.getDefaultSerialFields(ObjectStreamClass.java:1568)
| at java.io.ObjectStreamClass.getSerialFields(ObjectStreamClass.java:1484)
| at java.io.ObjectStreamClass.access$800(ObjectStreamClass.java:52)
| at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:410)
| at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:400)
| at java.io.ObjectStreamClass.lookup0(ObjectStreamClass.java:297)
| at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java)
| at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:531)
| at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1552)
| at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
| at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1552)
| at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
| at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1552)
| at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
| at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
| at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
| at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
| at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
| at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
| at java.rmi.MarshalledObject.get(MarshalledObject.java:135)
| at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:72)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:652)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
I use jboss 4.0.5-GA with BEA JRockit 1.5.0_08
On the client classpath are
javassist 3.3
jboss-ejb3-client 4.0.5-GA
jbossall-client 4.0.5-GA
I could not find anything similar in google or in this forum -
The session bean I am trying to access :
@Stateless()
| @Remote( TestSession.class )
| public class TestSessionImpl implements TestSession {
| public String test() {
| return "hello";
| }
| }
and the remote interface:
public interface TestSession {
| public String test();
| }
these are deployed as a single ejb3-jar in the deploy directory of jboss.
using the jmx console I can see the session-bean bound in the jndiview.
Any idees ?
Cheers,
Ron
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4063930#4063930
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4063930
19Â years