473,545 Members | 2,443 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is there a simlpe SOAP -> method call example that doesn't use any transports, etc.?

I have not had any luck searching for a simple, simple example that
calls a method on an object given a SOAP string. Here's what I'm
looking for (in pseudocode):

string SOAPCall = "bla bla bla"; // SOAP method invocation XML
string SOAPResponse;
MyObject x = new MyObject();
// and here's where I don't know what to do
/* call the method on x as specified in SOAPCall and
get the output into SOAPResponse. */

Can anyone be of any assistance?

Thank you!
Nov 12 '05 #1
3 4873
"Nimai Malle" <ni*********@ya hoo.com> wrote in message news:7a******** *************** ***@posting.goo gle.com...
I have not had any luck searching for a simple, simple example that
calls a method on an object given a SOAP string.
That's probably because it's impractical. What's the point of
SOAP without any transport? If I wanted to call a method on
an object I'm holding in my hand, creating a SOAP envelope
is the last thing I want to do.

SOAP's usefulness is when I want to call a method on the
object in Billy Jean's hand, over there. Or an object in
Heather's hand, in San Diego. Or an object in Dieter's
warehouse in Cologne, Germany, that's running on an
AS/400 midrange machine requiring me to digitally sign
the method call so Dieter knows it came from me and
not Heather.
string SOAPCall = "bla bla bla"; // SOAP method invocation XML
string SOAPResponse;
MyObject x = new MyObject();
Why not get rid of SOAPCall and SOAPResponse and just
say x.MyMethod( blah, blah)? It's both easier, and much
more efficient. :-)
Can anyone be of any assistance?


For the particular three objects you have in your example,
you could parse the SOAPCall string as XML and interpret
it to route to the correct method of MyObject using a number
of System.Reflecti on methods, call the method and then
return a value that you'd have to format as SOAP to store
in SOAPResponse.
Derek Harmon
Nov 12 '05 #2
Thank you Derek. I guess, this being the usenet and all, I forgot to
mention that:

I AM NOT A TOTAL IDIOT!

In the interest of keeping my original post brief, I did not include
the entire context surrounding my interest in acquiring such an
example. I would have thought it obvious that I wasn't trying write a
stand-alone application using SOAP calls.
That said, what I am interested in is what .NET Framework methods are
available (and possible used internally) for implementing the
functionality in HttpRuntime.Pro cessRequest, for example.

Anyway, I understand your reply. Thank you.
Nov 12 '05 #3
"Nimai Malle" <ni*********@ya hoo.com> wrote in message news:7a******** *************** ***@posting.goo gle.com...
That said, what I am interested in is what .NET Framework methods are
available (and possible used internally) for implementing the
functionality in HttpRuntime.Pro cessRequest, for example.
From your first post and subject line, I would never have guessed you
were interested in the implementation of HttpRuntime.Pro cessRequest( );
what it dealing with HTTP transport, and largely unrelated to SOAP? ;-)

ProcessRequest handles incoming HTTP requests (not necessarily SOAP,
but you know that) for ASP.NET. The file extension of the requested
resource is mapped to an HttpHandler implementation that knows how
to process and respond to that particular request. The handler is created,
and responsibility for driving the response is turned over to it.

If you look in the machine.config file, you will see an <httpHandlers > section
which associates types with various paths (often file extensions). When you
look at path="*.vb" for instance, you see it associated with the type: System.
Web.HttpForbidd enHandler. ASP.NET does not want IIS to answer requests
for source files that may exist in the web applications' folders, so this class will
construct a response that gets sent back to the end user saying "Forbidden. "

One of those HttpHandlers, of course, is for the path="*.asmx", which is
a ASP.NET web service document. It's type is System.Web.Serv ices.
Protocols.WebSe rviceHandlerFac tory. That's about as soapy as Process-
Request itself gets.

If you want to see what .NET Framework methods HttpRuntime.Pro cess-
Request uses internally, I suggest running ILDASM -- it's included in the
FrameworkSDK /bin folder (or the popular Reflector tool by Lutz Roeder)
-- on the System.Web assembly. It's not necessary to be fluent in MSIL
to read the disassembly, all of the .NET Framework method calls will jump
right out at you.

: : Anyway, I understand your reply. Thank you.

"Derek Harmon" <lo*******@msn. com> wrote in message news:uP******** *****@TK2MSFTNG P10.phx.gbl...

: :
For the particular three objects you have in your example,
you could parse the SOAPCall string as XML and interpret
it to route to the correct method of MyObject using a number
of System.Reflecti on methods, call the method and then
return a value that you'd have to format as SOAP to store
in SOAPResponse.


Let me elaborate, you may not have seen how this applies.

Use the System.Xml.* classes to interpret the SOAP envelope that
you're (it sounds like to me) posting from your SimpleWorkerReq uest
subclass. The .NET Framework also uses System.Xml.Seri alization
and the System.Runtime. Serialization.F ormatters.Soap; but were I
writing it, I'd avoid using those if possible.

Use the classes in the System.Reflecti on namespace to instantiate an
instance of your object (e.g., ConstructorInfo or the CreateInstance( )
method of Type or AppDomain if you prefer) and invoke the right
method (e.g., MethodInfo or PropertyInfo; Invoke( ) or SetValue( )
methods).

Go back to the System.Xml.* classes to create the response containing
the method's return value; or to create a fault for any Exception you've
caught.

The actual WebService handler ASP.NET uses will look for (using
reflection) all sorts of Attributes adorning MyObject's metadata to
drive through certain parts of it's deserialization , processing, and
serialization of the response.
Derek Harmon
Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1708
by: Russell | last post by:
Using Python 2.3 and ZSI 1.2 I am having problems getting information back from a test web service running on a PC on our LAN. The SOAP request details (from the .asmxfile) are as follows: POST /rjetest/rjetestservice.asmx HTTP/1.1 Host: grouse Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction:...
0
2416
by: Doug Farrell | last post by:
Hi everyone, I'm trying to build a program to interface to a SOAP/XML interface provided by one of our vendors. This interface is built with MS SOAP Toolkit 3.0, so I'm guessig they are running a .NET server. I'm trying to build my program with Python as I've got to deploy on both Linux and Sun/Solaris platforms. I'm developing on RedHat...
0
1617
by: chr | last post by:
Hi, I'm trying to integrate a webservice into a c#-program, creating proxy classes from a wsdl-file with wsdl.exe. All works fine, except if containers are returned. Although I can see in the returned xml that there are entries in the containers the proxy-classes say it is empty. Has anybody an idea why this is so an how to solve this...
8
6285
by: xmail123 | last post by:
Hi, As was pointed out whatever you return from a WebMethod needs to be serializable to SOAP. An ArrayList is not serializable. I will be needing to return other data types from web methods. Is there a document, or can some one list those types that are not serializable and the syntax for converting them? Thanks
0
2115
by: Daniel | last post by:
Hi, I need help signing SOAP/XML. Have been stuck with this for a couple of days now. I get the following error message from the server: "The security token could not be authenticated or authorized." I am probably doing something wrong in the signing process. I use a tool called "Exchanger XML Professional 3.2" for canonicalization and...
7
5862
by: beachdog | last post by:
I'm using Visual Studio 2005/C# to build a web client. The web server is something I've written in a different framework, which does not support generating wsdl, so I have hand-built a wsdl file, then created my proxy class by running wsdl.exe. The problem is that the SOAP message that the client generates contains an empty namespace for...
0
1603
by: Michael_R_Banks | last post by:
All, I'm trying to use SOAP to pass a serialized object from a VB.net application to a PHP application. Is this at all possible? Any help will be appreciated. I have included a copy of the SOAP file below. Regards, Michael
1
2256
by: gcmartijn | last post by:
H! When I use php code nusoap everything works but with python I get everytime "Your session key does not exist or has expired" I use this code below: test = SOAPpy.SOAPProxy("http://secure.easynic.com/com/iomart/ easynicWSv2.cfc?wsdl") data = test.login(_id='test',_pass='pass')
1
3799
by: akumar8k | last post by:
when i am excusing the below code i am getting the error. Error 1 − <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> − <SOAP-ENV:Body> −
0
2682
by: Philluminati | last post by:
I have a Perl SOAP Server which returns this SOAP Message when invoked: <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi="http:// www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http:// schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/ XMLSchema" soap:encodingStyle="http://schemas.xmlsoap.org/soap/...
0
7490
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7935
jinu1996
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...
0
7780
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6009
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3479
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...
0
3465
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1911
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
1
1037
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
734
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.