on 11-22-2015 11:30 PM
Buenas Noches
Antes que nada
me presento
Mi Nombre es Elio Peña
Estoy comenzando a Desarrollar para SAP B1
Quisiera en la medida de las posibilidades que me ayudasen en la realización de varios Web Services en C# para SB1 uno de los Web Services es el de Consultar los datos Maestros de almacén en General es decir todos los almacenes a las vez o uno en particular.
La manera en que lo he enfocado es realizar un Web Services con los métodos devolver todos los almacenes y otro método que recibe como parámetro el Numero del almacén y retorna los datos del almacén solicitado.
La información devuelta por ambos métodos se hace bajo el formato de XMLDocument.
De Antemano
Gracias por su valiosa Ayuda
Feliz Noche
Que tal Elio ,
Pasame los querys con los que quieres hacer tus webservices y te enviare ya desarrollado para que puedas ayudarte.
Saludos
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Services; namespace Web_Services { /// /// Descripción breve de Servicios_Web /// [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [System.ComponentModel.ToolboxItem(false)] // Para permitir que se llame a este servicio Web desde un script, usando ASP.NET AJAX, quite la marca de comentario de la línea siguiente. // [System.Web.Script.Services.ScriptService] public class Servicios_Web : System.Web.Services.WebService { private SAPbobsCOM.Company ObjComp; private SAPbobsCOM.Items Oitem; private int lRetCode, lErr_Code; private string StrCnx; private bool cnx; [WebMethod] public string HelloWorld() { return "Hello World"; } public bool conexionDB(SAPbobsCOM.Company ocmp) { try { ocmp.Server = System.Configuration.ConfigurationManager.AppSettings["Server"]; ocmp.DbServerType = SAPbobsCOM.BoDataServerTypes.dst_MSSQL2008; ocmp.CompanyDB = System.Configuration.ConfigurationManager.AppSettings["CompanyDB"]; ocmp.UserName = System.Configuration.ConfigurationManager.AppSettings["Usuario"]; ocmp.Password = System.Configuration.ConfigurationManager.AppSettings["password"]; ocmp.language = SAPbobsCOM.BoSuppLangs.ln_Spanish; lRetCode = ocmp.Connect(); if (lRetCode != 0) { ocmp.GetLastError(out lRetCode, out StrCnx); Console.WriteLine("ERROR " + lRetCode + " " + StrCnx); return false; } else { return true; } } catch (Exception ex) { return false; } } [WebMethod(Description = "Metodo Web Encargado de mostrar los Datos de los articulos")] public string CTS_WS_DATA_Master_Articulos() { Servicios_Web objN = new Servicios_Web(); objN.ObjComp = new SAPbobsCOM.Company(); cnx = objN.conexionDB(objN.ObjComp); if (cnx) { Oitem = new SAPbobsCOM.Items(); Oitem.GetAsXML(); return "ARTICULOS"; } else { return "NO ENCONTRE"; } } } } Esto es lo que llevo hasta ahora me podrías ayudar
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.