newbie - Calling Web Service from a Client


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: newbie - Calling Web Service from a Client

  1. #1
    Sam Guest

    newbie - Calling Web Service from a Client


    I have a Web service, which I'm not able to invoke through a web client.



    Invoking Client Web page (.aspx)
    <%@ Import Namespace="rmsService"%>

    <Script>

    Dim xObj as rmsService.EmpDataService = New rmsService.EmpDataService() -

    It errors out here...

    </Script>


    Error Text : Type rmsService.EmpDataService is not defined...



    I have the proxy class EmpDataService.vb in the directory, created by the
    wsdl utility.

    Any pointers greatly appreciated....


    cheers,
    Sam

  2. #2
    Christian Weyer Guest

    Re: newbie - Calling Web Service from a Client

    Sam,

    for this approach you need to compile the proxy class into a library
    (DLL) assembly and put this assembly into a subfolder called 'bin'. Then
    the ASPX should find the appropriate types.

    Also you do not need to import the namespace when you are referencing
    you types through the namespace.

    Cheers,
    Christian Weyer
    ---------------------------------
    .NET XML Web Services Repertory
    http://www.xmlwebservices.cc/
    ---------------------------------

    Sam wrote:

    > I have a Web service, which I'm not able to invoke through a web client.
    >
    >
    >
    > Invoking Client Web page (.aspx)
    > <%@ Import Namespace="rmsService"%>
    >
    > <Script>
    >
    > Dim xObj as rmsService.EmpDataService = New rmsService.EmpDataService() -
    >
    > It errors out here...
    >
    > </Script>
    >
    >
    > Error Text : Type rmsService.EmpDataService is not defined...
    >
    >
    >
    > I have the proxy class EmpDataService.vb in the directory, created by the
    > wsdl utility.
    >
    > Any pointers greatly appreciated....
    >
    >
    > cheers,
    > Sam



  3. #3
    Sankar Guest

    Re: newbie - Calling Web Service from a Client



    User the .URL property after you instantiate your proxy class of the
    web serivce.
    The URL property should show the IP address or the namedspace of the
    server which hosts the web service.

    Example,

    Dim xObj as rmsService.EmpDataService = New rmsService.EmpDataService()

    xobj.URL = "Http://microsoft.com/webservices/Service1.asmx"
    or
    xobj.URL = "Http://000.000.000.000(IP)/webservices/Service1.asmx"

    Try again.

    "Sam" <sansar7@hotmail.com> wrote:
    >
    >I have a Web service, which I'm not able to invoke through a web client.
    >
    >
    >
    >Invoking Client Web page (.aspx)
    ><%@ Import Namespace="rmsService"%>
    >
    ><Script>
    >
    >Dim xObj as rmsService.EmpDataService = New rmsService.EmpDataService()

    -
    >
    >It errors out here...
    >
    ></Script>
    >
    >
    >Error Text : Type rmsService.EmpDataService is not defined...
    >
    >
    >
    >I have the proxy class EmpDataService.vb in the directory, created by the
    >wsdl utility.
    >
    >Any pointers greatly appreciated....
    >
    >
    >cheers,
    >Sam



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center