Hi,
I created a sample web service and tried calling it from my VBScript.
Here it is:
----------------------------------------------------------------------------
---------------
'-- Declare variables
dim fs
dim file
dim strPara
Const URL = "http://localhost/Sample/SampleService.a smx"
'-- Initialize variables
para = "Anand"
Set fs = CreateObject("S cripting.FileSy stemObject")
Set file = fs.OpenTextFile ("C:\Inetpub\ww wroot\Sample\ou tput\get.html", 8,
True)
' Create the HTTP object
Set xmlhttp = CreateObject("M icrosoft.XMLHTT P")
xmlhttp.open "GET", URL & "/HelloWorld?pstr Temp=" & strPara, false
' Send the request synchronously
xmlhttp.send ""
'-- Write output to file
file.write xmlhttp.respons eText
file.close()
----------------------------------------------------------------------------
---------------
But I get the output as:
System.InvalidO perationExcepti on: HelloWorld Web Service method name is not
valid. at System.Web.Serv ices.Protocols. HttpServerProto col.Initialize( ) at
System.Web.Serv ices.Protocols. ServerProtocolF actory.Create(T ype type,
HttpContext context, HttpRequest request, HttpResponse response, Boolean&
abortProcessing )
I have allowed httpget and httppost in my web.config of the sample web
service.
<webServices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
<add name="HttpPostL ocalhost"/>
<!-- Documentation enables the documentation/test pages -->
<add name="Documenta tion"/>
</protocols>
</webServices>
I also do not have my firewall enabled.
Any clue how to solve this?
Regards,
Anand 1 14460
Hi,
I solved the problem.
Silly mistake, I had commented the [Web Method] before my method that
prevented its exposure. :~)
Regards
Andy
--
Regards,
Anand
"Andy" <ar******@ivesi a.com> wrote in message
news:OQ******** ******@TK2MSFTN GP15.phx.gbl... Hi,
I created a sample web service and tried calling it from my VBScript.
Here it is: --------------------------------------------------------------------------
-- --------------- '-- Declare variables
dim fs
dim file
dim strPara
Const URL = "http://localhost/Sample/SampleService.a smx"
'-- Initialize variables
para = "Anand"
Set fs = CreateObject("S cripting.FileSy stemObject")
Set file = fs.OpenTextFile ("C:\Inetpub\ww wroot\Sample\ou tput\get.html", 8, True)
' Create the HTTP object
Set xmlhttp = CreateObject("M icrosoft.XMLHTT P")
xmlhttp.open "GET", URL & "/HelloWorld?pstr Temp=" & strPara, false
' Send the request synchronously
xmlhttp.send ""
'-- Write output to file
file.write xmlhttp.respons eText
file.close()
--------------------------------------------------------------------------
-- --------------- But I get the output as:
System.InvalidO perationExcepti on: HelloWorld Web Service method name is
not valid. at System.Web.Serv ices.Protocols. HttpServerProto col.Initialize( ) at System.Web.Serv ices.Protocols. ServerProtocolF actory.Create(T ype type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing )
I have allowed httpget and httppost in my web.config of the sample web service. <webServices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
<add name="HttpPostL ocalhost"/>
<!-- Documentation enables the documentation/test pages -->
<add name="Documenta tion"/>
</protocols>
</webServices>
I also do not have my firewall enabled.
Any clue how to solve this?
Regards, Anand
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: maflatoun |
last post by:
Hi,
I have recently noticed that some of my web services when used/tested
directly by calling the
..asmx page return the following result
Invalid method name 'logusagereport', method names are case sensitive.
The method name 'LogUsageReport' with the same name but different
casing was found.
|
by: dpp |
last post by:
Hi
I am calling a method of a .NET component from both win forms and web
service applications.
Strangly, it is working fine from win forms application, but when i
call the same method (same code with same input values) of that . NET
component from the web service method it is giving the following
exception,
|
by: SM |
last post by:
Hi,
I have a web service method developed in .Net 1.1 where both http get and
post protocols are enabled.
the problem is that , when i access my web method from ie window like
http://localhost/ws/FindName.asmx/FindName?name="test"&age=30 it returns
results in xml , however , if tried to call the same method in the following
fashion
http://localhost/ws/FindName.asmx/FindName?name="test"&age=
|
by: Debasish Pramanik |
last post by:
Hi All,
Is there any standards to be followed for method name while writing Web
Service. For e.g. Should we follow the camel case standards or Hungarian
notation.
--
Regards,
|
by: Abhi |
last post by:
Hi All,
I have a web service method which works fine when called from my local
machine i.e. from localhost but when I publish the web services to a remote
machine it throws an invalid cast soap exception.
That web service method access Active Directory to get the group names for
the given user. Following is the code.
DirectorySearcher dirSearcher = new DirectorySearcher();
| |
by: Microsoft Newsgroups |
last post by:
I am trying to consume a web service where there is a dot in the method name
as defined in the portType and binding section of the WSDL file. Here is an
example:
<operation name="soapserver.login">
The WSDL.EXE tool correctly removes the dot when creating the C# method
name, resulting in soapserverlogin; however, it also removes the dot when
making the Invoke call as shown:
|
by: Matteo |
last post by:
Hi everybody,
can anyone tell me how to pass an XMLNode to a web service method?
While using structs as response of the web service all works fine, but
there's a certain difficulty with XML data.
The service is a .NET web service, I tried to find some documentation
but there's no solution, also here:
http://www.php.net/manual/en/ref.soap.php
|
by: enggwaqas |
last post by:
I am exposing my Biztalk orchestration as a web service and want to consume this web service asyncly, but when i added web reference in my visual studio project it isn't displying Begin<Web Method Name> and End<Web Method Name> function?
|
by: =?Utf-8?B?YW5kcmV3?= |
last post by:
I have a web application demo page and a web service.
On my machine everything works great.
In our test environment the web service is working fine... when I point the
demo page on my machine to the test environment web service I get results as
expected.
The demo page in the test environment which is pointed at the web service in
the test environment doesn't work at all... instead I end up with this
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |