Re: WebService - XML

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



author wrote:
How do I change my webservice (ws.asmx.vb), so it can "understand"
when I send the below soap-xml to it ??

If I submit a normal html-form with input a+b, it works well. I know
how to send the soap-xml, but not how to get the webservice to work
with it.

TIA


<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";> <soap:Body> <Add xmlns="abcdefg"> <a>10</a> <b>20</b> </Add> </soap:Body> </soap:Envelope>


ws.asmx.vb -- Imports System.Web.Services

<WebService(Namespace:="http://tempuri.org";)> _
Public Class Service1
  Inherits WebService

  <WebMethod()> _
  Public Function Add(ByVal a As Integer, ByVal b As Integer) As
Integer
    Return a + b
  End Function
--


You dont call ws.asmx.vb, you call ws.asmx
The .vb is the pre-compiled code.

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com
.



Relevant Pages

  • WebService - XML
    ... How do I change my webservice, ... how to send the soap-xml, but not how to get the webservice to work ... Public Class Service1 ... Public Function Add ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: publishing Hello World to local IIS
    ... "Decorate" means to beautify to me and I was at a loss as to how that worked with web services. ... The "WebMethodAttribute" I mentioned is used to indicate that a certain class method of the webservice class should be exposed as "webmethod". ... Public Function HelloWorld() As String ... Public Class Service1 ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: publishing Hello World to local IIS
    ... Public Class Service1 ... you should keep one webservice class in each asmx. ... Also, for each WebService method in it, you need to decorate it with <WebMethodAttribute> ... ' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: publishing Hello World to local IIS
    ... \par Here are some general reference about the webservice essentials(most of them are of XML webservice standard, not platform coupled concepts) which may help you better understand webservice: ... \par loss as to how that worked with web services. ... \par> Public Function HelloWorld() As String ... \par>> Public Class Service1 ...
    (microsoft.public.dotnet.framework.webservices)