Hi,

Some more information -

To root cause the problem, I managed to remove warning "element ref "....." 
stands as the head of a 
substitutionGroup but is not declared abstract" by defining head elements to be 
of abstract type. These elements are now defined as below -

<xsd:element name="OpportunityConstraints" type="OpportunityConstraintsType" 
abstract="true">
<xsd:element name="OpportunityConstraintsV2" 
type="OpportunityConstraintsV2Type" substitutionGroup="OpportunityConstraints">

Generated C++ header (wsdl2h without any warning) has below union definition 
for above elements - 

/// Union for substitutionGroup="OpportunityConstraints"
    union _ns5__union_PlacementControlType
    {
    ns2__OpportunityConstraintsV2Type*   ns2__OpportunityConstraintsV2  1;      
///< Required element.
    ns2__OpportunityConstraintsV2Type*   ns2__OpportunityConstraintsV2  1;      
///< Required element.
    }                                    __union_PlacementControlType  ;
//  END OF CHOICE


Please notice that both fields of union is same, which is ERROR. Ideally, one 
should be of type OpportunityConstraintsType (head element) so that one element 
out of two can be selected at run time. I am using gSOAP 2.7.15 (Sorry, I 
wrongly mentioned 2.7.17 in last email, please ignore)..

Anyone has encountered this problem earlier? Any resolution/fix for this issue?

Any help here is highly appreciated!

Regards,
Ranjeet




________________________________
From: ranjeet kumar singh <ranjeet_jakh...@yahoo.com>
To: gsoap@yahoogroups.com
Sent: Sun, June 6, 2010 1:15:17 PM
Subject: Re: [gsoap] substitutionGroup element wsdl2h problem

  
Hi,

Just to add on below email...

I am using  gsoap 2.7.17.

Regards,
Ranjeet




________________________________
From: ranjeet kumar singh <ranjeet_jakhini@ yahoo.com>
To: gs...@yahoogroups. com
Sent: Sun, June 6, 2010 12:44:12 PM
Subject: [gsoap] substitutionGroup element wsdl2h problem

  
Hi,

I am using "substitutionGroup" for an element in my schema. I am getting below 
warnings when I convert my wsdl (which imports schema with 
substitutionGroup) to C++ header using wsdl2h -

Warning: element ref "....." stands as the head of a 
substitutionGroup but is not declared abstract

Any idea why am I getting this warning? Further more, I noticed that union 
definition in C++ header for substitutionGroup is also not 
correct, there are 2 fields in this union of same name and type, 
hence error while using C++ header with soapcpp2 compiler. Ideally, this union 
should have 2 different fields so that one can be selected at 
run-time.

Any idea why am I getting this error? Anyone encountered this problem 
earlier (I searched but could not find), any fix?

Any help here is highly appreciated!

Regards,
Ranjeet


 


      

Reply via email to