Axis-C++
  1. Axis-C++
  2. AXISCPP-623

Support for the WSDL construct "all"

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5 Final
    • Fix Version/s: current (nightly)
    • Component/s: WSDL processing - RPC
    • Labels:
      None
    • Environment:
      All

      Description

      Axis C++ doesn't support the WSDL construct "all".

      1. AllConstructTest.wsdl
        2 kB
        Chinthana Danapala

        Issue Links

          Activity

          Mark Thomas made changes -
          Workflow Default workflow, editable Closed status [ 12556847 ] jira [ 12579832 ]
          Mark Thomas made changes -
          Workflow jira [ 41789 ] Default workflow, editable Closed status [ 12556847 ]
          nadir amra made changes -
          Resolution Fixed [ 1 ]
          Status Reopened [ 4 ] Resolved [ 5 ]
          Fix Version/s current (nightly) [ 10476 ]
          Hide
          nadir amra added a comment - - edited

          The solution was to put all-group processing in a loop.

          In addition, checks are made to ensure that there is one and only one element from the all group. If not, an exception is thrown.

          In addition, at the end of the processing, an attempt is made to verify that all elements in the all group have been processed (except for nillable or optional elements).

          Changes have been put under SVN revision 678552
          (http://svn.apache.org/viewvc?view=rev&revision=678552). This revision also included changes to fix AXISCPP-888.

          Show
          nadir amra added a comment - - edited The solution was to put all-group processing in a loop. In addition, checks are made to ensure that there is one and only one element from the all group. If not, an exception is thrown. In addition, at the end of the processing, an attempt is made to verify that all elements in the all group have been processed (except for nillable or optional elements). Changes have been put under SVN revision 678552 ( http://svn.apache.org/viewvc?view=rev&revision=678552 ). This revision also included changes to fix AXISCPP-888 .
          nadir amra made changes -
          Assignee nadir amra [ nadiramra ]
          nadir amra made changes -
          Resolution Fixed [ 1 ]
          Assignee Dushshantha Chandradasa [ dchandradasa ]
          Status Closed [ 6 ] Reopened [ 4 ]
          Hide
          nadir amra added a comment -

          I am reopening this issue because I do not think xsd:all is supported correctly.

          Testing against the Google API, the result is described by the WSDL as follows:

          <xsd:complexType name="GoogleSearchResult">
          <xsd:all>
          <xsd:element name="documentFiltering" type="xsd:boolean"/>
          <xsd:element name="searchComments" type="xsd:string"/>
          <xsd:element name="estimatedTotalResultsCount" type="xsd:int"/>
          <xsd:element name="estimateIsExact" type="xsd:boolean"/>
          <xsd:element name="resultElements" type="typens:ResultElementArray"/>
          <xsd:element name="searchQuery" type="xsd:string"/>
          <xsd:element name="startIndex" type="xsd:int"/>
          <xsd:element name="endIndex" type="xsd:int"/>
          <xsd:element name="searchTips" type="xsd:string"/>
          <xsd:element name="directoryCategories" type="typens:DirectoryCategoryArray"/>
          <xsd:element name="searchTime" type="xsd:double"/>
          </xsd:all>
          </xsd:complexType>

          However, the result returned by the web service is not in the sequence given above ( xsd:all all the data to be returned in any order) and thus invoking the stub fails unless one goes into the various deserializers in the generated code and moves the code around to match the returned data.

          Here is the response returned by the web service:

          <?xml version='1.0' encoding='UTF-8'?>
          <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
          <SOAP-ENV:Body>
          <ns1:doGoogleSearchResponse xmlns:ns1="urn:GoogleSearch" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
          <return xsi:type="ns1:GoogleSearchResult">
          <directoryCategories xmlns:ns2="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:Array" ns2:arrayType="ns1:DirectoryCategory[0]">
          </directoryCategories>
          <documentFiltering xsi:type="xsd:boolean">false</documentFiltering>
          <endIndex xsi:type="xsd:int">1</endIndex>
          <estimateIsExact xsi:type="xsd:boolean">false</estimateIsExact>
          <estimatedTotalResultsCount xsi:type="xsd:int">577000000</estimatedTotalResultsCount>
          <resultElements xmlns:ns3="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:Array" ns3:arrayType="ns1:ResultElement[1]">
          <item xsi:type="ns1:ResultElement">
          <URL xsi:type="xsd:string">http://www.ibm.com/</URL>
          <cachedSize xsi:type="xsd:string">25k</cachedSize>
          <directoryCategory xsi:type="ns1:DirectoryCategory">
          <fullViewableName xsi:type="xsd:string"></fullViewableName>
          <specialEncoding xsi:type="xsd:string"></specialEncoding>
          </directoryCategory>
          <directoryTitle xsi:type="xsd:string"></directoryTitle>
          <hostName xsi:type="xsd:string"></hostName>
          <relatedInformationPresent xsi:type="xsd:boolean">true</relatedInformationPresent>
          <snippet xsi:type="xsd:string">The <b>IBM</b> corporate home page, entry point to information about <b>IBM</b> products and<br> services.</snippet>
          <summary xsi:type="xsd:string"></summary>
          <title xsi:type="xsd:string"><b>IBM</b> Corporation</title>
          </item>
          </resultElements>
          <searchComments xsi:type="xsd:string"></searchComments>
          <searchQuery xsi:type="xsd:string">ibm</searchQuery>
          <searchTime xsi:type="xsd:double">0.244935</searchTime>
          <searchTips xsi:type="xsd:string"></searchTips>
          <startIndex xsi:type="xsd:int">1</startIndex>
          </return>
          </ns1:doGoogleSearchResponse>

          </SOAP-ENV:Body>
          </SOAP-ENV:Envelope>

          Show
          nadir amra added a comment - I am reopening this issue because I do not think xsd:all is supported correctly. Testing against the Google API, the result is described by the WSDL as follows: <xsd:complexType name="GoogleSearchResult"> <xsd:all> <xsd:element name="documentFiltering" type="xsd:boolean"/> <xsd:element name="searchComments" type="xsd:string"/> <xsd:element name="estimatedTotalResultsCount" type="xsd:int"/> <xsd:element name="estimateIsExact" type="xsd:boolean"/> <xsd:element name="resultElements" type="typens:ResultElementArray"/> <xsd:element name="searchQuery" type="xsd:string"/> <xsd:element name="startIndex" type="xsd:int"/> <xsd:element name="endIndex" type="xsd:int"/> <xsd:element name="searchTips" type="xsd:string"/> <xsd:element name="directoryCategories" type="typens:DirectoryCategoryArray"/> <xsd:element name="searchTime" type="xsd:double"/> </xsd:all> </xsd:complexType> However, the result returned by the web service is not in the sequence given above ( xsd:all all the data to be returned in any order) and thus invoking the stub fails unless one goes into the various deserializers in the generated code and moves the code around to match the returned data. Here is the response returned by the web service: <?xml version='1.0' encoding='UTF-8'?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema"> <SOAP-ENV:Body> <ns1:doGoogleSearchResponse xmlns:ns1="urn:GoogleSearch" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <return xsi:type="ns1:GoogleSearchResult"> <directoryCategories xmlns:ns2="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:Array" ns2:arrayType="ns1:DirectoryCategory [0] "> </directoryCategories> <documentFiltering xsi:type="xsd:boolean">false</documentFiltering> <endIndex xsi:type="xsd:int">1</endIndex> <estimateIsExact xsi:type="xsd:boolean">false</estimateIsExact> <estimatedTotalResultsCount xsi:type="xsd:int">577000000</estimatedTotalResultsCount> <resultElements xmlns:ns3="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:Array" ns3:arrayType="ns1:ResultElement [1] "> <item xsi:type="ns1:ResultElement"> <URL xsi:type="xsd:string"> http://www.ibm.com/ </URL> <cachedSize xsi:type="xsd:string">25k</cachedSize> <directoryCategory xsi:type="ns1:DirectoryCategory"> <fullViewableName xsi:type="xsd:string"></fullViewableName> <specialEncoding xsi:type="xsd:string"></specialEncoding> </directoryCategory> <directoryTitle xsi:type="xsd:string"></directoryTitle> <hostName xsi:type="xsd:string"></hostName> <relatedInformationPresent xsi:type="xsd:boolean">true</relatedInformationPresent> <snippet xsi:type="xsd:string">The <b>IBM</b> corporate home page, entry point to information about <b>IBM</b> products and<br> services.</snippet> <summary xsi:type="xsd:string"></summary> <title xsi:type="xsd:string"><b>IBM</b> Corporation</title> </item> </resultElements> <searchComments xsi:type="xsd:string"></searchComments> <searchQuery xsi:type="xsd:string">ibm</searchQuery> <searchTime xsi:type="xsd:double">0.244935</searchTime> <searchTips xsi:type="xsd:string"></searchTips> <startIndex xsi:type="xsd:int">1</startIndex> </return> </ns1:doGoogleSearchResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
          Marcus Dushshantha Chandradasa made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Hide
          Marcus Dushshantha Chandradasa added a comment -

          Support for WSDL construct 'all' implemented and four tests are in place. Thanks Chinthana for fixing this.

          Show
          Marcus Dushshantha Chandradasa added a comment - Support for WSDL construct 'all' implemented and four tests are in place. Thanks Chinthana for fixing this.
          Marcus Dushshantha Chandradasa made changes -
          Assignee Dushshantha Chandradasa [ dchandradasa ]
          Marcus Dushshantha Chandradasa made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          Hide
          Samisa Abeysinghe added a comment -

          This issue talks of the same issue on non supporting 'all'
          There is a wsdl attached to AXISCPP-257 issue which could be used in testing

          Show
          Samisa Abeysinghe added a comment - This issue talks of the same issue on non supporting 'all' There is a wsdl attached to AXISCPP-257 issue which could be used in testing
          Samisa Abeysinghe made changes -
          Link This issue relates to AXISCPP-257 [ AXISCPP-257 ]
          Hide
          Chinthana Danapala added a comment -

          There are two kinds of changes that we have to looking in to this.

          1. WSDL tool changes
          2. DeSerializer changes.

          1.) WSDL tool

          1.1 How to decide if we have an "all" construct in WSDL?

          1.2 When we come crosses "all" construct generate the code accordingly. Changes should be in DeSerialization part of the complex types.

          2.) DeSerializer

          2.1 Decide minOccurs 0 or 1.
          If 1 then get (use current code.)
          If 0 then check & get

          2.2 Check & get
          Here there are 3 possible changes.

          1.We can have a list of element stored and can compare with the pulled one and select the matched one.
          E.g.
          List Pulled one
          A B
          B-->
          C
          D
          Here we sellect the B from the list.
          But in this option have additional check logic in generated code for each element. Also have to change current DeSerializer code.

          2.Also we can go element in sequence order and if it is not matched with pulled one then go to next. But here need to figure out how to recover pulled element.

          3.Passer peak ahead.
          Can we look ahead (without pulling) what element is the next?

          Advantage of this is can keep the current DeSerializer code as it is.
          Still additional check logic will be in generated code.

          Show
          Chinthana Danapala added a comment - There are two kinds of changes that we have to looking in to this. 1. WSDL tool changes 2. DeSerializer changes. 1.) WSDL tool 1.1 How to decide if we have an "all" construct in WSDL? 1.2 When we come crosses "all" construct generate the code accordingly. Changes should be in DeSerialization part of the complex types. 2.) DeSerializer 2.1 Decide minOccurs 0 or 1. If 1 then get (use current code.) If 0 then check & get 2.2 Check & get Here there are 3 possible changes. 1.We can have a list of element stored and can compare with the pulled one and select the matched one. E.g. List Pulled one A B B--> C D Here we sellect the B from the list. But in this option have additional check logic in generated code for each element. Also have to change current DeSerializer code. 2.Also we can go element in sequence order and if it is not matched with pulled one then go to next. But here need to figure out how to recover pulled element. 3.Passer peak ahead. Can we look ahead (without pulling) what element is the next? Advantage of this is can keep the current DeSerializer code as it is. Still additional check logic will be in generated code.
          Chinthana Danapala made changes -
          Attachment AllConstructTest.wsdl [ 19715 ]
          Hide
          Chinthana Danapala added a comment -

          this WSDL can use to test for the construct "all". This is a document type WSDL file.

          Show
          Chinthana Danapala added a comment - this WSDL can use to test for the construct "all". This is a document type WSDL file.
          Samisa Abeysinghe made changes -
          Component/s Basic Architecture [ 10817 ]
          Component/s WSDL processing [ 10822 ]
          Type Bug [ 1 ] New Feature [ 2 ]
          Affects Version/s 1.5 Final [ 11013 ]
          Fix Version/s 1.6 Alpha [ 11014 ]
          Affects Version/s 1.6 Alpha [ 11014 ]
          Hide
          Samisa Abeysinghe added a comment -
          Show
          Samisa Abeysinghe added a comment - http://www.w3schools.com/schema/el_all.asp is a useful reference.
          Samisa Abeysinghe made changes -
          Field Original Value New Value
          Fix Version/s 1.6 Alpha [ 11014 ]
          Summary Support for the construct any Support for the WSDL construct "all"
          Description Axis C++ doesn't support the Construct Any. Axis C++ doesn't support the WSDL construct "all".
          Marcus Dushshantha Chandradasa created issue -

            People

            • Assignee:
              nadir amra
              Reporter:
              Marcus Dushshantha Chandradasa
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development