By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,617 Members | 1,896 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,617 IT Pros & Developers. It's quick & easy.

Problem generating code with wsdl

P: n/a
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
Oct 23 '06 #1
Share this Question
Share on Google+
9 Replies


P: n/a
"Cesar" <Ce***@discussions.microsoft.comwrote in message
news:9D**********************************@microsof t.com...
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.
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
Oct 24 '06 #2

P: n/a
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/archiv...23/218886.aspx
2)
http://msdn.microsoft.com/library/de...pc_literal.asp

Thanks,
César

"John Saunders" wrote:
"Cesar" <Ce***@discussions.microsoft.comwrote in message
news:9D**********************************@microsof t.com...
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.

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
Oct 25 '06 #3

P: n/a
"Cesar" <Ce***@discussions.microsoft.comwrote in message
news:71**********************************@microsof t.com...
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.
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
Oct 26 '06 #4

P: n/a
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("c ode")]
[System.Web.Services.WebServiceBindingAttribute(Nam e="AvaluosBinding",
Namespace="urn:m15.AvaluosPortType")]
public class AvaluosService :
System.Web.Services.Protocols.SoapHttpClientProtoc ol {

/// <remarks/>
public AvaluosService() {
this.Url = "http://ggo:8080/ws/services/AvaluosPort";
}
}
}

Regards,
Cesar

"John Saunders" wrote:
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
Oct 26 '06 #5

P: n/a
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

"Cesar" <Ce***@discussions.microsoft.comwrote in message
news:6F**********************************@microsof t.com...
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("c ode")]
[System.Web.Services.WebServiceBindingAttribute(Nam e="AvaluosBinding",
Namespace="urn:m15.AvaluosPortType")]
public class AvaluosService :
System.Web.Services.Protocols.SoapHttpClientProtoc ol {

/// <remarks/>
public AvaluosService() {
this.Url = "http://ggo:8080/ws/services/AvaluosPort";
}
}
}

Regards,
Cesar

"John Saunders" wrote:
>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

Oct 26 '06 #6

P: n/a
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.SoapHttpClientProtoc ol. The exception was
"WebServiceBindingAttribute is required on proxy classes.".

Any ideas? Is there something that I need to configure ?
Thanks a lot.
Regards,
Cesar

"RYoung" wrote:
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
Oct 27 '06 #7

P: n/a
How about I send the files that I generated from the wsdl you supplied? You
can email me at ry*******@gmail.com. If you do, please include the wsdl
again.

Ron
"Cesar" <Ce***@discussions.microsoft.comwrote in message
news:3E**********************************@microsof t.com...
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.SoapHttpClientProtoc ol. The exception was
"WebServiceBindingAttribute is required on proxy classes.".

Any ideas? Is there something that I need to configure ?
Thanks a lot.
Regards,
Cesar

"RYoung" wrote:
>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

Oct 30 '06 #8

P: n/a
This is a snip from the client side proxy of the AvaluosService class
generated by wsdl, with the WebServiceBindingAttribute:

[System.CodeDom.Compiler.GeneratedCodeAttribute("ws dl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("c ode")]
[System.Web.Services.WebServiceBindingAttribute(Nam e="AvaluosBinding",
Namespace="urn:m15.AvaluosPortType")]
public partial class AvaluosService :
System.Web.Services.Protocols.SoapHttpClientProtoc ol {

Ron

"Cesar" <Ce***@discussions.microsoft.comwrote in message
news:3E**********************************@microsof t.com...
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.SoapHttpClientProtoc ol. The exception was
"WebServiceBindingAttribute is required on proxy classes.".

Any ideas? Is there something that I need to configure ?
Thanks a lot.
Regards,
Cesar

"RYoung" wrote:
>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

Oct 30 '06 #9

P: n/a

Cesar;6750528 Wrote:
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:
ocurred. This is the error:

An exception occurred while trying to create an instance of
System.Web.Services.Protocols.SoapHttpClientProtoc ol. The exception
was
"WebServiceBindingAttribute is required on proxy classes.".

Any ideas? Is there something that I need to configure ?
Thanks a lot.
Regards,
Cesar

"RYoung" wrote:

[/vbcol]
hola Cesar,
yo tambien estoy armando el WS para SHF, si encontraste la solucion me
podrias escribir?
gracias mi mail es dv***@siamsa.com.mx
abrazo
--
diegovega
Nov 27 '07 #10

This discussion thread is closed

Replies have been disabled for this discussion.