XSD to temp-tables/dataset???

Posted by scott_auge on 25-May-2016 15:56

Hi all,

I have tried using bproxsdto4gl and that is not working.  (Guess it is for only progress generated xsd's.)

Has anyone written such a beast yet and would like to share?

All Replies

Posted by Robin Brown on 25-May-2016 16:05

No, bproxsdto4gl is for generating ABL templates based on any WSDL file, for use with communicating with a Web Service with the ABL.  Not every WSDL parameter can map to a temp-table/prodataset.  Please share more details or log a request with Tech Support.

Regards,

Robin

Posted by scott_auge on 25-May-2016 16:15

Here is a partial of the XSD.

It really goes on and on and I am hoping to escape manually typing all the temp table definitions and relations in a dataset...

I am checking if there is a wsdl file available for it (I am behind security that uses a blind web service to call a web service.)

<?xml version="1.0" encoding="UTF-8"?>

<xs:schema xmlns:xs="www.w3.org/.../XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">

 <!-- RESPONSE -->

 <xs:element name="Response">

   <xs:complexType>

     <xs:all>

       <xs:element name="TransactionID" type="String" minOccurs="0"/>

       <xs:element name="IntegratorTransactionID" type="String" minOccurs="0"/>

       <xs:element ref="ErnstResponse" minOccurs="0"/>

       <xs:element ref="TitleResponse" minOccurs="0"/>

       <xs:element ref="Block6Response" minOccurs="0"/>

       <xs:element ref="DocumentResponse" minOccurs="0"/>

       <xs:element name="Error" type="Error" minOccurs="0"/>

     </xs:all>

   </xs:complexType>

 </xs:element>

 <!-- ERNST RESPONSE -->

 <xs:element name="ErnstResponse">

   <xs:complexType>

     <xs:all>

       <xs:element ref="Request" minOccurs="0"/>

       <xs:element ref="Data" minOccurs="0"/>

       <xs:element ref="SupplementalAddress" minOccurs="0"/>

       <xs:element name="Display" minOccurs="0">

         <xs:complexType>

           <xs:all>

             <xs:element ref="Calculation" minOccurs="0"/>

             <xs:element ref="RecordingWorksheet" minOccurs="0"/>

             <xs:element ref="DocumentLinks" minOccurs="0"/>

             <xs:element name="Error" type="Error" minOccurs="0"/>

           </xs:all>

         </xs:complexType>

       </xs:element>

       <xs:element name="Audit" type="Audit" minOccurs="0"/>

       <xs:element name="Error" type="Error" minOccurs="0"/>

     </xs:all>

   </xs:complexType>

 </xs:element>

 <!-- ERNST REQUEST -->

 <xs:element name="Request">

   <xs:complexType>

     <xs:all>

       <xs:element name="ClientTransactionID" type="String" minOccurs="0"/>

       <xs:element name="TransactionID" type="String" minOccurs="0"/>

       <xs:element name="Page" type="String" minOccurs="0"/>

       <xs:element name="City" type="String" minOccurs="0"/>

       <xs:element name="County" type="String" minOccurs="0"/>

       <xs:element name="State" type="String" minOccurs="0"/>

       <xs:element name="TransactionCode" type="String" minOccurs="0"/>

       <xs:element name="DeedNumberOfPages" type="Pages" minOccurs="0"/>

       <xs:element name="MortgageNumberOfPages" type="Pages" minOccurs="0"/>

       <xs:element name="MortgageAmount" type="DecimalOrEmpty" minOccurs="0"/>

       <xs:element name="OriginalDebtAmount" type="DecimalOrEmpty" minOccurs="0"/>

       <xs:element name="UnpaidPrincipalBalance" type="DecimalOrEmpty" minOccurs="0"/>

       <xs:element name="EstimatedValue" type="DecimalOrEmpty" minOccurs="0"/>

       <xs:element name="Title" type="String" minOccurs="0"/>

       <xs:element name="TitleAmount" type="DecimalOrEmpty" minOccurs="0"/>

       <xs:element name="OwnersTitleAmount" type="DecimalOrEmpty" minOccurs="0"/>

       <xs:element name="OriginalTitleAmount" type="DecimalOrEmpty" minOccurs="0"/>

       <xs:element name="OriginalMortgageDate" type="String" minOccurs="0"/>

       <xs:element name="AssignmentPages" type="Pages" minOccurs="0"/>

       <xs:element name="AssignmentNumber" type="IntegerOrEmpty" minOccurs="0"/>

       <xs:element name="ReleasePages" type="Pages" minOccurs="0"/>

       <xs:element name="ReleaseNumber" type="IntegerOrEmpty" minOccurs="0"/>

       <xs:element name="SubordinationPages" type="Pages" minOccurs="0"/>

       <xs:element name="SubordinationNumber" type="IntegerOrEmpty" minOccurs="0"/>

       <xs:element name="POAPages" type="Pages" minOccurs="0"/>

Posted by tbergman on 25-May-2016 16:18
You could try using the READ-XMLSCHEMA into a dynamic dataset. If this succeeds, it’s a fairly simple exercise to loop through the tables and fields in the dataset and write out definitions. If you’re interested, I can send you a quick example of this.
 
Tom
 
Posted by scott_auge on 25-May-2016 16:23

Yea I tried a dynamic READ-XMLSCHEMA already.  It  doesn't work.  It pukes on stuff like this:

<xs:element name="OriginalDebtAmount" type="DecimalOrEmpty" minOccurs="0"/>

I have found a WSDL for it - anyone know how to use a WSDL to generate the temp-table and dataset  code?

Posted by Robin Brown on 25-May-2016 16:28

So what is the xsd definition for DecimalOrEmpty?  If bproxsdto4gl cannot map the element to a dataset(temp-tables are only accepted with Progress WSDL's), then you get a LONGCHAR?  Or does bproxsdto4gl fail to generate anything?

Posted by tbergman on 25-May-2016 16:32
One more shot in the dark – Use SoapUI to read the wsdl, then generate an actual response from the service. Try reading the response xml into a dataset using READ-XML.
 
Tom
 
Posted by scott_auge on 25-May-2016 16:41

The WSDL stuff just uses a character for the request and respond.  (Used bprowsdldoc)  Such a bummer.

Posted by Thomas Mercer-Hursh on 25-May-2016 16:48

How about editing the offending types to something known, then using the tools on the cleaned up version and then patch the result to handle the problem datatypes?

Posted by scott_auge on 25-May-2016 16:54

Yea, that is going to be tomorrows plan.  Unless I dream up something different.

Posted by Elsworth Burmeister on 26-May-2016 00:55

Hi

you can try using this from proenv: xsdto4gl c:\Temp\myxsd.xsd -output c:\temp\

This will generate the include file for you that contains your temp-tables and datasets.

However it might not work with your xml.

Posted by Robin Brown on 26-May-2016 09:56

The point here is that every complexType in a WSDL's xsd will not be mapped to a ProDataSet..  If the WSDL Analyzer fails to generate ABL templates for you to use, then there might be a bug.  You might want to log an issue with tech support to get this sorted out.

Regards,

Robin

Posted by Patrick Tingen on 27-May-2016 09:25

It might depend on the version of Progress you are on. I tried generating a complex xsd in 10.2 but it choked on it, whereas 11.6 happily ate it. If you're not on 11.6 I could test it for you.

This thread is closed