You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by fd...@za.safmarine.com on 2007/03/14 13:19:26 UTC

Re: Abstract Complex Type [Our Ref:CPT34345 Your Ref:CPTBC628]

Hi

Apologies, I'm re-posting the problem that I'm experiencing. 

Anybody have any ideas... please?

In the mean time I'm going to give it a go with the latest Axis2, but I 
have a funny feeling it's going to produce the same results.

Kind regards
Fouche Du Preez





fdupreez@za.safmarine.com 
2007/03/13 03:48 PM
Please respond to
axis-user@ws.apache.org


To
axis-user@ws.apache.org
cc

Subject
Abstract Complex Type 
OREF:
CPTBC628 






Hi All

I'm using Axis 1.3 to generate my client stubs etc. The problem that I'm 
experiencing is as follows:

The web service that I'm connecting to has a abstract complex type (let's 
say: Favorite) defined as part of an argument for a call (let's say: 
favoritesAdd). The Favorite abstract type also has additional implementing 

types defined, eg. SimpleFavorite, AdvancedFavorite etc. These 
implementing complex types have additional properties that can be set. 
When making a call to favoritesAdd, Axis only populates the properties 
defined by the Favorite interface and not the additional properties 
defined by an implementing class.

My thoughts are:
1. Since the WSDL defines Favorite as the call's argument Axis quite 
rightly ignores the additional properties set by an implementing class. 
Can somebody please confirm this? 
2. Alternatively, should Axis be "clever" enough to realize that I'm 
passing it an object type that contains additional properties and that 
they need to be set in the SOAP request as well.
3. If not, and if it is even legal to do something like this in a web 
service, how can I tell Axis to do this?



Below the relevant WSDL snippets:
(Looking at the snippets below, you'll notice that the Favorite object 
get's passed to a FavoriteAddRequestDO for the call - I did not want to 
expand on this too much above in order to keep the explanation simple...)

<operation name="favoritesAdd"> 
  <input message="tns:favoritesAdd" /> 
  <output message="tns:favoritesAddResponse" /> 
</operation>

<message name="favoritesAdd"> 
  <part xmlns:partns="
http://www.maerskline.com/eTrack30/2006/03/22/TrackingRegisteredService" 
name="wsrequest" element="partns:favoritesAdd" />
</message>

<xsd:element xmlns:tp="java:com.maerskline.etrack.service.type.request" 
type="tp:FavoritesAddRequestDO" name="favoritesAdd" nillable="true" /> 

<xsd:complexType name="FavoritesAddRequestDO"> 
  <xsd:sequence> 
  <xsd:element xmlns:tp="java:com.maerskline.etrack.service.type" 
type="tp:Favorite" name="favorite" minOccurs="1" maxOccurs="1" 
nillable="true" /> 
  </xsd:sequence> 
</xsd:complexType>

<xsd:complexType name="Favorite" abstract="true"> 
        <xsd:sequence> 
                <xsd:element type="xsd:string" name="SCACCode" 
minOccurs="1" maxOccurs="1" nillable="true" /> 
                <xsd:element type="xsd:string" name="certificateId" 
minOccurs="1" maxOccurs="1" nillable="true" /> 
                <xsd:element type="xsd:string" name="customerId" 
minOccurs="1" maxOccurs="1" nillable="true" /> 
                <xsd:element type="xsd:string" name="description" 
minOccurs="1" maxOccurs="1" nillable="true" /> 
                <xsd:element type="xsd:integer" name="favoriteId" 
minOccurs="1" maxOccurs="1" nillable="true" /> 
                <xsd:element type="xsd:dateTime" name="lastUsed" 
minOccurs="1" maxOccurs="1" nillable="true" /> 
        </xsd:sequence> 
</xsd:complexType>

<xsd:complexType name="FavoriteSimpleTracking"> 
<xsd:complexContent> 
  <xsd:extension base="stns:Favorite"> 
    <xsd:sequence> 
      <xsd:element type="stns:ArrayOfFavoriteSimpleTrackingCriterion" 
name="criteria" minOccurs="1" maxOccurs="1" nillable="true" /> 
    </xsd:sequence> 
  </xsd:extension> 
</xsd:complexContent> 
</xsd:complexType>


Many thanks!

Kind regards
Fouche Du Preez




The information in this e-mail is confidential and is intended solely for 
the adressee(s). Access to this email by anyone else is unauthorized.  If 
you are not an intended recipient, please notify the sender of this email 
immediately.  You may not print, save or otherwise store the e-mail or any 
of the contents thereof in electronic or physical form, nor copy, use or 
disseminate the information contained in the email.




---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org





The information in this e-mail is confidential and is intended solely for the adressee(s). Access to this email by anyone else is unauthorized.  If you are not an intended recipient, please notify the sender of this email immediately.  You may not print, save or otherwise store the e-mail or any of the contents thereof in electronic or physical form, nor copy, use or disseminate the information contained in the email.

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org