B1WS is available !!!

B1WS is a webservices wrapper around DI Server. It exposes B1 objects and services as WSDLs and gets nicely integrated with IIS and Visual Studio .NET: you can add webreferences to B1 objects and services in your C# or VB.NET project.
You can as usual download it under Business One SDK Tools. You get the setup, the documentation, samples and also source code. Enjoy.

Olga,
The download for B1WS is on the main SAP Business One page here on SDN ...
https://www.sdn.sap.com/irj/sdn/businessone?rid=/webcontent/uuid/a0915b47-ef89-2a10-91a5-b22649e5cfab [original link is broken]
... or you can also locate it under the "Tools" section from the SAP Business One main page here on SDN.
I am not sure what you mean by "B1DK"?
The SAP Business One SDK is a set of COM and DCOM objects that expose the data layer of SAP Business One as well as the User Interface Layer.  You can find more detail in the SAP Business One SDK Help Center documentation that comes with the SDK.
HTH,
Eddy

Similar Messages

  • Adding a batch to a line item in an Order with B1WS

    Hi,
    I am trying to create code which can update a batch in a line item in an order.  The updating works great, if the batch is already attached to the line item.  However, I am unable to add a batch if one doesn't already exist.
    Can you please have a look at this code and let me know what is wrong?
    I've tried various things, though am still unable to get it to work.
    Thank you very much!
    Mike
    using System;
    using System.Configuration;
    using System.Data;
    using System.Linq;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Xml.Linq;
    using orderWebRef;
    using System.Text;
    public partial class _Default : System.Web.UI.Page
        protected void Page_Load(object sender, EventArgs e)
            // B1BATCH performs batch operations on SAP via DISERVER and B1WS
            // The inputs are:
            // o = Order Number (this is the DocEntry value, NOT the DocNum value)
            // b = Batch Number
            // q = Quantity
            // i = Item Code
            // p = Project
            // debug = 1 or true if you want to see output messages
            // For some security, we will encode some values at the client,
            // and verify them here for consistency.
            // The "Secret Formula" is these variables, which will be passed to the URL
            // 1 = Order Number * 2 (encoded at the client)
            // 2 = Batch Number * 2 (encoded at the client)
            // To decode, we do this:
            // Correct decoding if ((1 = (o/2)) AND (2 = (b/2))
            string o = "";
            string b = "";
            string q = "";
            string i = "";
            string p = "";
            string v1 = "";
            string v2 = "";
            int orderNumber = 0; // This is the DocEntry value, NOT the DocNum value
            int batchNumber = 0;
            int quantity = 0;
            int v1int = 0;
            int v2int = 0;
            bool debugMode = false;
            bool allVarsPresent = true;
            bool allVarsValid = true;
            try
                o = Request.QueryString["o"].ToString();
            catch
                allVarsPresent = false;
            try
                b = Request.QueryString["b"].ToString();
            catch
                allVarsPresent = false;
            try
                q = Request.QueryString["q"].ToString();
            catch
                allVarsPresent = false;
            try
                i = Request.QueryString["i"].ToString().ToUpper();
            catch
                allVarsPresent = false;
            try
                p = Request.QueryString["p"].ToString().ToUpper();
            catch
                allVarsPresent = false;
            try
                v1 = Request.QueryString["1"].ToString();
            catch
                allVarsPresent = false;
            try
                v2 = Request.QueryString["2"].ToString();
            catch
                allVarsPresent = false;
            try
                string debug = Request.QueryString["debug"].ToString();
                if ((debug == "1") || (debug.ToLower() == "true"))
                    debugMode = true;
            catch
                debugMode = false;
            if (!allVarsPresent)
                WriteDebugMessage(debugMode, "All required variables are not in the request.");
                return;
            else
                // All variables are present, now check that they are valid.
                // First, check the v1 and v2 variables are correct
                // Then check that the order exists
                // Then check that the batch exists and has the appropraite quantity available
                try
                    orderNumber = Convert.ToInt32(o);
                    batchNumber = Convert.ToInt32(b);
                    quantity = Convert.ToInt32(q);
                    v1int = Convert.ToInt32(v1);
                    v2int = Convert.ToInt32(v2);
                    if ((v1int / 2) != orderNumber)
                        allVarsValid = false;
                    if ((v2int / 2) != batchNumber)
                        allVarsValid = false;
                catch
                    WriteDebugMessage(debugMode, "Error in processing variables.");
                    return;
                if (!allVarsValid)
                    WriteDebugMessage(debugMode, "Error in validating checksum.");
                    return;
                // All variables are present and valid!
                WriteDebugMessage(debugMode, "All variables are present and valid.");
            try
                loginWebRef.LoginService ls = new loginWebRef.LoginService();
                string sessionID = ls.Login("DBSERVER", "DBNAME", loginWebRef.LoginDatabaseType.dst_MSSQL2005, true, "sa", "PASSWORD", "manager", "managerPass", loginWebRef.LoginLanguage.ln_English, true, "LICENSE:30000");
                WriteDebugMessage(debugMode, "<BR><BR>SessionId: " + sessionID + "<BR><BR>");
                orderWebRef.MsgHeader msgHeader = new orderWebRef.MsgHeader();
                msgHeader.SessionID = sessionID;
                msgHeader.ServiceName = MsgHeaderServiceName.OrdersService;
                msgHeader.ServiceNameSpecified = true;
                orderWebRef.OrdersService order = new OrdersService();
                order.MsgHeaderValue = msgHeader;
                DocumentParams param = new DocumentParams();
                param.DocEntry = orderNumber;
                param.DocEntrySpecified = true;
                orderWebRef.Document document = new orderWebRef.Document();
                document = order.GetByParams(param);
                StringBuilder orderSb = new StringBuilder();
                orderSb.Append("Order " + document.DocNum.ToString() + "<BR><BR>");
                foreach (DocumentDocumentLine docLine in document.DocumentLines)
                    if ((docLine.ProjectCode == p) && (docLine.ItemCode == i))
                        orderSb.Append("Line Num:      " + docLine.LineNum + "<BR>");
                        orderSb.Append("Item Code:     " + docLine.ItemCode + "<BR>");
                        orderSb.Append("Project Code:  " + docLine.ProjectCode + "<BR>");
                        orderSb.Append("Description:   " + docLine.ItemDescription + "<BR>");
                        // Find the batch if it exists and update the quantity
                        // Add the batch if it doesn't exist
                        bool batchExistsInLineItem = false;
                        int batchCount = 0;
                        foreach (DocumentDocumentLineBatchNumber batch in docLine.BatchNumbers)
                            batchCount++;
                            if (batch.BatchNumber == b)
                                batchExistsInLineItem = true;
                                orderSb.Append("<BR>");
                                orderSb.Append("+++++ Batch exists in line item.  Updating.<BR><BR>");
                                orderSb.Append("+++++ Batch Line:   " + batchCount.ToString() + "<BR>");
                                orderSb.Append("+++++ Batch Num:    " + batchNumber + "<BR>");
                                orderSb.Append("+++++ Quantity:     " + quantity + "<BR>");
                                batch.Quantity = quantity;
                        if (!batchExistsInLineItem)
                            docLine.BatchNumbers = new DocumentDocumentLineBatchNumber[1];
                            DocumentDocumentLineBatchNumber batch = new DocumentDocumentLineBatchNumber();
                            batch.BatchNumber = b;
                            batch.Quantity = quantity;
                            docLine.BatchNumbers[0] = batch;
                            orderSb.Append("<BR>");
                            orderSb.Append("+++++ Batch does not exist in line item.  Adding.<BR><BR>");
                            orderSb.Append("+++++ Batch Line:   " + batchCount.ToString() + "<BR>");
                            orderSb.Append("+++++ Batch Num:    " + batchNumber + "<BR>");
                            orderSb.Append("+++++ Quantity:     " + quantity + "<BR>");
                try
                    order.Update(document);
                catch (Exception ex)
                    WriteDebugMessage(debugMode, "SAP Exception:  " + ex.Message.ToString());
                    return;
                WriteDebugMessage(debugMode, orderSb.ToString());
            catch (Exception ex)
                WriteDebugMessage(debugMode, "Error in processing the request.  Exception:<BR><BR>" + ex.Message);
                return;
        private void WriteDebugMessage(bool debugMode, string exitMessage)
            if (debugMode)
                Response.Write(exitMessage);

    Hi Everyone,
    I found the answer, you can find the code here: [B1WS Batch Manipulations with Orders|http://paste-it.net/public/dbbcea0/]
    Cheers,
    Mike

  • B1WS Problem with error response

    We use B1WS to communicate with the SAP system. Communication works fine until a exception occurs. In my special case I try to create a delivery note but there are not enough items on stock. When I add the delivery note the following exeception is raised:
    com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: A Subcode must be  namespace-qualified
    There is no other information available. When I add the delivery note with SoapUI I get the message from sap the there are not enough items on stock. Is there any way to fix this problem with the webservice?

    Thanks for your answer. The exception in this case is no problem for me. The problem is that I cannot get the exception because the SAP response cannot be parsed.
    Here is another post of the same problem.
    https://java.net/projects/metro/lists/users/archive/2010-08/message/185
    I cannot figure out why the response from sap causes this problems.

  • DI Server B1WS - Look up current user?

    Hello all:
    I am just wondering if there is any service that allows me to look up the currently logged on user through B1WS. I was looking through the CompanyInfo and AdminInfo objects, but haven't found any propoerty that relates to the current user.
    I know I can save my logon user locally and use that information instead, but it would have been nice to just access this as part of the provided DI objects... Did I just overlook it?
    Thanks,
    Joerg.

    Hello Joerg,
    I don't think it is possible because this info is not available to any B1 objects. Only B1upf.xml file under licensing server kept that data.
    Thanks,
    Gordon

  • Updating Business Partner via B1WS web services

    Hi,
    I get an error when I try to update (through the 'update' function of the BusinessPartnersService object) a BP that has already a bank account; even if I populate the BPBankAccounts property with the existing info of bank account, I get:
    Bank account is in use and therefore cannot be removed or changed   [(----) 705-20]
    My code is:
                BusinessPartnersService px = NewBPService(LoginDefault());
                BusinessPartner bp = new BusinessPartner();
                bp.CardCode = "CADRIAT0000";
                bp.Phone1 = "041666666";
                BusinessPartnerBPBankAccount[] bpba = new BusinessPartnerBPBankAccount[1];
                bpba[0] = new BusinessPartnerBPBankAccount();
                bpba[0].BPCode = "CADRIAT0000";
                bpba[0].IBAN = "IT42L0350012500000000021179";
                bpba[0].Branch = "12500";
                bpba[0].BankCode = "03500";
                bpba[0].AccountNo = "000000021179";
                bp.BPBankAccounts = bpba;
                px.Update(bp);
    Does anyone know ho to update correctly a BP with an existing bank account?
    Thanks,
    Alessio

    Hi,
    First Use the getbykey to get the Business partnet then update.
    sample code is available with B1WS package
    Regards.

  • Two questions about B1WS with 2007B

    Hi All
    As described in topic "Re: Can B1WS work with SBO 2007B Preview", b1ws seems to support 2007B.
    When I used WsdlServicesGenerator.exe to regenerat wsdl files, I got error reported "Login Error env: Receiver 100000001 Connection with license server failed Login". The license server was properly given and tested to be available. Can any one give me a clue? Thanks!
    One other question: can I select "In_Chinese" for the Language column? I got error "Login Error env: Sender -8020 Invalid language Language ln_Chinese ln_Chinese Login" reported when I did this.

    Hi Yatsea:
    谢谢你的答案!
    现我有3台机器:
    A , 装有 IIS,DI_server (2007b), B1WS
    B , 装有 SBO (2007b) 和 其数据库实例 test02 (版本为2007b).
    C , SBO license server.
    我在A上通过WsdlServicesGenerator.exe 试图重新生成wsdl文件,结果接到报错信息"111 Failed to Connect to SBOCommon".
    在WsdlServicesGenerator.exe 中输入的信息为:
    database server : 192.168.0.208         // 这是B的IP
    database name: test02
    database type: dst_MSSQL2005
    database username: sa
    database password: 1234
    company username: manager
    company password: manager
    language: ln_English
    license server: 192.168.0.102:30000    //102为license服务器
    在其他的测试中证实 192.168.0.102:30000 是可用的地址。
    问题出在哪里呢?
    谢谢

  • My mac's software is only available under my profile on MacBook pro. How can other family members get to the optional SW logged in under their own profile

    Is there a way to share purchased SW under mote than one profile on the MacBook pro?
    Thanks

    If the software is in the HD>Applications folder it's available to everyone. If for some reason you put software into User>Applications folder it will be available only to that user.

  • Adobe Cloud is installed on my desktop and one laptop computer. Upon noticing updates were available yesterday, I successfully installed them on my laptop. Today, I cannot get Abobe Cloud to open on my desktop.

    Adobe Cloud is installed on my desktop and one laptop computer. Upon noticing updates were available yesterday, I successfully installed them on my laptop. Today, I cannot get Abobe Cloud to open on my desktop.

    We don't know what Apple plans on doing to change this (and it may not be just Apple but more likely the publishers, since Apple would, of course, do whatever it could to maximize sales/profits).  Right now you can only read Apple books on mobile devices. Sure, buy them from Amazon if you want to read them on the computer. We don't work for Apple so we're pretty impartial on this kind of advice.
    You might also see what your library can offer.  My wife can browse the county library from her iPhone, borrow e-versions, and read books on it too.  Free!

  • Service Desk - Expert Mode - Not all actions are available

    Dear SAP colleagues,
    I have just implemented the Service Desk in our SOLMAN system.
    1. I choose Incident Management
    2. I click on Queries
    3. I click on a ticket (Transaction ID).
    4. I edit the message
    5. When I select Actions, I only have the 4 following options :
        - Send Message to SAP
        - Maintain SAP Logon Data
        - Display SAP Action Log
        - Update SAP Message
    When I consult some demos, there are many differents options available in Actions menu, as, for example :
    - Open System fro SAP
    - Confirm Message to SAP
    - E-Mail to Message Creator (Mail)
    - Print Message
    - Create Change Document
    - Call Solution Manager Diagnostics.
    Is it due to an missing authorizations (roles and profiles) ?
    Thanks for your input.
    Best regards
    CP2009

    Dear Rajeev,
    First of all, thanks for your input.
    I have choosen SIVA when I have activated BC Sets.
    Should I activate also BC Sets for transaction type SLFN ?
    1. I have started SPPFCADM and follow your recommandations.
    2. I have choosen CRM_ORDER
    3. I have then click on "Condition Configuration (Transportable Conditions)
    4. There are many entries related to the Support and Service Desk
    Example : Support Desk Message Action Profile
    I have 5 actions defined -
    Action 01 : Send Message to Processor
    Action 02 : Create/Change Basis Message from CRM Procedure
    Action 03 : Send Notification to SAP
    Action 04 : Update Message from SAP
    Action 05 : Confirm Message to SAP
    I have activate BC Sets for transaction type SIVA, not for SLFN.
    Best regards
    CP2009

  • (Request for reporting available) is not coming in Cube

    Hi All,
    I have Cube & DSO.
    I  added fields in DSO & Cube.
    Cube1 has Aggregrates built on it.i added 5 infoobjects on it, Now when i load data from DSO to Cube(Request for reporting available) is not coming up. i cant do reporting on it. can anyone help.
    thanks in advance,
    Kiran.

    Hi ....
    Have you done the Roll up ?
    Since aggregates are there on that cube....until and unless you do the roll up that request will not be available for Reporting...
    Regards,
    Debjani....

  • My app store wont let me download apps, says they are not available in the uk please help??

    my app store wont let me download apps, says there not available in the uk?? please help??

    Try This...
    Close All Open Apps...  Sign Out of your Account... Perform a Reset... Try again...
    Reset  ( No Data will be Lost )
    Press and hold the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Release the Buttons.
    http://support.apple.com/kb/ht1430

  • I deleted all my photos, music, apps, ect. and it says I have no storage available. It wont let me download any apps even though I basically deleted everything on my phone

    I plugged my iphone 4s into my mac to sync it and it wouldnt allow me to do so and says I have no more gb available, but again I have nothing on my phone and have barely anything synced. More than 80% is filled with documents and data???

    If Other (the yellow bar) is too big something is corrupted.  The only solution (that I know of) is to restore from your most recent backup using iTunes (see http://support.apple.com/kb/ht1766).

  • Report for material with sloc,qty available, and production order

    hi friends, i need advice on getting this report for material with qty and specific sloc with the corresponding Prodn order numbers. in mb51 i could get all these details except the prodn order no. could you advice me please?

    to make sure you know how to do this.
    In the material document list, hit "Ctrl+F8" on your keyboard.
    A window will pop up. Click on the button position and look for "order" in the list of available fields. That should do it.
    Rgds.

  • IPhone limited to 130 apps at a time! 6,200 apps available in app store

    The i phone is limited to nine app screen i notice this when i try to move on to a tenth screen and it would not let me and also when you download a app after all 9 screen are full the app dose not show up but the app store says it is installed apple needs to expand the amount of screen allowed. you then end up having to delete 2 apps download 1 app in able to make the invisible app appear you have to try this one out for your self so you get a better idea of what i mean so it looks like we are limited to 144 apps per iPhone subtract 14 apps that come default on the screen not including the 4 that are on the bar below you are left with 130 apps that can be downloaded and use at a time per i phone that ***** there are over 6,200 apps available in the app store as i type this to you and apple is limiting me to only carry 130 at a time there is somthing worng with this and i think somthing should be done!

    No acutally what that means is most people like myself have to install 30 apps just to get the iphone to do half the things it should have done out of the box. Sure some are wants but most are "need" in order for it to do the things my old palm treo 600 could do, and still there's not copy and past and no video. On top of that they have a stupid 130 limit. I'd love to hear why that is.

  • In ical edit, can you get rid of invitees, availability, url, notes?

    in ical edit, can you get rid of invitees, availability, url, notes?

    in ical edit, can you get rid of invitees, availability, url, notes?

Maybe you are looking for

  • TS2446 Please help my apple id has been disabled

    And not for security reasons

  • Home Screen Not Saving Changes

    Hi.  In iTunes, I've customized my home screen (moved apps around, created folders, etc.)  When I sync it, it appears the way I want it on my phone and in iTunes.  However, whenever I restart the phone, the changes are gone and it's back to the way i

  • Schconfig error in solaris environment

    hi...while running the scheconfig in solrais environment...i am getting the following error... ./schconfig ld.so.1: schconfig: fatal: relocation error: file /home/OracleBI/server/Bin/libnqportable.so: symbol AnaAtomicIncrement: referenced symbol not

  • Why does my Preview app keep shutting my computer down?

    For weeks now I've been reporting this issue to Apple but so far I haven't had any response or update fixes.  When I click on a picture file Preview attempts to open the file but then quits or shuts the computer down.  Any help with this? Here is a p

  • Content Holder Menu vs. Dynamic Menu--which should I be using?

    I've recently taken over managing a site handled through BC. I'm trying to add submenus to our navigation but I'm struggling to determine how since the previous person set up menus via the Content Holder. Do I need to switch (or is it simply better t