[JBossWS] - JBossWS POJO register as JMS listener
by nheminge
Hi,
I am having problems implementing a web service POJO that also registers as a JMS listener. I need a web service to recieve updates from a JMS topic and maintain a stateful list of data that is then returned from the webservice when it is called.
I tried creating a topic connection and registering the web service POJO in the constructor (by doing recv.setMessageListener(this);). However, it does not seem to ever get invoked/registered correctly since it does not recieve messages from my test JMS publisher.
I have been reading and it seems that also I will have a problem because the POJO implementation means it might create a new instance on every invocation (thus clearing out my stateful java.util.list that I want maintained).
A better description of what I want to do:
I need to have java commandline application send JMS messages to the web service that include the IP/port of the server the commandline program is running on. The web service then needs to update a list of IP/ports internally (there will be many commandline programs sending out updates). Then, the web service needs to return a comma-delimited string of the IPs/ports when a method is invoked. However, I need this to run in a clustered/distributed fashion, so I need to have the web services listen on a topic for the IP/port updates, so that I make sure they are all synced up.
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4141951#4141951
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4141951
18 years
[JBossWS] - Web services client
by nikhilkshirsagar
Hi
I am new to web services.Recently I deployed a 'Say Hello' web service on jboss .The IDE I used was eclipse.
I also suceeded in developing the client by using stubs generated by jbossws.How ever when the client tries to call the web service I get an error.The stack trace is as follows
javax.xml.ws.WebServiceException: java.lang.UnsupportedOperationException: setProperty must be overridden by all subclasses of SOAPMessage
org.jboss.ws.core.jaxws.client.ClientImpl.handleRemoteException(ClientImpl.java:304)
org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:242)
org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:164)
org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
$Proxy144.sayHello(Unknown Source)
src.Callws.Call(Callws.java:17)
src.Client.doGet(Client.java:32)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
Can someone please tell me how to handle this error.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4141889#4141889
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4141889
18 years
[JBossWS] - Re: Date, Time and DateTime
by gquintana
JBoss WS has a problem the XMLGregorianCalendar, when it generates back the WSDL from Java objects, I get xsd:anySimpleType instead of xsd:dateTime.
I found a workaround (maybe not the best solution), I customized the JAXB binding to avoid the XMLGregorianCalendar:
<?xml version="1.0" encoding="utf-8"?>
| <bindings
| xmlns="http://java.sun.com/xml/ns/jaxb"
| xmlns:xsd="http://www.w3.org/2001/XMLSchema"
| version="2.0">
| <globalBindings>
| <javaType name="java.util.Calendar" xmlType="xsd:dateTime"
| parseMethod="javax.xml.bind.DatatypeConverter.parseDateTime"
| printMethod="javax.xml.bind.DatatypeConverter.printDateTime"/>
| <javaType name="java.util.Calendar" xmlType="xsd:date"
| parseMethod="javax.xml.bind.DatatypeConverter.parseDate"
| printMethod="javax.xml.bind.DatatypeConverter.printDate"/>
| <javaType name="java.util.Calendar" xmlType="xsd:time"
| parseMethod="javax.xml.bind.DatatypeConverter.parseTime"
| printMethod="javax.xml.bind.DatatypeConverter.printTime"/>
| </globalBindings>
| </binding>
|
With this, I get Calendar instead of an XMLGregorianCalendar.
However I still have the "Cannot close output stream" error from the RequestHandlerImpl. This is not related to the date/time problem.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4141640#4141640
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4141640
18 years