[JBossWS] - javax.xml.bind.annotation annotations all being ignored
by hitman_in_wis
Hi, my name is Brett, and my company is pretty new to java web services, but we need to use them to communicate between PowerBuilder and EJB3.
As far as I can tell, it looks like the annotations from the javax.xml.bind.annotation are being completely ignored in our deployed web services. Below is an example:
The web service class...
| package com.nsighttel.ejb.services.validation.creditcard;
|
| import java.io.Serializable;
|
| import javax.ejb.Stateless;
| import javax.jws.WebMethod;
| import javax.jws.WebParam;
| import javax.jws.WebService;
| import javax.jws.soap.SOAPBinding;
|
| import com.nsighttel.domain.MonthYearWS;
|
| @Stateless
| @WebService
| @SOAPBinding(style = SOAPBinding.Style.RPC, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
| public class CreditCardVerificationServiceWS implements Serializable {
| private static final long serialVersionUID = 1L;
|
| @WebMethod
| public int isValid(
| @WebParam(name = "cardExp")MonthYearWS cardExpWS
| ){
| return 1;
| }
|
| }
|
And the class for the WebParam...
| package com.nsighttel.domain;
|
| import java.io.Serializable;
| import javax.xml.bind.annotation.XmlAccessorType;
| import javax.xml.bind.annotation.XmlTransient;
| import javax.xml.bind.annotation.XmlAccessType;
|
| @XmlAccessorType(XmlAccessType.FIELD)
| public class MonthYearWS implements Serializable {
| private static final long serialVersionUID = 1L;
| private Boolean isNull;
| private Integer month;
| private Integer year;
| @XmlTransient private MonthYear obj;
|
|
| public MonthYearWS(Boolean isNull, Integer month, Integer year) {
| this.isNull = isNull;
| this.month = month;
| this.year = year;
| if (isNull == null || !isNull){
| obj = new MonthYear(month,year);
| }
| }
|
| public Boolean getIsNull() {
| return isNull;
| }
|
| public void setIsNull(Boolean isNull) {
| this.isNull = isNull;
| }
|
| public Integer getMonth() {
| return month;
| }
|
| public void setMonth(Integer month) {
| this.month = month;
| }
|
| public Integer getYear() {
| return year;
| }
|
| public void setYear(Integer year) {
| this.year = year;
| }
|
| @XmlTransient
| public MonthYear getObj(){
| return obj;
| }
|
| public void setObj(MonthYear obj){
| this.obj = obj;
| }
| }
|
No matter what annotations I use, I get isNull, month, year, and obj all in my WSDL file for the above web service. The @XmlTransient annotation on the getObj() function is not being honored, as I am still getting obj in the WSDL file. Furthermore, if I take away all of the public getter functions, then I get no elements in my WSDL file. Therefore, the @XmlAccessorType(XmlAccessType.FIELD) is not being honored either.
I have tried a few other annotations from the javax.xml.bind.annotation package, but none of them appear to be working either.
Could someone please clue me in to what I may be doing wrong? Does Jboss not support these annotations? Or maybe the annotations do not apply to web services?
Any help is greatly appreciated.
Thanks!
-Brett Birschbach
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3998406#3998406
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3998406
18 years, 2 months
[JBossWS] - Support for the
by saegeun
Hello,
I have a fairly critical question for our development team. We are working on a product that uses Microsoft's WS-* library: WSE 3.0 (I'm a long-time Java Dev, but recently have had to work on a .net project. What can you do...). Microsoft's library supports both the "http transport" for sending SOAP messages, and the "tcp transport." For those of you not aware of what the "tcp transport" is, if you set your WS-* library to use the TCP transport, you can create web services outside of a webserver. What happens is the web service will send and receive messages using the TCP protocol, instead of HTTP.
We are now checking the compatibility of using JbossWS with MS WSE 3.0. We will be using a JbossWS client to connect to MS WSE 3.0 server app using WS-Messaging and WS-Addressing. The compatibility of the two seems pretty close, but it doesn't seem like JbossWS supports the tcp transport. I checked around the documentation, the forum and the source itself and couldn't find anything (may have missed it). Does anyone know if it supports the TCP Transport?
Any help would be greatly appreciated! Thanks in advanced,
Peter
peter.joh.mrmx(a)gmail.com
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3998391#3998391
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3998391
18 years, 2 months
[JBossWS] - Pbs when consuming a Web Service with JBoss WS 1.0.3 and 1.0
by pguillot44
Hello everybody,
I'am trying to consume a web service I wrote - based on the samples provided with JBoss WS.
I'm using JBoss 4.0.4.GA with JDK 1.4.2_06 - we are using 1.4 because of some other third party software we are using which do not support 1.5 yet.
I have no problem with consuming the web service when the web service client and the web service implmentation share the Java source code of the service end point interface.
The case which is of interrest for us is to not have the service end point interface on the client side but rely on WSDL instead - we need to demonstrate that we are able to consume any web service, including the ones for which we don't have the source code of the service endpoint interface.
After installing JBoss WS 1.0.3 and JBoss XB 1.0.0.CR7, I have the following error when consuling the web service :
2007-01-05 17:12:33,406 ERROR [STDERR] [SEVERE] [DACC995A4FA18232BEA04A3CE9708A1D] [79d39d9f8f18bfd0b3f6f3bbd51d82f5] [LOG_EXCEPTION] [java.lang.NoSuchMethodError: org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding.setXopUnmarshaller(Lorg/jboss/xb/binding/sunday/xop/XOPUnmarshaller;)V
at org.jboss.ws.jaxb.JBossXBUnmarshallerImpl.unmarshal(JBossXBUnmarshallerImpl.java:60)
at org.jboss.ws.jaxrpc.encoding.JAXBDeserializer.deserialize(JAXBDeserializer.java:92)
at org.jboss.ws.soap.SOAPContentElement.getObjectValue(SOAPContentElement.java:235)
at org.jboss.ws.binding.EndpointInvocation.transformPayloadValue(EndpointInvocation.java:233)
at org.jboss.ws.binding.EndpointInvocation.getReturnValue(EndpointInvocation.java:182)
at org.jboss.ws.jaxrpc.CallImpl.syncOutputParams(CallImpl.java:873)
at org.jboss.ws.jaxrpc.CallImpl.invokeInternal(CallImpl.java:704)
at org.jboss.ws.jaxrpc.CallImpl.invoke(CallImpl.java:404)
at com.ecitiz.mairie.toulouse.ws.TarifCantineWSCall.Invoke(TarifCantineWSCall.java:97)
The web service is reached and compute the result, but then things are getting wrong.
The strange point is that I checked in the JBoss XB 1.0.0.CR7 source code that this method indeed exist ! I then double checked that I indeed put the right jar file in JBoss's "client" and "lib" directories.
I even resintalled JBoss and JBoss WS from scratch to make sure everything is clean - and rebuilt all my application items.
I then tried with JBoss WS 1.0.4 and JBoss XB 1.0.0.CR7 : I get another error : this time, I cannot even reach the web service because of this error :
2007-01-05 18:00:33,359 ERROR [STDERR] [SEVERE] Error while invoking Web Service:
org.jboss.ws.WSException: Cannot load service endpoint interface: com.ecitiz.mairie.toulouse.cantine.ws.tarif.TarifCantineContract
at org.jboss.ws.metadata.EndpointMetaData.getServiceEndpointInterface(EndpointMetaData.java:228)
at org.jboss.ws.metadata.EndpointMetaData.initializeInternal(EndpointMetaData.java:467)
at org.jboss.ws.metadata.EndpointMetaData.eagerInitialize(EndpointMetaData.java:454)
at org.jboss.ws.metadata.ServiceMetaData.eagerInitialize(ServiceMetaData.java:439)
at org.jboss.ws.metadata.UnifiedMetaData.eagerInitialize(UnifiedMetaData.java:183)
at org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaData(JSR109ClientMetaDataBuilder.java:132)
at org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaData(JSR109ClientMetaDataBuilder.java:85)
at org.jboss.ws.jaxrpc.ServiceImpl.(ServiceImpl.java:96)
at org.jboss.ws.jaxrpc.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:158)
at org.jboss.ws.jaxrpc.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:129)
at com.ecitiz.mairie.toulouse.ws.TarifCantineWSCall.Invoke(TarifCantineWSCall.java:85)
...
at java.lang.Thread.run(Thread.java:534)
Caused by: java.lang.ClassNotFoundException: com.ecitiz.mairie.toulouse.cantine.ws.tarif.TarifCantineContract
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
at org.jboss.ws.metadata.EndpointMetaData.getServiceEndpointInterface(EndpointMetaData.java:219)
... 50 more
I tried both installations several time and took care of the following :
- deleted jboss-4.0.4.GA\server\default\work\ content
- deleted jboss-4.0.4.GA\server\default\tmp\ content
- deleted jboss-4.0.4.GA\server\default\jbossws14.sar\ content
- unzipped jbossws-1.0.3.GA\lib\jboss-jdk1.4\jbossws14.sar in jboss-4.0.4.GA\server\default\jbossws14.sar\
- copied jbossws-1.0.3.GA\lib\jboss-jdk1.4\jbossws14-client.jar in JBoss' "client" directory
- copied jboss-xml-binding.jar - got it here : http://repository.jboss.com/jboss/jbossxb/1.0.0.CR7/lib/ - in JBoss's "client" and "lib" directories.
- deleted all the build produced items and rebuild the web service implementation and client app...
Note that I changed nothing in my projects when I moved from JBoss WS 1.0.3 to JBoss WS 1.0.4. I simply rebuild everything.
Now, I don't see what I can try next...
Do you see anything wrong in what I did ?
Thanks in advance for any hint you could provide me.
Kind regards,
Patrick Guillot
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3998325#3998325
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3998325
18 years, 2 months