4 Replies Latest reply on Apr 25, 2005 5:00 PM by Lorinda Swick

    Trouble setting up ear to be client of web service

    Thomas Diesler Master

      Put your <service-ref> element in web.xml, not in application-client.xml. Use jwsdp's wscompile to generate POJOs as your WS parameter and return types.

      wsdl2java generates axis stubs that are not portable and may not work with JBossWS. Don't use wsdl2java with JBossWS.

        • 1. Re: Trouble setting up ear to be client of web service
          Matthew Parrish Newbie

          I've made the changes you suggested, but I'm still getting the same error. Here are the relavent portions of the xml files...

          WEB-INF/web.xml

           <servlet>
           <servlet-name>FinAidServlet</servlet-name>
           <servlet-class>xxx.yyy.services.finaid.GetLOAPortType_Stub</servlet-class>
           </servlet>
          
           <servlet-mapping>
           <servlet-name>FinAidServlet</servlet-name>
           <url-pattern>/servlet/FinAid</url-pattern>
           </servlet-mapping>
          
           <service-ref>
           <service-ref-name>service/FinAidService</service-ref-name>
           <service-interface>xxx.yyy.services.finaid.GetLOA</service-interface>
           <wsdl-file>WEB-INF/wsdl/finAid.wsdl</wsdl-file>
           <jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
           </service-ref>
          


          WEB-INF/webservices.xml
          <webservice-description>
           <webservice-description-name>FinAidServiceJSE</webservice-description-name>
           <wsdl-file>WEB-INF/wsdl/finAid.wsdl</wsdl-file>
           <jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
           <port-component>
           <port-component-name>FinAid</port-component-name>
           <wsdl-port>getLOAPort</wsdl-port>
           <service-endpoint-interface>xxx.yyy.services.finaid.GetLOAPortType</service-endpoint-interface>
           <service-impl-bean>
           <servlet-link>FinAidServlet</servlet-link>
           </service-impl-bean>
           </port-component>
           </webservice-description>
          


          WEB-INF/jaxrpc-mapping.xml
          <package-mapping>
           <package-type>xxx.yyy.services.finaid</package-type>
           <namespaceURI>http://xxx/yyy/ws/loa/getLOA.wsdl</namespaceURI>
           </package-mapping>
          


          Logic Class file
          InitialContext iniCtx = new InitialContext();
          iniCtx.lookup("java:comp/env/service/FinAidService");
          


          Does anything here look wrong? I still don't know why it's not looking for the wsdl in the xxx-exp.war expanded directory. It seems like that would make all the difference.

          Thanks again,
          Matt

          • 2. Re: Trouble setting up ear to be client of web service
            Thomas Diesler Master

            Have you looked at the samples.zip on the wiki? It contains samples for all possible combinations of exposing ws4ee endpoints and ws4ee clients.

            • 3. Re: Trouble setting up ear to be client of web service
              Prince Khan Newbie

              HI,

              I came across the same problem while porting sun's j2ee blueprint adventurebuilder application to jboss. Has this issue been resolved ? Is there a work around to the problem ?
              Any help would be welcome.

              Arun

              • 4. Re: Trouble setting up ear to be client of web service
                Lorinda Swick Newbie

                Upgrade to RC 4.0.2 where the http://jira.jboss.com/jira/browse/JBWS-128 was fixed though it was not clear. Note, the RC is not recommended for production.

                -L