problem in using the webservice.htc file to call webservice method

Hello Mate,

                   The webservice method is not getting called . COULD U PLEASE HELP ME ON THIS PROBLEM?              

                   First of all i have a folder called "Masters" in my project.

                   In that folder i am having two webpages ( one as master page and other as a pop up page) and a webservice.htc file which i had downloaded from the internet.

                   I have specified the htc file (which is nothing but webservice's behavior file) in webpage's source code as

                  <div id="service" style="behavior:url(webservice.htc)"></div

                    i have a webservice file and also a jscript file.

in the jscript file i have coded as

(in this i have specified "FillTable" which is nothing but the webservice method. it is used to fill a datatable from the parameters passed and stored in a session variable. after that the succeededcall back function will refresh the parent form in which i will fill a datagrid using the datatable in the session variable) function init()

{

service.useService(
"Webservices/GridTasks.asmx?WSDL","GridTasks");

}

function CreateAndFillTable()

{

alert("in create and fill table");

var strtxtCust_cp_code = document.getElementById("Table1_txtCust_cp_code").value;

var strtxtCust_cp_name = document.getElementById("Table1_txtCust_cp_name").value;

var strtxtCust_cp_desig = document.getElementById("Table1_txtCust_cp_desig").value;

var strtxtcust_cp_ph_no = document.getElementById("Table1_txtCust_cp_phone_no").value;

var strtxtCust_cp_mobile_no = document.getElementById("Table1_txtCust_cp_mobile_no").value;

var strtxtCust_cp_email_id = document.getElementById("Table1_txtCust_cp_email").value;

var strtxtCust_cp_rmks = document.getElementById("Table1_txtCust_cp_rmks").value;

 

init();

var iCallID; iCallID = service.GridTasks.callService(SucceededCallback,"FillTable",strtxtCust_cp_code,strtxtCust_cp_name,strtxtCust_cp_desig,strtxtcust_cp_ph_no,strtxtCust_cp_mobile_no,strtxtCust_cp_email_id,strtxtCust_cp_rmks);

}

function SucceededCallback()

{

opener.document.forms[
"aspnetForm"].submit();

window.close();

}

 

WebService method:

<WebMethod(True)> _

Public Sub FillTable(ByVal strtxtCust_cp_code As String, ByVal strtxtCust_cp_name As String, ByVal strtxtCust_cp_desig As String, ByVal strtxtcust_cp_ph_no As String, ByVal strtxtCust_cp_mobile_no As String, ByVal strtxtCust_cp_email_id As String, ByVal strtxtCust_cp_rmks As String)

MsgBox("filltable/webservices") Dim Table6 As New DataTable

Try

Dim Delete As New DataColumn Delete.ColumnName = "Delete"

 

Dim Modify As New DataColumnModify.ColumnName = "Modify"

 

 

Dim Code As New DataColumn Code.ColumnName = "Code"

 

Dim Name As New DataColumn Name.ColumnName = "Name"

 

Dim Designation As New DataColumn Designation.ColumnName = "Designation"

 

Dim Phone As New DataColumn Phone.ColumnName = "Phone"

 

Dim Mobile As New DataColumn Mobile.ColumnName = "Mobile"

 

Dim Email As New DataColumn Email.ColumnName = "Email"

 

Dim Remarks As New DataColumnRemarks.ColumnName = "Remarks"

 

 

Table6.Columns.Add(Delete)

Table6.Columns.Add(Modify)

Table6.Columns.Add(Code)

Table6.Columns.Add(Name)

Table6.Columns.Add(Designation)

Table6.Columns.Add(Phone)

Table6.Columns.Add(Mobile)

Table6.Columns.Add(Email)

Table6.Columns.Add(Remarks)

If Session("CUST_Info") Is Nothing Then

Table6.Rows.Add(0)

Table6.Rows(0).Item("Delete") = "Delete.png"

Table6.Rows(0).Item("Modify") = "Modify.png"

Table6.Rows(0).Item("Code") = strtxtCust_cp_code

Table6.Rows(0).Item("Name") = strtxtCust_cp_name

Table6.Rows(0).Item("Designation") = strtxtCust_cp_desig

Table6.Rows(0).Item("Phone") = strtxtcust_cp_ph_no

Table6.Rows(0).Item("Mobile") = strtxtCust_cp_mobile_no

Table6.Rows(0).Item("Email") = strtxtCust_cp_email_id

Table6.Rows(0).Item("Remarks") = strtxtCust_cp_rmks

Else

Table6 = Session("CUST_Info")

Dim i As Integer

i = Table6.Rows.Count

Table6.Rows.Add(i)

Table6.Rows(i).Item("Delete") = "Delete.png"

Table6.Rows(i).Item("Modify") = "Modify.png"

Table6.Rows(i).Item("CODE") = strtxtCust_cp_code

Table6.Rows(i).Item("Name") = strtxtCust_cp_name

Table6.Rows(i).Item("Designation") = strtxtCust_cp_desig

Table6.Rows(i).Item("Phone") = strtxtcust_cp_ph_no

Table6.Rows(i).Item("Mobile") = strtxtCust_cp_mobile_no

Table6.Rows(i).Item("Email") = strtxtCust_cp_email_id

Table6.Rows(i).Item("Remarks") = strtxtCust_cp_rmks

End If

Session("CUST_Info") = Table6Catch ex As Exception

MsgBox(ex.ToString)

End Try

MsgBox("filltable/webservices over")

End Sub


Much Obliged & Thanks a Lot,
Myself
0
Sidewinder2
7/8/2008 10:43:35 AM
asp.net.client-side 24353 articles. 1 followers. Follow

1 Replies
1030 Views

Similar Articles

[PageSpeed] 57

Hello There!,

   Actually My code was correct .Mistakenly i ran some other application instead of this application.

 

 


Much Obliged & Thanks a Lot,
Myself
0
Sidewinder2
7/9/2008 5:42:15 AM
Reply:

Similar Artilces:

call webservice using javascript without using AJAX and webservice.htc?
HI,how can i call a webservice without using AJAX and Webservice.htc, using any protocols?Thanks.X you could skip using an AJAX framework and issue an xmlHttpRequest directlyhttp://en.wikipedia.org/wiki/XMLHttpRequestMike Banavige~~~~~~~~~~~~Need a site code sample in a different language? Try converting it with: http://converter.telerik.com/ Hi, thanks mbanavige.well, is there any disadvantage of using xmlhttprequest?and one more question can AJAX also work on other web servers than IIS like Apache? and is AJAX compatible with all browsers other than IE?how can i call a web servi...

to use a webservice or not to use a webservice?
hi folks, i have a web-based application that connects to a server for processing and then gets back the data from the server asynchonously to display to the user--specifically, the user identifies a product by answering coupla questions and then the program connects to a CAD server to generate models of the product to display to the user. creating the CAD files typically takes little over a minute or so...but i would like to know whether its a good idea to use a web-service to connect to the CAD server and then do the processing or whether remoting is a better way to do this. ...

Problem in convert xml file (created using webservice) to datagridview(vb.net)
 i had created webservice with two functions 1 is hello which displays the text "Welcome" and 2 is GetNavisionItems which displays the database table in xml format. and publish that web site.Now i created another windows application project in vb.net by click a button i am invoking the webservice which i published.i can able to print the text "Welcome"but, i could not able to store the database table in xml format to DataGridView.now what i have to do pls suggest.below is my vb.net coding:Imports TestSample24_01_08.TestWSImports System.DataPublic Class Form1 &...

Advantage of calling Webservice from server side/client side.
Hi Folks,      I've an issue sending/receiving huge amount of data from webservices. When a webmethod is called from javascript, it fails due to the size restriction of the data (> 4MB) that can be transferred. My application architechture do have webservices and asp.net applications hosted on the same server. I'm wondering, if I can make a PageMethod call to a static method on my codebehind file and then the static method makes a call to the webservice would solve the issue? Any thoughts on this, would be really helpful? (I was trying to use WSE3.0 to incres...

How to call web method directly form client side javascript without using hta file
Hello nice guys, I am a newbie in this forum. I need to be able to call a web service from client side javascript code without using webservices.hta file so it may work on Netscape browsers as well as IE browsers. I don't mind having to form soap request and then post it all in javascript. An example will be very helpful. Do you have any resource I may look up to, like any published article on the net, for code examples or a work around. Thanks Dean51 Hi, I wrote a library to use AJAX to consume Web Services. You can find the article, the source code (less than 8 KB) and some...

Problem calling a secure Webservice from another Webservice
The situation is as follows: I have a library VRKModule which calls an external Webservice requiring a Client Certificate. Function VRKModule.VRKQuery(string): 1    public void VRKQuery(string SSN)2            {3                XmlSerializer Serializer;4                MemoryStream Stream;5                try6 &n...

how calling webservice client side
hi there,  i have created a webservice, how can i register it in  UDDI and how to consume and invoke the webservice from my web application. Please help. Thanks in Advance,Pruthvi Sagar  Check these links: http://www.asp.net/ajax/documentation/live/tutorials/ExposingWebServicesToAJAXTutorial.aspx http://www.asp.net/ajax/documentation/live/tutorials/ConsumingWebServicesWithAJAXTutorial.aspx Hope this helps, Elias.If this post helped you please remember to set it as Answer so it can help others. i have created a webservice its works fine but how can i call this web...

Webservice call in client side
hi How to bind list controls like Dropdown list or data gird on client side through web service which returns dataset Description: I hav a dropdown list control and i wnt to bind it from client side.for that i create a web service which return the datasetbut i dnt kno how to bind tht datset to controls on client side how can i do this ? ThanksDo hard work, you will get your result sure!Jaydev Jangid You can call it using JScript http://aspalliance.com/713Or if you already using AJAX in your web site you can do it using AJAX Take a look here Calling Web Services from Client Sc...

ModalPopup using WebServices (WebService Call Failed: 500)
Hi All,   I am trying to populate a gridview and display the results in a Modal Popup.  I have wired it all together, but when it calls the webservice, it is not dropping into the web service.  It finds the .asmx file which calls a .cs file and begins to run through the process, but it doesnt run the WebMethod.   Here is all the code, your help is greatly appreciated. The asmx File: <%@ WebService Language="C#" CodeBehind="~/App_Code/ModalSerivice.cs" Class="ModalService" %> Here is the WebService: [WebService(Namespace = "http://tempuri.org/")] [WebService...

how to retrieve a value which is returned by a webservice method by using the webservice behavior
Hello Mate,                     I am using the webservice behavior to call a webservice method through internet. but i have a problem in getting a value which is returned from a webservice method. the jscript shown below is not working. Could u please help me in this ? This is my web method:<WebMethod(True)> _ Public Function add(ByVal a As Integer, ByVal b As Integer)Return a + b End Function  This is my jscript file: Function add() {  service.useService("GridTasks.a...

Call Webservice from windows client problem
I have web service with a windows client , sometimes when I call the web service this error happen: [ERROR] Client found response content type of '', but expected 'text/xml'. The request failed with the error message: -- <HTML><HEAD><META HTTP-EQUIV="REFRESH" CONTENT="0" URL="http://myhost.com/WS.asmx"></HEAD><BODY> </BODY></HTML> [/ERROR] It is happend by chance and I donn't no any reason, cause if I close my application and open it again and call methods with the same datait does not happend.Any...

Client side WebService call Issue
I have in my /Tests/ folder JsonTest.aspx and JsonObj.asmx. I also have /js/json.jsJsonTest.aspx:<body onload="UpdateCall()">    <form id="form1" runat="server">    <asp:ScriptManager ID="ScriptManager1" runat="server">        <Scripts>            <asp:ScriptReference Path="/js/JSON.js" />        </Scripts>      &nb...

Calling another webservice within a webservice's method....
Is there any drawback or incovenient in doing it? example: [WebMethod] public DataSet List1() { AnotherWebService.Service zbr = new AnotherWebService.Service(); return zbr.GetUsersList(); } Thanks If your business needs that archicture, then you have to use it ; ) But..you have to be more careful for trapping error etc!!Sreedharhttp://www.w3coder.orgweblog http://weblogs.asp.net/skoganti...

Problem calling webservice from client code
Hi All,                   I am trying to call a webservice method on a ASP.NET page (in AJAX enabled website). I have my asmx file in the same project as my ASP.NET page. When i try to compile the project , i am getting a  "Could not create type TestService" error. Can some body tell me what exactly is the problem here?   Thanks Mahesh cud u have given namespace reference of web.script.services.scriptservices as  using web.script.services.scriptservices & inherite [Scrip...

Web resources about - problem in using the webservice.htc file to call webservice method - asp.net.client-side

webservices Articles, Posts, Blogs, Videos - Technorati
— Authority: The job consist in a PHP program that read a file, compose a message (email or sms) and call an API of email provider (Amazon SES) ...

Section: software:webservices
Wired.com © 2012 Condé Nast. All rights reserved. Use of this Site constitutes acceptance of our User Agreement (effective 3/21/12) and Privacy ...

Products - CrunchBase
Product profiles

App Search on Flickr - Application Sharing!
Flickr is almost certainly the best online photo management and sharing application in the world. Show off your favorite photos and videos to ...

Wikipedia:Press coverage 2005 - Wikipedia, the free encyclopedia
If you add an article, please cite both the title and the source. Note that if you're listing an article from a traditional press wire service ...

Entity–relationship model - Wikipedia, the free encyclopedia
In software engineering , an entity-relationship model ( ER model for short) is an abstract and conceptual representation of data . Entity-relationship ...

Entity-relationship model - Wikipedia, the free encyclopedia
In software engineering , an entity-relationship model ( ER model for short) is an abstract and conceptual representation of data . Entity-relationship ...

IT and Telecommunications Jobs in Melbourne Metro - MyCareer
Find IT and Telecommunications Jobs in Melbourne Metro on MyCareer. Fresh IT and Telecommunications Jobs posted daily. Free email alerts and ...

AWS Elastic Beanstalk: A Quick and Simple Way into the Cloud
Flexibility is one of the key principles of Amazon WebServices - developers can select any programming language and software package,any operating ...

How To Use the Amazon SDK for Android to Upload Photos to Amazon S3
This article demonstrates how to use the AWS SDK for Android to upload an image to Amazon Simple Storage Service (S3) from your mobile device ...

Resources last updated: 12/14/2015 4:39:26 AM