none
Como utilizo una Public Interface?

    Pregunta

  • Buenos días, estoy intentando utilizar un servicio web, para enviar un mensaje, pero no he tenido éxito, especificamente no sé como utilizar una Public Interface, el código del servicio es el siguiente:

    Option Strict On
    Option Explicit On
    
    
    Namespace servicio
        
        <System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0"),  _
         System.ServiceModel.ServiceContractAttribute([Namespace]:="urn:cmpc.cl:CLogic:RecepcionTransportesProgramados", ConfigurationName:="servicio.DocumentoNotification_Out")>  _
        Public Interface DocumentoNotification_Out
            
            'CODEGEN: Se está generando un contrato de mensaje, ya que la operación DocumentoNotification_Out no es RPC ni está encapsulada en un documento.
            <System.ServiceModel.OperationContractAttribute(IsOneWay:=true, Action:="http://sap.com/xi/WebService/soap1.1"),  _
             System.ServiceModel.XmlSerializerFormatAttribute()>  _
            Sub DocumentoNotification_Out(ByVal request As servicio.DocumentoNotification_Out1)
        End Interface
        
        '''<comentarios/>
        <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.3662"),  _
         System.SerializableAttribute(),  _
         System.Diagnostics.DebuggerStepThroughAttribute(),  _
         System.ComponentModel.DesignerCategoryAttribute("code"),  _
         System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true, [Namespace]:="urn:cmpc.cl:CLogic:RecepcionTransportesProgramados")>  _
        Partial Public Class DocumentoRow
            Inherits Object
            Implements System.ComponentModel.INotifyPropertyChanged
            
            Private cabeceraField As DocumentoRowCabecera
            
            Private registro_FechasField() As DocumentoRowRegistro_Fechas
            
            Private entregasField() As String
            
            '''<comentarios/>
            <System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, Order:=0)>  _
            Public Property Cabecera() As DocumentoRowCabecera
                Get
                    Return Me.cabeceraField
                End Get
                Set
                    Me.cabeceraField = value
                    Me.RaisePropertyChanged("Cabecera")
                End Set
            End Property
            
            '''<comentarios/>
            <System.Xml.Serialization.XmlElementAttribute("Registro_Fechas", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, Order:=1)>  _
            Public Property Registro_Fechas() As DocumentoRowRegistro_Fechas()
                Get
                    Return Me.registro_FechasField
                End Get
                Set
                    Me.registro_FechasField = value
                    Me.RaisePropertyChanged("Registro_Fechas")
                End Set
            End Property
            
            '''<comentarios/>
            <System.Xml.Serialization.XmlArrayAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, Order:=2),  _
             System.Xml.Serialization.XmlArrayItemAttribute("Numero_Entrega", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable:=false)>  _
            Public Property Entregas() As String()
                Get
                    Return Me.entregasField
                End Get
                Set
                    Me.entregasField = value
                    Me.RaisePropertyChanged("Entregas")
                End Set
            End Property
            
            Public Event PropertyChanged As System.ComponentModel.PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged
            
            Protected Sub RaisePropertyChanged(ByVal propertyName As String)
                Dim propertyChanged As System.ComponentModel.PropertyChangedEventHandler = Me.PropertyChangedEvent
                If (Not (propertyChanged) Is Nothing) Then
                    propertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyName))
                End If
            End Sub
        End Class
        
        '''<comentarios/>
        <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.3662"),  _
         System.SerializableAttribute(),  _
         System.Diagnostics.DebuggerStepThroughAttribute(),  _
         System.ComponentModel.DesignerCategoryAttribute("code"),  _
         System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true, [Namespace]:="urn:cmpc.cl:CLogic:RecepcionTransportesProgramados")>  _
        Partial Public Class DocumentoRowCabecera
            Inherits Object
            Implements System.ComponentModel.INotifyPropertyChanged
            
            Private nro_TransporteField As String
            
            Private clase_TransporteField As String
            
            Private ident_Externa_1Field As String
            
            Private clase_ExpedicionField As String
            
            Private cond_ExpedicionField As String
            
            Private gestion_EspecialField As String
            
            Private ruta_TransporteField As String
            
            Private signaturaField As String
            
            Private ident_Externa_2Field As String
            
            Private identificacionField As String
            
            Private estatus_PlanificacionField As String
            
            Private creacion_o_ModificacionField As String
            
            Private interlocutor_ProveedorField As String
            
            Private proveedorField As String
            
            Private funcion_InterlocutorField As String
            
            Private cualificador_InterlocutorField As String
            
            Private puesto_TransporteField As String
            
            '''<comentarios/>
            <System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, Order:=0)>  _
            Public Property Nro_Transporte() As String
                Get
                    Return Me.nro_TransporteField
                End Get
                Set
                    Me.nro_TransporteField = value
                    Me.RaisePropertyChanged("Nro_Transporte")
                End Set
            End Property
            
            '''<comentarios/>
            <System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, Order:=1)>  _
            Public Property Clase_Transporte() As String
                Get
                    Return Me.clase_TransporteField
                End Get
                Set
                    Me.clase_TransporteField = value
                    Me.RaisePropertyChanged("Clase_Transporte")
                End Set
            End Property
            
            '''<comentarios/>
            <System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, Order:=2)>  _
            Public Property Ident_Externa_1() As String
                Get
                    Return Me.ident_Externa_1Field
                End Get
                Set
                    Me.ident_Externa_1Field = value
                    Me.RaisePropertyChanged("Ident_Externa_1")
                End Set
            End Property
            
            '''<comentarios/>
            <System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, Order:=3)>  _
            Public Property Clase_Expedicion() As String
                Get
                    Return Me.clase_ExpedicionField
                End Get
                Set
                    Me.clase_ExpedicionField = value
                    Me.RaisePropertyChanged("Clase_Expedicion")
                End Set
            End Property
            
            '''<comentarios/>
            <System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, Order:=4)>  _
            Public Property Cond_Expedicion() As String
                Get
                    Return Me.cond_ExpedicionField
                End Get
                Set
                    Me.cond_ExpedicionField = value
                    Me.RaisePropertyChanged("Cond_Expedicion")
                End Set
            End Property
            
            '''<comentarios/>
            <System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, Order:=5)>  _
            Public Property Gestion_Especial() As String
                Get
                    Return Me.gestion_EspecialField
                End Get
                Set
                    Me.gestion_EspecialField = value
                    Me.RaisePropertyChanged("Gestion_Especial")
                End Set
            End Property
            
            '''<comentarios/>
            <System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, Order:=6)>  _
            Public Property Ruta_Transporte() As String
                Get
                    Return Me.ruta_TransporteField
                End Get
                Set
                    Me.ruta_TransporteField = value
                    Me.RaisePropertyChanged("Ruta_Transporte")
                End Set
            End Property
            
            '''<comentarios/>
            <System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, Order:=7)>  _
            Public Property Signatura() As String
                Get
                    Return Me.signaturaField
                End Get
                Set
                    Me.signaturaField = value
                    Me.RaisePropertyChanged("Signatura")
                End Set
            End Property
            
            '''<comentarios/>
            <System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, Order:=8)>  _
            Public Property Ident_Externa_2() As String
                Get
                    Return Me.ident_Externa_2Field
                End Get
                Set
                    Me.ident_Externa_2Field = value
                    Me.RaisePropertyChanged("Ident_Externa_2")
                End Set
            End Property
            
            '''<comentarios/>
            <System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, Order:=9)>  _
            Public Property Identificacion() As String
                Get
                    Return Me.identificacionField
                End Get
                Set
                    Me.identificacionField = value
                    Me.RaisePropertyChanged("Identificacion")
                End Set
            End Property
            
            '''<comentarios/>
            <System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, Order:=10)>  _
            Public Property Estatus_Planificacion() As String
                Get
                    Return Me.estatus_PlanificacionField
                End Get
                Set
                    Me.estatus_PlanificacionField = value
                    Me.RaisePropertyChanged("Estatus_Planificacion")
                End Set
            End Property
            
            '''<comentarios/>
            <System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, Order:=11)>  _
            Public Property Creacion_o_Modificacion() As String
                Get
                    Return Me.creacion_o_ModificacionField
                End Get
                Set
                    Me.creacion_o_ModificacionField = value
                    Me.RaisePropertyChanged("Creacion_o_Modificacion")
                End Set
            End Property
            
            '''<comentarios/>
            <System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, Order:=12)>  _
            Public Property Interlocutor_Proveedor() As String
                Get
                    Return Me.interlocutor_ProveedorField
                End Get
                Set
                    Me.interlocutor_ProveedorField = value
                    Me.RaisePropertyChanged("Interlocutor_Proveedor")
                End Set
            End Property
            
            '''<comentarios/>
            <System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, Order:=13)>  _
            Public Property Proveedor() As String
                Get
                    Return Me.proveedorField
                End Get
                Set
                    Me.proveedorField = value
                    Me.RaisePropertyChanged("Proveedor")
                End Set
            End Property
            
            '''<comentarios/>
            <System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, Order:=14)>  _
            Public Property Funcion_Interlocutor() As String
                Get
                    Return Me.funcion_InterlocutorField
                End Get
                Set
                    Me.funcion_InterlocutorField = value
                    Me.RaisePropertyChanged("Funcion_Interlocutor")
                End Set
            End Property
            
            '''<comentarios/>
            <System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, Order:=15)>  _
            Public Property Cualificador_Interlocutor() As String
                Get
                    Return Me.cualificador_InterlocutorField
                End Get
                Set
                    Me.cualificador_InterlocutorField = value
                    Me.RaisePropertyChanged("Cualificador_Interlocutor")
                End Set
            End Property
            
            '''<comentarios/>
            <System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, Order:=16)>  _
            Public Property Puesto_Transporte() As String
                Get
                    Return Me.puesto_TransporteField
                End Get
                Set
                    Me.puesto_TransporteField = value
                    Me.RaisePropertyChanged("Puesto_Transporte")
                End Set
            End Property
            
            Public Event PropertyChanged As System.ComponentModel.PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged
            
            Protected Sub RaisePropertyChanged(ByVal propertyName As String)
                Dim propertyChanged As System.ComponentModel.PropertyChangedEventHandler = Me.PropertyChangedEvent
                If (Not (propertyChanged) Is Nothing) Then
                    propertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyName))
                End If
            End Sub
        End Class
        
        '''<comentarios/>
        <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.3662"),  _
         System.SerializableAttribute(),  _
         System.Diagnostics.DebuggerStepThroughAttribute(),  _
         System.ComponentModel.DesignerCategoryAttribute("code"),  _
         System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true, [Namespace]:="urn:cmpc.cl:CLogic:RecepcionTransportesProgramados")>  _
        Partial Public Class DocumentoRowRegistro_Fechas
            Inherits Object
            Implements System.ComponentModel.INotifyPropertyChanged
            
            Private codigo_RegistroField As String
            
            Private fecha_InicioField As Date
            
            Private fecha_InicioFieldSpecified As Boolean
            
            Private fecha_FinalField As Date
            
            Private fecha_FinalFieldSpecified As Boolean
            
            Private hora_inicioField As Date
            
            Private hora_inicioFieldSpecified As Boolean
            
            Private hora_FinalField As Date
            
            Private hora_FinalFieldSpecified As Boolean
            
            '''<comentarios/>
            <System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, Order:=0)>  _
            Public Property Codigo_Registro() As String
                Get
                    Return Me.codigo_RegistroField
                End Get
                Set
                    Me.codigo_RegistroField = value
                    Me.RaisePropertyChanged("Codigo_Registro")
                End Set
            End Property
            
            '''<comentarios/>
            <System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="date", Order:=1)>  _
            Public Property Fecha_Inicio() As Date
                Get
                    Return Me.fecha_InicioField
                End Get
                Set
                    Me.fecha_InicioField = value
                    Me.RaisePropertyChanged("Fecha_Inicio")
                End Set
            End Property
            
            '''<comentarios/>
            <System.Xml.Serialization.XmlIgnoreAttribute()>  _
            Public Property Fecha_InicioSpecified() As Boolean
                Get
                    Return Me.fecha_InicioFieldSpecified
                End Get
                Set
                    Me.fecha_InicioFieldSpecified = value
                    Me.RaisePropertyChanged("Fecha_InicioSpecified")
                End Set
            End Property
            
            '''<comentarios/>
            <System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="date", Order:=2)>  _
            Public Property Fecha_Final() As Date
                Get
                    Return Me.fecha_FinalField
                End Get
                Set
                    Me.fecha_FinalField = value
                    Me.RaisePropertyChanged("Fecha_Final")
                End Set
            End Property
            
            '''<comentarios/>
            <System.Xml.Serialization.XmlIgnoreAttribute()>  _
            Public Property Fecha_FinalSpecified() As Boolean
                Get
                    Return Me.fecha_FinalFieldSpecified
                End Get
                Set
                    Me.fecha_FinalFieldSpecified = value
                    Me.RaisePropertyChanged("Fecha_FinalSpecified")
                End Set
            End Property
            
            '''<comentarios/>
            <System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="time", Order:=3)>  _
            Public Property Hora_inicio() As Date
                Get
                    Return Me.hora_inicioField
                End Get
                Set
                    Me.hora_inicioField = value
                    Me.RaisePropertyChanged("Hora_inicio")
                End Set
            End Property
            
            '''<comentarios/>
            <System.Xml.Serialization.XmlIgnoreAttribute()>  _
            Public Property Hora_inicioSpecified() As Boolean
                Get
                    Return Me.hora_inicioFieldSpecified
                End Get
                Set
                    Me.hora_inicioFieldSpecified = value
                    Me.RaisePropertyChanged("Hora_inicioSpecified")
                End Set
            End Property
            
            '''<comentarios/>
            <System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="time", Order:=4)>  _
            Public Property Hora_Final() As Date
                Get
                    Return Me.hora_FinalField
                End Get
                Set
                    Me.hora_FinalField = value
                    Me.RaisePropertyChanged("Hora_Final")
                End Set
            End Property
            
            '''<comentarios/>
            <System.Xml.Serialization.XmlIgnoreAttribute()>  _
            Public Property Hora_FinalSpecified() As Boolean
                Get
                    Return Me.hora_FinalFieldSpecified
                End Get
                Set
                    Me.hora_FinalFieldSpecified = value
                    Me.RaisePropertyChanged("Hora_FinalSpecified")
                End Set
            End Property
            
            Public Event PropertyChanged As System.ComponentModel.PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged
            
            Protected Sub RaisePropertyChanged(ByVal propertyName As String)
                Dim propertyChanged As System.ComponentModel.PropertyChangedEventHandler = Me.PropertyChangedEvent
                If (Not (propertyChanged) Is Nothing) Then
                    propertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyName))
                End If
            End Sub
        End Class
        
        <System.Diagnostics.DebuggerStepThroughAttribute(),  _
         System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0"),  _
         System.ServiceModel.MessageContractAttribute(IsWrapped:=false)>  _
        Partial Public Class DocumentoNotification_Out1
            
            <System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="urn:cmpc.cl:CLogic:RecepcionTransportesProgramados", Order:=0),  _
             System.Xml.Serialization.XmlArrayItemAttribute("Row", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable:=false)>  _
            Public DocumentoNotification() As DocumentoRow
            
            Public Sub New()
                MyBase.New
            End Sub
            
            Public Sub New(ByVal DocumentoNotification() As DocumentoRow)
                MyBase.New
                Me.DocumentoNotification = DocumentoNotification
            End Sub
        End Class
        
        <System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")>  _
        Public Interface DocumentoNotification_OutChannel
            Inherits servicio.DocumentoNotification_Out, System.ServiceModel.IClientChannel
        End Interface
        
        <System.Diagnostics.DebuggerStepThroughAttribute(),  _
         System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")>  _
        Partial Public Class DocumentoNotification_OutClient
            Inherits System.ServiceModel.ClientBase(Of servicio.DocumentoNotification_Out)
            Implements servicio.DocumentoNotification_Out
            
            Public Sub New()
                MyBase.New
            End Sub
            
            Public Sub New(ByVal endpointConfigurationName As String)
                MyBase.New(endpointConfigurationName)
            End Sub
            
            Public Sub New(ByVal endpointConfigurationName As String, ByVal remoteAddress As String)
                MyBase.New(endpointConfigurationName, remoteAddress)
            End Sub
            
            Public Sub New(ByVal endpointConfigurationName As String, ByVal remoteAddress As System.ServiceModel.EndpointAddress)
                MyBase.New(endpointConfigurationName, remoteAddress)
            End Sub
            
            Public Sub New(ByVal binding As System.ServiceModel.Channels.Binding, ByVal remoteAddress As System.ServiceModel.EndpointAddress)
                MyBase.New(binding, remoteAddress)
            End Sub
            
            <System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>  _
            Sub servicio_DocumentoNotification_Out_DocumentoNotification_Out(ByVal request As servicio.DocumentoNotification_Out1) Implements servicio.DocumentoNotification_Out.DocumentoNotification_Out
                MyBase.Channel.DocumentoNotification_Out(request)
            End Sub
            
            Public Sub DocumentoNotification_Out(ByVal DocumentoNotification() As DocumentoRow)
                Dim inValue As servicio.DocumentoNotification_Out1 = New servicio.DocumentoNotification_Out1
                inValue.DocumentoNotification = DocumentoNotification
                CType(Me,servicio.DocumentoNotification_Out).DocumentoNotification_Out(inValue)
            End Sub
        End Class
    End Namespace

    Y este es el código donde estoy generando el mensaje pero me falta enviarlo:

    Imports TransportesProgramados.servicio
    Public Class Form1
        'Implements DocumentoNotification_Out
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Dim doc As DocumentoRow = New DocumentoRow()
    
            Dim cabecera As New DocumentoRowCabecera
    
            cabecera.Nro_Transporte = 12
            cabecera.Clase_Transporte = "A"
            cabecera.Ident_Externa_1 = "X"
            cabecera.Clase_Expedicion = "F"
            cabecera.Cond_Expedicion = "CNE"
            cabecera.Gestion_Especial = "GE"
            cabecera.Ruta_Transporte = "RT"
            cabecera.Signatura = "SGN"
            cabecera.Ident_Externa_2 = "IE2"
            cabecera.Identificacion = "IDN"
            cabecera.Estatus_Planificacion = "SPL"
            cabecera.Creacion_o_Modificacion = "M"
            cabecera.Interlocutor_Proveedor = "INPRV"
            cabecera.Proveedor = "PROV"
            cabecera.Funcion_Interlocutor = "FINT"
            cabecera.Cualificador_Interlocutor = "CINT"
            cabecera.Puesto_Transporte = "PTR"
    
    
            doc.Cabecera = cabecera
    
            Dim fecha As DocumentoRowRegistro_Fechas = New DocumentoRowRegistro_Fechas
            fecha.Codigo_Registro = "CW!"
            fecha.Fecha_Inicio = "31/01/2016"
            fecha.Fecha_Final = "31/01/2016"
            fecha.Hora_inicio = "31/01/2016 10:21"
            fecha.Hora_Final = "31/01/2016 15:45"
    
    
            Dim fechas() As DocumentoRowRegistro_Fechas = Nothing
            ReDim Preserve fechas(0)
            fechas(0) = fecha
            doc.Registro_Fechas = fechas
    
    
            Dim expected() As String = Nothing
            ReDim Preserve expected(0)
            expected(0) = "ent1"
            ReDim Preserve expected(1)
            expected(1) = "ent2"
    
            doc.Entregas = expected
    
            Dim DocumentoNotification() As DocumentoRow = Nothing ' TODO: Inicializar en un valor adecuado
            ReDim Preserve DocumentoNotification(0)
            DocumentoNotification(0) = doc
    
            Dim Out1 As DocumentoNotification_Out1 = New DocumentoNotification_Out1(DocumentoNotification)
    
    
            'AQUÍ DEBERÍA UTILIZAR LA INTERFACE PARA ENVIAR EL MENSAJE 
    
        End Sub
         
    End Class

    Traté de hacerlo lo más fácil de entender, es sólo una prueba, pero no me resulta, favor ayuuuuuuuuda!!!!

    miércoles, 23 de noviembre de 2016 14:18

Respuestas

  • Hola,

     si te fijas en el siguiente código

    Partial Public Class DocumentoNotification_OutClient
            Inherits System.ServiceModel.ClientBase(Of servicio.DocumentoNotification_Out)
            Implements servicio.DocumentoNotification_Out
            

    El cliente está implementando el Interface que tienes. Para llamar al servicio web deberás usar un objeto de tipo 

    DocumentoNotification_OutClient

    Si se solucionó tu consulta no olvides marcar la respuesta. Si te ayudó, vótala como útil. Saludos

    • Marcado como respuesta Phantom.Lord miércoles, 23 de noviembre de 2016 15:20
    miércoles, 23 de noviembre de 2016 14:42

Todas las respuestas

  • Hola,

     si te fijas en el siguiente código

    Partial Public Class DocumentoNotification_OutClient
            Inherits System.ServiceModel.ClientBase(Of servicio.DocumentoNotification_Out)
            Implements servicio.DocumentoNotification_Out
            

    El cliente está implementando el Interface que tienes. Para llamar al servicio web deberás usar un objeto de tipo 

    DocumentoNotification_OutClient

    Si se solucionó tu consulta no olvides marcar la respuesta. Si te ayudó, vótala como útil. Saludos

    • Marcado como respuesta Phantom.Lord miércoles, 23 de noviembre de 2016 15:20
    miércoles, 23 de noviembre de 2016 14:42
  • Muchas gracias Maestro... pero ahora me entrega una excepción de seguridad... que me faltara?

    miércoles, 23 de noviembre de 2016 15:22
  • Hola,

    puedes mostrarnos el archivo de configuración tanto del cliente que consume el servicio como del servicio mismo? Estas llamando a un RFC de SAP?

    Saludos


    Si se solucionó tu consulta no olvides marcar la respuesta. Si te ayudó, vótala como útil. Saludos

    miércoles, 23 de noviembre de 2016 16:50
  • Exacto, SAP, pero no tengo el del servicio, yo sólo debo consumirlo, pero este es el app.config que genera al agregar el servicio:

    <system.serviceModel>
            <bindings>
                <basicHttpBinding>
                    <binding name="DocumentoNotification_OutBinding" closeTimeout="00:01:00"
                        openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                        allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
                        maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                        messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
                        useDefaultWebProxy="true">
                        <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                        <security mode="None">
                            <transport clientCredentialType="None" proxyCredentialType="None"
                                realm="" />
                            <message clientCredentialType="UserName" algorithmSuite="Default"  />
                        </security>
                    </binding> 
                </basicHttpBinding>
            </bindings>
            <client>
                <endpoint address="http://URLXXX:50000/WSAdapter/WSSender_XXX_D"
                    binding="basicHttpBinding" bindingConfiguration="DocumentoNotification_OutBinding"
                    contract="servicio.DocumentoNotification_Out" name="HTTP_Port" /> 
            </client>
        </system.serviceModel>

    miércoles, 23 de noviembre de 2016 17:21