How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask Ingo U Your Own Question

Ingo U
Ingo U, Software Engineer
Category: Programming
Satisfied Customers: 755
Experience:  Over 25 years experience in software development. Expert in Microsoft .Net, C#, C++, VB, SQL
44076068
Type Your Programming Question Here...
Ingo U is online now
A new question is answered every 9 seconds

How to call a web service in my application then pull the data

Customer Question

How to call a web service in my application then pull the data needed and added it in xsl file.
Submitted: 1 year ago.
Category: Programming
Expert:  Aitizaz replied 1 year ago.
Hello and welcome! My name is ***** ***** I look forward to assist you today with your question and provide the best answer possible
There are basically two parts of the web service: The web service method and the web service call. In the web service method, you actually describe what your web service would do, the data extraction and writing it to the xsl file in your case would be the function or web service method that you would create.
Second thing is to call that method.
if you need detailed instructions on how to create a web service and call it, i will refer you to a tutorial that will guide you on this.
if you have any queries, please do not hesitate to ask me.
Customer: replied 1 year ago.
Well a web service has already been created and I am only referencing it which I did. Now my question is how to call the web service then use its' method.
Expert:  Aitizaz replied 1 year ago.
please read this brief tutorial on web services and you will learn how to call the service in your program/site:
http://www.codeproject.com/Articles/863/Your-first-C-Web-Service
Customer: replied 1 year ago.
I'm a newbie and this is a bit confusing :(. I just want to understand from my own assignment first.
Expert:  Aitizaz replied 1 year ago.
which part of the tutorial is confusing? if this is difficult, you may watch the following video to learn more:
www.youtube.com/watch?v=1vJhezroMJc
Customer: replied 1 year ago.
this is in vb and it's not what I'm trying to accomplish
Expert:  Aitizaz replied 1 year ago.
how much time do you have for this? and what exactly are you trying to achieve?
Customer: replied 1 year ago.
so far I've added the web service reference, now my question is what comes next?
I have both aspx and aspx.cs files and xsl file. I am trying to get mailing address from the web service.
Expert:  Aitizaz replied 1 year ago.
please send me the exact description of the program and the xsl file. Also let me know how much time do you have for this. If you can wait till tomorrow ( same time), i can do this for you.
Customer: replied 1 year ago.
I don't have anything for this portion that's what I want to create.
Expert:  Aitizaz replied 1 year ago.
what sort of web service should i create for you? what should it do?
Customer: replied 1 year ago.
all I've done is add the web service reference then tried calling in my aspx.cs file like this under my namespace:
public class WebService1 : System.Web.Services.WebService
{
public WebService1()
{
MailingAddressInfoClient = new MailingAddressInfoClient();
}
}
the web service has already been created by someone else, I just need to reference it and use it
Expert:  Aitizaz replied 1 year ago.
you need to actually CONSUME the web service in this case. For that to happen, please follow the grphical instructions given in this web page:
http://www.c-sharpcorner.com/UploadFile/0c1bb2/consuming-web-service-in-Asp-Net-web-application/
Expert:  Aitizaz replied 1 year ago.
If this has resolved your problem, please rate the answer positive.
In case you have any query, please do not hesitate to ask me. Thank you
Customer: replied 1 year ago.
aaah still confuse not quiet what I want. I have seen some of these examples.
Expert:  Aitizaz replied 1 year ago.
what is the point of confusion? where do you lose control of the things?
Customer: replied 1 year ago.
I get the calling web service part but how do you use in xsl file?
Customer: replied 1 year ago.
give me example based on my requirements.
let's continue this tomorrow
Expert:  Aitizaz replied 1 year ago.
This gives you some idea on the topic:
http://www.xml.com/pub/a/2004/12/01/tr.html
Customer: replied 1 year ago.
Hey sorry for the delay, I had no access to pc yesterday. I would really like if you could give me a solution instead of forwarded me links. I've looked into tutorials but they are not the same as what I'm looking for.
Expert:  Aitizaz replied 1 year ago.
Please tell me about the exact functionality of the web service so that i may create it for you. I will use VC# ***** this purpose, if you have no problems with it.
Customer: replied 1 year ago.
what's vc#? I am using C#
Expert:  Aitizaz replied 1 year ago.
C# ***** be precise in this case. Please let me know about the exact requirements of the program. thank you
Customer: replied 1 year ago.
so far I've added the web reference then I wrote this code in my aspx.cs file:
private static void Main()
{
ClaimInfoServiceClient client = new ClaimInfoServiceClient();
client.Close();
}
what I need is to use the method of the data I need from the webservice then pass those values into my xsl file.
Please use C# ***** I don't know what VC# *****
Thanks
Expert:  Aitizaz replied 1 year ago.
What actually you want to read in the web method? from where does it read the data?
Customer: replied 1 year ago.
I need to read the claiminfo. I have a client call claiminfoserviceclient.
Expert:  Aitizaz replied 1 year ago.
i am not sure about the outcome of the program, i will opt out here so that any other expert can help you. thank you for your patience
Customer: replied 1 year ago.
ok
Expert:  Ingo U replied 1 year ago.
Hi,
could you please post, attach or upload all relevant details and any related file(s). Use wikisend.com, or a file sharing site of your choice.
Please include any assignments given and work/attempts you have created. Also, is the web service, created by someone else, running on a public site (that I could also reference?) Or do you have a local copy of it, provided to you for this project?
Thanks,
Ingo U
PS If you're not familiar with wikisend, it's easy and free:
Go to www.wikisend.com and upload the file there (no need to sign up). You will then get a page that has the File ID and Download Link. Copy either the File ID or the Download Link and come back here and paste it in your reply.
Customer: replied 1 year ago.
web service is created by someone else and I've added the web reference then added this line of code to my .aspx.cs file.
private void Call_Web_Service_Method()
{
ClaimInfoServiceClient client = new OcasServiceReference.ClaimInfoServiceClient();
client.GetClaims("policyNumber");client.Close();
}
Customer: replied 1 year ago.
what I want to do is call the web services, use it's method then use it in my xsl file to display. I just need the logic.
Customer: replied 1 year ago.
I can't rate this until an answer is given.