why has the default include bhavior of a web service changed?

Last post 08-21-2006 8:33 AM by dekarma. 7 replies.

Sort Posts:

  • why has the default include bhavior of a web service changed?

    07-16-2006, 6:44 AM
    • All-Star
      25,662 point All-Star
    • Luis Abreu
    • Member since 02-12-2005, 6:22 AM
    • Madeira [Portugal]
    • Posts 5,368
    • TrustedFriends-MVPs

    hello guys.

    can anyone tell me why the behavior of the traditional proxy generation has changed in this last ctp? till now, we could get the proxy by doing something like this:

    <script type="text/javascript" src="path/js"></script>

    currently, this returns the proxy but doesn't set the path property of the proxy...

    yes, i can see that you guys changed the generatefields method of the webserivceclientproxygenerator class...what i'd like to know is:

    1.) why isn't this documented?

    2.) why is this changed necessary?

    btw, this change breaks all your online demos (including videos, quickstarts, etc)....

    --
    Regards,
    Luis Abreu
    email: labreu_at_gmail.com
    EN blog:http://msmvps.com/blogs/luisabreu
  • Re: why has the default include bhavior of a web service changed?

    07-16-2006, 6:51 AM
    • All-Star
      25,662 point All-Star
    • Luis Abreu
    • Member since 02-12-2005, 6:22 AM
    • Madeira [Portugal]
    • Posts 5,368
    • TrustedFriends-MVPs
    btw, what's the purpose of theonscriptload attribute that has been added to the servicereference class?
    --
    Regards,
    Luis Abreu
    email: labreu_at_gmail.com
    EN blog:http://msmvps.com/blogs/luisabreu
  • Re: why has the default include bhavior of a web service changed?

    07-18-2006, 3:16 PM
    • Participant
      959 point Participant
    • HaoK
    • Member since 07-18-2003, 2:06 PM
    • Posts 185
    • AspNetTeam

    The change was made to fix the issue where the path was incorrect due to the fact that we were computing the path with respect to the server as opposed to the client, i.e. webfarm scenarios, port forwarding.  So now the client sets the path to the url it uses to access the site via the OnScriptLoad method which you see.  Perhaps we should add the old behavior back as a default for the direct /js include scenario.

    Thanks for reporting this,
    -Hao

  • Re: why has the default include bhavior of a web service changed?

    07-18-2006, 4:39 PM
    • Participant
      959 point Participant
    • HaoK
    • Member since 07-18-2003, 2:06 PM
    • Posts 185
    • AspNetTeam

    I should also mention that we did add a new query string parameter for the /js requests which supports generating a path in the proxy, but its explicit, i.e. you pass in the path:

    <script src=testSoap.asbx/js?__svcPath=http://localhost/atlas/BCL/testSoap.asbx" type="text/javascript"></script>

    Hope that helps,
    -Hao

  • Re: why has the default include bhavior of a web service changed?

    07-18-2006, 5:43 PM
    • All-Star
      25,662 point All-Star
    • Luis Abreu
    • Member since 02-12-2005, 6:22 AM
    • Madeira [Portugal]
    • Posts 5,368
    • TrustedFriends-MVPs

    hello.

    thanks for the reply.

    can you give me an example of how to use that new property?

    --
    Regards,
    Luis Abreu
    email: labreu_at_gmail.com
    EN blog:http://msmvps.com/blogs/luisabreu
  • Re: why has the default include bhavior of a web service changed?

    07-18-2006, 6:33 PM
    • Participant
      959 point Participant
    • HaoK
    • Member since 07-18-2003, 2:06 PM
    • Posts 185
    • AspNetTeam

    Its basically whatever script you want to be evaluated, so scriptLoad="alert('hi')" or something like what we do scriptLoad="Sample.ProxyClass.path = 'http://url/app/fooservice.asmx'".

    Hope that helps,
    -Hao

  • Re: why has the default include bhavior of a web service changed?

    07-19-2006, 4:12 AM
    • All-Star
      25,662 point All-Star
    • Luis Abreu
    • Member since 02-12-2005, 6:22 AM
    • Madeira [Portugal]
    • Posts 5,368
    • TrustedFriends-MVPs

    hello again.

    hum,...i must have done something wrong because i tried something like that and it did not work...i'll give it a go again. thanks.

    --
    Regards,
    Luis Abreu
    email: labreu_at_gmail.com
    EN blog:http://msmvps.com/blogs/luisabreu
  • Re: why has the default include bhavior of a web service changed?

    08-21-2006, 8:33 AM
    • Member
      50 point Member
    • dekarma
    • Member since 02-22-2006, 2:03 AM
    • Belgium
    • Posts 10
    I ran into the same problem today. I used to include a script reference to a webservice dynamically (webpart code) using

    ScriptManager.GetCurrent(Page).RegisterScriptReference(Page.ResolveUrl("~/Service.asmx/js"));

    After I found out that calls were made to "undefined?mn=xxx", I changed it to

    ScriptManager.GetCurrent(Page).RegisterScriptReference(Page.ResolveUrl("~/Service.asmx/js?__svcPath=Service.asmx"));

    This works, but it does looks a bit redundant to me :(
Page 1 of 1 (8 items)