You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "alexandre collier (Created) (JIRA)" <ji...@apache.org> on 2011/10/20 18:17:10 UTC

[jira] [Created] (CXF-3870) aegis databing SOAP response does not respect validation standard

aegis databing SOAP response does not respect validation standard 
------------------------------------------------------------------

                 Key: CXF-3870
                 URL: https://issues.apache.org/jira/browse/CXF-3870
             Project: CXF
          Issue Type: Bug
          Components: Aegis Databinding
    Affects Versions: 2.4.3
         Environment: Debian/Tomcat/Spring/CXF/Aegis/Hibernate/PostgreSQL
            Reporter: alexandre collier


We are using aegis data binding to produce SOAP and wsdl content in front a web server. Integration with spring works great, and the services are consumable by both Java and PHP clients. But if I validate the SOAP response with a tool (such as SOAP UI), an error occurs on complex type binding involving an inheritance pattern.

Complex inheritance scheme:
{quote} 
   AbstractObjectA -implements-> InterfaceObjectA
   ObjectAImpl -extends-> AbstractObjectA
   AbstractObjectB -implements-> InterfaceObjectB
   AbstractObjectB -extends-> AbstractObjectA
   ObjectBImpl -extends-> AbstractObjectB
{quote} 

Spring and aegis configuration:
{quote} 
	<bean id="aegisContext" class="org.apache.cxf.aegis.AegisContext">
		<property name="writeXsiTypes" value="true" />
		<property name="enableJDOMMappings" value="true" />
		<property name="mtomEnabled" value="true" />
		<property name="beanImplementationMap">
			<map>
				<entry key="my.company.domain.ObjectA" value="AbstractObjectA"/>
				<entry key="my.company.domain.ObjectB" value="AbstractObjectB"/>
			</map>
		</property>
		<property name="rootClassNames">
			<set>
				<value>my.company.domain.ObjectAImpl</value>
				<value>my.company.domain.ObjectBImpl</value>
			</set>
		</property>
	</bean>
		
	<bean id="aegisBean" class="org.apache.cxf.aegis.databinding.AegisDatabinding" scope="prototype">
		<property name="aegisContext" ref="aegisContext"/>
	</bean>
	
	<bean id="service-factory" class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean" scope="prototype">
		<property name="dataBinding" ref="aegisBean" />
		<property name="serviceConfigurations">
			<list>
				<bean class="org.apache.cxf.jaxws.support.JaxWsServiceConfiguration" />
				<bean class="org.apache.cxf.service.factory.DefaultServiceConfiguration" />
			</list>
		</property>
	</bean>

	<jaxws:endpoint id="SoapServiceTestJaxws" implementor="#testService" address="/serviceTestJaxws" >
		<jaxws:serviceFactory>
			<ref bean='service-factory' />
		</jaxws:serviceFactory>
	</jaxws:endpoint>	
{quote} 

here is the wsdl:types part of resulting wsdl :
{quote} 
<wsdl:types>
<xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" argetNamespace="http://domain.company.my">

<xsd:complexType name="ObjectB">
   <xsd:sequence>
      <xsd:element minOccurs="0" name="attributeA" nillable="true" type="xsd:string"/>
      <xsd:element minOccurs="0" name="attributeB" nillable="true" type="xsd:string"/>
      <xsd:element minOccurs="0" name="id" type="xsd:long"/>
   </xsd:sequence>
</xsd:complexType>

<xsd:complexType name="ObjectBImpl">
   <xsd:complexContent>
      <xsd:extension base="tns:AbstractObjectB">
         <xsd:sequence/>
      </xsd:extension>
   </xsd:complexContent>
</xsd:complexType>

<xsd:complexType abstract="true" name="AbstractObjectB">
   <xsd:complexContent>
      <xsd:extension base="tns:AbstractObjectA">
         <xsd:sequence>
            <xsd:element minOccurs="0" name="attributeB" nillable="true" type="xsd:string"/>
         </xsd:sequence>
      </xsd:extension>
   </xsd:complexContent>
</xsd:complexType>

<xsd:complexType name="ObjectAImpl">
   <xsd:complexContent>
      <xsd:extension base="tns:AbstractObjectA">
         <xsd:sequence/>
      </xsd:extension>
   </xsd:complexContent>
</xsd:complexType>

<xsd:complexType name="ObjectA">
   <xsd:sequence>
      <xsd:element minOccurs="0" name="attributeA" nillable="true" type="xsd:string"/>
      <xsd:element minOccurs="0" name="id" type="xsd:long"/>
   </xsd:sequence>
</xsd:complexType>

<xsd:complexType abstract="true" name="AbstractObjectA">
   <xsd:sequence>
      <xsd:element minOccurs="0" name="attributeA" nillable="true" type="xsd:string"/>
      <xsd:element minOccurs="0" name="id" type="xsd:long"/>
   </xsd:sequence>
</xsd:complexType>

</xsd:schema>
</wsdl:types>
{quote} 

Here is a web service declaration:
{quote}
	@WebMethod
	public ObjectB methodWithB(@WebParam(name = "pInputTypeB", mode = WebParam.Mode.IN) ObjectB pInputTypeB)
{quote}

and the soap response to a call to that service:
<soap:Envelope>
   <soap:Body>
      <ns1:methodWithBResponse>
         <return xsi:type="ns2:ObjectBImpl">
            <ns2:attributeA>attributeAValue</ns2:attributeA>
            <ns2:id>0</ns2:id>
            <ns2:attributeB>attributeBValue</ns2:attributeB>
         </return>
      </ns1:methodWithBResponse>
   </soap:Body>
</soap:Envelope>

We can see in wsdl content that inheritance between interfaces and abstract objects are not described. The inheritance tree isn't complete and similar to what is coded in java. If a service return type is described with an interface and the real content is an implementation object, validation of soap response will fail. Java clients (cxf aegis client) seem to be smart enough to unmarshall that kind of inheritance tree, PHP clients need to declare a data type mapping to complete the inheritance tree, but .NET client are blocking on validation of the soap response as they fail to match interface and implementation types (As far as I know). 

Existing tickets on XFire's jira were pointing that problem, have they been fixed in CXF : 
<ul>
   <li><a href="http://jira.codehaus.org/browse/XFIRE-556" target="_top" rel="nofollow" link="external">556</a></li>
   <li><a href="http://jira.codehaus.org/browse/XFIRE-558" target="_top" rel="nofollow" link="external">558</a></li>
</ul>

I've upgraded the CXF lib on my project to the last stable version (2.4.3) but the problem remains.

If someone want to test it, I can supply a full working project (~40Mb due to a messy lib dir).

Alex

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-3870) aegis databing SOAP response does not respect validation standard

Posted by "Daniel Kulp (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13159458#comment-13159458 ] 

Daniel Kulp commented on CXF-3870:
----------------------------------


The result with 2.5 is the best that can be done with XMLSchema.   XSD does not allow interfaces to be mapped in.  Thus, the best we can do is the hierarchy of the abstract classes which is what it is doing now.   WSDL operations must return an element with a concrete (or abstract) type, not an interface.  Thus, the current behavior is "correct".



                
> aegis databing SOAP response does not respect validation standard 
> ------------------------------------------------------------------
>
>                 Key: CXF-3870
>                 URL: https://issues.apache.org/jira/browse/CXF-3870
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.4.3
>         Environment: Debian/Tomcat/Spring/CXF/Aegis/Hibernate/PostgreSQL
>            Reporter: alexandre collier
>            Assignee: Daniel Kulp
>             Fix For: 2.5
>
>
> We are using aegis data binding to produce SOAP and wsdl content in front a web server. Integration with spring works great, and the services are consumable by both Java and PHP clients. But if I validate the SOAP response with a tool (such as SOAP UI), an error occurs on complex type binding involving an inheritance pattern.
> Complex inheritance scheme:
> {quote} 
>    AbstractObjectA implements-> InterfaceObjectA
>    ObjectAImpl extends-> AbstractObjectA
>    AbstractObjectB implements-> InterfaceObjectB
>    AbstractObjectB extends-> AbstractObjectA
>    ObjectBImpl extends-> AbstractObjectB
> {quote} 
> Spring and aegis configuration:
> {quote} 
> 	<bean id="aegisContext" class="org.apache.cxf.aegis.AegisContext">
> 		<property name="writeXsiTypes" value="true" />
> 		<property name="enableJDOMMappings" value="true" />
> 		<property name="mtomEnabled" value="true" />
> 		<property name="beanImplementationMap">
> 			<map>
> 				<entry key="my.company.domain.ObjectA" value="AbstractObjectA"/>
> 				<entry key="my.company.domain.ObjectB" value="AbstractObjectB"/>
> 			</map>
> 		</property>
> 		<property name="rootClassNames">
> 			<set>
> 				<value>my.company.domain.ObjectAImpl</value>
> 				<value>my.company.domain.ObjectBImpl</value>
> 			</set>
> 		</property>
> 	</bean>
> 		
> 	<bean id="aegisBean" class="org.apache.cxf.aegis.databinding.AegisDatabinding" scope="prototype">
> 		<property name="aegisContext" ref="aegisContext"/>
> 	</bean>
> 	
> 	<bean id="service-factory" class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean" scope="prototype">
> 		<property name="dataBinding" ref="aegisBean" />
> 		<property name="serviceConfigurations">
> 			<list>
> 				<bean class="org.apache.cxf.jaxws.support.JaxWsServiceConfiguration" />
> 				<bean class="org.apache.cxf.service.factory.DefaultServiceConfiguration" />
> 			</list>
> 		</property>
> 	</bean>
> 	<jaxws:endpoint id="SoapServiceTestJaxws" implementor="#testService" address="/serviceTestJaxws" >
> 		<jaxws:serviceFactory>
> 			<ref bean='service-factory' />
> 		</jaxws:serviceFactory>
> 	</jaxws:endpoint>	
> {quote} 
> here is the wsdl:types part of resulting wsdl :
> {quote} 
> <wsdl:types>
> <xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" argetNamespace="http://domain.company.my">
> <xsd:complexType name="ObjectB">
>    <xsd:sequence>
>       <xsd:element minOccurs="0" name="attributeA" nillable="true" type="xsd:string"/>
>       <xsd:element minOccurs="0" name="attributeB" nillable="true" type="xsd:string"/>
>       <xsd:element minOccurs="0" name="id" type="xsd:long"/>
>    </xsd:sequence>
> </xsd:complexType>
> <xsd:complexType name="ObjectBImpl">
>    <xsd:complexContent>
>       <xsd:extension base="tns:AbstractObjectB">
>          <xsd:sequence/>
>       </xsd:extension>
>    </xsd:complexContent>
> </xsd:complexType>
> <xsd:complexType abstract="true" name="AbstractObjectB">
>    <xsd:complexContent>
>       <xsd:extension base="tns:AbstractObjectA">
>          <xsd:sequence>
>             <xsd:element minOccurs="0" name="attributeB" nillable="true" type="xsd:string"/>
>          </xsd:sequence>
>       </xsd:extension>
>    </xsd:complexContent>
> </xsd:complexType>
> <xsd:complexType name="ObjectAImpl">
>    <xsd:complexContent>
>       <xsd:extension base="tns:AbstractObjectA">
>          <xsd:sequence/>
>       </xsd:extension>
>    </xsd:complexContent>
> </xsd:complexType>
> <xsd:complexType name="ObjectA">
>    <xsd:sequence>
>       <xsd:element minOccurs="0" name="attributeA" nillable="true" type="xsd:string"/>
>       <xsd:element minOccurs="0" name="id" type="xsd:long"/>
>    </xsd:sequence>
> </xsd:complexType>
> <xsd:complexType abstract="true" name="AbstractObjectA">
>    <xsd:sequence>
>       <xsd:element minOccurs="0" name="attributeA" nillable="true" type="xsd:string"/>
>       <xsd:element minOccurs="0" name="id" type="xsd:long"/>
>    </xsd:sequence>
> </xsd:complexType>
> </xsd:schema>
> </wsdl:types>
> {quote} 
> Here is a web service declaration:
> {quote}
> 	@WebMethod
> 	public ObjectB methodWithB(@WebParam(name = "pInputTypeB", mode = WebParam.Mode.IN) ObjectB pInputTypeB)
> {quote}
> and the soap response to a call to that service:
> {quote}
> <soap:Envelope>
>    <soap:Body>
>       <ns1:methodWithBResponse>
>          <return xsi:type="ns2:ObjectBImpl">
>             <ns2:attributeA>attributeAValue</ns2:attributeA>
>             <ns2:id>0</ns2:id>
>             <ns2:attributeB>attributeBValue</ns2:attributeB>
>          </return>
>       </ns1:methodWithBResponse>
>    </soap:Body>
> </soap:Envelope>
> {quote}
> We can see in wsdl content that inheritance between interfaces and abstract objects are not described. The inheritance tree isn't complete and similar to what is coded in java. If a service return type is described with an interface and the real content is an implementation object, validation of soap response will fail. Java clients (cxf aegis client) seem to be smart enough to unmarshall that kind of inheritance tree, PHP clients need to declare a data type mapping to complete the inheritance tree, but .NET client are blocking on validation of the soap response as they fail to match interface and implementation types (As far as I know). 
> Existing tickets on XFire's jira were pointing that problem, have they been fixed in CXF : 
>    http://jira.codehaus.org/browse/XFIRE-556
>    http://jira.codehaus.org/browse/XFIRE-558
> I've upgraded the CXF lib on my project to the last stable version (2.4.3) but the problem remains.
> If someone want to test it, I can supply a full working project (~40Mb due to a messy lib dir).
> Alex

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Reopened] (CXF-3870) aegis databing SOAP response does not respect validation standard

Posted by "alexandre collier (Reopened) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3870?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

alexandre collier reopened CXF-3870:
------------------------------------


This bug is not fixed yet, as inheritance between interfaces and abstract classes is still not present in generated wsdl.
                
> aegis databing SOAP response does not respect validation standard 
> ------------------------------------------------------------------
>
>                 Key: CXF-3870
>                 URL: https://issues.apache.org/jira/browse/CXF-3870
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.4.3
>         Environment: Debian/Tomcat/Spring/CXF/Aegis/Hibernate/PostgreSQL
>            Reporter: alexandre collier
>            Assignee: Daniel Kulp
>             Fix For: 2.5
>
>
> We are using aegis data binding to produce SOAP and wsdl content in front a web server. Integration with spring works great, and the services are consumable by both Java and PHP clients. But if I validate the SOAP response with a tool (such as SOAP UI), an error occurs on complex type binding involving an inheritance pattern.
> Complex inheritance scheme:
> {quote} 
>    AbstractObjectA implements-> InterfaceObjectA
>    ObjectAImpl extends-> AbstractObjectA
>    AbstractObjectB implements-> InterfaceObjectB
>    AbstractObjectB extends-> AbstractObjectA
>    ObjectBImpl extends-> AbstractObjectB
> {quote} 
> Spring and aegis configuration:
> {quote} 
> 	<bean id="aegisContext" class="org.apache.cxf.aegis.AegisContext">
> 		<property name="writeXsiTypes" value="true" />
> 		<property name="enableJDOMMappings" value="true" />
> 		<property name="mtomEnabled" value="true" />
> 		<property name="beanImplementationMap">
> 			<map>
> 				<entry key="my.company.domain.ObjectA" value="AbstractObjectA"/>
> 				<entry key="my.company.domain.ObjectB" value="AbstractObjectB"/>
> 			</map>
> 		</property>
> 		<property name="rootClassNames">
> 			<set>
> 				<value>my.company.domain.ObjectAImpl</value>
> 				<value>my.company.domain.ObjectBImpl</value>
> 			</set>
> 		</property>
> 	</bean>
> 		
> 	<bean id="aegisBean" class="org.apache.cxf.aegis.databinding.AegisDatabinding" scope="prototype">
> 		<property name="aegisContext" ref="aegisContext"/>
> 	</bean>
> 	
> 	<bean id="service-factory" class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean" scope="prototype">
> 		<property name="dataBinding" ref="aegisBean" />
> 		<property name="serviceConfigurations">
> 			<list>
> 				<bean class="org.apache.cxf.jaxws.support.JaxWsServiceConfiguration" />
> 				<bean class="org.apache.cxf.service.factory.DefaultServiceConfiguration" />
> 			</list>
> 		</property>
> 	</bean>
> 	<jaxws:endpoint id="SoapServiceTestJaxws" implementor="#testService" address="/serviceTestJaxws" >
> 		<jaxws:serviceFactory>
> 			<ref bean='service-factory' />
> 		</jaxws:serviceFactory>
> 	</jaxws:endpoint>	
> {quote} 
> here is the wsdl:types part of resulting wsdl :
> {quote} 
> <wsdl:types>
> <xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" argetNamespace="http://domain.company.my">
> <xsd:complexType name="ObjectB">
>    <xsd:sequence>
>       <xsd:element minOccurs="0" name="attributeA" nillable="true" type="xsd:string"/>
>       <xsd:element minOccurs="0" name="attributeB" nillable="true" type="xsd:string"/>
>       <xsd:element minOccurs="0" name="id" type="xsd:long"/>
>    </xsd:sequence>
> </xsd:complexType>
> <xsd:complexType name="ObjectBImpl">
>    <xsd:complexContent>
>       <xsd:extension base="tns:AbstractObjectB">
>          <xsd:sequence/>
>       </xsd:extension>
>    </xsd:complexContent>
> </xsd:complexType>
> <xsd:complexType abstract="true" name="AbstractObjectB">
>    <xsd:complexContent>
>       <xsd:extension base="tns:AbstractObjectA">
>          <xsd:sequence>
>             <xsd:element minOccurs="0" name="attributeB" nillable="true" type="xsd:string"/>
>          </xsd:sequence>
>       </xsd:extension>
>    </xsd:complexContent>
> </xsd:complexType>
> <xsd:complexType name="ObjectAImpl">
>    <xsd:complexContent>
>       <xsd:extension base="tns:AbstractObjectA">
>          <xsd:sequence/>
>       </xsd:extension>
>    </xsd:complexContent>
> </xsd:complexType>
> <xsd:complexType name="ObjectA">
>    <xsd:sequence>
>       <xsd:element minOccurs="0" name="attributeA" nillable="true" type="xsd:string"/>
>       <xsd:element minOccurs="0" name="id" type="xsd:long"/>
>    </xsd:sequence>
> </xsd:complexType>
> <xsd:complexType abstract="true" name="AbstractObjectA">
>    <xsd:sequence>
>       <xsd:element minOccurs="0" name="attributeA" nillable="true" type="xsd:string"/>
>       <xsd:element minOccurs="0" name="id" type="xsd:long"/>
>    </xsd:sequence>
> </xsd:complexType>
> </xsd:schema>
> </wsdl:types>
> {quote} 
> Here is a web service declaration:
> {quote}
> 	@WebMethod
> 	public ObjectB methodWithB(@WebParam(name = "pInputTypeB", mode = WebParam.Mode.IN) ObjectB pInputTypeB)
> {quote}
> and the soap response to a call to that service:
> {quote}
> <soap:Envelope>
>    <soap:Body>
>       <ns1:methodWithBResponse>
>          <return xsi:type="ns2:ObjectBImpl">
>             <ns2:attributeA>attributeAValue</ns2:attributeA>
>             <ns2:id>0</ns2:id>
>             <ns2:attributeB>attributeBValue</ns2:attributeB>
>          </return>
>       </ns1:methodWithBResponse>
>    </soap:Body>
> </soap:Envelope>
> {quote}
> We can see in wsdl content that inheritance between interfaces and abstract objects are not described. The inheritance tree isn't complete and similar to what is coded in java. If a service return type is described with an interface and the real content is an implementation object, validation of soap response will fail. Java clients (cxf aegis client) seem to be smart enough to unmarshall that kind of inheritance tree, PHP clients need to declare a data type mapping to complete the inheritance tree, but .NET client are blocking on validation of the soap response as they fail to match interface and implementation types (As far as I know). 
> Existing tickets on XFire's jira were pointing that problem, have they been fixed in CXF : 
>    http://jira.codehaus.org/browse/XFIRE-556
>    http://jira.codehaus.org/browse/XFIRE-558
> I've upgraded the CXF lib on my project to the last stable version (2.4.3) but the problem remains.
> If someone want to test it, I can supply a full working project (~40Mb due to a messy lib dir).
> Alex

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CXF-3870) aegis databing SOAP response does not respect validation standard

Posted by "alexandre collier (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3870?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

alexandre collier updated CXF-3870:
-----------------------------------

    Description: 
We are using aegis data binding to produce SOAP and wsdl content in front a web server. Integration with spring works great, and the services are consumable by both Java and PHP clients. But if I validate the SOAP response with a tool (such as SOAP UI), an error occurs on complex type binding involving an inheritance pattern.

Complex inheritance scheme:
{quote} 
   AbstractObjectA implements-> InterfaceObjectA
   ObjectAImpl extends-> AbstractObjectA
   AbstractObjectB implements-> InterfaceObjectB
   AbstractObjectB extends-> AbstractObjectA
   ObjectBImpl extends-> AbstractObjectB
{quote} 

Spring and aegis configuration:
{quote} 
	<bean id="aegisContext" class="org.apache.cxf.aegis.AegisContext">
		<property name="writeXsiTypes" value="true" />
		<property name="enableJDOMMappings" value="true" />
		<property name="mtomEnabled" value="true" />
		<property name="beanImplementationMap">
			<map>
				<entry key="my.company.domain.ObjectA" value="AbstractObjectA"/>
				<entry key="my.company.domain.ObjectB" value="AbstractObjectB"/>
			</map>
		</property>
		<property name="rootClassNames">
			<set>
				<value>my.company.domain.ObjectAImpl</value>
				<value>my.company.domain.ObjectBImpl</value>
			</set>
		</property>
	</bean>
		
	<bean id="aegisBean" class="org.apache.cxf.aegis.databinding.AegisDatabinding" scope="prototype">
		<property name="aegisContext" ref="aegisContext"/>
	</bean>
	
	<bean id="service-factory" class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean" scope="prototype">
		<property name="dataBinding" ref="aegisBean" />
		<property name="serviceConfigurations">
			<list>
				<bean class="org.apache.cxf.jaxws.support.JaxWsServiceConfiguration" />
				<bean class="org.apache.cxf.service.factory.DefaultServiceConfiguration" />
			</list>
		</property>
	</bean>

	<jaxws:endpoint id="SoapServiceTestJaxws" implementor="#testService" address="/serviceTestJaxws" >
		<jaxws:serviceFactory>
			<ref bean='service-factory' />
		</jaxws:serviceFactory>
	</jaxws:endpoint>	
{quote} 

here is the wsdl:types part of resulting wsdl :
{quote} 
<wsdl:types>
<xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" argetNamespace="http://domain.company.my">

<xsd:complexType name="ObjectB">
   <xsd:sequence>
      <xsd:element minOccurs="0" name="attributeA" nillable="true" type="xsd:string"/>
      <xsd:element minOccurs="0" name="attributeB" nillable="true" type="xsd:string"/>
      <xsd:element minOccurs="0" name="id" type="xsd:long"/>
   </xsd:sequence>
</xsd:complexType>

<xsd:complexType name="ObjectBImpl">
   <xsd:complexContent>
      <xsd:extension base="tns:AbstractObjectB">
         <xsd:sequence/>
      </xsd:extension>
   </xsd:complexContent>
</xsd:complexType>

<xsd:complexType abstract="true" name="AbstractObjectB">
   <xsd:complexContent>
      <xsd:extension base="tns:AbstractObjectA">
         <xsd:sequence>
            <xsd:element minOccurs="0" name="attributeB" nillable="true" type="xsd:string"/>
         </xsd:sequence>
      </xsd:extension>
   </xsd:complexContent>
</xsd:complexType>

<xsd:complexType name="ObjectAImpl">
   <xsd:complexContent>
      <xsd:extension base="tns:AbstractObjectA">
         <xsd:sequence/>
      </xsd:extension>
   </xsd:complexContent>
</xsd:complexType>

<xsd:complexType name="ObjectA">
   <xsd:sequence>
      <xsd:element minOccurs="0" name="attributeA" nillable="true" type="xsd:string"/>
      <xsd:element minOccurs="0" name="id" type="xsd:long"/>
   </xsd:sequence>
</xsd:complexType>

<xsd:complexType abstract="true" name="AbstractObjectA">
   <xsd:sequence>
      <xsd:element minOccurs="0" name="attributeA" nillable="true" type="xsd:string"/>
      <xsd:element minOccurs="0" name="id" type="xsd:long"/>
   </xsd:sequence>
</xsd:complexType>

</xsd:schema>
</wsdl:types>
{quote} 

Here is a web service declaration:
{quote}
	@WebMethod
	public ObjectB methodWithB(@WebParam(name = "pInputTypeB", mode = WebParam.Mode.IN) ObjectB pInputTypeB)
{quote}

and the soap response to a call to that service:
{quote}
<soap:Envelope>
   <soap:Body>
      <ns1:methodWithBResponse>
         <return xsi:type="ns2:ObjectBImpl">
            <ns2:attributeA>attributeAValue</ns2:attributeA>
            <ns2:id>0</ns2:id>
            <ns2:attributeB>attributeBValue</ns2:attributeB>
         </return>
      </ns1:methodWithBResponse>
   </soap:Body>
</soap:Envelope>
{quote}

We can see in wsdl content that inheritance between interfaces and abstract objects are not described. The inheritance tree isn't complete and similar to what is coded in java. If a service return type is described with an interface and the real content is an implementation object, validation of soap response will fail. Java clients (cxf aegis client) seem to be smart enough to unmarshall that kind of inheritance tree, PHP clients need to declare a data type mapping to complete the inheritance tree, but .NET client are blocking on validation of the soap response as they fail to match interface and implementation types (As far as I know). 

Existing tickets on XFire's jira were pointing that problem, have they been fixed in CXF : 
   http://jira.codehaus.org/browse/XFIRE-556
   http://jira.codehaus.org/browse/XFIRE-558

I've upgraded the CXF lib on my project to the last stable version (2.4.3) but the problem remains.

If someone want to test it, I can supply a full working project (~40Mb due to a messy lib dir).

Alex

  was:
We are using aegis data binding to produce SOAP and wsdl content in front a web server. Integration with spring works great, and the services are consumable by both Java and PHP clients. But if I validate the SOAP response with a tool (such as SOAP UI), an error occurs on complex type binding involving an inheritance pattern.

Complex inheritance scheme:
{quote} 
   AbstractObjectA -implements-> InterfaceObjectA
   ObjectAImpl -extends-> AbstractObjectA
   AbstractObjectB -implements-> InterfaceObjectB
   AbstractObjectB -extends-> AbstractObjectA
   ObjectBImpl -extends-> AbstractObjectB
{quote} 

Spring and aegis configuration:
{quote} 
	<bean id="aegisContext" class="org.apache.cxf.aegis.AegisContext">
		<property name="writeXsiTypes" value="true" />
		<property name="enableJDOMMappings" value="true" />
		<property name="mtomEnabled" value="true" />
		<property name="beanImplementationMap">
			<map>
				<entry key="my.company.domain.ObjectA" value="AbstractObjectA"/>
				<entry key="my.company.domain.ObjectB" value="AbstractObjectB"/>
			</map>
		</property>
		<property name="rootClassNames">
			<set>
				<value>my.company.domain.ObjectAImpl</value>
				<value>my.company.domain.ObjectBImpl</value>
			</set>
		</property>
	</bean>
		
	<bean id="aegisBean" class="org.apache.cxf.aegis.databinding.AegisDatabinding" scope="prototype">
		<property name="aegisContext" ref="aegisContext"/>
	</bean>
	
	<bean id="service-factory" class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean" scope="prototype">
		<property name="dataBinding" ref="aegisBean" />
		<property name="serviceConfigurations">
			<list>
				<bean class="org.apache.cxf.jaxws.support.JaxWsServiceConfiguration" />
				<bean class="org.apache.cxf.service.factory.DefaultServiceConfiguration" />
			</list>
		</property>
	</bean>

	<jaxws:endpoint id="SoapServiceTestJaxws" implementor="#testService" address="/serviceTestJaxws" >
		<jaxws:serviceFactory>
			<ref bean='service-factory' />
		</jaxws:serviceFactory>
	</jaxws:endpoint>	
{quote} 

here is the wsdl:types part of resulting wsdl :
{quote} 
<wsdl:types>
<xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" argetNamespace="http://domain.company.my">

<xsd:complexType name="ObjectB">
   <xsd:sequence>
      <xsd:element minOccurs="0" name="attributeA" nillable="true" type="xsd:string"/>
      <xsd:element minOccurs="0" name="attributeB" nillable="true" type="xsd:string"/>
      <xsd:element minOccurs="0" name="id" type="xsd:long"/>
   </xsd:sequence>
</xsd:complexType>

<xsd:complexType name="ObjectBImpl">
   <xsd:complexContent>
      <xsd:extension base="tns:AbstractObjectB">
         <xsd:sequence/>
      </xsd:extension>
   </xsd:complexContent>
</xsd:complexType>

<xsd:complexType abstract="true" name="AbstractObjectB">
   <xsd:complexContent>
      <xsd:extension base="tns:AbstractObjectA">
         <xsd:sequence>
            <xsd:element minOccurs="0" name="attributeB" nillable="true" type="xsd:string"/>
         </xsd:sequence>
      </xsd:extension>
   </xsd:complexContent>
</xsd:complexType>

<xsd:complexType name="ObjectAImpl">
   <xsd:complexContent>
      <xsd:extension base="tns:AbstractObjectA">
         <xsd:sequence/>
      </xsd:extension>
   </xsd:complexContent>
</xsd:complexType>

<xsd:complexType name="ObjectA">
   <xsd:sequence>
      <xsd:element minOccurs="0" name="attributeA" nillable="true" type="xsd:string"/>
      <xsd:element minOccurs="0" name="id" type="xsd:long"/>
   </xsd:sequence>
</xsd:complexType>

<xsd:complexType abstract="true" name="AbstractObjectA">
   <xsd:sequence>
      <xsd:element minOccurs="0" name="attributeA" nillable="true" type="xsd:string"/>
      <xsd:element minOccurs="0" name="id" type="xsd:long"/>
   </xsd:sequence>
</xsd:complexType>

</xsd:schema>
</wsdl:types>
{quote} 

Here is a web service declaration:
{quote}
	@WebMethod
	public ObjectB methodWithB(@WebParam(name = "pInputTypeB", mode = WebParam.Mode.IN) ObjectB pInputTypeB)
{quote}

and the soap response to a call to that service:
<soap:Envelope>
   <soap:Body>
      <ns1:methodWithBResponse>
         <return xsi:type="ns2:ObjectBImpl">
            <ns2:attributeA>attributeAValue</ns2:attributeA>
            <ns2:id>0</ns2:id>
            <ns2:attributeB>attributeBValue</ns2:attributeB>
         </return>
      </ns1:methodWithBResponse>
   </soap:Body>
</soap:Envelope>

We can see in wsdl content that inheritance between interfaces and abstract objects are not described. The inheritance tree isn't complete and similar to what is coded in java. If a service return type is described with an interface and the real content is an implementation object, validation of soap response will fail. Java clients (cxf aegis client) seem to be smart enough to unmarshall that kind of inheritance tree, PHP clients need to declare a data type mapping to complete the inheritance tree, but .NET client are blocking on validation of the soap response as they fail to match interface and implementation types (As far as I know). 

Existing tickets on XFire's jira were pointing that problem, have they been fixed in CXF : 
<ul>
   <li><a href="http://jira.codehaus.org/browse/XFIRE-556" target="_top" rel="nofollow" link="external">556</a></li>
   <li><a href="http://jira.codehaus.org/browse/XFIRE-558" target="_top" rel="nofollow" link="external">558</a></li>
</ul>

I've upgraded the CXF lib on my project to the last stable version (2.4.3) but the problem remains.

If someone want to test it, I can supply a full working project (~40Mb due to a messy lib dir).

Alex

    
> aegis databing SOAP response does not respect validation standard 
> ------------------------------------------------------------------
>
>                 Key: CXF-3870
>                 URL: https://issues.apache.org/jira/browse/CXF-3870
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.4.3
>         Environment: Debian/Tomcat/Spring/CXF/Aegis/Hibernate/PostgreSQL
>            Reporter: alexandre collier
>
> We are using aegis data binding to produce SOAP and wsdl content in front a web server. Integration with spring works great, and the services are consumable by both Java and PHP clients. But if I validate the SOAP response with a tool (such as SOAP UI), an error occurs on complex type binding involving an inheritance pattern.
> Complex inheritance scheme:
> {quote} 
>    AbstractObjectA implements-> InterfaceObjectA
>    ObjectAImpl extends-> AbstractObjectA
>    AbstractObjectB implements-> InterfaceObjectB
>    AbstractObjectB extends-> AbstractObjectA
>    ObjectBImpl extends-> AbstractObjectB
> {quote} 
> Spring and aegis configuration:
> {quote} 
> 	<bean id="aegisContext" class="org.apache.cxf.aegis.AegisContext">
> 		<property name="writeXsiTypes" value="true" />
> 		<property name="enableJDOMMappings" value="true" />
> 		<property name="mtomEnabled" value="true" />
> 		<property name="beanImplementationMap">
> 			<map>
> 				<entry key="my.company.domain.ObjectA" value="AbstractObjectA"/>
> 				<entry key="my.company.domain.ObjectB" value="AbstractObjectB"/>
> 			</map>
> 		</property>
> 		<property name="rootClassNames">
> 			<set>
> 				<value>my.company.domain.ObjectAImpl</value>
> 				<value>my.company.domain.ObjectBImpl</value>
> 			</set>
> 		</property>
> 	</bean>
> 		
> 	<bean id="aegisBean" class="org.apache.cxf.aegis.databinding.AegisDatabinding" scope="prototype">
> 		<property name="aegisContext" ref="aegisContext"/>
> 	</bean>
> 	
> 	<bean id="service-factory" class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean" scope="prototype">
> 		<property name="dataBinding" ref="aegisBean" />
> 		<property name="serviceConfigurations">
> 			<list>
> 				<bean class="org.apache.cxf.jaxws.support.JaxWsServiceConfiguration" />
> 				<bean class="org.apache.cxf.service.factory.DefaultServiceConfiguration" />
> 			</list>
> 		</property>
> 	</bean>
> 	<jaxws:endpoint id="SoapServiceTestJaxws" implementor="#testService" address="/serviceTestJaxws" >
> 		<jaxws:serviceFactory>
> 			<ref bean='service-factory' />
> 		</jaxws:serviceFactory>
> 	</jaxws:endpoint>	
> {quote} 
> here is the wsdl:types part of resulting wsdl :
> {quote} 
> <wsdl:types>
> <xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" argetNamespace="http://domain.company.my">
> <xsd:complexType name="ObjectB">
>    <xsd:sequence>
>       <xsd:element minOccurs="0" name="attributeA" nillable="true" type="xsd:string"/>
>       <xsd:element minOccurs="0" name="attributeB" nillable="true" type="xsd:string"/>
>       <xsd:element minOccurs="0" name="id" type="xsd:long"/>
>    </xsd:sequence>
> </xsd:complexType>
> <xsd:complexType name="ObjectBImpl">
>    <xsd:complexContent>
>       <xsd:extension base="tns:AbstractObjectB">
>          <xsd:sequence/>
>       </xsd:extension>
>    </xsd:complexContent>
> </xsd:complexType>
> <xsd:complexType abstract="true" name="AbstractObjectB">
>    <xsd:complexContent>
>       <xsd:extension base="tns:AbstractObjectA">
>          <xsd:sequence>
>             <xsd:element minOccurs="0" name="attributeB" nillable="true" type="xsd:string"/>
>          </xsd:sequence>
>       </xsd:extension>
>    </xsd:complexContent>
> </xsd:complexType>
> <xsd:complexType name="ObjectAImpl">
>    <xsd:complexContent>
>       <xsd:extension base="tns:AbstractObjectA">
>          <xsd:sequence/>
>       </xsd:extension>
>    </xsd:complexContent>
> </xsd:complexType>
> <xsd:complexType name="ObjectA">
>    <xsd:sequence>
>       <xsd:element minOccurs="0" name="attributeA" nillable="true" type="xsd:string"/>
>       <xsd:element minOccurs="0" name="id" type="xsd:long"/>
>    </xsd:sequence>
> </xsd:complexType>
> <xsd:complexType abstract="true" name="AbstractObjectA">
>    <xsd:sequence>
>       <xsd:element minOccurs="0" name="attributeA" nillable="true" type="xsd:string"/>
>       <xsd:element minOccurs="0" name="id" type="xsd:long"/>
>    </xsd:sequence>
> </xsd:complexType>
> </xsd:schema>
> </wsdl:types>
> {quote} 
> Here is a web service declaration:
> {quote}
> 	@WebMethod
> 	public ObjectB methodWithB(@WebParam(name = "pInputTypeB", mode = WebParam.Mode.IN) ObjectB pInputTypeB)
> {quote}
> and the soap response to a call to that service:
> {quote}
> <soap:Envelope>
>    <soap:Body>
>       <ns1:methodWithBResponse>
>          <return xsi:type="ns2:ObjectBImpl">
>             <ns2:attributeA>attributeAValue</ns2:attributeA>
>             <ns2:id>0</ns2:id>
>             <ns2:attributeB>attributeBValue</ns2:attributeB>
>          </return>
>       </ns1:methodWithBResponse>
>    </soap:Body>
> </soap:Envelope>
> {quote}
> We can see in wsdl content that inheritance between interfaces and abstract objects are not described. The inheritance tree isn't complete and similar to what is coded in java. If a service return type is described with an interface and the real content is an implementation object, validation of soap response will fail. Java clients (cxf aegis client) seem to be smart enough to unmarshall that kind of inheritance tree, PHP clients need to declare a data type mapping to complete the inheritance tree, but .NET client are blocking on validation of the soap response as they fail to match interface and implementation types (As far as I know). 
> Existing tickets on XFire's jira were pointing that problem, have they been fixed in CXF : 
>    http://jira.codehaus.org/browse/XFIRE-556
>    http://jira.codehaus.org/browse/XFIRE-558
> I've upgraded the CXF lib on my project to the last stable version (2.4.3) but the problem remains.
> If someone want to test it, I can supply a full working project (~40Mb due to a messy lib dir).
> Alex

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-3870) aegis databing SOAP response does not respect validation standard

Posted by "alexandre collier (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13149518#comment-13149518 ] 

alexandre collier commented on CXF-3870:
----------------------------------------

I've tested with the 2.5 cxf snapshot, and there is no change for the problem mentioned earlier. Inheritance between interfaces and abstract classes is still not present in wsdl. Moreover, SOAP response is still not valid as it returns implementation object for a method declared to return an interface object. 




                
> aegis databing SOAP response does not respect validation standard 
> ------------------------------------------------------------------
>
>                 Key: CXF-3870
>                 URL: https://issues.apache.org/jira/browse/CXF-3870
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.4.3
>         Environment: Debian/Tomcat/Spring/CXF/Aegis/Hibernate/PostgreSQL
>            Reporter: alexandre collier
>            Assignee: Daniel Kulp
>             Fix For: 2.5
>
>
> We are using aegis data binding to produce SOAP and wsdl content in front a web server. Integration with spring works great, and the services are consumable by both Java and PHP clients. But if I validate the SOAP response with a tool (such as SOAP UI), an error occurs on complex type binding involving an inheritance pattern.
> Complex inheritance scheme:
> {quote} 
>    AbstractObjectA implements-> InterfaceObjectA
>    ObjectAImpl extends-> AbstractObjectA
>    AbstractObjectB implements-> InterfaceObjectB
>    AbstractObjectB extends-> AbstractObjectA
>    ObjectBImpl extends-> AbstractObjectB
> {quote} 
> Spring and aegis configuration:
> {quote} 
> 	<bean id="aegisContext" class="org.apache.cxf.aegis.AegisContext">
> 		<property name="writeXsiTypes" value="true" />
> 		<property name="enableJDOMMappings" value="true" />
> 		<property name="mtomEnabled" value="true" />
> 		<property name="beanImplementationMap">
> 			<map>
> 				<entry key="my.company.domain.ObjectA" value="AbstractObjectA"/>
> 				<entry key="my.company.domain.ObjectB" value="AbstractObjectB"/>
> 			</map>
> 		</property>
> 		<property name="rootClassNames">
> 			<set>
> 				<value>my.company.domain.ObjectAImpl</value>
> 				<value>my.company.domain.ObjectBImpl</value>
> 			</set>
> 		</property>
> 	</bean>
> 		
> 	<bean id="aegisBean" class="org.apache.cxf.aegis.databinding.AegisDatabinding" scope="prototype">
> 		<property name="aegisContext" ref="aegisContext"/>
> 	</bean>
> 	
> 	<bean id="service-factory" class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean" scope="prototype">
> 		<property name="dataBinding" ref="aegisBean" />
> 		<property name="serviceConfigurations">
> 			<list>
> 				<bean class="org.apache.cxf.jaxws.support.JaxWsServiceConfiguration" />
> 				<bean class="org.apache.cxf.service.factory.DefaultServiceConfiguration" />
> 			</list>
> 		</property>
> 	</bean>
> 	<jaxws:endpoint id="SoapServiceTestJaxws" implementor="#testService" address="/serviceTestJaxws" >
> 		<jaxws:serviceFactory>
> 			<ref bean='service-factory' />
> 		</jaxws:serviceFactory>
> 	</jaxws:endpoint>	
> {quote} 
> here is the wsdl:types part of resulting wsdl :
> {quote} 
> <wsdl:types>
> <xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" argetNamespace="http://domain.company.my">
> <xsd:complexType name="ObjectB">
>    <xsd:sequence>
>       <xsd:element minOccurs="0" name="attributeA" nillable="true" type="xsd:string"/>
>       <xsd:element minOccurs="0" name="attributeB" nillable="true" type="xsd:string"/>
>       <xsd:element minOccurs="0" name="id" type="xsd:long"/>
>    </xsd:sequence>
> </xsd:complexType>
> <xsd:complexType name="ObjectBImpl">
>    <xsd:complexContent>
>       <xsd:extension base="tns:AbstractObjectB">
>          <xsd:sequence/>
>       </xsd:extension>
>    </xsd:complexContent>
> </xsd:complexType>
> <xsd:complexType abstract="true" name="AbstractObjectB">
>    <xsd:complexContent>
>       <xsd:extension base="tns:AbstractObjectA">
>          <xsd:sequence>
>             <xsd:element minOccurs="0" name="attributeB" nillable="true" type="xsd:string"/>
>          </xsd:sequence>
>       </xsd:extension>
>    </xsd:complexContent>
> </xsd:complexType>
> <xsd:complexType name="ObjectAImpl">
>    <xsd:complexContent>
>       <xsd:extension base="tns:AbstractObjectA">
>          <xsd:sequence/>
>       </xsd:extension>
>    </xsd:complexContent>
> </xsd:complexType>
> <xsd:complexType name="ObjectA">
>    <xsd:sequence>
>       <xsd:element minOccurs="0" name="attributeA" nillable="true" type="xsd:string"/>
>       <xsd:element minOccurs="0" name="id" type="xsd:long"/>
>    </xsd:sequence>
> </xsd:complexType>
> <xsd:complexType abstract="true" name="AbstractObjectA">
>    <xsd:sequence>
>       <xsd:element minOccurs="0" name="attributeA" nillable="true" type="xsd:string"/>
>       <xsd:element minOccurs="0" name="id" type="xsd:long"/>
>    </xsd:sequence>
> </xsd:complexType>
> </xsd:schema>
> </wsdl:types>
> {quote} 
> Here is a web service declaration:
> {quote}
> 	@WebMethod
> 	public ObjectB methodWithB(@WebParam(name = "pInputTypeB", mode = WebParam.Mode.IN) ObjectB pInputTypeB)
> {quote}
> and the soap response to a call to that service:
> {quote}
> <soap:Envelope>
>    <soap:Body>
>       <ns1:methodWithBResponse>
>          <return xsi:type="ns2:ObjectBImpl">
>             <ns2:attributeA>attributeAValue</ns2:attributeA>
>             <ns2:id>0</ns2:id>
>             <ns2:attributeB>attributeBValue</ns2:attributeB>
>          </return>
>       </ns1:methodWithBResponse>
>    </soap:Body>
> </soap:Envelope>
> {quote}
> We can see in wsdl content that inheritance between interfaces and abstract objects are not described. The inheritance tree isn't complete and similar to what is coded in java. If a service return type is described with an interface and the real content is an implementation object, validation of soap response will fail. Java clients (cxf aegis client) seem to be smart enough to unmarshall that kind of inheritance tree, PHP clients need to declare a data type mapping to complete the inheritance tree, but .NET client are blocking on validation of the soap response as they fail to match interface and implementation types (As far as I know). 
> Existing tickets on XFire's jira were pointing that problem, have they been fixed in CXF : 
>    http://jira.codehaus.org/browse/XFIRE-556
>    http://jira.codehaus.org/browse/XFIRE-558
> I've upgraded the CXF lib on my project to the last stable version (2.4.3) but the problem remains.
> If someone want to test it, I can supply a full working project (~40Mb due to a messy lib dir).
> Alex

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CXF-3870) aegis databing SOAP response does not respect validation standard

Posted by "Daniel Kulp (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3870?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-3870.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.5
         Assignee: Daniel Kulp


Only "fixed" on 2.5 as is changes some mapping in Aegis which could break thing.

It's now "somewhat fixed" in that it will map the interface hierarchy into the schema.  Thus, you will get schema like:

{code:xml}
<wsdl:types>
    <xsd:schema xmlns:ns0="http://persistence.core.spring.uml2.cartridges.fornax.org" xmlns:tns="http://domain.company.my" xmlns:xsd="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://domain.company.my">
        <xsd:import namespace="http://persistence.core.spring.uml2.cartridges.fornax.org"/>
        <xsd:complexType name="ObjectA">
            <xsd:sequence>
                <xsd:element minOccurs="0" name="attributeA" nillable="true" type="xsd:string"/>
                <xsd:element minOccurs="0" name="id" type="xsd:long"/>
            </xsd:sequence>
        </xsd:complexType>
        <xsd:complexType name="ObjectB">
            <xsd:complexContent>
                <xsd:extension base="tns:ObjectA">
                    <xsd:sequence>
                        <xsd:element minOccurs="0" name="attributeB" nillable="true" type="xsd:string"/>
                    </xsd:sequence>
                </xsd:extension>
            </xsd:complexContent>
        </xsd:complexType>
        <xsd:complexType name="ObjectBDao">
            <xsd:complexContent>
                <xsd:extension base="ns0:GenericDao">
                    <xsd:sequence/>
                </xsd:extension>
            </xsd:complexContent>
        </xsd:complexType>
        <xsd:complexType name="ObjectADao">
            <xsd:complexContent>
                <xsd:extension base="ns0:GenericDao">
                    <xsd:sequence/>
                </xsd:extension>
            </xsd:complexContent>
        </xsd:complexType>
    </xsd:schema>
    <xsd:schema xmlns:tns="http://persistence.core.spring.uml2.cartridges.fornax.org" xmlns:xsd="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://persistence.core.spring.uml2.cartridges.fornax.org">
        <xsd:complexType name="GenericDao">
            <xsd:sequence>
                <xsd:element minOccurs="0" name="count" nillable="true" type="xsd:long"/>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:schema>
</wsdl:types>

{code}

However, you cannot really set the rootClasses to the concrete classes or they will start to appear in the schema as well and there isn't a way, in schema, to represent both the interface and the concrete class hierarchies that you have.

                
> aegis databing SOAP response does not respect validation standard 
> ------------------------------------------------------------------
>
>                 Key: CXF-3870
>                 URL: https://issues.apache.org/jira/browse/CXF-3870
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.4.3
>         Environment: Debian/Tomcat/Spring/CXF/Aegis/Hibernate/PostgreSQL
>            Reporter: alexandre collier
>            Assignee: Daniel Kulp
>             Fix For: 2.5
>
>
> We are using aegis data binding to produce SOAP and wsdl content in front a web server. Integration with spring works great, and the services are consumable by both Java and PHP clients. But if I validate the SOAP response with a tool (such as SOAP UI), an error occurs on complex type binding involving an inheritance pattern.
> Complex inheritance scheme:
> {quote} 
>    AbstractObjectA implements-> InterfaceObjectA
>    ObjectAImpl extends-> AbstractObjectA
>    AbstractObjectB implements-> InterfaceObjectB
>    AbstractObjectB extends-> AbstractObjectA
>    ObjectBImpl extends-> AbstractObjectB
> {quote} 
> Spring and aegis configuration:
> {quote} 
> 	<bean id="aegisContext" class="org.apache.cxf.aegis.AegisContext">
> 		<property name="writeXsiTypes" value="true" />
> 		<property name="enableJDOMMappings" value="true" />
> 		<property name="mtomEnabled" value="true" />
> 		<property name="beanImplementationMap">
> 			<map>
> 				<entry key="my.company.domain.ObjectA" value="AbstractObjectA"/>
> 				<entry key="my.company.domain.ObjectB" value="AbstractObjectB"/>
> 			</map>
> 		</property>
> 		<property name="rootClassNames">
> 			<set>
> 				<value>my.company.domain.ObjectAImpl</value>
> 				<value>my.company.domain.ObjectBImpl</value>
> 			</set>
> 		</property>
> 	</bean>
> 		
> 	<bean id="aegisBean" class="org.apache.cxf.aegis.databinding.AegisDatabinding" scope="prototype">
> 		<property name="aegisContext" ref="aegisContext"/>
> 	</bean>
> 	
> 	<bean id="service-factory" class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean" scope="prototype">
> 		<property name="dataBinding" ref="aegisBean" />
> 		<property name="serviceConfigurations">
> 			<list>
> 				<bean class="org.apache.cxf.jaxws.support.JaxWsServiceConfiguration" />
> 				<bean class="org.apache.cxf.service.factory.DefaultServiceConfiguration" />
> 			</list>
> 		</property>
> 	</bean>
> 	<jaxws:endpoint id="SoapServiceTestJaxws" implementor="#testService" address="/serviceTestJaxws" >
> 		<jaxws:serviceFactory>
> 			<ref bean='service-factory' />
> 		</jaxws:serviceFactory>
> 	</jaxws:endpoint>	
> {quote} 
> here is the wsdl:types part of resulting wsdl :
> {quote} 
> <wsdl:types>
> <xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" argetNamespace="http://domain.company.my">
> <xsd:complexType name="ObjectB">
>    <xsd:sequence>
>       <xsd:element minOccurs="0" name="attributeA" nillable="true" type="xsd:string"/>
>       <xsd:element minOccurs="0" name="attributeB" nillable="true" type="xsd:string"/>
>       <xsd:element minOccurs="0" name="id" type="xsd:long"/>
>    </xsd:sequence>
> </xsd:complexType>
> <xsd:complexType name="ObjectBImpl">
>    <xsd:complexContent>
>       <xsd:extension base="tns:AbstractObjectB">
>          <xsd:sequence/>
>       </xsd:extension>
>    </xsd:complexContent>
> </xsd:complexType>
> <xsd:complexType abstract="true" name="AbstractObjectB">
>    <xsd:complexContent>
>       <xsd:extension base="tns:AbstractObjectA">
>          <xsd:sequence>
>             <xsd:element minOccurs="0" name="attributeB" nillable="true" type="xsd:string"/>
>          </xsd:sequence>
>       </xsd:extension>
>    </xsd:complexContent>
> </xsd:complexType>
> <xsd:complexType name="ObjectAImpl">
>    <xsd:complexContent>
>       <xsd:extension base="tns:AbstractObjectA">
>          <xsd:sequence/>
>       </xsd:extension>
>    </xsd:complexContent>
> </xsd:complexType>
> <xsd:complexType name="ObjectA">
>    <xsd:sequence>
>       <xsd:element minOccurs="0" name="attributeA" nillable="true" type="xsd:string"/>
>       <xsd:element minOccurs="0" name="id" type="xsd:long"/>
>    </xsd:sequence>
> </xsd:complexType>
> <xsd:complexType abstract="true" name="AbstractObjectA">
>    <xsd:sequence>
>       <xsd:element minOccurs="0" name="attributeA" nillable="true" type="xsd:string"/>
>       <xsd:element minOccurs="0" name="id" type="xsd:long"/>
>    </xsd:sequence>
> </xsd:complexType>
> </xsd:schema>
> </wsdl:types>
> {quote} 
> Here is a web service declaration:
> {quote}
> 	@WebMethod
> 	public ObjectB methodWithB(@WebParam(name = "pInputTypeB", mode = WebParam.Mode.IN) ObjectB pInputTypeB)
> {quote}
> and the soap response to a call to that service:
> {quote}
> <soap:Envelope>
>    <soap:Body>
>       <ns1:methodWithBResponse>
>          <return xsi:type="ns2:ObjectBImpl">
>             <ns2:attributeA>attributeAValue</ns2:attributeA>
>             <ns2:id>0</ns2:id>
>             <ns2:attributeB>attributeBValue</ns2:attributeB>
>          </return>
>       </ns1:methodWithBResponse>
>    </soap:Body>
> </soap:Envelope>
> {quote}
> We can see in wsdl content that inheritance between interfaces and abstract objects are not described. The inheritance tree isn't complete and similar to what is coded in java. If a service return type is described with an interface and the real content is an implementation object, validation of soap response will fail. Java clients (cxf aegis client) seem to be smart enough to unmarshall that kind of inheritance tree, PHP clients need to declare a data type mapping to complete the inheritance tree, but .NET client are blocking on validation of the soap response as they fail to match interface and implementation types (As far as I know). 
> Existing tickets on XFire's jira were pointing that problem, have they been fixed in CXF : 
>    http://jira.codehaus.org/browse/XFIRE-556
>    http://jira.codehaus.org/browse/XFIRE-558
> I've upgraded the CXF lib on my project to the last stable version (2.4.3) but the problem remains.
> If someone want to test it, I can supply a full working project (~40Mb due to a messy lib dir).
> Alex

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CXF-3870) aegis databing SOAP response does not respect validation standard

Posted by "Daniel Kulp (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3870?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-3870.
------------------------------

    Resolution: Fixed
    
> aegis databing SOAP response does not respect validation standard 
> ------------------------------------------------------------------
>
>                 Key: CXF-3870
>                 URL: https://issues.apache.org/jira/browse/CXF-3870
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.4.3
>         Environment: Debian/Tomcat/Spring/CXF/Aegis/Hibernate/PostgreSQL
>            Reporter: alexandre collier
>            Assignee: Daniel Kulp
>             Fix For: 2.5
>
>
> We are using aegis data binding to produce SOAP and wsdl content in front a web server. Integration with spring works great, and the services are consumable by both Java and PHP clients. But if I validate the SOAP response with a tool (such as SOAP UI), an error occurs on complex type binding involving an inheritance pattern.
> Complex inheritance scheme:
> {quote} 
>    AbstractObjectA implements-> InterfaceObjectA
>    ObjectAImpl extends-> AbstractObjectA
>    AbstractObjectB implements-> InterfaceObjectB
>    AbstractObjectB extends-> AbstractObjectA
>    ObjectBImpl extends-> AbstractObjectB
> {quote} 
> Spring and aegis configuration:
> {quote} 
> 	<bean id="aegisContext" class="org.apache.cxf.aegis.AegisContext">
> 		<property name="writeXsiTypes" value="true" />
> 		<property name="enableJDOMMappings" value="true" />
> 		<property name="mtomEnabled" value="true" />
> 		<property name="beanImplementationMap">
> 			<map>
> 				<entry key="my.company.domain.ObjectA" value="AbstractObjectA"/>
> 				<entry key="my.company.domain.ObjectB" value="AbstractObjectB"/>
> 			</map>
> 		</property>
> 		<property name="rootClassNames">
> 			<set>
> 				<value>my.company.domain.ObjectAImpl</value>
> 				<value>my.company.domain.ObjectBImpl</value>
> 			</set>
> 		</property>
> 	</bean>
> 		
> 	<bean id="aegisBean" class="org.apache.cxf.aegis.databinding.AegisDatabinding" scope="prototype">
> 		<property name="aegisContext" ref="aegisContext"/>
> 	</bean>
> 	
> 	<bean id="service-factory" class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean" scope="prototype">
> 		<property name="dataBinding" ref="aegisBean" />
> 		<property name="serviceConfigurations">
> 			<list>
> 				<bean class="org.apache.cxf.jaxws.support.JaxWsServiceConfiguration" />
> 				<bean class="org.apache.cxf.service.factory.DefaultServiceConfiguration" />
> 			</list>
> 		</property>
> 	</bean>
> 	<jaxws:endpoint id="SoapServiceTestJaxws" implementor="#testService" address="/serviceTestJaxws" >
> 		<jaxws:serviceFactory>
> 			<ref bean='service-factory' />
> 		</jaxws:serviceFactory>
> 	</jaxws:endpoint>	
> {quote} 
> here is the wsdl:types part of resulting wsdl :
> {quote} 
> <wsdl:types>
> <xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" argetNamespace="http://domain.company.my">
> <xsd:complexType name="ObjectB">
>    <xsd:sequence>
>       <xsd:element minOccurs="0" name="attributeA" nillable="true" type="xsd:string"/>
>       <xsd:element minOccurs="0" name="attributeB" nillable="true" type="xsd:string"/>
>       <xsd:element minOccurs="0" name="id" type="xsd:long"/>
>    </xsd:sequence>
> </xsd:complexType>
> <xsd:complexType name="ObjectBImpl">
>    <xsd:complexContent>
>       <xsd:extension base="tns:AbstractObjectB">
>          <xsd:sequence/>
>       </xsd:extension>
>    </xsd:complexContent>
> </xsd:complexType>
> <xsd:complexType abstract="true" name="AbstractObjectB">
>    <xsd:complexContent>
>       <xsd:extension base="tns:AbstractObjectA">
>          <xsd:sequence>
>             <xsd:element minOccurs="0" name="attributeB" nillable="true" type="xsd:string"/>
>          </xsd:sequence>
>       </xsd:extension>
>    </xsd:complexContent>
> </xsd:complexType>
> <xsd:complexType name="ObjectAImpl">
>    <xsd:complexContent>
>       <xsd:extension base="tns:AbstractObjectA">
>          <xsd:sequence/>
>       </xsd:extension>
>    </xsd:complexContent>
> </xsd:complexType>
> <xsd:complexType name="ObjectA">
>    <xsd:sequence>
>       <xsd:element minOccurs="0" name="attributeA" nillable="true" type="xsd:string"/>
>       <xsd:element minOccurs="0" name="id" type="xsd:long"/>
>    </xsd:sequence>
> </xsd:complexType>
> <xsd:complexType abstract="true" name="AbstractObjectA">
>    <xsd:sequence>
>       <xsd:element minOccurs="0" name="attributeA" nillable="true" type="xsd:string"/>
>       <xsd:element minOccurs="0" name="id" type="xsd:long"/>
>    </xsd:sequence>
> </xsd:complexType>
> </xsd:schema>
> </wsdl:types>
> {quote} 
> Here is a web service declaration:
> {quote}
> 	@WebMethod
> 	public ObjectB methodWithB(@WebParam(name = "pInputTypeB", mode = WebParam.Mode.IN) ObjectB pInputTypeB)
> {quote}
> and the soap response to a call to that service:
> {quote}
> <soap:Envelope>
>    <soap:Body>
>       <ns1:methodWithBResponse>
>          <return xsi:type="ns2:ObjectBImpl">
>             <ns2:attributeA>attributeAValue</ns2:attributeA>
>             <ns2:id>0</ns2:id>
>             <ns2:attributeB>attributeBValue</ns2:attributeB>
>          </return>
>       </ns1:methodWithBResponse>
>    </soap:Body>
> </soap:Envelope>
> {quote}
> We can see in wsdl content that inheritance between interfaces and abstract objects are not described. The inheritance tree isn't complete and similar to what is coded in java. If a service return type is described with an interface and the real content is an implementation object, validation of soap response will fail. Java clients (cxf aegis client) seem to be smart enough to unmarshall that kind of inheritance tree, PHP clients need to declare a data type mapping to complete the inheritance tree, but .NET client are blocking on validation of the soap response as they fail to match interface and implementation types (As far as I know). 
> Existing tickets on XFire's jira were pointing that problem, have they been fixed in CXF : 
>    http://jira.codehaus.org/browse/XFIRE-556
>    http://jira.codehaus.org/browse/XFIRE-558
> I've upgraded the CXF lib on my project to the last stable version (2.4.3) but the problem remains.
> If someone want to test it, I can supply a full working project (~40Mb due to a messy lib dir).
> Alex

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-3870) aegis databing SOAP response does not respect validation standard

Posted by "Benson Margulies (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13131727#comment-13131727 ] 

Benson Margulies commented on CXF-3870:
---------------------------------------

If you could take the time to create a small example of the phenomenon that would be helpful; otherwise one of us will have to do that.

                
> aegis databing SOAP response does not respect validation standard 
> ------------------------------------------------------------------
>
>                 Key: CXF-3870
>                 URL: https://issues.apache.org/jira/browse/CXF-3870
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.4.3
>         Environment: Debian/Tomcat/Spring/CXF/Aegis/Hibernate/PostgreSQL
>            Reporter: alexandre collier
>
> We are using aegis data binding to produce SOAP and wsdl content in front a web server. Integration with spring works great, and the services are consumable by both Java and PHP clients. But if I validate the SOAP response with a tool (such as SOAP UI), an error occurs on complex type binding involving an inheritance pattern.
> Complex inheritance scheme:
> {quote} 
>    AbstractObjectA implements-> InterfaceObjectA
>    ObjectAImpl extends-> AbstractObjectA
>    AbstractObjectB implements-> InterfaceObjectB
>    AbstractObjectB extends-> AbstractObjectA
>    ObjectBImpl extends-> AbstractObjectB
> {quote} 
> Spring and aegis configuration:
> {quote} 
> 	<bean id="aegisContext" class="org.apache.cxf.aegis.AegisContext">
> 		<property name="writeXsiTypes" value="true" />
> 		<property name="enableJDOMMappings" value="true" />
> 		<property name="mtomEnabled" value="true" />
> 		<property name="beanImplementationMap">
> 			<map>
> 				<entry key="my.company.domain.ObjectA" value="AbstractObjectA"/>
> 				<entry key="my.company.domain.ObjectB" value="AbstractObjectB"/>
> 			</map>
> 		</property>
> 		<property name="rootClassNames">
> 			<set>
> 				<value>my.company.domain.ObjectAImpl</value>
> 				<value>my.company.domain.ObjectBImpl</value>
> 			</set>
> 		</property>
> 	</bean>
> 		
> 	<bean id="aegisBean" class="org.apache.cxf.aegis.databinding.AegisDatabinding" scope="prototype">
> 		<property name="aegisContext" ref="aegisContext"/>
> 	</bean>
> 	
> 	<bean id="service-factory" class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean" scope="prototype">
> 		<property name="dataBinding" ref="aegisBean" />
> 		<property name="serviceConfigurations">
> 			<list>
> 				<bean class="org.apache.cxf.jaxws.support.JaxWsServiceConfiguration" />
> 				<bean class="org.apache.cxf.service.factory.DefaultServiceConfiguration" />
> 			</list>
> 		</property>
> 	</bean>
> 	<jaxws:endpoint id="SoapServiceTestJaxws" implementor="#testService" address="/serviceTestJaxws" >
> 		<jaxws:serviceFactory>
> 			<ref bean='service-factory' />
> 		</jaxws:serviceFactory>
> 	</jaxws:endpoint>	
> {quote} 
> here is the wsdl:types part of resulting wsdl :
> {quote} 
> <wsdl:types>
> <xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" argetNamespace="http://domain.company.my">
> <xsd:complexType name="ObjectB">
>    <xsd:sequence>
>       <xsd:element minOccurs="0" name="attributeA" nillable="true" type="xsd:string"/>
>       <xsd:element minOccurs="0" name="attributeB" nillable="true" type="xsd:string"/>
>       <xsd:element minOccurs="0" name="id" type="xsd:long"/>
>    </xsd:sequence>
> </xsd:complexType>
> <xsd:complexType name="ObjectBImpl">
>    <xsd:complexContent>
>       <xsd:extension base="tns:AbstractObjectB">
>          <xsd:sequence/>
>       </xsd:extension>
>    </xsd:complexContent>
> </xsd:complexType>
> <xsd:complexType abstract="true" name="AbstractObjectB">
>    <xsd:complexContent>
>       <xsd:extension base="tns:AbstractObjectA">
>          <xsd:sequence>
>             <xsd:element minOccurs="0" name="attributeB" nillable="true" type="xsd:string"/>
>          </xsd:sequence>
>       </xsd:extension>
>    </xsd:complexContent>
> </xsd:complexType>
> <xsd:complexType name="ObjectAImpl">
>    <xsd:complexContent>
>       <xsd:extension base="tns:AbstractObjectA">
>          <xsd:sequence/>
>       </xsd:extension>
>    </xsd:complexContent>
> </xsd:complexType>
> <xsd:complexType name="ObjectA">
>    <xsd:sequence>
>       <xsd:element minOccurs="0" name="attributeA" nillable="true" type="xsd:string"/>
>       <xsd:element minOccurs="0" name="id" type="xsd:long"/>
>    </xsd:sequence>
> </xsd:complexType>
> <xsd:complexType abstract="true" name="AbstractObjectA">
>    <xsd:sequence>
>       <xsd:element minOccurs="0" name="attributeA" nillable="true" type="xsd:string"/>
>       <xsd:element minOccurs="0" name="id" type="xsd:long"/>
>    </xsd:sequence>
> </xsd:complexType>
> </xsd:schema>
> </wsdl:types>
> {quote} 
> Here is a web service declaration:
> {quote}
> 	@WebMethod
> 	public ObjectB methodWithB(@WebParam(name = "pInputTypeB", mode = WebParam.Mode.IN) ObjectB pInputTypeB)
> {quote}
> and the soap response to a call to that service:
> {quote}
> <soap:Envelope>
>    <soap:Body>
>       <ns1:methodWithBResponse>
>          <return xsi:type="ns2:ObjectBImpl">
>             <ns2:attributeA>attributeAValue</ns2:attributeA>
>             <ns2:id>0</ns2:id>
>             <ns2:attributeB>attributeBValue</ns2:attributeB>
>          </return>
>       </ns1:methodWithBResponse>
>    </soap:Body>
> </soap:Envelope>
> {quote}
> We can see in wsdl content that inheritance between interfaces and abstract objects are not described. The inheritance tree isn't complete and similar to what is coded in java. If a service return type is described with an interface and the real content is an implementation object, validation of soap response will fail. Java clients (cxf aegis client) seem to be smart enough to unmarshall that kind of inheritance tree, PHP clients need to declare a data type mapping to complete the inheritance tree, but .NET client are blocking on validation of the soap response as they fail to match interface and implementation types (As far as I know). 
> Existing tickets on XFire's jira were pointing that problem, have they been fixed in CXF : 
>    http://jira.codehaus.org/browse/XFIRE-556
>    http://jira.codehaus.org/browse/XFIRE-558
> I've upgraded the CXF lib on my project to the last stable version (2.4.3) but the problem remains.
> If someone want to test it, I can supply a full working project (~40Mb due to a messy lib dir).
> Alex

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-3870) aegis databing SOAP response does not respect validation standard

Posted by "alexandre collier (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13132517#comment-13132517 ] 

alexandre collier commented on CXF-3870:
----------------------------------------

Here you can download an eclipse project which demonstrate the problem : http://dl.free.fr/q6D63s3Vs
I can't upload it on the jira because the file is too large (20Mo).

Alex
                
> aegis databing SOAP response does not respect validation standard 
> ------------------------------------------------------------------
>
>                 Key: CXF-3870
>                 URL: https://issues.apache.org/jira/browse/CXF-3870
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.4.3
>         Environment: Debian/Tomcat/Spring/CXF/Aegis/Hibernate/PostgreSQL
>            Reporter: alexandre collier
>
> We are using aegis data binding to produce SOAP and wsdl content in front a web server. Integration with spring works great, and the services are consumable by both Java and PHP clients. But if I validate the SOAP response with a tool (such as SOAP UI), an error occurs on complex type binding involving an inheritance pattern.
> Complex inheritance scheme:
> {quote} 
>    AbstractObjectA implements-> InterfaceObjectA
>    ObjectAImpl extends-> AbstractObjectA
>    AbstractObjectB implements-> InterfaceObjectB
>    AbstractObjectB extends-> AbstractObjectA
>    ObjectBImpl extends-> AbstractObjectB
> {quote} 
> Spring and aegis configuration:
> {quote} 
> 	<bean id="aegisContext" class="org.apache.cxf.aegis.AegisContext">
> 		<property name="writeXsiTypes" value="true" />
> 		<property name="enableJDOMMappings" value="true" />
> 		<property name="mtomEnabled" value="true" />
> 		<property name="beanImplementationMap">
> 			<map>
> 				<entry key="my.company.domain.ObjectA" value="AbstractObjectA"/>
> 				<entry key="my.company.domain.ObjectB" value="AbstractObjectB"/>
> 			</map>
> 		</property>
> 		<property name="rootClassNames">
> 			<set>
> 				<value>my.company.domain.ObjectAImpl</value>
> 				<value>my.company.domain.ObjectBImpl</value>
> 			</set>
> 		</property>
> 	</bean>
> 		
> 	<bean id="aegisBean" class="org.apache.cxf.aegis.databinding.AegisDatabinding" scope="prototype">
> 		<property name="aegisContext" ref="aegisContext"/>
> 	</bean>
> 	
> 	<bean id="service-factory" class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean" scope="prototype">
> 		<property name="dataBinding" ref="aegisBean" />
> 		<property name="serviceConfigurations">
> 			<list>
> 				<bean class="org.apache.cxf.jaxws.support.JaxWsServiceConfiguration" />
> 				<bean class="org.apache.cxf.service.factory.DefaultServiceConfiguration" />
> 			</list>
> 		</property>
> 	</bean>
> 	<jaxws:endpoint id="SoapServiceTestJaxws" implementor="#testService" address="/serviceTestJaxws" >
> 		<jaxws:serviceFactory>
> 			<ref bean='service-factory' />
> 		</jaxws:serviceFactory>
> 	</jaxws:endpoint>	
> {quote} 
> here is the wsdl:types part of resulting wsdl :
> {quote} 
> <wsdl:types>
> <xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" argetNamespace="http://domain.company.my">
> <xsd:complexType name="ObjectB">
>    <xsd:sequence>
>       <xsd:element minOccurs="0" name="attributeA" nillable="true" type="xsd:string"/>
>       <xsd:element minOccurs="0" name="attributeB" nillable="true" type="xsd:string"/>
>       <xsd:element minOccurs="0" name="id" type="xsd:long"/>
>    </xsd:sequence>
> </xsd:complexType>
> <xsd:complexType name="ObjectBImpl">
>    <xsd:complexContent>
>       <xsd:extension base="tns:AbstractObjectB">
>          <xsd:sequence/>
>       </xsd:extension>
>    </xsd:complexContent>
> </xsd:complexType>
> <xsd:complexType abstract="true" name="AbstractObjectB">
>    <xsd:complexContent>
>       <xsd:extension base="tns:AbstractObjectA">
>          <xsd:sequence>
>             <xsd:element minOccurs="0" name="attributeB" nillable="true" type="xsd:string"/>
>          </xsd:sequence>
>       </xsd:extension>
>    </xsd:complexContent>
> </xsd:complexType>
> <xsd:complexType name="ObjectAImpl">
>    <xsd:complexContent>
>       <xsd:extension base="tns:AbstractObjectA">
>          <xsd:sequence/>
>       </xsd:extension>
>    </xsd:complexContent>
> </xsd:complexType>
> <xsd:complexType name="ObjectA">
>    <xsd:sequence>
>       <xsd:element minOccurs="0" name="attributeA" nillable="true" type="xsd:string"/>
>       <xsd:element minOccurs="0" name="id" type="xsd:long"/>
>    </xsd:sequence>
> </xsd:complexType>
> <xsd:complexType abstract="true" name="AbstractObjectA">
>    <xsd:sequence>
>       <xsd:element minOccurs="0" name="attributeA" nillable="true" type="xsd:string"/>
>       <xsd:element minOccurs="0" name="id" type="xsd:long"/>
>    </xsd:sequence>
> </xsd:complexType>
> </xsd:schema>
> </wsdl:types>
> {quote} 
> Here is a web service declaration:
> {quote}
> 	@WebMethod
> 	public ObjectB methodWithB(@WebParam(name = "pInputTypeB", mode = WebParam.Mode.IN) ObjectB pInputTypeB)
> {quote}
> and the soap response to a call to that service:
> {quote}
> <soap:Envelope>
>    <soap:Body>
>       <ns1:methodWithBResponse>
>          <return xsi:type="ns2:ObjectBImpl">
>             <ns2:attributeA>attributeAValue</ns2:attributeA>
>             <ns2:id>0</ns2:id>
>             <ns2:attributeB>attributeBValue</ns2:attributeB>
>          </return>
>       </ns1:methodWithBResponse>
>    </soap:Body>
> </soap:Envelope>
> {quote}
> We can see in wsdl content that inheritance between interfaces and abstract objects are not described. The inheritance tree isn't complete and similar to what is coded in java. If a service return type is described with an interface and the real content is an implementation object, validation of soap response will fail. Java clients (cxf aegis client) seem to be smart enough to unmarshall that kind of inheritance tree, PHP clients need to declare a data type mapping to complete the inheritance tree, but .NET client are blocking on validation of the soap response as they fail to match interface and implementation types (As far as I know). 
> Existing tickets on XFire's jira were pointing that problem, have they been fixed in CXF : 
>    http://jira.codehaus.org/browse/XFIRE-556
>    http://jira.codehaus.org/browse/XFIRE-558
> I've upgraded the CXF lib on my project to the last stable version (2.4.3) but the problem remains.
> If someone want to test it, I can supply a full working project (~40Mb due to a messy lib dir).
> Alex

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira