1 2 Previous Next 16 Replies Latest reply on Aug 25, 2010 2:11 PM by andreas_back

    WebService response problem

    nean

      Hello

      First my configuration is like :

      - jbossIDE 2 beta 2 bundle (eclipse)
      - jboss 4.0.5
      - jdk 1.6

      I'm trying to complete a EJB/web service project, but to test W.S i tried this tutorial : http://www.soapui.org/jbossws/annotations_example.html

      i did all well normaly, i obtain the wsdl file ... But when i ty to send a SOAP message with a SOAPUI interface i have this error :

      00:26:26,328 ERROR [SOAPFaultExceptionHelper] SOAP request exception
      java.lang.UnsupportedOperationException: setProperty must be overridden by all subclasses of SOAPMessage
      at javax.xml.soap.SOAPMessage.setProperty(Unknown Source)
      at org.jboss.ws.soap.SOAPMessageImpl.<init>(SOAPMessageImpl.java:65)
      at org.jboss.ws.soap.MessageFactoryImpl.createMessageInternal(MessageFactoryImpl.java:209)
      at org.jboss.ws.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:142)
      at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:190)
      at org.jboss.ws.server.ServiceEndpointManager.processSOAPRequest(ServiceEndpointManager.java:355)
      at org.jboss.ws.server.StandardEndpointServlet.doPost(StandardEndpointServlet.java:115)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.jboss.ws.server.StandardEndpointServlet.service(StandardEndpointServlet.java:76)
      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.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
      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(Unknown Source)
      00:26:26,328 ERROR [SOAPFaultExceptionHelper] Error creating SOAPFault message
      java.lang.UnsupportedOperationException: setProperty must be overridden by all subclasses of SOAPMessage
      at javax.xml.soap.SOAPMessage.setProperty(Unknown Source)
      at org.jboss.ws.soap.SOAPMessageImpl.<init>(SOAPMessageImpl.java:65)
      at org.jboss.ws.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:115)
      at org.jboss.ws.jaxrpc.SOAPFaultExceptionHelper.toSOAPMessage(SOAPFaultExceptionHelper.java:203)
      at org.jboss.ws.jaxrpc.SOAPFaultExceptionHelper.exceptionToFaultMessage(SOAPFaultExceptionHelper.java:188)
      at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:223)
      at org.jboss.ws.server.ServiceEndpointManager.processSOAPRequest(ServiceEndpointManager.java:355)
      at org.jboss.ws.server.StandardEndpointServlet.doPost(StandardEndpointServlet.java:115)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.jboss.ws.server.StandardEndpointServlet.service(StandardEndpointServlet.java:76)
      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.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
      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(Unknown Source)
      00:26:26,343 ERROR [StandardEndpointServlet] Error processing web service request
      javax.xml.rpc.JAXRPCException: Cannot create SOAPFault message for: javax.xml.rpc.soap.SOAPFaultException: setProperty must be overridden by all subclasses of SOAPMessage
      at org.jboss.ws.jaxrpc.SOAPFaultExceptionHelper.exceptionToFaultMessage(SOAPFaultExceptionHelper.java:194)
      at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:223)
      at org.jboss.ws.server.ServiceEndpointManager.processSOAPRequest(ServiceEndpointManager.java:355)
      at org.jboss.ws.server.StandardEndpointServlet.doPost(StandardEndpointServlet.java:115)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.jboss.ws.server.StandardEndpointServlet.service(StandardEndpointServlet.java:76)
      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.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
      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(Unknown Source)
      00:26:26,437 ERROR [[MaisonMereBean]] Servlet.service() for servlet MaisonMereBean threw exception
      javax.xml.rpc.JAXRPCException: Cannot create SOAPFault message for: javax.xml.rpc.soap.SOAPFaultException: setProperty must be overridden by all subclasses of SOAPMessage
      at org.jboss.ws.jaxrpc.SOAPFaultExceptionHelper.exceptionToFaultMessage(SOAPFaultExceptionHelper.java:194)
      at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:223)
      at org.jboss.ws.server.ServiceEndpointManager.processSOAPRequest(ServiceEndpointManager.java:355)
      at org.jboss.ws.server.StandardEndpointServlet.doPost(StandardEndpointServlet.java:115)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.jboss.ws.server.StandardEndpointServlet.service(StandardEndpointServlet.java:76)
      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.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
      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(Unknown Source)


      And i have an empty response.

      have you any idea ? it makes around 3 days that i'm trying to solve the problem, but still a problem.
      I tried this link too : http://www.regdeveloper.co.uk/2007/01/23/ejb_web_services/

      I built the 2 project but at end i have always the same problem...

        • 1. Re: WebService response problem

          Hi!

          hmm.. can you show one of the requests that results in this error?

          regards,

          /Ole
          eviware.com

          • 2. Re: WebService response problem
            nean

            all kind of request do this kind of error, a simple SOAP one like a client one.

            But for exemple with the SAOPUI view i created from the wsdl link this request :

            <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:ejb">
             <soapenv:Header/>
             <soapenv:Body>
             <urn:HelloWorld>
             <String_1>this is me</String_1>
             </urn:HelloWorld>
             </soapenv:Body>
            </soapenv:Envelope>


            and the response is empty and on jboss consol i have the error given above

            • 3. Re: WebService response problem

              Hi,

              hmm... maybe this is happening because you are using jdk 1.6.. can you try running jboss under jdk 1.5 instead?

              regards again,

              /Ole
              eviware.com

              • 4. Re: WebService response problem
                nean

                thanks it works now.

                the thing was that i tried with the choice of jdk1.5 but jdk 1.6 installed, but it seems that didn't work correctly the time that i did it.

                So i uninstalled all an reinstalled all correctly without sdk 1.6.

                • 5. Re: WebService response problem
                  nean

                  Else which kind of client can i do in RMI/RPC ?

                  i tried something like that :

                  public class Client {
                   public static void main(String[] args) throws Exception {
                   System.out.println("Starting Test Client");
                   URL url = new URL("http://HAL:8080/echo/EchoBean?wsdl");
                   QName qname = new QName(
                   "http://webservice.regdeveloper.co.uk/jaws",
                   "EchoService");
                  
                   System.out.println("Creating a service Using: \n\t"
                   + url + " \n\tand " + qname);
                   ServiceFactory factory = ServiceFactory.newInstance();
                   Service remote = factory.createService(url, qname);
                  
                   System.out.println("Obtaining reference to a proxy object");
                   Echo proxy = (Echo) remote.getPort(Echo.class);
                   System.out.println("Accessed local proxy: " + proxy);
                  
                   String string = "John";
                   System.out.println("Sending: " + string);
                  
                   System.out.println("Receiving: " + proxy.echo("John"));
                   }
                  }


                  but the "factory.createService(url, qname);" give me an arror on jboss



                  • 6. Re: WebService response problem
                    nean

                    this is my error :

                    Starting Test Client
                    Creating a service Using:
                    http://localhost:8080/test/EchoBean?wsdl
                    and {http://ejb/jaws}EchoService
                    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/xerces/xs/XSModel
                    at org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaData(JSR109ClientMetaDataBuilder.java:106)
                    at org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaData(JSR109ClientMetaDataBuilder.java:82)
                    at org.jboss.ws.jaxrpc.ServiceImpl.<init>(ServiceImpl.java:96)
                    at org.jboss.ws.jaxrpc.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:157)
                    at org.jboss.ws.jaxrpc.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:128)
                    at Client.main(Client.java:19)


                    • 7. Re: WebService response problem
                      mageshbk

                      Xerces is missing in your classpath. Any client application you write needs to use the endorsed property to load the most current xerces. You should set the vm options as follows:

                      -Djava.endorsed.dirs=/[jboss_install_path]/jboss/jboss-4.0.5.GA/lib/endorsed

                      • 8. Re: WebService response problem

                        I'm running into exactly the same thing. I have put the following jars in my lib/endorsed directory:

                        jaxb-api.jar jboss-jaxws-ext.jar jboss-saaj.jar xalan.jar
                        jboss-jaxrpc.jar jboss-jaxws.jar serializer.jar xercesImpl.jar
                        


                        but I'm still getting the error. Is there one more jar I need, or is something else going on? Of course this is with Java 6. I'll need to get this app working on both Java 6 and Java 1.5.

                        Thanks


                        • 9. Re: WebService response problem
                          ropalka

                          And what's the exception you deal with?

                          • 10. Re: WebService response problem

                            It's this:

                            [java] Exception in thread "main" com.sun.xml.ws.streaming.XMLStreamReaderException: XML reader error: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
                             [java] Message: Premature end of file.
                             [java] at com.sun.xml.ws.streaming.XMLStreamReaderUtil.wrapException(XMLStreamReaderUtil.java:256)
                             [java] at com.sun.xml.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.java:84)
                             [java] at com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextContent(XMLStreamReaderUtil.java:99)
                             [java] at com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextElementContent(XMLStreamReaderUtil.java:89)
                            
                            ....
                            
                             [java] Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
                             [java] Message: Premature end of file.
                             [java] at com.sun.xml.stream.XMLReaderImpl.next(XMLReaderImpl.java:563)
                             [java] at com.sun.xml.ws.util.xml.XMLStreamReaderFilter.next(XMLStreamReaderFilter.java:92)
                             [java] at com.sun.xml.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.java:65)
                            
                            


                            I'm working way too hard to make a SOAP request here. SOAP is supposed to be simple and I've been working for days on making a simple request to the server.

                            At this point it seems like it would be simpler to disregard all the SOAP libraries and just use JAXB and HttpClient and be done with it. It was easy to get everything working when it fetches the WSDL over the net every time but that would be a performance killer in this app.


                            • 11. Re: WebService response problem
                              jgf1

                               

                              "omatzura" wrote:
                              Hi,

                              hmm... maybe this is happening because you are using jdk 1.6.. can you try running jboss under jdk 1.5 instead?

                              regards again,

                              /Ole
                              eviware.com

                              This begs the question.. What is it about jdk 1.6 & Soap versus jdk1.5.

                              What has changed to make jdk 1.6 incompatible with prior release. I had assumed newer versions would be backwardly compatible..

                              I came across the same issue following along with an Eclipse example hosted here:
                              http://www.mirrorservice.org/sites/download.eclipse.org/eclipseMirror/technology/phoenix/europa/EclipseIdeForJeeDevelopers/
                              My config was similar:
                              eclipse-jee-europa-winter-win32.zip (Plus updates to get past weird null pointer error : see https://bugs.eclipse.org/bugs/show_bug.cgi?id=219627
                              java_app_platform_sdk-5_04-windows.exe

                              java version "1.6.0_04"
                              Java(TM) SE Runtime Environment (build 1.6.0_04-b12)
                              Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode)

                              JBoss 4.2.2 GA
                              (Eclipse says Java 5 JRE is required).
                              (Release notes for JBoss 4.2.2GA say JDK5 required).


                              • 12. Re: WebService response problem
                                peterj

                                If you look at the runtime library that accompanies JDK 6, you will see that it now includes many of the web services packages that were not in JDK 5. Every Java SE release, it appears that Sun adds in more packages that earlier had appeared only in Java EE. Because JBossAS 4.2.x and 4.0.x are qualified with JDK 5, they include the web services jars, which are not at the same level as the ones on JDK 6. (From what I recall when I researched this in depth many months ago, the web services libraries included in JBossAS 4.2.x were newer than what is included in JDK 6.) Placing the web service jars from JBossAS into the endorsed directory causes the JDK to use those classes instead of the ones in the runtime jar.

                                • 13. Re: WebService response problem
                                  jgf1

                                   

                                  "PeterJ" wrote:
                                  (From what I recall when I researched this in depth many months ago, the web services libraries included in JBossAS 4.2.x were newer than what is included in JDK 6.).

                                  Many thanks for reply. I am beginning to appreciate the complexities of what's going on better now. Out of interest how did you go about doing this research/analysis? Investigating what versions of classes are in what jars is one of the things I am struggling to get my head around when working with Java. I understand technologies like Maven/Ivy can help but am stll a novice and have not used them too much yet.

                                  • 14. Re: WebService response problem
                                    peterj

                                    Add the -verbose:class JVM option to the command line (to JAVA_OPTS in the run scripts). This option causes the JVM to print out the location of each class loaded. I noticed when using JDK 6 that the web services classes were suddenly coming from the runtime jar. Also, if I recall correctly, with JDK 6 I was getting a missing method exception. I unzipped the sources for JDK 6 and noted that the method was indeed missing but when looking at the sources from the app server, the method was there.

                                    1 2 Previous Next