webservices with nested structures

B

Brent

I have the following code, in an asmx file:

Public Structure ThreePartOffer
Public startTime As DateTime
Public endTime As DateTime
Public expirationTime As DateTime
Public resource As String
Public combinedCycle As String
Structure FipFop
Public startTime As DateTime
Public endTime As DateTime
Public fippercent As Decimal
Public foppercent As Decimal
End Structure
Structure StartupCost
Public startTime As DateTime
Public endTime As DateTime
Public hot As Decimal
Public inttermediate As Decimal
Public cold As Decimal
End Structure
Structure MinimumEnergy
Public startTime As DateTime
Public endTime As DateTime
Public cost As Decimal
End Structure
Public Structure EnergyOfferCurve
Public startTime As DateTime
Public endTime As DateTime
Public curveStyle As String
Public Structure CurveData
Public xvalue As Double
Public y1value As Double
End Structure
Public incExcFlag As String
End Structure
End Structure

I am trying to make a variable, say TPO, that I can assign values to every
type under ThreePartOffer. Is this possible? The XML code looks like the
following:

- <ThreePartOffer>
<startTime>2008-01-01T00:00:00-06:00</startTime>
<endTime>2008-01-02T00:00:00-06:00</endTime>
<expirationTime>2007-12-31T04:00:00-06:00</expirationTime>
<resource>AcmeUnit1</resource>
<combinedCycle>AcmeCC</combinedCycle>
- <FipFop>
<startTime>2008-01-01T00:00:00-06:00</startTime>
<endTime>2008-01-02T00:00:00-06:00</endTime>
<fipPercent>50</fipPercent>
<fopPercent>50</fopPercent>
</FipFop>
- <StartupCost>
<startTime>2008-01-01T00:00:00-06:00</startTime>
<endTime>2008-01-02T00:00:00-06:00</endTime>
<hot>333.33</hot>
<intermediate>444.44</intermediate>
<cold>666.66</cold>
</StartupCost>
- <MinimumEnergy>
<startTime>2008-01-01T00:00:00-06:00</startTime>
<endTime>2008-01-02T00:00:00-06:00</endTime>
<cost>1001.11</cost>
</MinimumEnergy>
- <EnergyOfferCurve>
<startTime>2008-01-01T00:00:00-06:00</startTime>
<endTime>2008-01-01T10:00:00-06:00</endTime>
<curveStyle>CURVE</curveStyle>
- <CurveData>
<xvalue>60</xvalue>
<y1value>40.00</y1value>
</CurveData>
- <CurveData>
<xvalue>80</xvalue>
<y1value>45.00</y1value>
</CurveData>
<incExcFlag>INC</incExcFlag>
</EnergyOfferCurve>
</ThreePartOffer>

Or any other approaches for an asmx file. Thank you.

Brent
 
E

Ed Bennett

Brent said:
I have the following code, in an asmx file:

This newsgroup is for discussing programming with Microsoft Publisher.
As you're not (as far as I can tell) using Publisher here, I think your
question would be best directed at a web service newsgroup such as
microsoft.public.dotnet.framework.webservices.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top