Storing XML Data

kirsch59

Member
I'm running 10.1c webspeed

I would like to be able to store the response from a web service "OrderGet" method, modify some of the data and then update the order by calling a web service "OrderUpdate" method. For the update to occur I have to submit all the "OrderGet" data elements. The "OrderGet" response contains a ton of data elements. Below is a subset of the data elements. I would like to avoid using a temp-table/dataset that contains all the data element definitions. What other options do I have?

Code:
<ns0:GetOrderByOrderNumberResponse xmlns:ns0="[URL]http://tempuri.org/[/URL]">
  <!-- The following element is optional. The following element may have the 'xsi:nil="true"` attribute (it is nillable). -->
  <ns0:GetOrderByOrderNumberResult>
  <!-- The following element is optional. The following element may have the 'xsi:nil="true"` attribute (it is nillable). -->
  <ns1:AffiliateId xmlns:ns1="[URL]http://schemas.datacontract.org/2004/07/Logicblock.Commerce.Domain[/URL]">string-value</ns1:AffiliateId>
  <!-- The following element is optional. The following element may have the 'xsi:nil="true"` attribute (it is nillable). -->
  <ns1:BackendOrderId>string-value</ns1:BackendOrderId>
  <!-- The following element is optional. The following element may have the 'xsi:nil="true"` attribute (it is nillable). -->
  <ns1:BillingAddress>
  <!-- The following element is optional. The following element may have the 'xsi:nil="true"` attribute (it is nillable). -->
  <ns1:City>string-value</ns1:City>
  <!-- The following element is optional. The following element may have the 'xsi:nil="true"` attribute (it is nillable). -->
  <ns1:Company>string-value</ns1:Company>
  <!-- The following element is optional. The following element may have the 'xsi:nil="true"` attribute (it is nillable). -->
  <ns1:CountryCode>string-value</ns1:CountryCode>
  <!-- The following element is optional. The following element may have the 'xsi:nil="true"` attribute (it is nillable). -->
  <ns1:Fax>string-value</ns1:Fax>
  <!-- The following element is optional. The following element may have the 'xsi:nil="true"` attribute (it is nillable). -->
  <ns1:FirstName>string-value</ns1:FirstName>
  <!-- The following element is optional. The following element may have the 'xsi:nil="true"` attribute (it is nillable). -->
  <ns1:LastName>string-value</ns1:LastName>
  <!-- The following element is optional. -->
  <ns1:LastUpdated>dateTime-value</ns1:LastUpdated>
  <!-- The following element is optional. The following element may have the 'xsi:nil="true"` attribute (it is nillable). -->
  <ns1:Line1>string-value</ns1:Line1>
  <!-- The following element is optional. The following element may have the 'xsi:nil="true"` attribute (it is nillable). -->
  <ns1:Line2>string-value</ns1:Line2>
  <!-- The following element is optional. The following element may have the 'xsi:nil="true"` attribute (it is nillable). -->
  <ns1:MiddleInitial>string-value</ns1:MiddleInitial>
  <!-- The following element is optional. The following element may have the 'xsi:nil="true"` attribute (it is nillable). -->
  <ns1:NickName>string-value</ns1:NickName>
  <!-- The following element is optional. The following element may have the 'xsi:nil="true"` attribute (it is nillable). -->
  <ns1:phone>string-value</ns1:phone>
  <!-- The following element is optional. The following element may have the 'xsi:nil="true"` attribute (it is nillable). -->
  <ns1:postalCode>string-value</ns1:postalCode>
  <!-- The following element is optional. The following element may have the 'xsi:nil="true"` attribute (it is nillable). -->
  <ns1:RegionCode>string-value</ns1:RegionCode>
  </ns1:BillingAddress>
  <!-- The following element is optional. The following element may have the 'xsi:nil="true"` attribute (it is nillable). -->
  <ns1:CustomerPurchaseOrderNumber>string-value</ns1:CustomerPurchaseOrderNumber>
  <!-- The following element is optional. -->
  <ns1:FraudScore>decimal-value</ns1:FraudScore>
  <!-- The following element is optional. -->
  <ns1:GrandTotal>decimal-value</ns1:GrandTotal>
  <!-- The following element is optional. -->
  <ns1:HandlingTotal>decimal-value</ns1:HandlingTotal>
  <!-- The following element is optional. The following element may have the 'xsi:nil="true"` attribute (it is nillable). -->
  <ns1:Id>string-value</ns1:Id>
  <!-- The following element is optional. The following element may have the 'xsi:nil="true"` attribute (it is nillable). -->
  <ns1:Instructions>string-value</ns1:Instructions>
  <!-- The following element is optional. The following element may have the 'xsi:nil="true"` attribute (it is nillable). -->
  <ns1:Ip>string-value</ns1:Ip>
  <!-- The following element is optional. -->
  <ns1:IsPlaced>boolean-value</ns1:IsPlaced>
  <!-- The following element is optional. -->
  <ns1:LastUpdated>dateTime-value</ns1:LastUpdated>
  <!-- The following element is optional. The following element may have the 'xsi:nil="true"` attribute (it is nillable). -->
  <ns1:LineItems>
  <!-- The following element may occur 0 or more times. The following element may have the 'xsi:nil="true"` attribute (it is nillable). -->
  <ns1:LineItem>
  <!-- The following element is optional. -->
  <ns1:AdditionalDiscount>decimal-value</ns1:AdditionalDiscount>
  <!-- The following element is optional. -->
  <ns1:BasePrice>decimal-value</ns1:BasePrice>
  <!-- The following element is optional. The following element may have the 'xsi:nil="true"` attribute (it is nillable). -->
  <ns1:Comment>string-value</ns1:Comment>
  <!-- The following element is optional. -->
  <ns1:Cost>decimal-value</ns1:Cost>
  <!-- The following element is optional. -->
  <ns1:Discounts>decimal-value</ns1:Discounts>
  <!-- The following element is optional. The following element may have the 'xsi:nil="true"` attribute (it is nillable). -->
  <ns1:Id>string-value</ns1:Id>
  <!-- The following element is optional. -->
  <ns1:LastUpdated>dateTime-value</ns1:LastUpdated>
  <!-- The following element is optional. -->
  <ns1:LineTotal>decimal-value</ns1:LineTotal>
  <!-- The following element is optional. The following element may have the 'xsi:nil="true"` attribute (it is nillable). -->
  <ns1:OrderId>string-value</ns1:OrderId>
  <!-- The following element is optional. The following element may have the 'xsi:nil="true"` attribute (it is nillable). -->
  <ns1:productName>string-value</ns1:productName>
  <!-- The following element is optional. The following element may have the 'xsi:nil="true"` attribute (it is nillable). -->
  <ns1:productSku>string-value</ns1:productSku>
  <!-- The following element is optional. The following element may have the 'xsi:nil="true"` attribute (it is nillable). -->

  <ns1:UserId>string-value</ns1:UserId>
  </ns0:GetOrderByOrderNumberResult>
</ns0:GetOrderByOrderNumberResponse>
 

RealHeavyDude

Well-Known Member
Since you mention ProDataSet and Temp-Tables I'll take it that you don't want to store the XML data permanently.

A ProDataSet would be the most structured way of storing the information giving you easy and fast access ( given that you've indexed the temp-tables according to your needs ) to the data. Any other form ( memory pointer, longchar and file ) requires you to parse it.

To me it is not exactly clear what you want to do with the XML data once you've stored it though.

Heavy Regards, RealHeavyDude.
 

kirsch59

Member
The XML data contains order detail information. I plan on updating a field and then posting all the order detail back to the web service. If I use C# then I do not have to define every order detail data element.
 

RealHeavyDude

Well-Known Member
What role is C# playing with all this?

So far it is clear to me that you want to chage data in the XML - are you planning to change the data with C#?

If that is the case you have some options:
  • Upgrade at least to OpenEdge 10.2 - better yet the current OpenEdge 11.3 release. It contains the .NET integration which allows you to use .NET classes. I haven't done anything with it since we are a Java shop - but it seems to me that this could be suitable to you.
  • You can integrate .NET and Progress via the .NET Open Client that allows a .NET client to connect to the Progress AppSever and call ABL procedures on it. It goes as far as that there is a direct mapping of ProDataSets to ADO .NET databasets.

Heavy Regards, RealHeavyDude.
 

kirsch59

Member
I may use C# / .NET in calling the web service and manipulating the data in conjunction with OpenEdge 10.2. This is a scheduled task and there's no user interface.

Thanks for all the information.
 
Top