Re: How create Prosy Class for soap.tcp
From: BenW (BenW_at_discussions.microsoft.com)
Date: 02/03/05
- Previous message: BenW: "Re: Newbie General Question"
- In reply to: William Stacey [MVP]: "Re: How create Prosy Class for soap.tcp"
- Next in thread: William Stacey [MVP]: "Re: How create Prosy Class for soap.tcp"
- Reply: William Stacey [MVP]: "Re: How create Prosy Class for soap.tcp"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 3 Feb 2005 12:57:03 -0800
Thanks for the quick reply but I get this:
If I use localhost rather than my "machine name", I get Server unavailable
please try later, where I specify localhost in the URi of the class.
However of I specify the machine name in the URis in my class and call with
localhost in the command line I get "Destination Unreachable". Which a new
one.
The new code is :
Uri addressUri = new Uri("soap://MYMACHINE/MyServiceV1");
Uri viaUri = new Uri("soap.tcp://MYMACHINE/MySoapService");
Microsoft.Web.Services2.Referral.Via via = new
Microsoft.Web.Services2.Referral.Via(viaUri);
Microsoft.Web.Services2.Addressing.Address address = new
Address(addressUri);
EndpointReference endpoint = new EndpointReference(address, via);
SoapReceivers.Add(endpoint, typeof(MySoapService));
BenW
WSE 2 SP2
C:\Program Files\Microsoft WSE\v2.0\Tools\Wsdl>wsewsdl2
soap.tcp://MYMACHINE/MySoa
pService -name soap://MYMACHINE/MyServiceV1 myproxy01.cs
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:
Microsoft.Web.Services2.AsynchronousOperationException: WSE101: An
asynchronous
operation raised an exception. ---> System.Net.Sockets.SocketException: No
conne
ction could be made because the target machine actively refused it
Server stack trace:
at Microsoft.Web.Services2.Messaging.SoapTcpConnection.Connect()
at Microsoft.Web.Services2.Messaging.SoapTcpConnection..ctor(Uri
remoteEndpoi
nt, SoapTcpTransportOptions options, ISoapFormatter formatter)
at Microsoft.Web.Services2.Messaging.SoapTcpTransport.GetConnection(Uri
desti
nation)
at
Microsoft.Web.Services2.Messaging.SoapTcpOutputChannel.Send(SoapEnvelope m
essage)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(M
ethodBase mb, Object[] args, Object server, Int32 methodPtr, Boolean
fExecuteInC
ontext, Object[]& outArgs)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMe
ssage msg, IMessageSink replySink)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message
reqMsg,
Boolean bProxyCase)
at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed,
Messa
geData& msgData)
at Microsoft.Web.Services2.Messaging.SendDelegate.EndInvoke(IAsyncResult
resu
lt)
at
Microsoft.Web.Services2.Messaging.SoapOutputChannel.EndSend(IAsyncResult r
esult)
at Microsoft.Web.Services2.Messaging.SoapSender.EndSend(IAsyncResult
result)
at
Microsoft.Web.Services2.Messaging.SoapClientAsyncResult.OnSendComplete(IAs
yncResult result)
--- End of inner exception stack trace ---
at Microsoft.Web.Services2.AsyncResult.End(IAsyncResult result)
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)
"William Stacey [MVP]" wrote:
> http://spaces.msn.com/members/staceyw/Blog/cns!1pnsZpX0fPvDxLKC6rAAhLsQ!304.entry
>
> --
> William Stacey, MVP
> http://mvp.support.microsoft.com
>
> "BenW" <BenW@discussions.microsoft.com> wrote in message
> news:119C9DE6-546E-4D47-AC6A-9DA3280EE007@microsoft.com...
> > Yes I'm tring the same thing and don't seem to be able to get it to work.
> >
> > Details:
> >
> > Console application
> >
> > namespace SoapService1
> > {
> > class Class1
> > {
> > [STAThread]
> > static void Main(string[] args)
> > {
> > Uri address = new Uri("soap.tcp://" + System.Net.Dns.GetHostName() +
> > "/MySoapService");
> > EndpointReference endpoint = new EndpointReference(address);
> > SoapReceivers.Add(endpoint, typeof(MySoapService));
> > Console.WriteLine( "Listening for messages at " + address);
> > Console.ReadLine();
> > }
> > }
> > }
> > namespace SoapService1
> > {
> > /// <summary>
> > /// Summary description for MySoapService.
> > /// </summary>
> > [SoapService("MySoapService")]
> > public class MySoapService : SoapService
> > {
> > public MySoapService() {}
> >
> >
> > [SoapMethod("GetQuote")]
> > public string GetQuote(int i, string b)
> > {
> > return "xyz";
> > }
> > }
> > }
> >
> > Started application.
> >
> > Then ran from the command prompt:
> >
> > C:\Program Files\Microsoft WSE\v2.0\Tools\Wsdl>wsewsdl2.exe
> > "soap.tcp://MYMACHINE/MySoapService" c:\myproxy.cs
> >
> >
> >
> > Output:
> >
> > 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: Server unavailable, please
> try
> > late
> > r
> > 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)
> >
> >
> >
> > "Drew Marsh" wrote:
> >
> > > MrDotNet wrote:
> > >
> > > > I Know that I asking about soao.tcp proxy.
> > >
> > > Use WseWsdl2.exe. You'll find the instructions for doing so, right
> here[1].
> > >
> > > HTH,
> > > Drew
> > >
> > > [1]
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wse/html/gxaconwsdltosoapclienttool.asp
> > >
> > >
>
>
- Previous message: BenW: "Re: Newbie General Question"
- In reply to: William Stacey [MVP]: "Re: How create Prosy Class for soap.tcp"
- Next in thread: William Stacey [MVP]: "Re: How create Prosy Class for soap.tcp"
- Reply: William Stacey [MVP]: "Re: How create Prosy Class for soap.tcp"
- Messages sorted by: [ date ] [ thread ]