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

Benson Margulies commented on CXF-1628:
---------------------------------------

I definitely need more information.

Here's how I test this:

I made an @WebMethod like:

public void takeMyBean(BeanClass bean) {
}

and then I defined 

class BeanClass {
  private int[] ints;
  public int[] getInts() {return ints; }
  public void setInts(int[] n) { ints = n; }
}

Aegis makes a schema in which there is a separate ArrayOfInt type, and it has 
whatever minOccurs I put in the options class.

How are you getting minOccurs='0' for a plain int in a sequence?

For example, I see schemata like:

 <xsd:complexType name="BeanWithArrayNoAegisXml">
        <xsd:sequence>
            <xsd:element name="intArray" type="ns1:ArrayOfInt" />
            <xsd:element name="oneInt" type="xsd:int" />
        </xsd:sequence>
    </xsd:complexType>

Are you using a .aegis.xml file? Any @ annotations?



> TypeCreationOptions ignored
> ---------------------------
>
>                 Key: CXF-1628
>                 URL: https://issues.apache.org/jira/browse/CXF-1628
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.1
>         Environment: java 6 update 6 + tomcat 6.0.16
>            Reporter: Bruno Braga
>            Assignee: Benson Margulies
>             Fix For: 2.1.1
>
>
> I believe that the aegis is with a bug.
> The new settings using TypeCreationOptions  are not working (or I did wrong 
> settings and didn't show any error).
> --------------------------
>         <bean id="aegisBean" 
> class="org.apache.cxf.aegis.databinding.AegisDatabinding">
>                 <property name="configuration">
>                         <bean 
> class="org.apache.cxf.aegis.type.TypeCreationOptions">
>                         <property name="defaultMinOccurs" value="1"/>
>                         <property name="defaultNillable" value="false"/>
>                         </bean>
>                 </property>
>         </bean>
>            
>         <bean id="jaxws-and-aegis-service-factory"
>             class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean"
>             scope="prototype">
>             <property name="dataBinding" ref="aegisBean"/>
>         </bean>
>        
>         <bean id="segurancaService" class="xxxxx.SegurancaService">
>                 <constructor-arg><ref 
> bean="fachadaSeguranca"/></constructor-arg>  
>         </bean>
>        
>         <jaxws:endpoint id="endpointSegurancaService" 
> implementor="#segurancaService" address="/SegurancaService">
>                 <jaxws:serviceFactory>
>                         <ref bean='jaxws-and-aegis-service-factory' />
>                 </jaxws:serviceFactory>
>             <jaxws:inInterceptors>
>               <bean 
> class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor" />
>               <bean 
> class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
>                 <constructor-arg>
>                   <map>
>                     <entry key="action" value="UsernameToken Timestamp" />
>                     <entry key="passwordType" value="PasswordDigest" />
>                     <entry key="passwordCallbackClass" 
> value="xxxxx.wssecurity.PWCallback" />
>                   </map>
>                 </constructor-arg>
>               </bean>
>               <bean class="xxxxx.wssecurity.UsernameTokenInterceptor" />
>             </jaxws:inInterceptors>
>         </jaxws:endpoint>
> --------------------------
> My wsdl is being generated thus:
> <xsd:sequence>
> <xsd:element minOccurs="0" name="idSistema" type="xsd:int"/>
> <xsd:element minOccurs="0" name="idModulo" type="xsd:int"/>
> </xsd:sequence>
> It's wrong.
> minOccurs should be 1.
> TypeCreationOptions had no effect. 

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

Reply via email to