cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "yousef b (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CXF-4481) unable to generate WADL to java
Date Wed, 22 Aug 2012 06:22:37 GMT
yousef b created CXF-4481:
-----------------------------

             Summary: unable to generate WADL to java 
                 Key: CXF-4481
                 URL: https://issues.apache.org/jira/browse/CXF-4481
             Project: CXF
          Issue Type: Bug
         Environment: cxf version 2.6.1
apache-maven-3.0.4
java 1.7
            Reporter: yousef b
            Priority: Blocker


i succeeded to created rest with CXF,all good except that i get error when generating WADL2java.

i use the following configuration: 
<plugin>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-wadl2java-plugin</artifactId>
                <version>2.6.1</version>
                <executions>
                    <execution>
                        <id>generate-sources</id>
                        <phase>generate-sources</phase>
                        <configuration>
                            <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
                            <wadlOptions>
                                <wadlOption>
                                    <wadl>http://localhost:8080/apache-cxf-rest-test?_wadl</wadl>
                                    <impl>true</impl>
                                    <interface>true</interface>
                                    <packagename>org.apache.cxf.systest.jaxrs.codegen.service</packagename>
                                    <schemaPackagenames>
                                        <schemaPackagename>http://superbooks=org.apache.cxf.systest.jaxrs.codegen.schema</schemaPackagename>
                                    </schemaPackagenames>

                                </wadlOption>
                            </wadlOptions>
                        </configuration>
                        <goals>
                            <goal>wadl2java</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>


stack error: 
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile
(default-compile) on project wad: Compilation failure: Compilation failure: 
[ERROR] \DEV\wad\target\generated\src\main\java\org\apache\cxf\systest\jaxrs\codegen\service\ServiceResourceImpl.java:[11,27]
error: ';' expected 
[ERROR] \DEV\wad\target\generated\src\main\java\org\apache\cxf\systest\jaxrs\codegen\service\ServiceResourceImpl.java:[11,28]
error: not a statement 
[ERROR] \DEV\wad\target\generated\src\main\java\org\apache\cxf\systest\jaxrs\codegen\service\ServiceResourceImpl.java:[11,30]
error: ';' expected 
[ERROR] \DEV\wad\target\generated\src\main\java\org\apache\cxf\systest\jaxrs\codegen\service\ServiceResourceImpl.java:[11,31]
error: illegal start of type 
[ERROR] \DEV\wad\target\generated\src\main\java\org\apache\cxf\systest\jaxrs\codegen\service\ServiceResourceImpl.java:[11,32]
error: ';' expected 
[ERROR] \DEV\wad\target\generated\src\main\java\org\apache\cxf\systest\jaxrs\codegen\service\ServiceResourceImpl.java:[11,41]
error: <identifier> expected 
[ERROR] \DEV\wad\target\generated\src\main\java\org\apache\cxf\systest\jaxrs\codegen\service\ServiceResource.java:[18,20]
error: = expected 
[ERROR] \DEV\wad\target\generated\src\main\java\org\apache\cxf\systest\jaxrs\codegen\service\ServiceResource.java:[18,23]
error: <identifier> expected 
[ERROR] \DEV\wad\target\generated\src\main\java\org\apache\cxf\systest\jaxrs\codegen\service\ServiceResource.java:[18,24]
error: ';' expected 
[ERROR] \DEV\wad\target\generated\src\main\java\org\apache\cxf\systest\jaxrs\codegen\service\ServiceResource.java:[18,51]
error: = expected 



wadl:
<application xmlns="http://wadl.dev.java.net/2009/02" xmlns:xs="http://www.w3.org/2001/XMLSchema"><grammars><xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="unqualified">
    <xs:element name="user" type="user"/>
    <xs:element name="userCollection" type="userCollection"/>
    <xs:complexType name="user">
        <xs:sequence>
            <xs:element minOccurs="0" name="id" type="xs:int"/>
            <xs:element minOccurs="0" name="name" type="xs:string"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="userCollection">
        <xs:sequence>
            <xs:element minOccurs="0" name="users">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element maxOccurs="unbounded" minOccurs="0" ref="user"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
</xs:schema>
</grammars><resources base="http://127.0.0.1:8080/apache-cxf-rest-test/"><resource
path="/service/"><resource path="user/{id}"><param name="id" style="template"
type="xs:int"/><method name="GET"><request></request><response><representation
mediaType="application/xml"/></response></method></resource><resource
path="users"><method name="GET"><response><representation mediaType="application/xml"/></response></method></resource><resource
path="users/bad"><method name="GET"><response><representation mediaType="application/xml"/></response></method></resource></resource></resources></application>


please help 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message