Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / February 2005

Tip: Looking for answers? Try searching our database.

WSE and TCP / HTTP

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Anthony - 22 Feb 2005 20:43 GMT
I have been experimenting with WSE and i really like what ive been seeing so
far.

The way WSE does SOAP over TCP is great, but I seem to be having
intergration issues since most other solutions only support SOAP over HTTP.  

Is it possible to use WSE in a way that doesnt use asp.net or IIS, but still
can send SOAP messages over HTTP ?  

Thanks
Anthony
John Bristowe - 22 Feb 2005 21:15 GMT
Anthony,

Absolutely. You can utilize the WSE inside applications hosted inside
Enterprise Services and Windows services simply by hosting the WSE pipeline.

John

> I have been experimenting with WSE and i really like what ive been seeing
> so
[quoted text clipped - 10 lines]
> Thanks
> Anthony
Anthony - 22 Feb 2005 21:41 GMT
John,

how would you say, take the TcpSyncStockService  (the sameple in the WSE2)
and convert it to so the messages are SOAP over http?

It would seem that changing the via's "soap.tcp" to "http" would be all that
is needed, but this throws an exception when adding the soap listener.  
"WSE803: A valid HttpContext is required for Active HTTP Listening."   

I might have to do more than just change the via parameter, but what more i
have to do, i dont know.

If i open the HTTPstock service sample i get an error saying it cant open
because there is no web server running (i have IIS turned off)  That leads me
to believe it might not be possible to do it the way i would like.

-Anthony

> Anthony,
>
[quoted text clipped - 17 lines]
> > Thanks
> > Anthony
John Bristowe - 22 Feb 2005 22:49 GMT
Anthony,

You're correct; there is a dependency on context (System.Web.HttpContext)
for WSE-based service endpoints listening over HTTP. That stated, you can
write your own host via the System.Web.Hosting namespace. This solution uses
ASP.NET if you consider the hosting APIs part of this framework. ;-) A good
example of the hosting APIs is the Cassini Sample Web Server, which you can
download from the ASP.NET Web site:

http://www.asp.net/Default.aspx?tabindex=6&tabid=41

You could certainly mimic what's there to establish your own host inside the
context of an Enterprise Services server application or a Windows service.

John

> John,
>
[quoted text clipped - 40 lines]
>> > Thanks
>> > Anthony
William Stacey [MVP] - 22 Feb 2005 23:42 GMT
AFAICT, if you don't need ASP, then the ES and hosting api are not required
or useful.  So I believe you still need to write your own server to process
the http.  If there is a class that does that already, would welcome the
info.  I think FX 2.0 will include http classes.  If you do get the http
body, how do you process that down the wse pipeline and get the pipeline
reply to send back to client as http reply?

Signature

William Stacey, MVP
http://mvp.support.microsoft.com

> Anthony,
>
[quoted text clipped - 56 lines]
> >> > Thanks
> >> > Anthony
John Bristowe - 23 Feb 2005 00:38 GMT
William,

Independently hosted WSE-based service endpoints listening over HTTP must -
at some level - leverage the hosting APIs. There is a dependency in the WSE
on HTTP context (System.Web.HttpContext), as demonstrated by Anthony in a
previous post (see exception).

The WSE pipeline operates independently of the underlying transport. It may
leveraged to create and/or process SOAP messages without the imposition of
transport. By extension, the resulting SOAP message that's created could be
sent across the wire using any transport-related class found in the .NET
Framework. However, it's not guaranteed to be compliant with its associated
SOAP binding. That stated, you're better off leveraging  what the WSE
provides in the Microsoft.Web.Services2.Messaging namespace. There is a code
example specified in the WSE quickstarts (%ProgramFiles%\Microsoft
WSE\v2.0\Samples\<Language>\QuickStart\PipelineHosting) that demonstrates
how to instantiate the WSE pipeline to create a message in memory.

To answer your question:

The purpose of the WSE pipeline is to process a SOAP message through I/O
filters. Inbound SOAP messages are processed via the ProcessInputMessage
method while outbound SOAP messages are augmented via the
ProcessOutputMessage method. In both cases, the
Microsoft.Web.Services2.SoapEnvelope parameter is what is processed,
independently without the imposition of transport. That stated, once the
message has been processed, you are free to do with it what you like. :-) In
the WSE quickstart example (above), the resulting message is persisted to
and read from disk.

John

> AFAICT, if you don't need ASP, then the ES and hosting api are not
> required
[quoted text clipped - 76 lines]
>> >> > Thanks
>> >> > Anthony
Dilip Krishnan - 23 Feb 2005 01:00 GMT
Hey John!

{{
> The WSE pipeline operates independently of the underlying transport.
> It may leveraged to create and/or process SOAP messages without the
> imposition of transport.
}}

Yes and no. Yes because the pipline doesnt have a notion of transport mechanisms,
no because it has an indirect depency on the service host and transport via
the SoapContext. The soap context for WSE is dependent on the HttpContext.
It would be more appropriate to say that the soap context looks for the existence
of a HttpContext first and if its not found assumes a non http transport.

{{
By extension, the resulting SOAP message
> that's created could be sent across the wire using any
> transport-related class found in the .NET Framework. However, it's not
[quoted text clipped - 5 lines]
> demonstrates how to instantiate the WSE pipeline to create a message
> in memory.
}}

True

HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
Anthony - 25 Feb 2005 21:19 GMT
Well it looks like i found an answer to my question.

URL:
http://msdn.microsoft.com/msdnmag/issues/04/12/ServiceStation/toc.asp?frame=true&_r=1

unfortunately, i have to wait for .NET 2.0

> I have been experimenting with WSE and i really like what ive been seeing so
> far.
[quoted text clipped - 7 lines]
> Thanks
> Anthony

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.