You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Bruno Braga (JIRA)" <ji...@apache.org> on 2008/06/06 04:14:45 UTC
[jira] Issue Comment Edited: (CXF-1628) TypeCreationOptions ignored
[ https://issues.apache.org/jira/browse/CXF-1628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12602882#action_12602882 ]
bruno.braga edited comment on CXF-1628 at 6/5/08 7:14 PM:
----------------------------------------------------------
Hi Benson,
I was beginning to prepare a project using your test files ...
But I will answer some things here to detail the problem better.
This "alterarVisao" is an operation, not a class.
<xsd:complexType name="alterarVisao">
<xsd:sequence>
<xsd:element minOccurs="0" name="idSistema" type="xsd:int"/>
<xsd:element minOccurs="0" name="nomeVisao" type="xsd:string"/>
<xsd:element minOccurs="0" name="codigoVisao" type="xsd:string"/>
<xsd:element minOccurs="0" name="idVisao" type="xsd:short"/>
</xsd:sequence>
</xsd:complexType>
See the code of WS and annotations:
@WebMethod
public Visao alterarVisao(@WebParam(name="idSistema") Integer idSistema, @WebParam(name="nomeVisao") String nomeVisao, @WebParam(name="codigoVisao") String codigoVisao, @WebParam(name="idVisao") Short idVisao) throws SegurancaException {
Using JAX or Aegis I have a minOccurs="0" for each field of operation.
This causes a big problem for the .Net client.
I have the same WS in Axis 1. The WSDL is generated correctly (I'm trying to migrate to CXF):
<wsdl:message name="alterarVisaoRequest">
<wsdl:part name="idSistema" type="xsd:int"/>
<wsdl:part name="nomeVisao" type="xsd:string"/>
<wsdl:part name="codigoVisao" type="xsd:string"/>
<wsdl:part name="idVisao" type="xsd:short"/>
</wsdl:message>
I'm seeing now that my operation of the Axis 1 (wsdl:message) is generated as xsd:complexType in Aegis...
But the important is: I don't have minOccurs="0" in WS parameters using Axis, and that is my problem of interop:
http://geekswithblogs.net/shahed/archive/2007/07/11/113881.aspx
was (Author: bruno.braga):
Hi Benson,
I was beginning to prepare a project using its files to test ...
But I will answer some things here to detail the problem better.
This "alterarVisao" is an operation, not a class.
<xsd:complexType name="alterarVisao">
<xsd:sequence>
<xsd:element minOccurs="0" name="idSistema" type="xsd:int"/>
<xsd:element minOccurs="0" name="nomeVisao" type="xsd:string"/>
<xsd:element minOccurs="0" name="codigoVisao" type="xsd:string"/>
<xsd:element minOccurs="0" name="idVisao" type="xsd:short"/>
</xsd:sequence>
</xsd:complexType>
See the code of WS and annotations:
@WebMethod
public Visao alterarVisao(@WebParam(name="idSistema") Integer idSistema, @WebParam(name="nomeVisao") String nomeVisao, @WebParam(name="codigoVisao") String codigoVisao, @WebParam(name="idVisao") Short idVisao) throws SegurancaException {
Using JAX or Aegis I have a minOccurs="0" for each field of operation.
This causes a big problem for the .Net client.
I have the same WS in Axis 1. The WSDL is generated correctly (I'm trying to migrate to CXF):
<wsdl:message name="alterarVisaoRequest">
<wsdl:part name="idSistema" type="xsd:int"/>
<wsdl:part name="nomeVisao" type="xsd:string"/>
<wsdl:part name="codigoVisao" type="xsd:string"/>
<wsdl:part name="idVisao" type="xsd:short"/>
</wsdl:message>
I'm seeing now that my operation of the Axis 1 (wsdl:message) is generated as xsd:complexType in Aegis...
But the important is: I don't have minOccurs="0" in WS parameters using Axis, and that is my problem of interop:
http://geekswithblogs.net/shahed/archive/2007/07/11/113881.aspx
> 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.