[JBoss Web Services Users] - Jboss 4.0.0 web service client -
by ehognestad@gmail.com
I am developing a web service client to consume a web service that returns an Object not a String. When I make the webservice return a String it works perfectly, when I switch to a Object then it throws this exception:
org.xml.sax.SAXException: Deserializing parameter 'result': could not find deserializer for type {http://ericsson.webservice.ems.com.br/EricssonMockingWebService/types}SendResponse
at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:330)
at org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:1188)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:244)
at org.apache.axis.message.SOAPElementAxisImpl.publishToHandler(SOAPElementAxisImpl.java:1407)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:263)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:397)
at org.apache.axis.client.Call.invoke(Call.java:2652)
at org.apache.axis.client.Call.invoke(Call.java:2524)
at org.apache.axis.client.Call.invokeInternal(Call.java:1976)
at org.apache.axis.client.Call.invoke(Call.java:1917)
at org.jboss.webservice.client.CallImpl.invoke(CallImpl.java:175)
at org.apache.axis.client.AxisClientProxy.invoke(AxisClientProxy.java:251)
at $Proxy145.send(Unknown Source)
at br.com.ouvi.ems.gw.ericssonipx.ejb.EricssonIPXWebServiceHelperEJB.sendSms(EricssonIPXWebServiceHelperEJB.java:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:113)
at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:51)
at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:316)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:149)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:128)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
at org.jboss.ejb.Container.invoke(Container.java:854)
at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:413)
at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:82)
at $Proxy143.sendSms(Unknown Source)
My client looks like this.
public SendResponse sendSms(String smsMessage) throws WebserviceException {
SendResponse sendSmsResponse;
sendSmsResponse = null;
try {
System.out.println("Contacting webservice at http://localhost:8080/ws4ee/services/EricssonMockingWebService?wsdl");
URL url = new URL("http://localhost:8080/ws4ee/services/EricssonMockingWebService?wsdl");
QName qname = new QName("http://ericsson.webservice.ems.com.br",
"EricssonMockingWebService");
ServiceFactory factory = ServiceFactory.newInstance();
Service service = factory.createService(url, qname);
EricssonMockingWebServiceEndpoint endpoint = (EricssonMockingWebServiceEndpoint) service.getPort(EricssonMockingWebServiceEndpoint.class);
System.out.println("output:" + endpoint.send("blablabalblabl"));
} catch (Exception ex) {
logger.error("Exception doing sms request for IPX: " + ex.getMessage(), ex);
throw new WebserviceException(ex.getMessage(), ex);
}
return sendSmsResponse;
}
The exception is thrown from the line:
System.out.println("output:" + endpoint.send("blablabalblabl"));
I am guessing I am missing a deserializer class that is produced by the wstools, but I haven't been able to find out which yet.
Anybody experienced the same problem?
Best regards,
Eivind
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4263600#4263600
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4263600
15 years, 2 months
[JBoss Web Services Users] - Re: Why no forum for Resteasy
by traviskds
"bill.burke(a)jboss.com" wrote : Also, we have over 100+ pages of documentation. I don't know what exactly you mean by thin...
Bill, my apologies regarding the thin on doco comment. I guess I did not phrase it properly. What I was trying to convey was that you don't get user posts/replies that relate to issues rather than documentation of RE per say.
The docs on the framework itself is really great. Without any prior REST background, I was able to very quickly get it working with consumes and produces of xml, json,plain text and multipart . This is truly a very easy to use framework.
And yes, RE rocks. I first did a standalone application and then did one with Seam. Yesterday we had a code hackathon at my company and I did an application using SEAM/RE and it just rocks and was able to impress my fellow non SEAM/RE colleagues. So thanks a lot to Bill and his team/contributors. I hope RE will go from strength to strength.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4263592#4263592
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4263592
15 years, 2 months
[JBoss Web Services Users] - Re: Why no forum for Resteasy
by traviskds
Thanks Justin and Bill.
Will get on the mailing list. Its just that I have been using the JBoss forums and have done a lot of extensive searches before I post a question.
I guess I can refer to the mail list archives before I post any question. Not sure if it provides any search functionality. Maybe I need to look a bit more.
But may I suggest that you guys look at forums or at least presenting all the JBoss technology stack in a consistent fashion.
I work for a very large telco and I am one of the JBoss champions within the organizations and one of the issues we face when we come up against guys promoting commercial products such as the Oracle stack is that open source is fragmented and difficult to get information. This is true when you compare different open source frameworks from different communities but if you decide to go with one stack (as I advocate I.E. use the JBoss stack), then we need to have all the information presented/searchable via a common format. Most of JBoss technology is in the forums but a few like SEAM have their own forum and then now RestEasy does not even use a forum and prefer mailing lists.
I am not complaining as for me I will go where ever the information is available to get my job done so its not that much of an issue for me but when you look at the bigger picture, then can be an issue.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4263591#4263591
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4263591
15 years, 2 months
[JBoss Web Services Users] - javax.xml.rpc.soap.SOAPFaultException: does not contain oper
by gowri
Hi,
I am using JBOSS 5.1.0 GA as JBOSS App. server. I have created a simple webservice for getting string say "Hello". I could able to deploy the project as a war file and the generation of wsdl file is also fine.
When I run the client, I am getting this exception in the server side.
Pls. help me on this to find out where I am going wrong.
"javax.xml.rpc.soap.SOAPFaultException: Endpoint {http://com.apr/helloworld}HelloWorldWSPort does not contain operation meta data for: {http://apr.com/}sayHello"
jboss-esb.xml
| <?xml version = "1.0" encoding = "UTF-8"?>
| <jbossesb
| xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml...">
| <providers>
| <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
| <jms-bus busid="myChannel">
| <jms-message-filter dest-type="QUEUE"
| dest-name="queue/ESBTestQueue" />
| </jms-bus>
| <jms-bus busid="MyEsbAwareChannel">
| <jms-message-filter dest-type="QUEUE"
| dest-name="queue/ESBTestQueue_ESBAware" />
| </jms-bus>
| </jms-provider>
| <jbr-provider name="JBR-Http" protocol="http" host="localhost">
| <jbr-bus busid="Http-1" port="9001" />
| </jbr-provider>
|
| </providers>
| <services>
|
| <service category="MyCateg" name="wsservice" description="Webservice">
| <listeners>
| <jms-listener name="helloWorld" busidref="MyEsbAwareChannel" />
| <jbr-listener name="Http-Gateway" busidref="Http-1" is-gateway="true" />
| </listeners>
| <actions>
| <action name="JBossWSAdapter" class="org.jboss.soa.esb.actions.soap.SOAPProcessor">
| <property name="jbossws-endpoint" value="HelloWorldWS" />
| </action>
| </actions>
| </service>
|
|
| </services>
| </jbossesb>
|
HelloInterface.java
|
| package com.apr;
| import javax.jws.WebParam;
| import javax.jws.WebService;
| @WebService
| public interface HelloInterface {
|
| public String sayHello(@WebParam(name="message")String name);
| }
|
The implementation class
| package com.apr;
|
| import javax.jws.WebMethod;
| import javax.jws.WebParam;
| import javax.jws.WebService;
|
| @WebService(name = "HelloWorldWS", targetNamespace="http://com.apr/helloworld")
| public class HelloWorldWS implements HelloInterface {
|
| @WebMethod
| public String sayHello(@WebParam(name="message") String message) {
| System.out.println("Hello World. Message=" + message);
| return "Hello World - " + message;
|
| }
|
|
| }
|
wsdl file
| <?xml version="1.0" encoding="UTF-8"?>
| <definitions name="HelloWorldWSService" targetNamespace="http://com.apr/helloworld" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://com.apr/helloworld" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
| <types>
| <xs:schema targetNamespace="http://com.apr/helloworld" version="1.0" xmlns:tns="http://com.apr/helloworld" xmlns:xs="http://www.w3.org/2001/XMLSchema">
| <xs:element name="sayHello" type="tns:sayHello"/>
| <xs:element name="sayHelloResponse" type="tns:sayHelloResponse"/>
| <xs:complexType name="sayHello">
| <xs:sequence>
| <xs:element minOccurs="0" name="message" type="xs:string"/>
| </xs:sequence>
| </xs:complexType>
| <xs:complexType name="sayHelloResponse">
| <xs:sequence>
| <xs:element minOccurs="0" name="return" type="xs:string"/>
| </xs:sequence>
| </xs:complexType>
| </xs:schema>
| </types>
| <message name="HelloWorldWS_sayHello">
| <part name="sayHello" element="tns:sayHello">
| </part>
| </message>
| <message name="HelloWorldWS_sayHelloResponse">
| <part name="sayHelloResponse" element="tns:sayHelloResponse">
| </part>
| </message>
| <portType name="HelloWorldWS">
| <operation name="sayHello" parameterOrder="sayHello">
| <input message="tns:HelloWorldWS_sayHello">
| </input>
| <output message="tns:HelloWorldWS_sayHelloResponse">
| </output>
| </operation>
| </portType>
| <binding name="HelloWorldWSBinding" type="tns:HelloWorldWS">
| <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
| <operation name="sayHello">
| <soap:operation soapAction=""/>
| <input>
| <soap:body use="literal"/>
| </input>
| <output>
| <soap:body use="literal"/>
| </output>
| </operation>
| </binding>
| <service name="HelloWorldWSService">
| <port name="HelloWorldWSPort" binding="tns:HelloWorldWSBinding">
| <soap:address location="http://127.0.0.1:8080/MyWS/HelloWorldWS"/>
| </port>
| </service>
| </definitions>
|
|
|
web.xml
| <?xml version="1.0" encoding="UTF-8"?>
| <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
| <display-name>
| MyWS</display-name>
| <welcome-file-list>
| <welcome-file>index.html</welcome-file>
| <welcome-file>index.htm</welcome-file>
| <welcome-file>index.jsp</welcome-file>
| <welcome-file>default.html</welcome-file>
| <welcome-file>default.htm</welcome-file>
| <welcome-file>default.jsp</welcome-file>
| </welcome-file-list>
| <servlet>
| <servlet-name>HelloWorldWS</servlet-name>
| <servlet-class>com.apr.HelloWorldWS</servlet-class>
| </servlet>
|
| <servlet-mapping>
| <servlet-name>HelloWorldWS</servlet-name>
| <url-pattern>/HelloWorldWS</url-pattern>
| </servlet-mapping>
|
| </web-app>
|
Client Code:
| package com.apr;
|
| import org.apache.cxf.interceptor.LoggingInInterceptor;
| import org.apache.cxf.interceptor.LoggingOutInterceptor;
| import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
|
|
|
| public class Client {
| public static void main(String[] args) {
| JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
| factory.getInInterceptors().add(new LoggingInInterceptor());
| factory.getOutInterceptors().add(new LoggingOutInterceptor());
| factory.setServiceClass(HelloInterface.class);
| factory.setAddress("http://127.0.0.1:8080/MyWS/HelloWorldWS");
| HelloInterface client = (HelloInterface) factory.create();
|
| String reply = client.sayHello("Krishna");
| System.out.println("Server said: " + reply);
|
|
|
|
| }
| }
|
|
Exception from server log:
| 2009-11-02 11:10:49,052 INFO [org.jboss.wsf.framework.management.DefaultEndpointRegistry] (HDScanner) register: jboss.ws:context=MyWS,endpoint=HelloWorldWS
| 2009-11-02 11:10:49,161 INFO [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (HDScanner) deploy, ctxPath=/MyWS
| 2009-11-02 11:10:49,427 INFO [org.jboss.wsf.stack.jbws.WSDLFilePublisher] (HDScanner) WSDL published to: file:/D:/software/jboss-5.1.0.GA-jdk6/jboss-5.1.0.GA/server/default/data/wsdl/MyWS.war/HelloWorldWSService8985776581610665970.wsdl
| 2009-11-02 11:13:03,836 ERROR [org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS] (http-127.0.0.1-8080-1) SOAP request exception
| org.jboss.ws.core.CommonSOAPFaultException: Endpoint {http://com.apr/helloworld}HelloWorldWSPort does not contain operation meta data for: {http://apr.com/}sayHello
| at org.jboss.ws.core.server.ServiceEndpointInvoker.getDispatchDestination(ServiceEndpointInvoker.java:476)
| at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:178)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:474)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:295)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:205)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:131)
| at org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:85)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Unknown Source)
|
|
Thanks
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4263454#4263454
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4263454
15 years, 2 months