Dynamically change URL in Web Service

Discussion in 'ASP .Net Web Services' started by kit, Apr 22, 2004.

  1. kit

    kit Guest

    Dear Al

    I am now also facing a problem on changing URL in web reference.
    Firstly, i added a web reference in my project, and then i change the URL value for the Web Service by coding
    An error showed like
    "Server did not recognize the value of HTTP Header SOAPAction:http://XXXXXX";

    It seems that my program remembered the original URL setting in web reference.
    Is that i have performed an inappropriate way to change the URL value for it.

    Please help and thanks
    kit, Apr 22, 2004
    #1
    1. Advertising

  2. kit

    Jan Tielens Guest

    How did you change the url?

    --
    Greetz,
    Jan
    ________________________
    Read my weblog: http://weblogs.asp.net/jan

    "kit" <> schreef in bericht
    news:...
    > Dear All
    >
    > I am now also facing a problem on changing URL in web reference.
    > Firstly, i added a web reference in my project, and then i change the URL

    value for the Web Service by coding.
    > An error showed like
    > "Server did not recognize the value of HTTP Header

    SOAPAction:http://XXXXXX";.
    >
    > It seems that my program remembered the original URL setting in web

    reference.
    > Is that i have performed an inappropriate way to change the URL value for

    it.
    >
    > Please help and thanks
    Jan Tielens, Apr 22, 2004
    #2
    1. Advertising

  3. kit

    kit Guest

    Maybe i show you the steps and coding to diagnosis.

    First, i add web reference by using address like "http://Testing/Service1.asmx"
    Then in my vb coding, i write like,

    Dim rswb as new Testing.Service1()
    rswb.URL = "http://Testing/Group/Service1.asmx"
    Dim ds as new dataset()
    ds = rswb.Result()

    Thanks for your help ~
    kit, Apr 22, 2004
    #3
  4. kit

    Jan Tielens Guest

    The code seems fine to me.

    If you leave out following line, your project works as expected?
    rswb.URL = "http://Testing/Group/Service1.asmx"

    --
    Greetz,
    Jan
    ________________________
    Read my weblog: http://weblogs.asp.net/jan

    "kit" <> schreef in bericht
    news:...
    > Maybe i show you the steps and coding to diagnosis.
    >
    > First, i add web reference by using address like

    "http://Testing/Service1.asmx"
    > Then in my vb coding, i write like,
    >
    > Dim rswb as new Testing.Service1()
    > rswb.URL = "http://Testing/Group/Service1.asmx"
    > Dim ds as new dataset()
    > ds = rswb.Result()
    >
    > Thanks for your help ~
    Jan Tielens, Apr 22, 2004
    #4
  5. kit

    kit Guest

    Thanks Ja

    If i change the URL to http://Testing/Service2.asmx, the program work fine
    I think it is caused by the "Group" subfolder. Web Reference cannot make appropriate change if the namespace structure is not the same.

    Kit
    kit, Apr 22, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. steven
    Replies:
    2
    Views:
    469
    steven
    Dec 12, 2007
  2. Gujju

    Change URL of Web service at Runtime

    Gujju, May 30, 2005, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    122
    Gujju
    May 30, 2005
  3. Gujju

    Change url of web service at runtime

    Gujju, May 30, 2005, in forum: ASP .Net Web Services
    Replies:
    2
    Views:
    172
    Chris Hayes
    May 31, 2005
  4. change web service URL at runtime

    , Jul 6, 2006, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    153
    Vijay Pandey
    Jul 7, 2006
  5. 'Layemi Oshodi

    Dynamically change web service path

    'Layemi Oshodi, Apr 20, 2010, in forum: ASP .Net Web Services
    Replies:
    2
    Views:
    935
    sdunnin
    Apr 21, 2010
Loading...

Share This Page