Jump to content

Recommended Posts

Posted
Hello, I am very much new to using WCF programming I am having an issue while I am trying to return a field for one one of my webservice . That field or that element has a group of information like lets say  
 
 
                            LDSWebServices.MAVService.ItemsCollectionType.PersonalInformation
                  Address = response.GetValue<string>(LDSWebServices.MAVService.ItemsCollectionType.PersonalInformation)
 
this returns multiple information like Name, Age, Height, Sex, and Address and i want to get only his address for all my other calls i have it like regular call
  
 
 LDSWebServices.MAVService.ItemsCollectionType.AccountNumber 
                    accountnumber = response.GetValue<string(LDSWebServices.MAVService.ItemsCollectionType.AccountNumber)
 
which directly returns the account number, I tried to save that personal Information into a list which i am not able to save, when i am doing that its not storing any information.  I know this is like a very simple thing But i am unfortunately stuck at this step. Any help would be very much highly appreciated.Please let me know if you need more information i can provide
Posted

my questions will be what was that field declaration in the data contract like?

 

is it a list<t>?

 

since ur sayinmg personal information is a collection of data (name,address etc)....the wya ur reading the response is wrong....

 

Posted
 LDSWebServices.MAVService.ItemsCollectionType.AccountNumber 
                    accountnumber = response.GetValue<string(LDSWebServices.MAVService.ItemsCollectionType.AccountNumber)
 
<string ki > missing  sSa_j@il 
Posted

my questions will be what was that field declaration in the data contract like?

is it a list<t>?

since ur sayinmg personal information is a collection of data (name,address etc)....the wya ur reading the response is wrong....

I think it's a collection , dhani techkuni Andulo nunchi address ni oka local variable lo
Save cheyali
Posted


LDSWebServices.MAVService.ItemsCollectionType.AccountNumber

accountnumber = response.GetValue<string(LDSWebServices.MAVService.ItemsCollectionType.AccountNumber)


<string ki > missing sSa_j@il[font='Helvetica Neue']
[/font]

adhi typo bhayaa
Posted

Code copy pasting lo typo undadu anukoni vesa...

 

 

emanna exception ostunda, not able to save ante emptry string return avtunda??

adhi typo bhayaa

 

Posted

Exception rataledu akkada oka field nunchi group of information undi bhaya Andulo manaki oka value kavali

Posted

if its a class and you are getting List<PersonalInfo>  or IEnumerable<PersonalInfo>   you have to get that list or just the class , then extract the value..  GetValue<string> kudaradhu 

Posted

if its a class and you are getting List<PersonalInfo> or IEnumerable<PersonalInfo> you have to get that list or just the class , then extract the value.. GetValue<string> kudaradhu

yeah adhi kuda tey chesa Kani raledu
Posted
//if its a class you cant do for interface
LDSWebServices.MAVService.ItemsCollectionType.PersonalInformation
                  Personal= LDSWebServices.MAVService.ItemsCollectionType.PersonalInformation();
 
List<String> getAddress= new List<String>();
 
getAddress = Personal.Address  (address paremeter emanna unte)
 
 
ila emanna cheyocha?
Posted


//if its a class you cant do for interface

LDSWebServices.MAVService.ItemsCollectionType.PersonalInformation

Personal= LDSWebServices.MAVService.ItemsCollectionType.PersonalInformation();


List<String> getAddress= new List<String>();


getAddress = Personal.Address (address paremeter emanna unte)



ila emanna cheyocha?


Personal.address ante ravatledu
Posted

lets say ur personal information field is decalred like this in ur data contract

 

[DataMember]

public IList<PersonalInformation> InformationList { get; set; }

 

u shud be able to retrieve  the information from thuis list like

List<PersonalInformation> PersonalInformationList = Model.InformationList .ToList();

 

and u can loop thru the list<> and assign the address value to a string

 

Posted

We are using wsdls bhaya reference lo ila undi [system.xml.serialization.xmleumattribute(":personalinformation")],
Personalinformation

Posted

copied from SOF

bold: how is this possible?

 

List<string> PI = new List<string>()
string address = ""
LDSWebServices.MAVService.ItemsCollectionType.PersonalInformation;
PI = response.GetValue<List<string>>(LDSWebServices.MAVService.ItemsCollectionType.PersonalInformation);
PI.Address = address;

×
×
  • Create New...