Clarity

 View Only
  • 1.  Parse response of a WS with GEL

    Posted Dec 28, 2016 10:21 AM

    Hi All,

     

    I have called an external .NET webservice and get a resultset like below. I managed to read a single result but has anyone address any sample to read somteihn like this in a loop?

     

    <?xml version="1.0" encoding="UTF-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <CaPmoTFSProjectInfoCountResponse xmlns="http://tempuri.org/">
    <CaPmoTFSProjectInfoCountResult>
    <xs:schema xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="NewDataSet">
    <xs:element name="NewDataSet" msdata:UseCurrentLocale="true" msdata:MainDataTable="CAPMOTFSProjectInfoCountDT" msdata:IsDataSet="true">
    <xs:complexType>
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="CAPMOTFSProjectInfoCountDT">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="Type" minOccurs="0" type="xs:string"/>
    <xs:element name="State" minOccurs="0" type="xs:string"/>
    <xs:element name="Count" minOccurs="0" type="xs:int"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:choice>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
    <DocumentElement xmlns="">
    <CAPMOTFSProjectInfoCountDT diffgr:id="CAPMOTFSProjectInfoCountDT1" msdata:rowOrder="0" diffgr:hasChanges="inserted">
    <Type>Test Case</Type>
    <State>Toplam</State>
    <Count>1</Count>
    </CAPMOTFSProjectInfoCountDT>
    <CAPMOTFSProjectInfoCountDT diffgr:id="CAPMOTFSProjectInfoCountDT2" msdata:rowOrder="1" diffgr:hasChanges="inserted">
    <Type>Bug</Type>
    <State>Açık</State>
    <Count>2</Count>
    </CAPMOTFSProjectInfoCountDT>
    <CAPMOTFSProjectInfoCountDT diffgr:id="CAPMOTFSProjectInfoCountDT3" msdata:rowOrder="2" diffgr:hasChanges="inserted">
    <Type>Bug</Type>
    <State>Kapalı</State>
    <Count>0</Count>
    </CAPMOTFSProjectInfoCountDT>
    <CAPMOTFSProjectInfoCountDT diffgr:id="CAPMOTFSProjectInfoCountDT4" msdata:rowOrder="3" diffgr:hasChanges="inserted">
    <Type>Bug</Type>
    <State>Çözüldü</State>
    <Count>0</Count>
    </CAPMOTFSProjectInfoCountDT>
    <CAPMOTFSProjectInfoCountDT diffgr:id="CAPMOTFSProjectInfoCountDT5" msdata:rowOrder="4" diffgr:hasChanges="inserted">
    <Type>Bug</Type>
    <State>İptal</State>
    <Count>0</Count>
    </CAPMOTFSProjectInfoCountDT>
    <CAPMOTFSProjectInfoCountDT diffgr:id="CAPMOTFSProjectInfoCountDT6" msdata:rowOrder="5" diffgr:hasChanges="inserted">
    <Type>Bug</Type>
    <State>Toplam</State>
    <Count>2</Count>
    </CAPMOTFSProjectInfoCountDT>
    </DocumentElement>
    </diffgr:diffgram>
    </CaPmoTFSProjectInfoCountResult>
    </CaPmoTFSProjectInfoCountResponse>
    </soap:Body>
    </soap:Envelope>



  • 2.  Re: Parse response of a WS with GEL

    Posted Jan 09, 2017 05:37 PM

    Hi 

     

    we don't have samples as such, all info provided is in documentation:

     

    https://docops.ca.com/ca-ppm/15-1/en/administration/reference/xml-open-gateway-xog-development/xog-wsdl 

     

    I'd suggest to engage CA Services to help with the code.



  • 3.  Re: Parse response of a WS with GEL
    Best Answer

    Posted Jan 09, 2017 09:36 PM

    It is XML so just Xpath out the nodes you want to loop on.

     

    Parsing and Loading an XML File via GEL 

    GEL - Xpath How to modify/delete an attribute inside a node? 

     

     

    V/r,

    Gene



  • 4.  Re: Parse response of a WS with GEL

    Posted Jan 10, 2017 01:08 AM

    These will solve my problem. Thank you...

     

    Regards