none
Webservice object RRS feed

  • Question

  • Olá amigos, estou criando uma integração com um sistema de terceiros onde trabalho, pois para uma empresa de desenvolvimento custaria muito dinheiro, não tenho muito conhecimento de webservice, mas olhando tutoriais e exemplos estou conseguindo fazer, mas estou quebrando a cabeça para descobrir como é feito o objeto na imagem abaixo.

    Hello friends, I am creating an integration with a third party system where I work, because for a development company it would cost a lot of money, I do not have much knowledge of webservice, but looking tutorials and examples I am able to do, but I am breaking the head to find out how it is Made the object in the image below.

    Agradeço desde já a ajuda do fórum.

    Thanks in advance for the help of the fórum.

    • Moved by Sabah ShariqMVP Wednesday, May 31, 2017 12:11 PM Moved From Visual C#
    Tuesday, May 23, 2017 12:22 PM

All replies

  • Endereço do WebService http://wseapisul.apisul.com.br/apisulintegracaoobj.asmx?op=CancelSMP

    WebService Address http://wseapisul.apisul.com.br/apisulintegracaoobj.asmx?op=CancelSMP

    Tuesday, May 23, 2017 12:24 PM
  • Code

    using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.Data;
    using System.Diagnostics;
    using System.Web.Services;
    using System.Web.Services.Protocols;
    using System.ComponentModel;
    using System.Web.Services.Description;
    using System.CodeDom;
    using System.CodeDom.Compiler;
    using System.Xml.Serialization;
    
    // Para permitir que esse serviço da web seja chamado a partir do script, usando ASP.NET AJAX, remova os comentários da linha a seguir.
    // <System.Web.Script.Services.ScriptService()> _
    public class LOGIN : SoapHeader
    {
    	public string DS_USUARIO;
    	public string DS_SENHA;
    	public decimal CD_CLIENTE;
    }
    
    [System.Web.Services.WebService(Namespace = "http://tempuri.org/")]
    [System.Web.Services.WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [ToolboxItem(false)]
    public class apisulintegracaoobj : System.Web.Services.WebService
    {
    
    
    	public LOGIN LOGIN;
    	[WebMethod(), SoapHeader("LOGIN")]
    	public object CancelSMP(string pcd_cliente)
    	{
    
    	}
    }

    Tuesday, May 23, 2017 12:31 PM
  • Hi Diego,

    Based on your soap code and related link. I think the web service code simple like this:

    using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Services; using System.Web.Services.Protocols; using System.ComponentModel; using System.Xml.Serialization; namespace WebService1 { // Para permitir que esse serviço da web seja chamado a partir do script, usando ASP.NET AJAX, remova os comentários da linha a seguir. // <System.Web.Script.Services.ScriptService()> _ public class LOGIN : SoapHeader { public string DS_USUARIO; public string DS_SENHA; public decimal CD_CLIENTE; } /// <summary> /// apisulintegracaoobj

    /// </summary> [System.Web.Services.WebService(Namespace = "http://tempuri.org/")] [System.Web.Services.WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [ToolboxItem(false)] // [System.Web.Script.Services.ScriptService] public class apisulintegracaoobj : System.Web.Services.WebService { public LOGIN LOGIN; [WebMethod(), SoapHeader("LOGIN")] public object CancelSMP(string pcd_cliente, objCancel objCancel) { return null; } } public class objCancel { public objCancelVIAGEM[] vIAGENSField { get; set; } public objCancelERROS eRROSField { get; set; } } public class objCancelVIAGEM { public decimal CD_CLIENTE { get; set; } public string DS_DOC_CONTROLE { get; set; } public string NU_ANO { get; set; } } public class objCancelERROS { public objCancelERROSEVENTO[] eVENTOField { get; set; } public decimal quantidadeField { get; set; } public bool quantidadeFieldSpecified { get; set; } } public partial class objCancelERROSEVENTO { public string valueField { get; set; } } }

    In addition, Since it is a asp.net web service issue, you also your issue on asp.net web service forum for suitable support.

    https://forums.asp.net/28.aspx/1?WCF+ASMX+and+other+Web+Services

    Best regards,

    Cole Wu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.



    Wednesday, May 31, 2017 8:05 AM
  • Hi Diego H da Silva,

    This is Visual C# forum. As your issue is related to Web, please ask your question into ASP.Net forum for getting quick response. I am moving your thread to off-topic.

    https://forums.asp.net/

    Your understanding and cooperation will be grateful.

    Thanks,
    Sabah Shariq

    [If a post helps to resolve your issue, please click the "Mark as Answer" of that post or click Answered "Vote as helpful" button of that post. By marking a post as Answered or Helpful, you help others find the answer faster. ]

    Wednesday, May 31, 2017 12:11 PM