6 Replies Latest reply on Sep 14, 2006 1:02 PM by thomas.diesler

    WSTools Is Generating Invalid Java Source

    jiwils

      I have some WSDL from a non-Java web service that contains elements that have dashes in their names. For example:

      <complexType>
       <sequence>
       <element name="var-name-ex" type="xsd:string"/>
       </sequence>
      </complexType>
      


      This produces Java code with variable names that have hyphens in them (one named var-name-ex), and this will not compile as hyphens are not allowed in variable names. The WSTools configuration schema does not appear to support a way to adjust this either.

      Does anyone have any ideas that I could use to work around this issue?

        • 1. Re: WSTools Is Generating Invalid Java Source
          sunspider

          I can use wstools to generate jaxrpc-mapping and webservices.xml, but the inverse is not true. I can't use the wstool to generate java stubs from wsdl, even if the wsdl is produced by wstools itself. I used following instead. This tool even generated cactus testcase for me. It comes with axis. and The last line of WSDL,soap:address location=' ' should be changed to actual endpoint address.
          I am also a new learner, may be so sorry for misleading.

          <taskdef name="wsdl2java" classname="org.apache.axis.tools.ant.wsdl.Wsdl2javaAntTask" classpathref="axis.classpath"/>
          
           <target name="commandline">
           <mkdir dir="src/ws-gen/src"/>
           <wsdl2java all="true" debug="false" helperGen="true"
           noimports="false"
          
           output="src/"
           serverside="false" skeletonDeploy="false" testcase="true"
           typeMappingVersion="1.1"
           url="file:///E:/files/jBossProject/WebService/src/WEB-INF/wsdl/vondarService.wsdl"
           verbose="false" noWrapped="false" >
           <mapping namespace="http://vondart.org/webService/rpcstyle" package="webService.generated"/>
           </wsdl2java>
          
          
          </target>
          


          • 2. Re: WSTools Is Generating Invalid Java Source
            thomas.diesler
            • 3. Re: WSTools Is Generating Invalid Java Source
              jiwils

              That JIRA issue indicates that the fix will be in the 2.0 beta for JBossWS, and the timeframe for that final release, based on the roadmap, is not even known yet. Short of trying to patch this myself, is there anything I can do to increase the possibility that it could be added to the 1.x set of releases?

              I have no problem writing test cases, etc. I would even look into submitting a patch of some sort, but building the source has too many dependancies (having to pull JBossAS and build it for example) for this to seem feasible. If we had a source zip/release, that would be very helpful as well. Is that worth another JIRA issue? :)

              • 4. Re: WSTools Is Generating Invalid Java Source
                stevenh

                 

                "jiwils" wrote:


                I have no problem writing test cases, etc. I would even look into submitting a patch of some sort, but building the source has too many dependancies (having to pull JBossAS and build it for example) for this to seem feasible. If we had a source zip/release, that would be very helpful as well. Is that worth another JIRA issue? :)


                I would second a source zip for the release, It is not alway possible to pull the src from subversion, ie if your web proxy doesnt support all the required WebDAV methods.

                Steve.

                • 5. Re: WSTools Is Generating Invalid Java Source
                  thomas.diesler
                  • 6. Re: WSTools Is Generating Invalid Java Source
                    thomas.diesler

                    I rescheduled the feature request to 1.1.0 (31-Sep-2006)