Solved

Help regarding Building a webservice

Posted on 2010-08-24
4
481 Views
Last Modified: 2013-11-19
Hi experts,

I need some help in building a webservice where I can consume another webservice which is returning data in the form of xml. Here I am able to call the service but I got stuck up with loading the data in the required format. One is get the required format I should be able to return this data back to client.  It is something like Client is calling a service which inturn call other service to retrieve data and return to client.
Format is something similar to this.

<parent1>
<childone/>
..
<parent1/>
<parent2>
<childone/>
..
<parent2/>
..........
..
.
.
.
.
.
.

So any help regarding building this service will be greatly appriciated.

Thanks,
AG
0
Comment
Question by:Anil Golamari
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
Akin Delu earned 250 total points
ID: 33512516
why do you really need a webservice that calls another webservice, why not call the webservice from the application itself.
0
 
LVL 18

Author Comment

by:Anil Golamari
ID: 33512600
First web service is a wrapper, So now I need to build a web service where I can call the data from that wrapper. So now I should be able to get the required information instead of all the data from the service upto client.
0
 
LVL 35

Assisted Solution

by:Miguel Oz
Miguel Oz earned 250 total points
ID: 33526746
Consuming a web service from inside another web service is the same code as consuming from any other WCF client.
Check:
http://msdn.microsoft.com/en-us/library/bb332338.aspx
http://blogs.msdn.com/b/ericwhite/archive/2010/05/11/getting-started-building-a-wcf-web-service.aspx
http://www.xvpj.net/2008/03/08/wcf-step-by-step-tutorial/
http://www.switchonthecode.com/tutorials/wcf-tutorial-basic-interprocess-communication

Even though it is tempting to build a web method returning a XmlNode, your web service consumer has to do the hard work of parsing that information I will strongly suggest to use a serializable class, like ChildNode (implementation details is up to you) so your web method can return List<ChildNode>
0
 
LVL 18

Author Comment

by:Anil Golamari
ID: 33596908
None of the solution helped me. Anyhow thanks for your time to look into my issue.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now