[JBoss Web Services Users] - JAXB custom type mapping in JBossWS client not working quest
by joseph.miller
Hi, I hope someone on here can help with this one.
I'm trying to use JAXB to map xsd:date and xsd:time types in a WSDL I've been provided with, to a type more sensible than XMLGregorianCalendar, in my case Joda LocalTime and LocalDate types.
I have a binding xml file that looks like:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="2.0" targetNamespace="urn:DefaultNamespace">
| <xs:annotation >
| <xs:appinfo>
| <jaxb:globalBindings>
| <jaxb:javaType name="org.joda.time.LocalDate" xmlType="xs:date"
| parseMethod="bookit.util.DateTimeUtil.parseLocalDate"
| printMethod="bookit.util.DateTimeUtil.printLocalDate"/>
| <jaxb:javaType name="org.joda.time.LocalTime" xmlType="xs:time"
| parseMethod="bookit.util.DateTimeUtil.parseLocalTime"
| printMethod="bookit.util.DateTimeUtil.printLocalTime"/>
| </jaxb:globalBindings>
| </xs:appinfo>
| </xs:annotation>
| </xs:schema>
With my own parse/print static methods defined on my DateTimeUtil class.
I can successfully run the WSDL through wsimport, and this seems to generate the service interface with methods that look like:
@WebService(name = "AppointmentService", targetNamespace = "urn:DefaultNamespace")
| @SOAPBinding(style = SOAPBinding.Style.RPC)
| @XmlSeeAlso({
| ObjectFactory.class
| })
| public interface AppointmentService {
| ...
| @WebMethod(operationName = "GETAPPOINTMENTS")
| @WebResult(name = "GETAPPOINTMENTSReturn", partName = "GETAPPOINTMENTSReturn")
| public XsdAnyTypeArray getappointments(
| @WebParam(name = "ADVISER", partName = "ADVISER")
| String adviser,
| @XmlJavaTypeAdapter(Adapter1 .class)
| @WebParam(name = "STARTDATE", partName = "STARTDATE")
| LocalDate startdate,
| @XmlJavaTypeAdapter(Adapter1 .class)
| @WebParam(name = "ENDDATE", partName = "ENDDATE")
| LocalDate enddate);
| ...
| }
and the generated Adapter classes use my parse/print methods.
However, when I use this as a client, the adapters don't seem to be used, i.e. the SOAP request comes out looking like:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:DefaultNamespace">
| <soapenv:Header/>
| <soapenv:Body>
| <urn:GETAPPOINTMENTS>
| <ADVISER>myuser</ADVISER>
| <STARTDATE/>
| <ENDDATE/>
| </urn:GETAPPOINTMENTS>
| </soapenv:Body>
| </soapenv:Envelope>
Is there something else I need to be doing to make this work?
I'm currently using JDK6, Seam 2.1.2, and JBoss 4.2.2 (with the jboss-jaxws.jar etc in endorsed). I've also tried this on JBoss 5.0, but with the same result.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4260980#4260980
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4260980
16 years, 8 months
[JBoss Remoting Users] - Re: Messaging blocked by long time-out
by radimchatkalahari
Hi,
I was facing the same problem for a long time using
jboss-messaging 1.4.2GA-SP1 & jboss-remoting 2.2.2SP11
Yesterday I tried jboss-messaging 1.4.5GA together with
jboss-remoting 2.2.3SP1
but behavior was the same:
| 2009-10-19 03:27:53,687 ERROR [org.jboss.remoting.transport.socket.SocketClientInvoker] Got marshalling exception, exiting
| java.io.IOException: Connection reset by peer: socket write error
| ...and after 2 seconds
| 2009-10-19 03:27:55,687 WARN [org.jboss.messaging.core.impl.ChannelSupport] Queue[8724664/231/188656-y68h-xkppjy0g-1-655exx0g-xocyvy-2c3gs4] has reached maximum size, Reference[4166470286297938638]:NON-RELIABLE will be dropped
|
|
and after that communication works for a couple of seconds and then
ALL communication with ALL clients to/from jboss STOPPED
jboss log (with debug level) is after that time empty.
and thing gone even worst, because, when this occurred @ jbrem 2.2.2SP11
I just restarted jboss and all the clients reconnects correctly.
Using 2.2.3SP1 I had to restart ALL clients together with Jboss
(I tried left 2 clients with jbrem2.2.2SP11 and those ones reconnected automatically!)
my remoting-bisocket-service.xml @ jboss side looks like this
| ...
| <invoker transport="bisocket">
| <attribute name="stopLeaseOnFailure" isParam="true">true</attribute>
| <attribute name="clientLeasePeriod" isParam="true">10000</attribute>
| <attribute name="validatorPingPeriod" isParam="true">10000</attribute>
| <attribute name="validatorPingTimeout" isParam="true">5000</attribute>
| <attribute name="registerCallbackListener">false</attribute>
| <attribute name="timeout" isParam="true">0</attribute>
| <attribute name="numberOfRetries" isParam="true">10</attribute>
| <attribute name="JBM_clientMaxPoolSize" isParam="true">200</attribute>
| <attribute name="callbackTimeout">10000</attribute>
| </invoker>
| ...
|
do you have any suggestions how to solve this problem?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4260975#4260975
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4260975
16 years, 8 months