Escrito por

Project Manager & Head of Interoperability at Salutic Soluciones, S.L.
Pregunta Kurro Lopez · jun 24, 2019

Crear un servicio SOAP Pass-through

Hola a todos,

Estoy intentando crear un Pass-through de SOAP siguiendo las instrucciones de Configuring Pass-through Business Services , pero no puedo ponerlo en marcha sad

Estoy usando el siguiente servicio web

http://www.dneonline.com/calculator.asmx?wsdl

He creado ambos items

CalculatorSOAPCSPServ
  • Nombre de clase : EnsLib.SOAP.GenericService
  • Nombre de configuración de destino: CalculatorSOAPCSPOp
  • Puerto: Vacío
  • Activar peticiones estándar: Marcado
  • Tamaño del grupo: 0
CalculatorSOAPCSPOp
  • Nombre de clase : EnsLib.SOAP.GenericOperation
  • HttpServer: www.dneonline.com
  • Url: |

Además, he creado la aplicación web utilizando los siguientes parámetros:

Nombre: / SOAPpassthrough

Enviar clase: EnsLib.SOAP.GenericServer

Si pido directamente el WSDL a Calculator WebService, recupera este XML:

http://www.dneonline.com/calculator.asmx?wsdl

<?xml version="1.0" encoding="utf-8"?><wsdl:definitionsxmlns: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="http://tempuri.org/" 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="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><wsdl:types><s:schemaelementFormDefault="qualified" targetNamespace="http://tempuri.org/"><s:elementname="Add"><s:complexType><s:sequence><s:elementminOccurs="1" maxOccurs="1" name="intA" type="s:int" /><s:elementminOccurs="1" maxOccurs="1" name="intB" type="s:int" /></s:sequence></s:complexType></s:element><s:elementname="AddResponse"><s:complexType><s:sequence><s:elementminOccurs="1" maxOccurs="1" name="AddResult" type="s:int" /></s:sequence></s:complexType></s:element><s:elementname="Subtract"><s:complexType><s:sequence><s:elementminOccurs="1" maxOccurs="1" name="intA" type="s:int" /><s:elementminOccurs="1" maxOccurs="1" name="intB" type="s:int" /></s:sequence></s:complexType></s:element><s:elementname="SubtractResponse"><s:complexType><s:sequence><s:elementminOccurs="1" maxOccurs="1" name="SubtractResult" type="s:int" /></s:sequence></s:complexType></s:element><s:elementname="Multiply"><s:complexType><s:sequence><s:elementminOccurs="1" maxOccurs="1" name="intA" type="s:int" /><s:elementminOccurs="1" maxOccurs="1" name="intB" type="s:int" /></s:sequence></s:complexType></s:element><s:elementname="MultiplyResponse"><s:complexType><s:sequence><s:elementminOccurs="1" maxOccurs="1" name="MultiplyResult" type="s:int" /></s:sequence></s:complexType></s:element><s:elementname="Divide"><s:complexType><s:sequence><s:elementminOccurs="1" maxOccurs="1" name="intA" type="s:int" /><s:elementminOccurs="1" maxOccurs="1" name="intB" type="s:int" /></s:sequence></s:complexType></s:element><s:elementname="DivideResponse"><s:complexType><s:sequence><s:elementminOccurs="1" maxOccurs="1" name="DivideResult" type="s:int" /></s:sequence></s:complexType></s:element></s:schema></wsdl:types><wsdl:messagename="AddSoapIn"><wsdl:partname="parameters" element="tns:Add" /></wsdl:message><wsdl:messagename="AddSoapOut"><wsdl:partname="parameters" element="tns:AddResponse" /></wsdl:message><wsdl:messagename="SubtractSoapIn"><wsdl:partname="parameters" element="tns:Subtract" /></wsdl:message><wsdl:messagename="SubtractSoapOut"><wsdl:partname="parameters" element="tns:SubtractResponse" /></wsdl:message><wsdl:messagename="MultiplySoapIn"><wsdl:partname="parameters" element="tns:Multiply" /></wsdl:message><wsdl:messagename="MultiplySoapOut"><wsdl:partname="parameters" element="tns:MultiplyResponse" /></wsdl:message><wsdl:messagename="DivideSoapIn"><wsdl:partname="parameters" element="tns:Divide" /></wsdl:message><wsdl:messagename="DivideSoapOut"><wsdl:partname="parameters" element="tns:DivideResponse" /></wsdl:message><wsdl:portTypename="CalculatorSoap"><wsdl:operationname="Add"><wsdl:documentationxmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Adds two integers. This is a test WebService. ©DNE Online</wsdl:documentation><wsdl:inputmessage="tns:AddSoapIn" /><wsdl:outputmessage="tns:AddSoapOut" /></wsdl:operation><wsdl:operationname="Subtract"><wsdl:inputmessage="tns:SubtractSoapIn" /><wsdl:outputmessage="tns:SubtractSoapOut" /></wsdl:operation><wsdl:operationname="Multiply"><wsdl:inputmessage="tns:MultiplySoapIn" /><wsdl:outputmessage="tns:MultiplySoapOut" /></wsdl:operation><wsdl:operationname="Divide"><wsdl:inputmessage="tns:DivideSoapIn" /><wsdl:outputmessage="tns:DivideSoapOut" /></wsdl:operation></wsdl:portType><wsdl:bindingname="CalculatorSoap" type="tns:CalculatorSoap"><soap:bindingtransport="http://schemas.xmlsoap.org/soap/http" /><wsdl:operationname="Add"><soap:operationsoapAction="http://tempuri.org/Add" style="document" /><wsdl:input><soap:bodyuse="literal" /></wsdl:input><wsdl:output><soap:bodyuse="literal" /></wsdl:output></wsdl:operation><wsdl:operationname="Subtract"><soap:operationsoapAction="http://tempuri.org/Subtract" style="document" /><wsdl:input><soap:bodyuse="literal" /></wsdl:input><wsdl:output><soap:bodyuse="literal" /></wsdl:output></wsdl:operation><wsdl:operationname="Multiply"><soap:operationsoapAction="http://tempuri.org/Multiply" style="document" /><wsdl:input><soap:bodyuse="literal" /></wsdl:input><wsdl:output><soap:bodyuse="literal" /></wsdl:output></wsdl:operation><wsdl:operationname="Divide"><soap:operationsoapAction="http://tempuri.org/Divide" style="document" /><wsdl:input><soap:bodyuse="literal" /></wsdl:input><wsdl:output><soap:bodyuse="literal" /></wsdl:output></wsdl:operation></wsdl:binding><wsdl:bindingname="CalculatorSoap12" type="tns:CalculatorSoap"><soap12:bindingtransport="http://schemas.xmlsoap.org/soap/http" /><wsdl:operationname="Add"><soap12:operationsoapAction="http://tempuri.org/Add" style="document" /><wsdl:input><soap12:bodyuse="literal" /></wsdl:input><wsdl:output><soap12:bodyuse="literal" /></wsdl:output></wsdl:operation><wsdl:operationname="Subtract"><soap12:operationsoapAction="http://tempuri.org/Subtract" style="document" /><wsdl:input><soap12:bodyuse="literal" /></wsdl:input><wsdl:output><soap12:bodyuse="literal" /></wsdl:output></wsdl:operation><wsdl:operationname="Multiply"><soap12:operationsoapAction="http://tempuri.org/Multiply" style="document" /><wsdl:input><soap12:bodyuse="literal" /></wsdl:input><wsdl:output><soap12:bodyuse="literal" /></wsdl:output></wsdl:operation><wsdl:operationname="Divide"><soap12:operationsoapAction="http://tempuri.org/Divide" style="document" /><wsdl:input><soap12:bodyuse="literal" /></wsdl:input><wsdl:output><soap12:bodyuse="literal" /></wsdl:output></wsdl:operation></wsdl:binding><wsdl:servicename="Calculator"><wsdl:portname="CalculatorSoap" binding="tns:CalculatorSoap"><soap:addresslocation="http://www.dneonline.com/calculator.asmx" /></wsdl:port><wsdl:portname="CalculatorSoap12" binding="tns:CalculatorSoap12"><soap12:addresslocation="http://www.dneonline.com/calculator.asmx" /></wsdl:port></wsdl:service></wsdl:definitions>

 

Sin embargo, si estoy usando el SOAP Passthrow creado, recupera lo siguiente:

http://localhost: 57772/SOAPpassthrough/CalculatorSOAPCSPServ/calculator.asmx?wsdl

<?xml version="1.0" encoding="UTF-8"?><definitionsxmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://tempuri.org" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" targetNamespace="http://tempuri.org"><types/><portTypename="MyEnsembleRequestWebServiceSoap"/><bindingname="MyEnsembleRequestWebServiceSoap" type="s0:MyEnsembleRequestWebServiceSoap"><soap:bindingtransport="http://schemas.xmlsoap.org/soap/http" style="document"/></binding><servicename="MyEnsembleRequestWebService"><portname="MyEnsembleRequestWebServiceSoap" binding="s0:MyEnsembleRequestWebServiceSoap"><soap:addresslocation="http://localhost:57772/SOAPpassthrough/CalculatorSOAPCSPServ/EnsLib.SOAP.GenericService.cls"/></port></service></definitions>

 

Según la documentación, debería tener el mismo resultado en ambas peticiones.

¿Qué está mal?

Un saludo,

Francisco López