cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "warren crossing (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CXF-2446) generate java.util.List collections for XMLElementWrappers
Date Sun, 04 Oct 2009 05:31:56 GMT

    [ https://issues.apache.org/jira/browse/CXF-2446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12761996#action_12761996
] 

warren crossing commented on CXF-2446:
--------------------------------------

Sorry about that. I foolishly tried to save time and money by using the Local Transports without
appreciating the implications therein. 

I have updated and tidied the example, The specific point I wanted to clarify is visible in


example-client/target/generated-sources/main/org/example/mybookmarks/BookmarksService.java:30

public example.BookmarkTypeArray suggestABookmark

Can this not be generated as 

public List<example.BookmarkType> suggestABookmark

This may seem trivial here however when using xew on a semi-complicated model and ws interface
its becomes very time consuming, writing a lot a template type code

eg

new BookmarkTypeArray();
new Section()
section.setBookmarks(bookmarkTypeArray)
section.getBookmarks().getList(),add(element)

instead it could be a simple as

new Section()
section.getBookmarks(),add(element)


Ps I also noticed portName is being ignored on the example-server wsdl generation in the pom.
 If I put @PortName in the BookmarkService interface it generates correctly. however I cannot
run the web service as it violates something else.

Caused by: javax.xml.ws.WebServiceException: Attributes portName, serviceName and endpointInterface
are not allowed in the @WebService annotation of an SEI.

If this is a new issue/bug then please raise it as such.  With many regards

> generate java.util.List collections for XMLElementWrappers
> ----------------------------------------------------------
>
>                 Key: CXF-2446
>                 URL: https://issues.apache.org/jira/browse/CXF-2446
>             Project: CXF
>          Issue Type: New Feature
>          Components: Tooling
>            Reporter: warren crossing
>
> when generating code with the xew plugin you have to turn off 
>    <jaxws:enableWrapperStyle>false</jaxws:enableWrapperStyle>
> otherwise the cxf proxy will fail at runtime with a class cast exception.
> could some extension be added to generate XMLElementWrappers with one and only one collection
as java.util.List?
> <plugin>
>                 <groupId>org.apache.cxf</groupId>
>                 <artifactId>cxf-codegen-plugin</artifactId>
>                 <version>${cxfVersion}</version>
>                 <executions>
>                     <execution>
>                         <id>cxf-shipment</id>
>                         <phase>generate-sources</phase>
>                         <goals>
>                             <goal>wsdl2java</goal>
>                         </goals>
>                         <configuration>
>                             <sourceRoot>${project.build.directory}/generated-sources/main</sourceRoot>
>                             <wsdlOptions>
>                                 <wsdlOption>
>                                     <wsdl>${basedir}/src/main/resources/ShipmentService.wsdl</wsdl>
>                                     <bindingFiles>
>                                         <bindingFile>${basedir}/src/main/resources/bindings-global.xml</bindingFile>
>                                     </bindingFiles>
>                                     <extraargs>
>                                         <arg>-xjc-Xxew</arg>
>                                     </extraargs>
>                                 </wsdlOption>
>                             </wsdlOptions>
>                         </configuration>
>                     </execution>
>                 </executions>
>                 <configuration>
>                     <defaultOptions>
>                         <autoNameResolution>true</autoNameResolution>
>                     </defaultOptions>
>                     <verbose>true</verbose>
>                 </configuration>
>                 <dependencies>
>                     <dependency>
>                         <groupId>dk.conspicio</groupId>
>                         <artifactId>xew</artifactId>
>                         <version>1.0.0</version>
>                         <scope>runtime</scope>
>                     </dependency>
>                 </dependencies>
>             </plugin>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message