Last post Feb 20, 2013 01:55 PM by kushalrdalal
Feb 20, 2013 08:55 AM|CrusaderAD|LINK
Hello. I have a WSDL added as a web reference called mywsdl. I'm trying to call a method but I keep running into problems. The latest one is ServerName.mywsdl() not defined. Can someone please help? Here's the code:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="mypage._Default" %>
<%@ Import Namespace="mypage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<form id="form1" runat="server">
Dim CallWebService As New ServerName.mywsdl()
Dim sGetValue As String = CallWebService.GetSomeValue()
output = sGetValue
Feb 20, 2013 01:55 PM|kushalrdalal|LINK
What are you trying to do? Are you trying to call the methods from web service whose reference you have added by adding wsdl file or generated proxy from wsdl?
First you have to add service reference you can do that by adding the url of the service you are calling.
Then you can consume the methods from that service.
Please check this link-