Hello John,
Thanks for your reply. I'm using Visual Studio .NET 2003 (.NET Framework
1.1). Since the wsdl specification that I was given is only a file (not an
URL) I used directly the wsdl.exe tool to generate the class with the
webservice methods, which it didn't work.
As you suggested I try to add a web reference via VS .NET 2003 and since I
had no URL, I copied the wsdl file to my localhost (e.g.
http://localhost/myfilewsdl.wsdl). It didn't show any errors but once I tried
to instance a variable to access the web methods, I found that no web method
was generated.
I found these two websites with information, that I'm not sure if it's
related to this problem:
1) http://blogs.msdn.com/beatsch/archive/2004/08/23/218886.aspx
2)
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwebsrv/html/r
pc_literal.asp
Thanks,
César
> > Hello there,
> >
[quoted text clipped - 20 lines]
>
> John
John Saunders - 26 Oct 2006 11:25 GMT
> Hello John,
>
[quoted text clipped - 9 lines]
> method
> was generated.
In your VS project with the added Web Reference, use the Project->Show All
Files command. You'll be able to expand the web reference. Inside it, you'll
find a Reference.cs or Reference.vb file. Open it up and look inside, and
you may get a big hint about how Visual Studio interpreted the WSDL.
BTW, you don't have to move the WSDL file to your web site. You can browse
to it in the file system as well.
John
Cesar - 26 Oct 2006 20:29 GMT
Hello John,
Thank you for helping me on this issue !
This is the code for reference.cs
//
// This source code was auto-generated by Microsoft.VSDesigner, Version
1.1.4322.2032.
//
namespace WebAppGera.TheCure {
using System.Diagnostics;
using System.Xml.Serialization;
using System;
using System.Web.Services.Protocols;
using System.ComponentModel;
using System.Web.Services;
/// <remarks/>
// CODEGEN: The operation binding 'getAvaluos' from namespace
'urn:m15.AvaluosPortType' was ignored. The combination of style=rpc with
use=literal is not supported.
// CODEGEN: The operation binding 'getCambios' from namespace
'urn:m15.AvaluosPortType' was ignored. The combination of style=rpc with
use=literal is not supported.
// CODEGEN: The operation binding 'getCancelados' from namespace
'urn:m15.AvaluosPortType' was ignored. The combination of style=rpc with
use=literal is not supported.
// CODEGEN: The operation binding 'getMes' from namespace
'urn:m15.AvaluosPortType' was ignored. The combination of style=rpc with
use=literal is not supported.
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="AvaluosBinding",
Namespace="urn:m15.AvaluosPortType")]
public class AvaluosService :
System.Web.Services.Protocols.SoapHttpClientProtocol {
/// <remarks/>
public AvaluosService() {
this.Url = "http://ggo:8080/ws/services/AvaluosPort";
}
}
}
Regards,
Cesar
> In your VS project with the added Web Reference, use the Project->Show All
> Files command. You'll be able to expand the web reference. Inside it, you'll
[quoted text clipped - 5 lines]
>
> John
RYoung - 27 Oct 2006 00:08 GMT
I used wsdl.exe on the wsdl you originally posted and didn't encounter any
errors.
I generated both server implementation of the wsdl, and a client proxy.
Ahh, I just seen your using VS 2003. Maybe you can download the .NET 2.0 SDK
and use the wsdl.exe tool from there, then just generate the client side
proxy and add that to your project.
Ron
> Hello John,
>
[quoted text clipped - 55 lines]
>>
>> John
Cesar - 27 Oct 2006 18:46 GMT
Hello RYoung,
Thanks for your help. I did as you indicated and used the framework 2.0 SDK
(wsdl.exe) to generate the proxy class (C#). But when I tried to add it to my
VS 2003 project an error ocurred. This is the error:
An exception occurred while trying to create an instance of
System.Web.Services.Protocols.SoapHttpClientProtocol. The exception was
"WebServiceBindingAttribute is required on proxy classes.".
Any ideas? Is there something that I need to configure ?
Thanks a lot.
Regards,
Cesar
> I used wsdl.exe on the wsdl you originally posted and didn't encounter any
> errors.
[quoted text clipped - 5 lines]
>
> Ron
RYoung - 30 Oct 2006 22:54 GMT
How about I send the files that I generated from the wsdl you supplied? You
can email me at ryoungdev@gmail.com. If you do, please include the wsdl
again.
Ron
> Hello RYoung,
>
[quoted text clipped - 24 lines]
>>
>> Ron
RYoung - 30 Oct 2006 23:01 GMT
This is a snip from the client side proxy of the AvaluosService class
generated by wsdl, with the WebServiceBindingAttribute:
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="AvaluosBinding",
Namespace="urn:m15.AvaluosPortType")]
public partial class AvaluosService :
System.Web.Services.Protocols.SoapHttpClientProtocol {
Ron
> Hello RYoung,
>
[quoted text clipped - 24 lines]
>>
>> Ron