View Javadoc

1    /****************************************************************************
2    * Copyright (c) 2005, 2006, 2007, 2008, 2009 Imola Informatica.
3    * All rights reserved. This program and the accompanying materials
4    * are made available under the terms of the LGPL License v2.1
5    * which accompanies this distribution, and is available at
6    * http://www.gnu.org/licenses/lgpl.html
7    ****************************************************************************/
8   package it.imolinfo.jbi4corba.jbi.cxf;
9   
10  import org.apache.cxf.service.factory.DefaultServiceConfiguration;
11  import org.apache.cxf.service.model.MessagePartInfo;
12  
13  /**
14   * CXF Service Configuration that ovverides the minOccurss calculation for the wrapper
15   * types. With this calss we can force not-null message part (is not possible 
16   * to force that using jax-ws 2.1 - should be possible woth jax-ws 2.2). See
17   * http://www.nabble.com/CXF---JAXB-%22Java-first-approach%22---remove-minOccurs%3D%220%22-td21692084.html#a22052705
18   * @author marco
19   *
20   */
21  public class Jbi4CorbaServiceConfiguration extends DefaultServiceConfiguration {
22  	
23  	/**
24  	 * Returns always "1".
25  	 */
26      public Long getWrapperPartMinOccurs(MessagePartInfo mpi) {            
27          return new Long(1);
28      }
29      
30  	/**
31  	 * Returns always "1".
32  	 */    
33      public Long getWrapperPartMaxOccurs(MessagePartInfo mpi) {        
34          return new Long(1);
35      }    
36  
37  
38  }