on 05-18-2016 3:56 PM
Buen día, estoy tratando de añadir un pedido desde b1ws y estoy teniendo el siguiente error pero mi código aparentemente lo veo bien ¿que puede ser? gracias de antemano.
mi código:
public object CrearPedido()
{
PedidosWebRef.OrdersService ServicioPedido = new PedidosWebRef.OrdersService();
string Session1 = Session["IDSeccion"].ToString();
MsgHeader msgHeader = new MsgHeader();
msgHeader.SessionID = Session1;
ServicioPedido.MsgHeaderValue = msgHeader;
PedidosWebRef.Document CrearPedido = new PedidosWebRef.Document();
CrearPedido.CardCode = "CN16504364";
CrearPedido.CardName = "BETANCOURT OSORIO WILMER";
CrearPedido.NumAtCard = "JUANTEST";
CrearPedido.DocDueDate = DateTime.Now;
CrearPedido.DocDueDateSpecified = true;
CrearPedido.DocDate = DateTime.Now;
CrearPedido.DocDateSpecified = true;
CrearPedido.TaxDate = DateTime.Now;
CrearPedido.TaxDateSpecified = true;
CrearPedido.SalesPersonCode = 27;
CrearPedido.SalesPersonCodeSpecified = true;
PedidosWebRef.DocumentDocumentLine dline = new PedidosWebRef.DocumentDocumentLine();
dline.WarehouseCode = "R601";
dline.ItemCode = "0257101321";
dline.ItemDescription = "205/60R-13 XR611 NANKANG";
dline.Quantity = 2;
dline.QuantitySpecified = true;
dline.UnitPrice = 10;
dline.UnitPriceSpecified = true;
dline.TaxCode = "IVAG01";
CrearPedido.DocumentLines = new DocumentDocumentLine[] { dline };
ServicioPedido.Add(CrearPedido);
return true;
}
Hola Juan,
lo siento, mi español no es lo suficientemente bueno..( and this is an english speaking forum )
You are missing the servicename definition in header level - this should do the trick :
MsgHeader msgHeader = new MsgHeader();
msgHeader.SessionID = Session1;
msgHeader.ServiceName = ServicioPedido.MsgHeaderServiceName.OrdersService;
msgHeader.ServiceNameSpecified = true;
ServicioPedido.MsgHeaderValue = msgHeader;
regards,
Maik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Juan,
B1WS is compatible - but maybe you have to make little adjustments in source code ( to support MSSQL 2014 - you find info in this forum ), and you should generate new WSDLs.
Basically DI Server is a SOAP based service for interacting with SBO. B1WS is "simply" generating the corresponding WSDLs and puts the interaction in an IIS context.
regards,
Maik
User | Count |
---|---|
98 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
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.