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.

How create Prosy Class for soap.tcp

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MrDotNet - 17 Nov 2004 19:39 GMT
hi
Here is my Web service and one Soapmethod how can I create proxy class for
that and hows client access that web service. I try generated proxy class but
that give me error.
HELP.....
   Public Class WSE2Test
       Inherits SoapService
<SoapMethod("CreateDataTable")> Public Function CreateDataTable(ByVal
NCConnection As String, ByVal strSQL As String) As DataSet
           Try
             '......................
             ' Here some code fill out dataset
             return dataset
           Catch ex As Exception
               Throw ex
           End Try
           dbDA = Nothing
           dbCmd = Nothing
           dbConn = Nothing

       End Function

Signature

-MrDotNet MCAD, MCSD
Sr. Software Engineer / Lead Architect

John Paul. A - 23 Nov 2004 11:33 GMT
Dear MrDotNet,
Within the SDK, there is a tool called the Web Services Description Language
tool (WSDL.exe). This command-line tool is used to create proxy classes from
WSDL. For example, you could enter:

WSDL http://abc.xyz.com/testpage/HelloWorld/HelloWorld.asmx?WSDL

to create a proxy class called HelloWorld.cs.

Rgds,
John Paul. A

> hi
> Here is my Web service and one Soapmethod how can I create proxy class for
[quoted text clipped - 17 lines]
>
>         End Function
MrDotNet - 01 Dec 2004 23:53 GMT
Hi John,

I Know that I asking about soao.tcp proxy.

> Dear MrDotNet,
> Within the SDK, there is a tool called the Web Services Description Language
[quoted text clipped - 29 lines]
> >
> >         End Function
Drew Marsh - 02 Dec 2004 00:14 GMT
> 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/gxacon
wsdltosoapclienttool.as

BenW - 03 Feb 2005 19:09 GMT
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)

> > I Know that I asking about soao.tcp proxy.
>
[quoted text clipped - 4 lines]
>
> [1] http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wse/html/gxacon
wsdltosoapclienttool.asp
William Stacey [MVP] - 03 Feb 2005 19:46 GMT
http://spaces.msn.com/members/staceyw/Blog/cns!1pnsZpX0fPvDxLKC6rAAhLsQ!304.entry

Signature

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

> Yes I'm tring the same thing and don't seem to be able to get it to work.
>
[quoted text clipped - 71 lines]
> >
> > [1] http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wse/html/gxacon
wsdltosoapclienttool.asp
BenW - 03 Feb 2005 20:57 GMT
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)

> http://spaces.msn.com/members/staceyw/Blog/cns!1pnsZpX0fPvDxLKC6rAAhLsQ!304.entry
>
[quoted text clipped - 76 lines]
> > > [1]
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wse/html/gxacon
wsdltosoapclienttool.asp
William Stacey [MVP] - 03 Feb 2005 21:37 GMT
Use the DNS domain name that will "ping".  If your running on the same host,
localhost should work unless something else is going on.

Signature

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

> Thanks for the quick reply but I get this:
>
[quoted text clipped - 62 lines]
> geData& msgData)
>    at
Microsoft.Web.Services2.Messaging.SendDelegate.EndInvoke(IAsyncResult
> resu
> lt)
[quoted text clipped - 17 lines]
> , XmlSchemas schemas)
>    at ClientGen.Class1.Main(String[] arguments)

http://spaces.msn.com/members/staceyw/Blog/cns!1pnsZpX0fPvDxLKC6rAAhLsQ!304.entry

> > > Yes I'm tring the same thing and don't seem to be able to get it to work.
> > >
[quoted text clipped - 55 lines]
> > > r
> > >    at

Microsoft.Web.Services2.Messaging.SoapClient.SendRequestResponse(String me
> > > thodname, SoapEnvelope envelope)
> > >    at ClientGen.TcpProxy.RequestDescription(SoapEnvelope message)
[quoted text clipped - 13 lines]
> > > >
> > > > [1]

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wse/html/gxacon
wsdltosoapclienttool.asp

BenW - 04 Feb 2005 18:45 GMT
Tried all options.

I still get the error message below.  What else can I try?  Anyone else
succeeded?

Thanks.

> Use the DNS domain name that will "ping".  If your running on the same host,
> localhost should work unless something else is going on.
[quoted text clipped - 173 lines]
> > >
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wse/html/gxacon
wsdltosoapclienttool.asp

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.