You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Howard Chen <ho...@accenture.com> on 2010/08/06 18:56:44 UTC

Method Parameter's MinOccurs & MaxOccurs (Simple Front End, Aegis DataBinding/Mapping)

Hi,

I am trying to use CXF to create a class first web service using the
following combination of settings:

* Simple Front End
* Aegis Data Binding
* XFire Compatibility
* aegis.xml mapping file

My goal is to attempt to get the WSDL generated by CXF to look as if it was
generated by XFire.  I am almost there, but am getting stuck when trying to
get the MinOccurs and MaxOccurs to set for the method's parameters.

I have tried using the aegis.xml mapping as well as the global
TypeCreationOptions.  Neither seems to get the MinOccurs and MaxOccurs to
set properly.  I have also confirmed that my aegis.xml file is being picked
up because the mappedName is correct.

I am sure I am missing something here, so I was wondering if you guys knew
what config I might have missed.

Thank you for your help.


CLASSNAME.aegis.xml

    
    
    


settings.xml

    



    
        
    
    
        
        
            
                
                    
                    
                
            
        
        
            
                
                
                
            
        
    
    
        
    


CXF generates the following schema object within the WSDL:


    
        
        
        
    



Expected schema object within the WSDL


    
            
            
            
    





-- 
View this message in context: http://cxf.547215.n5.nabble.com/Method-Parameter-s-MinOccurs-MaxOccurs-Simple-Front-End-Aegis-DataBinding-Mapping-tp2266858p2266858.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Method Parameter's MinOccurs & MaxOccurs (Simple Front End, Aegis DataBinding/Mapping)

Posted by Howard Chen <ho...@accenture.com>.
After some further research, it seems like this is not an issue. 

Per XSD defaults, minOccurs and maxOccurs are defaulted to 1 if they are not
shown. 
http://www.w3schools.com/Schema/schema_complex_indicators.asp

Similar postings regarding minOccurs can also be found here: 
http://mail-archives.apache.org/mod_mbox/cxf-users/200902.mbox/%3C3C6E3ED010FCD34881D93108C79D7C0E14A52EDE@psysmsv6.ppm.nu%3E
http://cxf.547215.n5.nabble.com/CXF-JAXB-Java-first-approach-remove-minOccurs-0-td563211.html#a563211
http://cxf.547215.n5.nabble.com/Generated-code-with-minOccurs-0-and-nillable-true-contains-JAXBElement-td564375.html#a564375

-- 
View this message in context: http://cxf.547215.n5.nabble.com/Method-Parameter-s-MinOccurs-MaxOccurs-Simple-Front-End-Aegis-DataBinding-Mapping-tp2266858p2268183.html
Sent from the cxf-user mailing list archive at Nabble.com.