[JBossWS] - javax.xml.rpc.JAXRPCException: Cannot create or send respons
by rashmi_yes
Hi,
i am new to webservice. I tried to create a web service with a single method & called from client. It works fine. But when I add one more webservice method & called the first method from the client. The call goes to server works till the return but while returning, it throws the below error. Please help me on this.
WS Code is :
@Stateless()
@WebService()
public class REFactory {
/**
* Web service operation
*/
@WebMethod
public String display(@WebParam(name = "s") String s) {
// TODO implement operation
System.out.println("In method 1 :::: "+s);
return "From method 1";
}
/**
* Web service operation
*/
@WebMethod
public String createSession(@WebParam(name = "vo") Object vo) {
System.out.println("In method 2 ...........");
return "From method 2";
}
}
Error is :
18:02:26,791 ERROR [SOAPFaultExceptionHelper] SOAP request exception
javax.xml.rpc.JAXRPCException: Cannot create or send response message
at org.jboss.ws.server.ServiceEndpoint.postProcessResponse(ServiceEndpoint.java:311)
at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:236)
at org.jboss.ws.server.ServiceEndpointServlet.doPost(ServiceEndpointServlet.java:120)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.jboss.xb.binding.JBossXBRuntimeException: Neither getter nor field where found for defaultAssertionStatus in class java.lang.ClassLoader
at org.jboss.xb.binding.MappingObjectModelProvider$FieldToElementMapping.(MappingObjectModelProvider.java:368)
at org.jboss.xb.binding.MappingObjectModelProvider.mapFieldToElement(MappingObjectModelProvider.java:71)
at org.jboss.ws.jaxb.JAXBMarshallerImpl.marshal(JAXBMarshallerImpl.java:149)
at org.jboss.ws.jaxrpc.encoding.JAXBSerializer.serialize(JAXBSerializer.java:100)
at org.jboss.ws.soap.SOAPContentElement.getXMLFragment(SOAPContentElement.java:172)
at org.jboss.ws.soap.SOAPContentElement.expandToDOM(SOAPContentElement.java:844)
at org.jboss.ws.soap.SOAPContentElement.getChildNodes(SOAPContentElement.java:761)
at org.jboss.util.xml.DOMWriter.printInternal(DOMWriter.java:211)
at org.jboss.util.xml.DOMWriter.printInternal(DOMWriter.java:270)
at org.jboss.util.xml.DOMWriter.printInternal(DOMWriter.java:270)
at org.jboss.util.xml.DOMWriter.print(DOMWriter.java:186)
at org.jboss.util.xml.DOMWriter.printNode(DOMWriter.java:135)
at org.jboss.ws.server.ServiceEndpoint.postProcessResponse(ServiceEndpoint.java:305)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4106718#4106718
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4106718
18 years, 4 months
[JBossWS] - Question about webservice returning array with nillable=fals
by fheldt
I've got a problem with a webservice and no idea how to solve this. Maybe someone can give me a hint:
Java Webservice snippet:
| @WebMethod
| public Integer[] GetSteps(String ugid) {
| Session session = (Session) em.getDelegate();
| List<?> list = session.createSQLQuery("SELECT QVZAHL FROM MQVAL WHERE QVUGRP=:ugid AND QVSTAT<>'*'")
| .addScalar("QVZAHL", Hibernate.INTEGER)
| .setString("ugid", ugid)
| .list();
| return list.toArray(new Integer[list.size()]);
| }
|
Now i want to use this in a C# .NET project, it generates this
| public System.Nullable<int>[] GetSteps(string arg0) {
| object[] results = this.Invoke("GetSteps", new object[] {arg0});
| return ((System.Nullable<int>[])(results[0]));
| }
|
As you see, it generates a function returning an array of nullable ints.
The question is: how can i change the Java webservice so that the elemnets of the array are nillable=false. Is there any annotation to do this?
Thanks in advance for any help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4106634#4106634
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4106634
18 years, 4 months
[JBossWS] - ClassNotFoundException JBossWSProviderFactoryImpl with JBoss
by gquintana
I get an exception when I run WSProvide:
$ wsprovide.sh -k -w -c classes -o classes -r jbossws -s jbossws com.mycompany.myapp.ws.MyWebService
| [: 71: /opt/java/jboss-4.2.2.GA/client/jbossws-client.jar: unexpected operator
| JBossWS-SunRI stack deployed
| Exception in thread "main" java.lang.IllegalStateException: Failed to load: org.jboss.ws.tools.jaxws.impl.JBossWSProviderFactoryImpl
| at org.jboss.wsf.spi.util.ServiceLoader.loadDefault(ServiceLoader.java:205)
| at org.jboss.wsf.spi.util.ServiceLoader.loadFromSystemProperty(ServiceLoader.java:138)
| at org.jboss.wsf.spi.util.ServiceLoader.loadService(ServiceLoader.java:68)
| at org.jboss.wsf.spi.tools.WSContractProvider.newInstance(WSContractProvider.java:65)
| at org.jboss.wsf.spi.tools.cmd.WSProvide.generate(WSProvide.java:170)
| at org.jboss.wsf.spi.tools.cmd.WSProvide.main(WSProvide.java:77)
| Caused by: java.lang.ClassNotFoundException: org.jboss.ws.tools.jaxws.impl.JBossWSProviderFactoryImpl
| at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
| at java.security.AccessController.doPrivileged(Native Method)
| at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
| at org.jboss.wsf.spi.util.ServiceLoader.loadDefault(ServiceLoader.java:200)
| ... 5 more
|
I am using Ubuntu 7.10, Sun Java 1.5 and standard JBoss 4.2.2.
What's wrong?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4106549#4106549
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4106549
18 years, 4 months