2 Replies Latest reply on Jan 8, 2010 11:23 AM by gturan

    JBoss 5.0.1 for jdk 1.6 web services configuration

      Hello everybody !

       

      I have been struggling for two days to use an amazon web service on jboss 5.0.1 (I downloaded the one for jdk 1.6).  From the other forms I saw running web services on jboss with jdk 1.6 platform is tricky but I did not guess it will be that terrible. Anyways when I triggered the action using the web service I get this error in the console:

       

      14:39:52,202 ERROR [STDERR] javax.xml.ws.WebServiceException: java.lang.UnsupportedOperationException: setProperty must be overridden by all subclasses of SOAPMessage
      14:39:52,202 ERROR [STDERR]     at org.jboss.ws.core.jaxws.client.ClientImpl.handleRemoteException(ClientImpl.java:397)
      14:39:52,202 ERROR [STDERR]     at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:303)
      14:39:52,202 ERROR [STDERR]     at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:170)
      14:39:52,202 ERROR [STDERR]     at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
      14:39:52,202 ERROR [STDERR]     at $Proxy135.itemSearch(Unknown Source)
      14:39:52,202 ERROR [STDERR]     at com.corejsf.AuthorSearchBean.search(AuthorSearchBean.java:38)
      14:39:52,204 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      14:39:52,204 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      14:39:52,204 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      14:39:52,204 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Unknown Source)
      14:39:52,204 ERROR [STDERR]     at org.apache.el.parser.AstValue.invoke(AstValue.java:170)
      14:39:52,204 ERROR [STDERR]     at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
      14:39:52,204 ERROR [STDERR]     at org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
      14:39:52,204 ERROR [STDERR]     at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
      14:39:52,204 ERROR [STDERR]     at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
      14:39:52,204 ERROR [STDERR]     at javax.faces.component.UICommand.broadcast(UICommand.java:387)
      14:39:52,204 ERROR [STDERR]     at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
      14:39:52,204 ERROR [STDERR]     at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
      14:39:52,204 ERROR [STDERR]     at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
      14:39:52,204 ERROR [STDERR]     at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
      14:39:52,204 ERROR [STDERR]     at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
      14:39:52,204 ERROR [STDERR]     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
      14:39:52,204 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      14:39:52,204 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      14:39:52,204 ERROR [STDERR]     at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      14:39:52,204 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      14:39:52,204 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      14:39:52,204 ERROR [STDERR]     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
      14:39:52,204 ERROR [STDERR]     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      14:39:52,204 ERROR [STDERR]     at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
      14:39:52,204 ERROR [STDERR]     at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
      14:39:52,204 ERROR [STDERR]     at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
      14:39:52,204 ERROR [STDERR]     at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
      14:39:52,205 ERROR [STDERR]     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      14:39:52,205 ERROR [STDERR]     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      14:39:52,205 ERROR [STDERR]     at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
      14:39:52,205 ERROR [STDERR]     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      14:39:52,205 ERROR [STDERR]     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
      14:39:52,205 ERROR [STDERR]     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
      14:39:52,205 ERROR [STDERR]     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
      14:39:52,205 ERROR [STDERR]     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      14:39:52,205 ERROR [STDERR]     at java.lang.Thread.run(Unknown Source)
      14:39:52,205 ERROR [STDERR] Caused by: java.lang.UnsupportedOperationException: setProperty must be overridden by all subclasses of SOAPMessage
      14:39:52,205 ERROR [STDERR]     at javax.xml.soap.SOAPMessage.setProperty(Unknown Source)
      14:39:52,205 ERROR [STDERR]     at org.jboss.ws.core.soap.SOAPMessageImpl.<init>(SOAPMessageImpl.java:82)
      14:39:52,205 ERROR [STDERR]     at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:169)
      14:39:52,205 ERROR [STDERR]     at org.jboss.ws.core.CommonSOAP11Binding.createMessage(CommonSOAP11Binding.java:57)
      14:39:52,205 ERROR [STDERR]     at org.jboss.ws.core.CommonSOAPBinding.bindRequestMessage(CommonSOAPBinding.java:157)
      14:39:52,206 ERROR [STDERR]     at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:290)
      14:39:52,206 ERROR [STDERR]     at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:291)
      14:39:52,206 ERROR [STDERR]     ... 40 more

       

      Any help will be appreciated. Thanks in advance.

        • 1. Re: JBoss 5.0.1 for jdk 1.6 web services configuration
          jim.ma
          Looks like there is the wrong version saaj jar in your classpath or service war file.  Can you list the content in your deployed service file ?
          • 2. Re: JBoss 5.0.1 for jdk 1.6 web services configuration

            Saaj.jar file comes with jboss 5.x. That is under jboss->lib->endorsed . In some forms I saw addinglines to jboss launch config;

            -Djava.endorsed.dirs=$JBOSS_HOME_5/lib/endorsed
            -Dsun.lang.ClassLoader.allowArraySyntax=true

             

            Which did not help. I changed jboss 5.0.1 jdk to 5.1.0 jdk also did not help.

             

            The file I try calling the service is below. (and the amazon web service jar file is under the WEB-INF->lib of the project folder.)

             

            import java.util.List;

             

            import javax.xml.ws.Holder;
            import javax.xml.ws.WebServiceRef;

             

            import com.corejsf.amazon.AWSECommerceService;
            import com.corejsf.amazon.AWSECommerceServicePortType;
            import com.corejsf.amazon.Item;
            import com.corejsf.amazon.ItemSearchRequest;
            import com.corejsf.amazon.Items;

             

            public class AuthorSearchBean {
               @WebServiceRef(wsdlLocation
            ="http://webservices.amazon.com/AWSECommerceService/AWSECommerceService.wsdl")
               private AWSECommerceService service;
              
               private String name;
               private List<Item> response;
               private String accessKey;

             

               public String getName() { return name; }
               public void setName(String newValue) { name = newValue; }

             

               public void setAccessKey(String newValue) { accessKey = newValue; }

             

               public String search() {
                  try {        
                     AWSECommerceServicePortType port = service.getAWSECommerceServicePort();

             

                     ItemSearchRequest request = new ItemSearchRequest();
                     request.getResponseGroup().add("ItemAttributes");
                     request.setSearchIndex("Books");
                     request.setAuthor(name);
                    
                     Holder<List<Items>> responseHolder = new Holder<List<Items>>();        
                     port.itemSearch("", accessKey, "", "", "", "", request, null, null,
                           responseHolder);
                     response=responseHolder.value.get(0).getItem();
                    
                     return "success";
                   } catch(Exception e) {
                      e.printStackTrace();
                      return "failure";
                   }      
               }

             

               public List<Item> getResponse() { return response; }
            }

             

            Actually this is web service demo application I got from http://horstmann.com/corejsf/

            Under source code ch10->amazon is what I am trying to run.

            Thanks for the reply.