Professional Web Applications Themes

Calling web service from unmanaged code - ASP.NET Web Services

I don't know if this works in unmanaged code, but in managed code you can use the URL property of the proxy web service class for this. Alternativly you can set the URLBehavior property of the web service to Dynamic. This will create a .config file in which the url is stored. -- Greetz, Jan ________________________ Read my weblog: [url]http://weblogs.asp.net/jan[/url] "nico193" <nilinqueeuriware.fr> schreef in bericht news:543bc61.0403302324.68ecb74cposting.google.co m... > I've created a web service in C# and need to call it from unmanaged > code (C++). > I've imported the web reference into my C++ project, all is OK. I can ...

  1. #1

    Default Re: Calling web service from unmanaged code

    I don't know if this works in unmanaged code, but in managed code you can
    use the URL property of the proxy web service class for this. Alternativly
    you can set the URLBehavior property of the web service to Dynamic. This
    will create a .config file in which the url is stored.

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

    "nico193" <nilinqueeuriware.fr> schreef in bericht
    news:543bc61.0403302324.68ecb74cposting.google.co m...
    > I've created a web service in C# and need to call it from unmanaged
    > code (C++).
    > I've imported the web reference into my C++ project, all is OK. I can
    > generate (using sproxy) the file service.h and all works great.
    >
    > Now, I need to change the URL at runtime. When I create my service, I
    > do not see any methods to set the URL dynamically.
    >
    > Some code sample :
    >
    > CMyServiceT<CSoapSocketClientT<> > *myService = new
    > CMyServiceT<CSoapSocketClientT<> > ();
    >
    > The methods I can call from myService only allow me to get things ! I
    > cannot see any methods to set the url.
    >
    > Please do not tell me to modify the web.config, I do not have any !!!
    > I work in unmanaged code.
    > Any help greatly appreciated !

    Jan Tielens Guest

  2. #2

    Default Re: Calling web service from unmanaged code

    No web.config in unmanaged code ... (activeX)
    But, could you please give me a sample using proxy class ?
    Thanks

    [email]nilinqueeuriware.fr[/email] (nico193) wrote in message news:<543bc61.0403302324.68ecb74cposting.google.c om>...
    > I've created a web service in C# and need to call it from unmanaged
    > code (C++).
    > I've imported the web reference into my C++ project, all is OK. I can
    > generate (using sproxy) the file service.h and all works great.
    >
    > Now, I need to change the URL at runtime. When I create my service, I
    > do not see any methods to set the URL dynamically.
    >
    > Some code sample :
    >
    > CMyServiceT<CSoapSocketClientT<> > *myService = new
    > CMyServiceT<CSoapSocketClientT<> > ();
    >
    > The methods I can call from myService only allow me to get things ! I
    > cannot see any methods to set the url.
    >
    > Please do not tell me to modify the web.config, I do not have any !!!
    > I work in unmanaged code.
    > Any help greatly appreciated !
    nico193 Guest

  3. #3

    Default Re: Calling web service from unmanaged code

    In the managed world, the wsdl.exe tool gives you the URL property on the
    web service proxy class. I don't know for sure if this is the same for
    unmanaged code...

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

    "nico193" <nilinqueeuriware.fr> schreef in bericht
    news:543bc61.0404010206.27e6d9ebposting.google.co m...
    > No web.config in unmanaged code ... (activeX)
    > But, could you please give me a sample using proxy class ?
    > Thanks
    >
    > [email]nilinqueeuriware.fr[/email] (nico193) wrote in message
    news:<543bc61.0403302324.68ecb74cposting.google.c om>...
    > > I've created a web service in C# and need to call it from unmanaged
    > > code (C++).
    > > I've imported the web reference into my C++ project, all is OK. I can
    > > generate (using sproxy) the file service.h and all works great.
    > >
    > > Now, I need to change the URL at runtime. When I create my service, I
    > > do not see any methods to set the URL dynamically.
    > >
    > > Some code sample :
    > >
    > > CMyServiceT<CSoapSocketClientT<> > *myService = new
    > > CMyServiceT<CSoapSocketClientT<> > ();
    > >
    > > The methods I can call from myService only allow me to get things ! I
    > > cannot see any methods to set the url.
    > >
    > > Please do not tell me to modify the web.config, I do not have any !!!
    > > I work in unmanaged code.
    > > Any help greatly appreciated !

    Jan Tielens Guest

  4. #4

    Default Re: Calling web service from unmanaged code

    Hi nico193,

    you can use myService->SetUrl(_T("http://..."))
    This is a Member from CSoapSocketClientT.

    Bye
    jm

    nico193 schrieb:
    > I've created a web service in C# and need to call it from unmanaged
    > code (C++).
    > I've imported the web reference into my C++ project, all is OK. I can
    > generate (using sproxy) the file service.h and all works great.
    >
    > Now, I need to change the URL at runtime. When I create my service, I
    > do not see any methods to set the URL dynamically.
    >
    > Some code sample :
    >
    > CMyServiceT<CSoapSocketClientT<> > *myService = new
    > CMyServiceT<CSoapSocketClientT<> > ();
    >
    > The methods I can call from myService only allow me to get things ! I
    > cannot see any methods to set the url.
    >
    > Please do not tell me to modify the web.config, I do not have any !!!
    > I work in unmanaged code.
    > Any help greatly appreciated !
    jm Guest

  5. #5

    Default Re: Calling web service from unmanaged code

    Thanks a lot, it works !!



    jm <newspro-martens.de> wrote in message news:<c522ao$qgj$05$2news.t-online.com>...
    > Hi nico193,
    >
    > you can use myService->SetUrl(_T("http://..."))
    > This is a Member from CSoapSocketClientT.
    >
    > Bye
    > jm
    >
    > nico193 schrieb:
    > > I've created a web service in C# and need to call it from unmanaged
    > > code (C++).
    > > I've imported the web reference into my C++ project, all is OK. I can
    > > generate (using sproxy) the file service.h and all works great.
    > >
    > > Now, I need to change the URL at runtime. When I create my service, I
    > > do not see any methods to set the URL dynamically.
    > >
    > > Some code sample :
    > >
    > > CMyServiceT<CSoapSocketClientT<> > *myService = new
    > > CMyServiceT<CSoapSocketClientT<> > ();
    > >
    > > The methods I can call from myService only allow me to get things ! I
    > > cannot see any methods to set the url.
    > >
    > > Please do not tell me to modify the web.config, I do not have any !!!
    > > I work in unmanaged code.
    > > Any help greatly appreciated !
    nico193 Guest

Similar Threads

  1. Web Service and unmanaged DLL using ADO
    By Delf in forum ASP.NET Web Services
    Replies: 2
    Last Post: May 10th, 03:10 PM
  2. Invoke from unmanaged code
    By Mircea Pleteriu in forum ASP.NET Web Services
    Replies: 1
    Last Post: February 24th, 04:23 AM
  3. ASP.NET App with Unmanaged Code - HELP!
    By Ted in forum ASP.NET Security
    Replies: 1
    Last Post: December 15th, 02:55 PM
  4. Calling an unmanaged DLL from a web service.
    By Chris Bardon in forum ASP.NET Web Services
    Replies: 3
    Last Post: July 2nd, 01:12 AM
  5. Replies: 0
    Last Post: July 11th, 06:27 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139