WSE Messaging API without IIS

WSE Messaging API without IIS

Post by Richard A. » Wed, 29 Dec 2004 07:50:16


I have a Windows Service that needs to communicate with a
Windows GUI app on the same machine (and vice-versa).
Normally, I would use an Http channel in Remoting to
accomplish this. But I wondered if there is a WSE way to
accomplish this using the WSE 2.0 Messaging API.

Of course the problem is that I cannot guarantee IIS will
be running on the machine, so I'm wondering if there's a
way to somehow get the Http context that WSE seems to
want whenever you use its Http messaging. I keep
hearing "don't use remoting" from Don Box et al...
however this problem just doesn't seem solvable without
having a web server running (I'm not waiting for
Indigo!). However if there is a WSE messaging way I'd
love to use it.

Thanks,
Richard
 
 
 

WSE Messaging API without IIS

Post by erymuzua » Wed, 29 Dec 2004 08:56:10

You can run wse messaging not just only using HTTP(san s IIS) but also
TCP , SMTP. The way it works is based on the SoapEnvelope, SoapEnevelope
carry enough information in order for it to be properly delivered,
routed and processed. Take a look at this example as a guide
http://www.yqcomputer.com/


Regards
Erymuzuan Mustapa

 
 
 

WSE Messaging API without IIS

Post by Christoph » Wed, 29 Dec 2004 09:11:27

Yes, as erymuzuan already stated, you can build services and consume
them from any process, i.e. services as well as GUI apps.

However, alternatively to programming against the raw SoapEnvelope API,
you can follow the same programming model as you are used to with
ASP.NET web services or .NET Remoting.

WSE has two classes to help you, SoapService to build services that
listen on any supported endpoint and SoapClient to consume WSE services.
You can launch the service with the following two lines of code:

EndpointReference reference = new EndpointReference( new Uri(
"soap.tcp://localhost:8700/WSEEcho" ) );
SoapReceivers.Add( reference, typeof(EchoService) );


Where the EchoService class is a class derived from SoapService.

Then, with the service running, you can create a proxy class for that
service with WSE's wsewsdl2.exe tool:

wsewsdl2 soap.tcp://localhost:8700/WSEEcho proxy.cs


And you're set. The proxy class works just like its ASMX counter part.

HTH,
Christoph Schittko
MVP XML
http://www.yqcomputer.com/

SoapEnevelope
http://www.yqcomputer.com/
br
 
 
 

WSE Messaging API without IIS

Post by Richard A. » Wed, 29 Dec 2004 21:59:21

Thanks to you both. I'm glad to hear about the proxy generator, I didn't
know about that - I'm sure it will come in handy.

--
C#, .NET and Complex Adaptive Systems:
http://www.yqcomputer.com/
 
 
 

WSE Messaging API without IIS

Post by VG9kZCBDYX » Thu, 06 Jan 2005 01:21:02

always get an error when I try using wsewsdl2.exe to generate a proxy class
for a tcp hosted service.

I call wsewsdl2 like this -
wsewsdl2 soap.tcp://localhost/WebServiceengine myproxy.cs

and I get this error back -
Microsoft (R) WSDL to SoapClient Utility
[Microsoft (R) Web Services Enhancements, Version 2.0]
Copyright (C) Microsoft Corporation 1998-2004. All rights reserved.

An error occurred processing this WSDL. More information:
System.Web.Services.Protocols.SoapException:
Microsoft.Web.Services2.Addressing.
AddressingFault: Destination Unreachable
at
Microsoft.Web.Services2.Messaging.SoapClient.SendRequestResponse(String me
thodname, SoapEnvelope envelope)
at ClientGen.TcpProxy.RequestDescription(SoapEnvelope message)
at ClientGen.ClientGen.Download(String location)
at ClientGen.ClientGen.GenerateCode(String descriptionFile, String
outputFile
, XmlSchemas schemas)
at ClientGen.Class1.Main(String[] arguments)


Any ideas what's going wrong?

"Christoph Schittko [MVP]" wrote:

 
 
 

WSE Messaging API without IIS

Post by Dilip Kris » Thu, 06 Jan 2005 02:22:26

ello Todd,
Do you have a soap service running at soap.tcp://localhost ? My guess
is it should be a console application with a registered soap receiver. if
not thats the error you should expect to see

HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com



 
 
 

WSE Messaging API without IIS

Post by VG9kZCBDYX » Thu, 06 Jan 2005 02:47:02

es, I have a windows service running that is hosting the soap service. I am
able to access the soap service from a client that I hand coded but I can
never get the wsewsdl2.exe to work.

"Dilip Krishnan" wrote:

 
 
 

WSE Messaging API without IIS

Post by Dilip Kris » Thu, 06 Jan 2005 02:51:37

ello Todd,
Try wsewsdl2 soap.tcp://localhost/WebServiceengine?wsdl myproxy.cs

HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com



 
 
 

WSE Messaging API without IIS

Post by VG9kZCBDYX » Thu, 06 Jan 2005 03:11:03

ame error using the below syntax.

"Dilip Krishnan" wrote:

 
 
 

WSE Messaging API without IIS

Post by Sami Vaara » Thu, 06 Jan 2005 03:29:18

You are not alone with this problem. Check out this blog entry:
http://weblogs.asp.net/yreynhout/archive/2004/06/04/148055.aspx.

Regards,
Sami



"Todd Cash" < XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...


 
 
 

WSE Messaging API without IIS

Post by William St » Tue, 11 Jan 2005 13:33:45

:\Program Files\Microsoft WSE\v2.0\Tools\Wsdl>wsewsdl2
soap.tcp://myhost.mydomain.com/MyService -name
soap://service.contoso.com/MyServiceV1 output.cs

First parm is the "via" and the -name parm is the "address" as you defined
in EndpointReference. The service must be started. Also, make sure you
have WSE v2.0 installed. I also have sp2 installed, not sure if sp1 works.

First time I got wsdl with tcp to work, so this was helpful for me too.
Cheers!

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

"Todd Cash" < XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...

 
 
 

WSE Messaging API without IIS

Post by Softwarema » Wed, 12 Jan 2005 00:29:49

es, William is right. The -name is the (new) logical name you need to add
in SP2.

So, you have to be careful and put the [via = url or path] and the [address
= logical name of the service] properly.

I believe the -name param is optional BUT if I did leave it out, I get the
exact error you see...so try putting it in like this:

C:\Program Files\Microsoft WSE\v2.0\Tools\Wsdl\WseWsdl2.exe"
soap.tcp://localhost/SomeTcpService -name soap://localhost/dotn
tproj/SomeTcpService D:/output.vb VB

hth.

--
Thank you.

Regards,
Softwaremaker
http://www.softwaremaker.net/blog

Microsoft MVP - Solutions Architect
http://www.microsoft.com/mvp
==================================

"William Stacey [MVP]" < XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...
works.
guess
reserved.
Microsoft.Web.Services2.Messaging.SoapClient.SendRequestResponse(Str
SoapEnvelope
that
but
delivered,
http://msdn.microsoft.com/webservices/building/wse/default.aspx?pul
Windows