4 Replies Latest reply on Oct 26, 2007 2:06 PM by wcydaip

    WSTools to generate jaxrpc-mapping.xml file?

    wcydaip

      I am trying to connect to a microsoft ws using JBoss-4.0.5.GA and JBossWS-2.0.0.GA.

      I executed wsconsume to generate the classes, but, was not able to use wstools to generate the artifacts, i.e., jaxrpc-mapping.xml. I get the following error when executing the command:

      Exception in thread "main" java.lang.NoSuchMethodError: javax.wsdl.xml.WSDLLocator.close()V
       at org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.readWSDL(JBossWSDLReaderImpl.java:2367)
       at org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:127)
       at org.jboss.ws.tools.WSDLToJava.convertWSDL2Java(WSDLToJava.java:119)
       at org.jboss.ws.tools.helpers.ToolsHelper.handleWSDLToJavaGeneration(ToolsHelper.java:298)
       at org.jboss.ws.tools.WSTools.process(WSTools.java:147)
       at org.jboss.ws.tools.WSTools.generate(WSTools.java:69)
       at org.jboss.ws.tools.WSTools.generate(WSTools.java:123)
       at org.jboss.ws.tools.WSTools.main(WSTools.java:58)
      


      Any help on which version of the jar file that it's requesting? I've tried wsdl4j.jar that ships with JBossWS, wsdl4j-1.5.2.jar and wsdl4j-1.6.1.jar with no success.

      Deploying without the mapping file I believe confuses JBoss and it throws the following error:
      2007-10-24 16:03:55,015 ERROR [STDERR] javax.xml.ws.soap.SOAPFaultException: WSDLReader:None of the matching operations for soapAction http://actcenters.com/ALMVTC/action/Schedule.getCandidateScheduleData could successfully load the incoming request. Potential typemapper problem
      2007-10-24 16:03:55,015 ERROR [STDERR] at org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.getSOAPFaultException(SOAPFaultHelperJAXWS.java:69)
      2007-10-24 16:03:55,015 ERROR [STDERR] at org.jboss.ws.core.jaxws.binding.SOAP11BindingJAXWS.throwFaultException(SOAP11BindingJAXWS.java:109)
      2007-10-24 16:03:55,015 ERROR [STDERR] at org.jboss.ws.core.CommonSOAPBinding.unbindResponseMessage(CommonSOAPBinding.java:553)
      2007-10-24 16:03:55,015 ERROR [STDERR] at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:371)
      2007-10-24 16:03:55,015 ERROR [STDERR] at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:243)
      2007-10-24 16:03:55,015 ERROR [STDERR] at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:164)
      2007-10-24 16:03:55,015 ERROR [STDERR] at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
      2007-10-24 16:03:55,015 ERROR [STDERR] at $Proxy63.getCandidateScheduleData(Unknown Source)
      


      Any help is appreciated.
      Graham

        • 1. Re: WSTools to generate jaxrpc-mapping.xml file?
          wcydaip

          the conflict is between jwsdl4j.jar and jbossall-client.jar. the jbossall-client.jar doesn't have the close method.

          added the jwsdl4j.jar higher in the import scheme.

          It executes but now I get:

          log4j:WARN No appenders could be found for logger (org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory).
          log4j:WARN Please initialize the log4j system properly.
          Exception in thread "main" org.apache.xerces.xni.XNIException: Parser should stop: [domain:http://ww
          w.w3.org/TR/1998/REC-xml-19980210]::[key=ContentIllegalInProlog]::Message=Content is not allowed in
          prolog.
           at org.jboss.ws.metadata.wsdl.xmlschema.JBossXSErrorHandler.fatalError(JBossXSErrorHandler.j
          ava:78)
           at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
           at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
           at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
           at org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(Unknown Source)
           at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
           at org.apache.xerces.impl.xs.opti.SchemaParsingConfig.parse(Unknown Source)
           at org.apache.xerces.impl.xs.opti.SchemaParsingConfig.parse(Unknown Source)
           at org.apache.xerces.impl.xs.opti.SchemaDOMParser.parse(Unknown Source)
           at org.apache.xerces.impl.xs.traversers.XSDHandler.getSchemaDocument(Unknown Source)
           at org.apache.xerces.impl.xs.traversers.XSDHandler.resolveSchema(Unknown Source)
           at org.apache.xerces.impl.xs.traversers.XSDHandler.constructTrees(Unknown Source)
           at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source)
           at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)
           at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source)
           at org.jboss.ws.tools.JavaToXSD.parseSchema(JavaToXSD.java:182)
           at org.jboss.ws.tools.wsdl.WSDL11Reader.processTypes(WSDL11Reader.java:391)
           at org.jboss.ws.tools.wsdl.WSDL11Reader.processDefinition(WSDL11Reader.java:172)
           at org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:128)
           at org.jboss.ws.tools.WSDLToJava.convertWSDL2Java(WSDLToJava.java:119)
           at org.jboss.ws.tools.helpers.ToolsHelper.handleWSDLToJavaGeneration(ToolsHelper.java:298)
           at org.jboss.ws.tools.WSTools.process(WSTools.java:147)
           at org.jboss.ws.tools.WSTools.generate(WSTools.java:69)
           at org.jboss.ws.tools.WSTools.generate(WSTools.java:123)
           at org.jboss.ws.tools.WSTools.main(WSTools.java:58)
          C:\projects-cal-ws\act-ws-scheduler\client>
          


          • 2. Re: WSTools to generate jaxrpc-mapping.xml file?
            asoldano

            Considering you have jboss 4.0.5 and jbossws 2.0.0.GA, I would try using the JAX-WS tools (wsconsume) that are currently supported and should have less compatibility issues with thirdparty wsdls.
            http://jbws.dyndns.org/mediawiki/index.php?title=JAX-WS_User_Guide#Top-Down_.28Using_wsconsume.29

            I guess your problem somehow depends on what is actually in the wsdl file, I would take a look at it searching for something wrong in the xml prolog. May be this could help: http://forum.java.sun.com/thread.jspa?threadID=567285

            • 3. Re: WSTools to generate jaxrpc-mapping.xml file?
              wcydaip

              So, the call to WSTools is not necessary? That's what I was hoping to find out.

              Does this also mean that we no longer need a mapping file? If not, how is the mapping file generated? WSTools?

              The reason I even tried to generate artifacts with the WSTools is to solve this error:

              2007-10-25 11:42:57,765 ERROR [STDERR] javax.xml.ws.soap.SOAPFaultException: WSDLReader:None of the matching operations for soapAction http://actcenters.com/ALMVTC/action/Schedule.getCandidateScheduleData could successfully load the incoming request. Potential typemapper problem
              2007-10-25 11:42:57,765 ERROR [STDERR] at org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.getSOAPFaultException(SOAPFaultHelperJAXWS.java:69)
              2007-10-25 11:42:57,765 ERROR [STDERR] at org.jboss.ws.core.jaxws.binding.SOAP11BindingJAXWS.throwFaultException(SOAP11BindingJAXWS.java:109)
              2007-10-25 11:42:57,765 ERROR [STDERR] at org.jboss.ws.core.CommonSOAPBinding.unbindResponseMessage(CommonSOAPBinding.java:553)
              2007-10-25 11:42:57,765 ERROR [STDERR] at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:371)
              2007-10-25 11:42:57,765 ERROR [STDERR] at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:243)
              2007-10-25 11:42:57,765 ERROR [STDERR] at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:164)
              2007-10-25 11:42:57,765 ERROR [STDERR] at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
              2007-10-25 11:42:57,765 ERROR [STDERR] at $Proxy60.getCandidateScheduleData(Unknown Source)
              


              which is called via:
              public Event perform(HttpServletRequest request) throws HTMLActionException {
               logger.info("entering perform");
               String sEnrollId = "11110",
               sSSN = "-00004069",
               sClientPWD ="123",
               sClientId = "042";
              
               String req = "<GetCandidateScheduleData>"+
               "<Client Id='" + sClientId + "' Password='" + sClientPWD + "'/>"+
               "<EnrollId>" + sEnrollId + "</EnrollId>"+
               "<SSN>" + sSSN + "</SSN>" +
               "</GetCandidateScheduleData>";
              
               ALMVTC alm = new ALMVTC();
               ScheduleSoapPort ssp = alm.getScheduleSoapPort();
              
               Object resp = null;
              
               try {
               resp = ssp.getCandidateScheduleData((Object)req);
               //resp = ssp.serviceCheck(req);
               logger.info("the response for the candidates:"+resp);
               } catch (Exception e) {
               // TODO Auto-generated catch block
               e.printStackTrace();
               }
              
               logger.info("leaving perform");
               return null;
               }
              


              Not sure if this will help but the full stack trace can be found here:
              http://graham-king.blogspot.com/2007/10/full-stack-trace-for-jboss-mssql.html

              • 4. Re: WSTools to generate jaxrpc-mapping.xml file?
                wcydaip

                Can anyone help me solve this problem?