Comprehensive, categorized, searchable collection of links to ASP & ASP.NET resources...deloittes.NET Directory - Click for Demo!!
Our Directory

Applications
ASP.NET Directory
Books & Media
Community
Components
Other ASP Sites
Reference Material
Software & Server
Tutorials & Code
Web Site Hosts

Expand Directory...
Personlise Results...

Newsgroups

Participate in over
100 ASP & ASP.NET related newsgroups right here @ Fuzzy Software...

.NET Framework
- .net.faqs
- .net.framework
- .net.general
- .net.setup
- .net.scripting
- .net.xml

Web Services
- aspnet.webservices
- msdn.soaptoolkit
- msdn.webservices

SQL Server
- sqlserver.setup
- sqlserver.prog...
- sqlserver.tools

Classic ASP
- asp.db
- asp.general
- asp.components

Scripting
- scripting.jscript
- scripting.remote
- scripting.vbscript
- scripting.wsh

All newsgroups...

ASP Built-in
Objects Reference


Application Object
ObjectContext Object
Request Object
Response Object
Server Object
Session Object

Personalise Fuzzy
Make Homepage
Link To Fuzzy
Bookmark This Page

Add our directory to your site in less than
2 minutes...














Whats New!


From: "Vince C."
Subject: Help needed on using SoapServer.SoapInvoke *without* ASP Req...
Date: Tue, 4 Jun 2002 00:45:46 +0200

Hi all,

I'm trying to write an ASP where I'm reading form fields to create a SOAP
message and process it using the SoapInvoke method of a SoapServer object.
Unfortunately, all I succeed in getting is a "Bad server request" error message.
Can someone point some direction I can follow, please?


Here is the code for the modified ASP that was generated by the WSDL wizard:
...
' Determine if we're using SOAP client (SOAPAction HTTP header exists)
If Len(Request.ServerVariables("HTTP_SOAPACTION")) Then
SoapServer.SoapInvoke Request, Response, ""
Else
SoapServer.SoapInvoke ProcessPost(), Response,
"""http://tempuri.org/action/HelloServer." & Request.Form("Method") & """"
End If
...
Function CreateElement( ByVal szName, ByVal szValue, ByVal nsURI )
' Create an empty document; serves as a node factory
Dim xmlDoc: Set xmlDoc = Server.CreateObject("MSXML2.DOMDocument")

' Create a NODE_ELEMENT (1) from an empty document and set its value
Dim n: Set n = xmlDoc.createNode( 1, szName, nsURI )

' Optionally set the node value and return the element
If Len(szValue) Then n.Text = szValue
Set CreateElement = n
End Function

Function ProcessPost
' First create a SOAP message
Dim Msg: Set Msg = Server.CreateObject("MSSMO.SoapMessage")

' Then append method child node: use Request.Form() fields to fill a SOAP
message
Dim n: Set n = CreateElement( "m:" & Request.Form("Method"), "",
"http://tempuri.org/message/" )
Select Case Request.Form("Method")
Case "sayHelloTo"
n.appendChild CreateElement("Name", Request.Form("Name"), "")
Case "addNumbers"
n.appendChild CreateElement("Number1", Request.Form("Number1"), "")
n.appendChild CreateElement("Number2", Request.Form("Number2"), "")
End Select

' Add methods to the message body
Msg.BodyParts.BodyElement.appendChild n
ProcessPost = "<?xml version=""1.0"" encoding=""UTF-8"" standalone=""no"" ?>" &
vbCrLf & Msg.XML
End Function

Can someone tell me what is wrong?
Thanks in advance.

Vince C.


Post a follow up to this message...





InstantGallery.NET - ASP.NET Enabled Image Gallery

Receive all the latest quality ASP
& ASP.NET content direct to your inbox. Sign-up to our newsletter.




MyLittleWebTools

FreeBugTracking.com

KickinASP.NET

Ascenvia.net

Bipin Joshi

More partners...

Ektron web editor and content management software
  5813 ASP & ASP.NET resources in over 450 categories and growing daily...
Fuzzy Software - asp / asp.net resources, tutorials, code, scripts, applications, components, newsgroups, hosts and much more... Sitemap 0 1 4