Tengo el siguiente problema. Tengo que programar un Web Service para que un cliente lo consuma a modo de interface entre sus sistemas y los nuestros, y por X motivos, el cliente me solicita que el Servicio no devuelva nada (no tenga parámetros de salida).
El Servicio es:
Código ASP:
Ver original
Imports System.Web.Services Imports System.Web.Services.Protocols Imports System.ComponentModel Imports System.IO Imports System.Xml ' Para permitir que se llame a este servicio web desde un script, usando ASP.NET AJAX, quite la marca de comentario de la siguiente línea. ' <System.Web.Script.Services.ScriptService()> _ <System.Web.Services.WebService(Namespace:="https://servicios2/ws/")> _ <System.Web.Services.WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _ <ToolboxItem(False)> _ Public Class Service1 Inherits System.Web.Services.WebService <WebMethod()> _ Public Sub MaterialMaster(ByVal XmlDoc As XmlDocument) 'Código... End Sub End Class
Como veis, es un procedimiento y como tal no tiene parámetros de salida.
El WSDL que genera de forma dinámica .Net es el que sigue:
Código XML:
Ver original
<?xml version="1.0" encoding="utf-8"?> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="https://servicios2/ws/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="https://servicios2/ws/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> <wsdl:types> <s:schema elementFormDefault="qualified" targetNamespace="https://servicios2/ws/"> <s:element name="MaterialMaster"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="XmlDoc"> <s:complexType mixed="true"> <s:sequence> <s:any /> </s:sequence> </s:complexType> </s:element> </s:sequence> </s:complexType> </s:element> <s:element name="MaterialMasterResponse"> <s:complexType /> </s:element> </s:schema> </wsdl:types> <wsdl:message name="MaterialMasterSoapIn"> <wsdl:part name="parameters" element="tns:MaterialMaster" /> </wsdl:message> <wsdl:message name="MaterialMasterSoapOut"> <wsdl:part name="parameters" element="tns:MaterialMasterResponse" /> </wsdl:message> <wsdl:portType name="Service1Soap"> <wsdl:operation name="MaterialMaster"> <wsdl:input message="tns:MaterialMasterSoapIn" /> <wsdl:output message="tns:MaterialMasterSoapOut" /> </wsdl:operation> </wsdl:portType> <wsdl:binding name="Service1Soap" type="tns:Service1Soap"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="MaterialMaster"> <soap:operation soapAction="https://servicios2/ws/MaterialMaster" style="document" /> <wsdl:input> <soap:body use="literal" /> </wsdl:input> [B] <wsdl:output> <soap:body use="literal" /> </wsdl:output>[/B] </wsdl:operation> </wsdl:binding> <wsdl:binding name="Service1Soap12" type="tns:Service1Soap"> <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="MaterialMaster"> <soap12:operation soapAction="https://servicios2/ws/MaterialMaster" style="document" /> <wsdl:input> <soap12:body use="literal" /> </wsdl:input> [B] <wsdl:output> <soap12:body use="literal" /> </wsdl:output>[/B] </wsdl:operation> </wsdl:binding> <wsdl:service name="Service1"> <wsdl:port name="Service1Soap" binding="tns:Service1Soap"> <soap:address location="https://servicios2/ws/Service1.asmx" /> </wsdl:port> <wsdl:port name="Service1Soap12" binding="tns:Service1Soap12"> <soap12:address location="https://servicios2/ws/Service1.asmx" /> </wsdl:port> </wsdl:service> </wsdl:definitions>
Genera etiquetas Output, y el cliente me solicita que para que funcione correctamente en su soft, tengo que quitar esos parámetros de salida (etiquetas Output) del WSDL...
¿Por qué genera esas etiquetas si no hay ningún parámetro de salida? y sobre todo, ¿Cómo puedo editar el WSDL que se genera de forma dinámica para que no las genere?
Muchas gracias de antemano.
Saludos.