TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Lee Redhead
NA
1
1.9k
Returning values from web service
Feb 4 2011 1:41 PM
Hello,
I am quite stuck at the moment with trying to return data from a Web Service. I am ok with returning the data from the inital part and assigning the values to for labels and variables however I am stuck at returning some other data from the same set.
The structure is as follows:
<getVehicleWithOptionsResult>
<VehicleId>string</VehicleId>
<Chassis>string</Chassis>
<Engine>string</Engine>
<Description>string</Description>
<RegistrationDate>dateTime</RegistrationDate>
<RegistrationMark>string</RegistrationMark>
<Options>
<VehicleOption>
<VehicleId>string</VehicleId>
<Code>string</Code>
<Description>string</Description>
<Type>string</Type>
<Category>string</Category>
<UpdatedOn>dateTime</UpdatedOn>
<ListPrice>decimal</ListPrice>
<Quantity>int</Quantity>
</VehicleOption>
<VehicleOption>
<VehicleId>string</VehicleId>
<Code>string</Code>
<Description>string</Description>
<Type>string</Type>
<Category>string</Category>
<UpdatedOn>dateTime</UpdatedOn>
<ListPrice>decimal</ListPrice>
<Quantity>int</Quantity>
</VehicleOption>
</Options>
</getVehicleWithOptionsResult>
The search for the web service uses the VehicleID to perform the lookup which is working fine, the first field I return is the RegDate which I do as follows:
string
chassisNumber;
vehicleID= VehicleID.Text;
VehicleSearch.
VehicleService
vd =
new
VehicleSearch.
VehicleService
();
RegDate.Text =
Convert
.ToString(vd.getVehicleWithOptions(vehicleID).RegistrationDate);
And that works for all the fields that are in the first level of the data, however I also need to extract data from the <Options> section, the CODE field specifically.
I am really struggling to work out how to do this. Basically I need to perform a search on all the options to find if certian CODES exisit, also other contitions such as Type and Category need to be met but they are the same for all options I am interested in.
How best to do this? I have nevre worked with XML Web Services before and am really stuck trying to work this out.
If you need any more information let me know,
Lee
Reply
Answers (
2
)
How to how to recognise speech to text
Problem in getting selected data in datagrid...!!!