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 / November 2007

Tip: Looking for answers? Try searching our database.

Problem generating code with wsdl

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Cesar - 24 Oct 2006 00:21 GMT
Hello there,

A java programmer sent me a wsdl file, which I have to use to consume his
web methods. When I run the wsld.exe tool to generate the class' code, I get
the following message:

CODEGEN: The operation binding 'getAvaluos' from namespace
'urn:m15.AvaluosPortType' was ignored.  The combination of style=rpc with
use=literal is not supported.

Is it something wrong with the wsdl file which I can correct by making some
modifications? Any help would be so much appreciated it.

I've included de wsdl file ...

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="urn:m15.AvaluosPortType"
xmlns:impl="urn:m15.AvaluosPortType" xmlns:intf="urn:m15.AvaluosPortType"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
 <wsdl:types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:m15.AvaluosPortType">
        <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
            <complexType name="AvaluosCancel">
                <sequence>
                    <element name="cve_UV" nillable="false" type="xsd:string"/>
                    <element name="user" nillable="false" type="xsd:string"/>
                    <element name="paswd" nillable="false" type="xsd:string"/>
                    <element name="clave_Avaluo" nillable="false" type="xsd:string"
maxOccurs="unbounded"/>
                </sequence>
            </complexType>
            <complexType name="Avaluo">
                <sequence>
                    <element name="claveAvaluo" nillable="false" type="xsd:string"/>
                    <element name="fechaAvaluo" nillable="false" type="xsd:string"/>
                    <element name="noRegInfonavit" nillable="true" type="xsd:string"/>
                    <element name="controlador" nillable="false" type="xsd:string"/>
                    <element name="valuadorProfesional" nillable="false" type="xsd:string"/>
                    <element name="entidadOtorgaCredito" nillable="false" type="xsd:string"/>
                    <element name="nombreConstructor" nillable="true" type="xsd:string"/>
                    <element name="proposito" nillable="false" type="xsd:short"/>
                    <element name="tipologia" nillable="false" type="xsd:short"/>
                    <element name="calleNumero" nillable="false" type="xsd:string"/>
                    <element name="nombreConjunto" nillable="true" type="xsd:string"/>
                    <element name="colonia" nillable="false" type="xsd:string"/>
                    <element name="CP" nillable="false" type="xsd:string"/>
                    <element name="delegacion" nillable="false" type="xsd:string"/>
                    <element name="entidad" nillable="false" type="xsd:string"/>
                    <element name="predial" nillable="true" type="xsd:string"/>
                    <element name="proximidadUrbana" nillable="false" type="xsd:short"/>
                    <element name="infraestructura" nillable="false" type="xsd:short"/>
                    <element name="claseInmueble" nillable="false" type="xsd:short"/>
                    <element name="vidaUtil" nillable="false" type="xsd:short"/>
                    <element name="anioTerm" nillable="false" type="xsd:short"/>
                    <element name="uniRentGrales" nillable="false" type="xsd:short"/>
                    <element name="uniRent" nillable="false" type="xsd:short"/>
                    <element name="superTerreno" nillable="false" type="xsd:decimal"/>
                    <element name="superConstruido" nillable="false" type="xsd:decimal"/>
                    <element name="superAccesoria" nillable="true" type="xsd:decimal"/>
                    <element name="superVendible" nillable="false" type="xsd:decimal"/>
                    <element name="valCompa" nillable="false" type="xsd:decimal"/>
                    <element name="valTerreno" nillable="false" type="xsd:decimal"/>
                    <element name="valConst" nillable="false" type="xsd:decimal"/>
                    <element name="valInst" nillable="true" type="xsd:decimal"/>
                    <element name="valConcluido" nillable="false" type="xsd:decimal"/>
                    <element name="noRecamaras" nillable="false" type="xsd:short"/>
                    <element name="noBanos" nillable="false" type="xsd:short"/>
                    <element name="noMediosBanos" nillable="false" type="xsd:short"/>
                    <element name="noNiveles" nillable="false" type="xsd:short"/>
                    <element name="noEstacionamiento" nillable="false" type="xsd:short"/>
                    <element name="acometida" nillable="false" type="xsd:short"/>
                    <element name="nivelEquipamientoUrbano" nillable="false"
type="xsd:short"/>
                    <element name="elevador" nillable="false" type="xsd:short"/>
                    <element name="longitud" nillable="false" type="xsd:float"/>
                    <element name="latitud" nillable="false" type="xsd:float"/>
                    <element name="altitud" nillable="false" type="xsd:float"/>
                    <element name="costoAvaluo" nillable="false" type="xsd:decimal"/>
                    <element name="extemporaneo" nillable="true" type="xsd:short"/>
                </sequence>
            </complexType>
            <complexType name="Cambios">
                <sequence>
                    <element name="claveAvaluo" nillable="false" type="xsd:string"/>
                    <element name="accion" nillable="false" type="xsd:string"/>
                    <element name="avaluo" nillable="false" type="impl:Avaluo"/>
                </sequence>
            </complexType>
            <complexType name="AvaluosCambios">
                <sequence>
                    <element name="user" nillable="false" type="xsd:string"/>
                    <element name="paswd" nillable="false" type="xsd:string"/>
                    <element name="cve_UV" nillable="false" type="xsd:string"/>
                    <element name="avaluos" nillable="false" type="impl:Cambios"
maxOccurs="unbounded"/>
                </sequence>
            </complexType>
            <complexType name="AvaluosDoc">
                <sequence>
                    <element name="cve_UV" nillable="false" type="xsd:string"/>
                    <element name="user" nillable="false" type="xsd:string"/>
                    <element name="paswd" nillable="false" type="xsd:string"/>
                    <element name="avaluos" nillable="true" type="impl:Avaluo"
maxOccurs="unbounded"/>
                </sequence>
            </complexType>
            <complexType name="MesSinAvaluos">
                <sequence>
                    <element name="cve_UV" nillable="false" type="xsd:string"/>
                    <element name="user" nillable="false" type="xsd:string"/>
                    <element name="paswd" nillable="false" type="xsd:string"/>
                    <element name="mes" nillable="false" type="xsd:short"/>
                    <element name="anio" nillable="false" type="xsd:short"/>
                </sequence>
            </complexType>
    </schema>
 </wsdl:types>
 <wsdl:message name="getCambiosRequest">
   <wsdl:part name="inCambios" type="impl:AvaluosCambios"/>
 </wsdl:message>
 <wsdl:message name="getAvaluosRequest">
   <wsdl:part name="inAltas" type="impl:AvaluosDoc"/>
 </wsdl:message>
 <wsdl:message name="getCanceladosRequest">
   <wsdl:part name="inCancel" type="impl:AvaluosCancel"/>
 </wsdl:message>
 <wsdl:message name="getMesRequest">
   <wsdl:part name="inMes" type="impl:MesSinAvaluos"/>
 </wsdl:message>
 <wsdl:message name="getCanceladosResponse">
   <wsdl:part name="getCancelReturn" type="xsd:string"/>
 </wsdl:message>
 <wsdl:message name="getAvaluosResponse">
   <wsdl:part name="getAvaluosReturn" type="xsd:string"/>
 </wsdl:message>
 <wsdl:message name="getMesResponse">
   <wsdl:part name="getMesReturn" type="xsd:string"/>
 </wsdl:message>
 <wsdl:message name="getCambiosResponse">
   <wsdl:part name="getCambiosReturn" type="xsd:string"/>
 </wsdl:message>
 <wsdl:portType name="AvaluosPortType">
   <wsdl:operation name="getAvaluos" parameterOrder="inAltas">
     <wsdl:input name="getAvaluosRequest" message="impl:getAvaluosRequest"/>
     <wsdl:output name="getAvaluosResponse"
message="impl:getAvaluosResponse"/>
   </wsdl:operation>
   <wsdl:operation name="getCambios" parameterOrder="inCambios">
     <wsdl:input name="getCambiosRequest" message="impl:getCambiosRequest"/>
     <wsdl:output name="getCambiosResponse"
message="impl:getCambiosResponse"/>
   </wsdl:operation>
   <wsdl:operation name="getCancelados" parameterOrder="inCancel">
     <wsdl:input name="getCanceladosRequest"
message="impl:getCanceladosRequest"/>
     <wsdl:output name="getCanceladosResponse"
message="impl:getCanceladosResponse"/>
   </wsdl:operation>
   <wsdl:operation name="getMes" parameterOrder="inMes">
     <wsdl:input name="getMesRequest" message="impl:getMesRequest"/>
     <wsdl:output name="getMesResponse" message="impl:getMesResponse"/>
   </wsdl:operation>
 </wsdl:portType>
 <wsdl:binding name="AvaluosBinding" type="impl:AvaluosPortType">
   <wsdlsoap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
   <wsdl:operation name="getAvaluos">
     <wsdlsoap:operation soapAction=""/>
     <wsdl:input name="getAvaluosRequest">
       <wsdlsoap:body use="literal" namespace="urn:m15.AvaluosPortType"/>
     </wsdl:input>
     <wsdl:output name="getAvaluosResponse">
       <wsdlsoap:body use="literal" namespace="urn:m15.AvaluosPortType"/>
     </wsdl:output>
   </wsdl:operation>
   <wsdl:operation name="getCambios">
     <wsdlsoap:operation soapAction=""/>
     <wsdl:input name="getCambiosRequest">
       <wsdlsoap:body use="literal" namespace="urn:m15.AvaluosPortType"/>
     </wsdl:input>
     <wsdl:output name="getCambiosResponse">
       <wsdlsoap:body use="literal" namespace="urn:m15.AvaluosPortType"/>
     </wsdl:output>
   </wsdl:operation>
   <wsdl:operation name="getCancelados">
     <wsdlsoap:operation soapAction=""/>
     <wsdl:input name="getCanceladosRequest">
       <wsdlsoap:body use="literal" namespace="urn:m15.AvaluosPortType"/>
     </wsdl:input>
     <wsdl:output name="getCanceladosResponse">
       <wsdlsoap:body use="literal" namespace="urn:m15.AvaluosPortType"/>
     </wsdl:output>
   </wsdl:operation>
   <wsdl:operation name="getMes">
     <wsdlsoap:operation soapAction=""/>
     <wsdl:input name="getMesRequest">
       <wsdlsoap:body use="literal" namespace="urn:m15.AvaluosPortType"/>
     </wsdl:input>
     <wsdl:output name="getMesResponse">
       <wsdlsoap:body use="literal" namespace="urn:m15.AvaluosPortType"/>
     </wsdl:output>
   </wsdl:operation>
 </wsdl:binding>
 <wsdl:service name="AvaluosService">
   <wsdl:port name="AvaluosPort" binding="impl:AvaluosBinding">
     <wsdlsoap:address location="http://ggo:8080/ws/services/AvaluosPort"/>
   </wsdl:port>
 </wsdl:service>
</wsdl:definitions>

Regards,
César
John Saunders - 24 Oct 2006 21:01 GMT
> Hello there,
>
[quoted text clipped - 10 lines]
> some
> modifications? Any help would be so much appreciated it.

The WSDL file is the contract between the client and the server. You CANNOT
change it.

Only the developer of the server can change the WSDL. He would have to
change the service while he's at it.

What happens when you just do an "Add Web Reference"?

John
Cesar - 25 Oct 2006 18:31 GMT
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
diegovega - 27 Nov 2007 13:36 GMT
Cesar;6750528 Wrote:
> Hello there,
>
[quoted text clipped - 18 lines]
> >
> >[/vbcol]

hola Cesar,
yo tambien estoy armando el WS para SHF, si encontraste la solucion me
podrias escribir?
gracias mi mail es dvega@siamsa.com.mx
abrazo

Signature

diegovega


Rate this thread:







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.