all groups > dotnet web services > october 2006 >
You're in the

dotnet web services

group:

Problem generating code with wsdl


Problem generating code with wsdl Cesar
10/23/2006 4:21:02 PM
dotnet web services:
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">
Re: Problem generating code with wsdl John Saunders
10/24/2006 4:01:09 PM
[quoted text, click to view]

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

Re: Problem generating code with wsdl Cesar
10/25/2006 10:31:03 AM
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/rpc_literal.asp

Thanks,
César

[quoted text, click to view]
Re: Problem generating code with wsdl John Saunders
10/26/2006 6:25:27 AM
[quoted text, click to view]

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

Re: Problem generating code with wsdl Cesar
10/26/2006 12:29:02 PM
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

[quoted text, click to view]
Re: Problem generating code with wsdl RYoung
10/26/2006 6:08:30 PM
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

[quoted text, click to view]

Re: Problem generating code with wsdl Cesar
10/27/2006 10:46:04 AM
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

[quoted text, click to view]
Re: Problem generating code with wsdl RYoung
10/30/2006 3:54:53 PM
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
[quoted text, click to view]

Re: Problem generating code with wsdl RYoung
10/30/2006 4:01:27 PM
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

[quoted text, click to view]

Re: Problem generating code with wsdl diegovega
11/27/2007 7:36:55 AM

[quoted text, click to view]

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


--
AddThis Social Bookmark Button