Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8559367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:01:33+00:00 2026-06-11T16:01:33+00:00

My web service calls a url which returns a value which I must capture

  • 0

My web service calls a url which returns a value which I must capture and use in a different function.

I’ve only recently starting working with web services and am very new to the concept of calling a url within a web service (Previously asked and answered on this forum for those requiring more information)

Webservice method to call a url

My web service is: Insurance Service.

My client sends me data through the Insurance service which calls a url which returns an Insurance Number.

How do I capture this insurance number? I thought I could use session to capture it but I was so wrong insurance Number comes as null with an object reference error.

int insuranceNo;
insuranceNo = Convert.ToInt16(HttpContext.Current.Session["insuranceNo"]);

It must have something to do with response right?

I thought I could try google what I am looking for but I honestly don’t know what to call this in order to search for it. Thought I’d give it another shot in this forum since I found the answer to the first part of this function here.

code to call url:

 string url = string.Format("www.insuranceini.com/insurance.asp?fileno1={0},&txtfileno2={1‌​}&username={2}&userid={3}&dteinsured={4}&dteDob={5}&InsurerName={6}", txtfileno1, txtfileno2, username, userid, dteinsured,dteDob,InsurerName)
WebRequest request = HttpWebRequest.Create(url);
using(WebResponse response = request.GetResponse())
{
    using(StreamReader reader = new StreamReader(response.GetResponseStream()))
    {
        string urlText = reader.ReadToEnd();
        //Do whatever you need to do
    }
}

I would be grateful for any sort of pointers or places to start looking or any advice.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T16:01:34+00:00Added an answer on June 11, 2026 at 4:01 pm

    Code began giving different errors. Closing this and referring to : Datetime Conversion and Parsing

    Thank you everyone for the helpful comments.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have defined small MXML component which calls web service which returns random number
I am creating an application which involves so many web-service calls. I am using
My code calls a Web service method which takes a few minutes to perform
Let's say you have a Javascript function that calls a web service method. So
I'm looking to make a service which I can use to make calls to
I am trying to consume a web service which returns a Java hash map,
I want to call a web service of which URL is available to me.
I use KSOAP2 library, and web-service returns me string array: <GetChanelResult> <string> string </string>
When extracting web service calls into an abstraction so they can easily be tested
I m invoking a web service and they stop my service calls after an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.