Skip to content Skip to sidebar Skip to footer

How To Introspect Into SOAP Data Types?

Having never worked with SOAP before, I'm now trying to follow this tutorial to find out about the SOAP service of the Dutch government land register (kadaster.nl): >>> fr

Solution 1:

Your observations to this point are right. But I'd first explore the WSDL with a SOAP client tool to get a grasp on its structure and references. When you look at the WSDL, notice how the types are defined in a referenced .xsd schema named verzoekTotInformatie-2.1.xsd. Then this schema is referencing and including 20 other schema files:

High-res image - click here.

enter image description here

Obviously in your case it becomes a nightmare to follow everything by just reading yourself (WSDL is not indended for human reading by design anyway, but yours is very, very nested).

So I suggest you import this WSDL in SOAP UI (it is free, this is what I used in the screenshot above) and create a new project using the WSDL url:

http://www1.kadaster.nl/1/schemas/kik-inzage/20141101/verzoekTotInformatie-2.1.wsdl

It will import eveything and create a sample request for you. For me it even tried to add some lorem-ipsum sample data, based on the types of the fields:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.kadaster.nl/schemas/kik-inzage/20141101" xmlns:v20="http://www.kadaster.nl/schemas/kik-inzage/ip-aanvraag/v20141101">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:VerzoekTotInformatieRequest>
         <v20:Aanvraag>
            <v20:berichtversie>4.7</v20:berichtversie>
            <v20:klantReferentie>cum murmure</v20:klantReferentie>
            <v20:productAanduiding>aeoliam venit</v20:productAanduiding>
            <!--Optional:-->
            <v20:Gebruiker>
               <v20:identificatie>ventos tempestatesqu</v20:identificatie>
            </v20:Gebruiker>
            <v20:Ingang>
               <!--You have a CHOICE of the next 3 items at this level-->
               <v20:Object>
                  <!--You have a CHOICE of the next 2 items at this level-->
                  <v20:IMKAD_OZLocatie>
                     <v20:adres>
                        <v20:BAG_NummerAanduiding>
                           <v20:postcode>temper</v20:postcode>
                           <v20:huisnummer>turbine corripuit</v20:huisnummer>
                           <!--Optional:-->
                           <v20:huisletter>r</v20:huisletter>
                           <!--Optional:-->
                           <v20:huisnummertoevoeging>frem</v20:huisnummertoevoeging>
                        </v20:BAG_NummerAanduiding>
                     </v20:adres>
                     <!--Optional:-->
                     <v20:bijOfTegenover>ferant rapidi</v20:bijOfTegenover>
                  </v20:IMKAD_OZLocatie>
                  <v20:IMKAD_KadastraleAanduiding>
                     <!--Optional:-->
                     <v20:gemeente>sceptra tenens</v20:gemeente>
                     <v20:sectie>turbine corripuit scopuloque</v20:sectie>
                     <v20:perceelnummer>flamm</v20:perceelnummer>
                     <!--Optional:-->
                     <v20:appartementsindex>prof</v20:appartementsindex>
                     <!--Optional:-->
                     <v20:deelperceelnummer>nubi</v20:deelperceelnummer>
                     <!--Optional:-->
                     <v20:AKRKadastraleGemeenteCode>ac vi</v20:AKRKadastraleGemeenteCode>
                  </v20:IMKAD_KadastraleAanduiding>
               </v20:Object>
               <v20:PersoonsIngang>
                  <v20:Persoon>
                     <!--You have a CHOICE of the next 4 items at this level-->
                     <v20:BSN>100</v20:BSN>
                     <!--Optional:-->
                     <v20:KVKNummer>rapidum</v20:KVKNummer>
                     <!--Optional:-->
                     <v20:RSIN>caelumque</v20:RSIN>
                     <v20:kadastraleIdentificatie>100</v20:kadastraleIdentificatie>
                  </v20:Persoon>
                  <!--Optional:-->
                  <v20:Restrictie>
                     <v20:maximumAantalObjecten>100</v20:maximumAantalObjecten>
                  </v20:Restrictie>
               </v20:PersoonsIngang>
               <v20:Brondocument>
                  <v20:IMKAD_DeelEnNummer>
                     <v20:deel>circu</v20:deel>
                     <v20:nummer>coniu</v20:nummer>
                     <!--Optional:-->
                     <v20:reeks>arce sceptra</v20:reeks>
                     <v20:ipa_registerCodeSub>circum claustra fremunt</v20:ipa_registerCodeSub>
                  </v20:IMKAD_DeelEnNummer>
               </v20:Brondocument>
            </v20:Ingang>
         </v20:Aanvraag>
      </ns:VerzoekTotInformatieRequest>
   </soapenv:Body>
</soapenv:Envelope>

After everything is imported you can expand the project and then right-click on the binding VezorekToInformatieBinding and select Show Interface Viewer to explore any types (including the request) you need to further introspect that are defined in the referenced schemas.

With the whole definition at your disposal it will be much easier to do an introspection. In your case, there must be an option to import the WSDL and "expand" all the includes/references first and only then begin introspecting, when you have the whole picture available. If there is no such option, you might have to follow the references and includes one by one.

Hope this helps as a starting point. Good luck!


Post a Comment for "How To Introspect Into SOAP Data Types?"