Deepal,
i've modified the configuration of the mvn plugin per your suggestion. i get
exactly the same error. i get this on a document that is schema-valid
according to Oxygen.
Best wishes,
--greg
<plugin>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-wsdl2code-maven-plugin</artifactId>
<version>1.4.1</version>
<executions>
<execution>
<goals>
<goal>wsdl2code</goal>
</goals>
</execution>
</executions>
<configuration>
<packageName>${groupId}.${artifactId}.model</packageName>
<wv>2.0</wv>
</configuration>
</plugin>
bash-3.2$ mvn axis2-wsdl2code:wsdl2code
...
[Fatal Error] service.wsdl:5:5: Element type "wsdl2:definitions" must be
followed by either attribute specifications, ">" or "/>".
org.xml.sax.SAXParseException: Element type "wsdl2:definitions" must be
followed by either attribute specifications, ">" or "/>".
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.readInTheWSDLFile(CodeGenerationEngine.java:288)
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:111)
at
org.apache.axis2.maven2.wsdl2code.WSDL2CodeMojo.execute(WSDL2CodeMojo.java:558)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:512)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:482)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error parsing WSDL
Element type "wsdl2:definitions" must be followed by either attribute
specifications, ">" or "/>".
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 33 seconds
[INFO] Finished at: Thu Aug 13 11:51:03 PDT 2009
[INFO] Final Memory: 15M/29M
[INFO]
------------------------------------------------------------------------
bash-3.2$
On Thu, Aug 13, 2009 at 11:39 AM, Deepal Jayasinghe <[email protected]>wrote:
> Try
>
> -wv <version> WSDL Version. Valid Options : 2, 2.0, 1.1
>
> So in your case
> -wv 2 or -wv 2.0
>
> Thanks,
> Deepal
>
> On Thu, Aug 13, 2009 at 2:34 PM, Meredith
> Gregory<[email protected]> wrote:
> > Deepal,
> >
> > Many thanks for the note. But, even if that is the option, how do you set
> it
> > from maven. The configuration offers no parameter to control that.
> >
> > Best wishes,
> >
> > --greg
> >
> > The WSDL2Code goal takes the following parameters as input. All
> parameters
> > can be set from the command line by using properties. For example, the
> > parameter "generateServerSide" may be set using the property
> > "axis2.wsdl2code.generateServerSide". If the parameter isn't set via
> > property or in the POM, then a default value applies.
> >
> > Parameter NameCommand Line PropertyDescriptionDefault Value
> > databindingName${axis2.wsdl2code.databindingName}Data binding framework,
> > which is being used by the generated sources.adb
> > generateAllClasses${axis2.wsdl2code.generateAllClasses}Whether to
> generate
> > simply all classes. This is only valid in conjunction with
> > "generateServerSide".false
> > generateServerSide${axis2.wsdl2code.generateServerSide}Whether server
> side
> > sources are being generated.false
> >
> generateServerSideInterface${axis2.wsdl2code.generateServerSideInterface}Whether
> > to generate the server side interface.false
> > generateServicesXml${axis2.wsdl2code.generateServicesXml}Whether a
> > "services.xml" file is being generated.false
> > generateTestcase${axis2.wsdl2code.generateTestCase}Whether a test case is
> > being generated.false
> > language${axis2.wsdl2code.language}Programming language of the generated
> > sources.java
> > namespaceToPackages${axis2.wsdl2code.namespaceToPackages}Map of namespace
> > URI to packages in the format uri1=package1,uri2=package2,... Using this
> > parameter is discouraged. In general, you should use the namespaceUris
> > parameter. However, the latter cannot be set on the command line.
> > namespaceURIs
> > Map of namespace URI to packages. Example: <namespaceURIs> <namespaceURI>
> > <uri>uri1</uri> <package>package1</package> </namespaceURI> ........
> > </namespaceURI>
> > outputDirectory${axis2.wsdl2code.target}Target directory, where sources
> are
> > being target/generated-sources/axis2/wsdl2code generated.
> > packageName${axis2.wsdl2code.package}Package name of the generated
> sources.
> > portName${axis2.wsdl2code.portName}Port name, for which sources are being
> > generated. By default, sources are generated for all ports.
> > serviceName${axis2.wsdl2code.serviceName}Service name, for which sources
> are
> > being generated. By default, sources are generated for all services.
> > syncMode${axis2.wsdl2code.syncMode}Sync mode, for which sources are being
> > generated; either of "sync", "async", or "both" (default).both
> > unpackClasses${axis2.wsdl2code.unpackClasses}Whether to unpack classes.
> > wsdlFile${axis2.wsdl2code.wsdl}Location of the WSDL file, which is read
> as
> > inputsrc/main/axis2/service.wsdl
> >
> > On Thu, Aug 13, 2009 at 11:25 AM, Deepal Jayasinghe <[email protected]>
> > wrote:
> >>
> >> As I remember correct option is w2, but I need to double check. Now I
> >> do not have access to code, once I do I will send the exact parameter.
> >>
> >> On Thu, Aug 13, 2009 at 2:08 PM, Meredith
> >> Gregory<[email protected]> wrote:
> >> > Andreas,
> >> >
> >> > Thanks for your response. i did check the documentation. The
> description
> >> > of
> >> > the wsdl2code mvn target lists no such configuration parameter. Is
> there
> >> > some other place i should look?
> >> >
> >> > Best wishes,
> >> >
> >> > --greg
> >> >
> >> > On Thu, Aug 13, 2009 at 11:04 AM, Andreas Veithen
> >> > <[email protected]> wrote:
> >> >>
> >> >> I think there is a command line option to switch to WSDL 2.0. Please
> >> >> check the documentation.
> >> >>
> >> >> Andreas
> >> >>
> >> >> On Thu, Aug 13, 2009 at 19:56, Meredith
> >> >> Gregory<[email protected]>
> >> >> wrote:
> >> >> > Axis Folks,
> >> >> >
> >> >> > Do the Axis2 code-generation tools support WSDL 2.0?
> >> >> >
> >> >> > Best wishes,
> >> >> >
> >> >> > --greg
> >> >> >
> >> >> > --
> >> >> > L.G. Meredith
> >> >> > Managing Partner
> >> >> > Biosimilarity LLC
> >> >> > 1219 NW 83rd St
> >> >> > Seattle, WA 98117
> >> >> >
> >> >> > +1 206.650.3740
> >> >> >
> >> >> > http://biosimilarity.blogspot.com
> >> >> >
> >> >
> >> >
> >> >
> >> > --
> >> > L.G. Meredith
> >> > Managing Partner
> >> > Biosimilarity LLC
> >> > 1219 NW 83rd St
> >> > Seattle, WA 98117
> >> >
> >> > +1 206.650.3740
> >> >
> >> > http://biosimilarity.blogspot.com
> >> >
> >>
> >>
> >>
> >> --
> >> http://blogs.deepal.org
> >
> >
> >
> > --
> > L.G. Meredith
> > Managing Partner
> > Biosimilarity LLC
> > 1219 NW 83rd St
> > Seattle, WA 98117
> >
> > +1 206.650.3740
> >
> > http://biosimilarity.blogspot.com
> >
>
>
>
> --
> http://blogs.deepal.org
>
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117
+1 206.650.3740
http://biosimilarity.blogspot.com