Skip to Content

B1WS exposes the SAP Business One DI Server functionality as Web Services to provide a better usability. Developers only need to add the web references to the B1WS web services (presented through wsdl files) and use the services with the auto generated object model. Implementation is then simplified and development time reduced with the use of B1WS.

This new version of B1WS includes more web services than previous one and also the possibility to work with your UDOs as with the DI API. Just run the WsdlServicesGenerator and select the UDOs you want to generate a service for. After a wsdl file is generated for each one of your UDOs just copy the wsdl files to the B1WS/WebReferences folder referenced from IIS. Then in your code after adding the web reference pointing to the UDO service you will be able to work with UDOs as you will do for any other DI object. Check chapter “User Defined Objects (UDOs)” in B1WS detailed documentation for more details, there is also a blog showing you a sample code adding a UDO instance.

The list of exposed objects is the following one, just have a look and check whether the object you need to use is already available:

DI Objects

  • BillOfExchangeTransactionsService, 
  • BudgetsService,
  • BusinessPartnersService, 
  • CorrectionInvoiceReversalService,
  • CorrectionInvoiceService,
  • CorrectionPurchaseInvoiceReversalService,
  • CorrectionPurchaseInvoiceService,
  • CreditNotesService,
  • DeliveryNotesService,
  • DownPaymentsService,
  • DraftsService,
  • DynamicSystemStringsService,
  • IncomingPaymentsService,
  • InventoryGenEntryService,
  • InventoryGenExitService,
  • InvoicesService,
  • ItemsService,
  • JournalEntriesService,
  • JournalVouchersService, 
  • MaterialRevaluationService,
  • OrdersService,
  • PaymentDraftsService,
  • ProductionOrdersService,
  • ProductTreesService,
  • PurchaseCreditNotesService,
  • PurchaseDeliveryNotesService,
  • PurchaseDownPaymentsService,  
  • PurchaseInvoicesService, 
  • PurchaseOrdersService,
  • PurchaseReturnsService,
  • QuotationsService,
  • ReturnsService,
  • SalesForecastsService,
  • SalesTaxAuthoritiesService, 
  • ServiceCallsService,
  • SpecialPricesService,
  • StockTransferDraftService,
  • StockTransferService,
  • UserFieldsMDService,
  • UsersService,
  • VendorPaymentsService,
  • WithholdingTaxCodesService,
  • WizardPaymentMethodsService

DI Services

  • AccountCategoryService
  • AccountsService
  • AlertManagementService
  • AlternativeItemsService
  • ApprovalStagesService
  • ApprovalTemplatesService
  • BankStatementsService
  • BOEDocumentTypesService
  • BOEInstructionsService
  • BOEPortfoliosService
  • BranchesService
  • BusinessPartnerPropertiesService
  • CashDiscountsService
  • CertificateSeriesService
  • CompanyService
  • CountriesService
  • CustomsDeclarationService
  • DepartmentsService
  • DimensionsService
  • DistributionRulesService
  • DNFCodeSetupService
  • DunningTermsService
  • EmployeeRolesSetupService
  • ExternalCallsService
  • FinancialYearsService
  • FormPreferencesService
  • MaterialRevaluationFIFOService
  • MessagesService
  • NatureOfAssesseesService
  • NCMCodesSetupService
  • PredefinedTextsService
  • ProfitCentersService
  • ProjectsService
  • ReportFilterService
  • ReportLayoutsService
  • SalesOpportunityCompetitorsSetupService
  • SalesOpportunityInterestsSetupService
  • SalesOpportunityReasonsSetupService
  • SalesOpportunitySourcesSetupService
  • SectionsService
  • SeriesService
  • ServiceCallOriginsService
  • ServiceCallProblemTypesService
  • ServiceCallSolutionStatusService
  • ServiceCallStatusService
  • ServiceCallTypesService
  • StatesService
  • UserMenuService

If you want to learn more on how to use the services provided by B1WS just have a look to the samples provided with B1WS setup.

We will like to use this Weblog as a way to receive and share your feedback about the Business One Web Services wrapper. Don’t hesitate and give us your opinion!

To report this post you need to login first.

59 Comments

You must be Logged on to comment or reply to a post.

  1. Luis Hidalgo
    Hi Maria, I was wondering if I can expose SB1 funcionality (such as creating a record in the database)into a WebService through this tool and then use that wsdl into a NetWeaver BPM project as an automated activity.

    I will really appreciate your help.

    (0) 
    1. Maria Trinidad MARTINEZ GEA Post author
      Hi Luis,

      I don’t know whether I understood your question but I’ll try to explain something around it.

      B1WS tool exposes as web services some of the features exposed by DI Server (the ones that are exposed as services, with a format that can be serialized). The goal of B1WS is to easily call the DI Server by using WebServices and objects instead of building the SOAP commands by hand in your application.
      Per each call to a  B1WS Web Service the B1WS handler will translate the web service into a DI Server call.
      You should not add extra Web Services into B1WS as they will not be managed by the DI Server afterwards and will throw errors.
      You can use the CompanyService with the method Query in order to send a SELECT query to B1 database tables (always passing through DI Server).
      Let me know if I did answer your question or not
      Best Regards
      Trinidad.

      (0) 
    2. Maria Trinidad MARTINEZ GEA Post author
      Hi Luis,

      I don’t know whether I understood your question but I’ll try to explain something around it.

      B1WS tool exposes as web services some of the features exposed by DI Server (the ones that are exposed as services, with a format that can be serialized). The goal of B1WS is to easily call the DI Server by using WebServices and objects instead of building the SOAP commands by hand in your application.
      Per each call to a  B1WS Web Service the B1WS handler will translate the web service into a DI Server call.
      You should not add extra Web Services into B1WS as they will not be managed by the DI Server afterwards and will throw errors.
      You can use the CompanyService with the method Query in order to send a SELECT query to B1 database tables (always passing through DI Server).
      Let me know if I did answer your question or not
      Best Regards
      Trinidad.

      (0) 
      1. Luis Hidalgo
        Hi Maria, thank you very much for the insight. However, my question was more directed to know if, for example, I can use one of those Web Services provided by B1WS as an automated activity in NetWeaver BPM. In NetWeaver BPM automated activities need to be linked to a wsdl or to a Web Service in the Services Registry. In that sense, I would like to know if I can use the functionality provided by B1WS an integrate it into a process in NetWeaver BPM. 
        (0) 
        1. Maria Trinidad MARTINEZ GEA Post author
          Hi Luis,

          So your goal is to do actions in B1 through B1WS web services from NetWeaver BPM. I don’t have any knowledge on NetWeaver BPM but if it is capable to call a web service then it should work. B1WS is simply exposing wsdl files. Any tool in top of B1WS adding a reference to B1WS wsdl files and using the services will be able then to work in top of B1WS. There are some samples provided with B1WS, maybe it can help you understand B1WS.

          Regards
          Trinidad.

          (0) 
          1. Luis Hidalgo
            Hi Maria,

            Thanks a lot for the answer, I will try to connect everything together and see how all of this works. As you say, If NetWeaver BPM is capable of calling wsdl files and using the Web services, then everything should work fine.

            Regards
            Luis.

            (0) 
  2. Emilio GT
    Maria,

    A customer of mine that uses SAP Business one has asked me to develop an e commerce application, that reads and writes data to SAPBO. I am not a SAP Buiseness One Partner, can I use this webservice to read and write to his SAPBO without putting the customer warranty with SAP BO at risk.

    Thanks

    (0) 
    1. Maria Trinidad MARTINEZ GEA Post author
      Hi Emilio,
      I can only help you in the technical side. Please ask your customer to get in contact with their local SAP contact in order to discuss about the need to be a partner to develop add-ons for SAP B1.
      Regarding the technical side question.
      B1WS can be used to develop an eComerce application, the customer needs to have a specific license for SAP B1 DIServer in order to be able to use B1WS (that is working on top of SAP B1 DI Server).
      Regards
      Trinidad.
      (0) 
  3. Wei Jie Pan
    Hi, can I use my customer fields in B1WS, for example, I make a customer field named ‘U_MyField’ in table OINV, how can I input a value to the field?
    thanks for your help!
    (0) 
    1. Maria Trinidad MARTINEZ GEA Post author
      Hi,

      You will need to regenerate the WebService having the UserField in order to get an extra property for the UDF. To regenarate the WebService you will need to run the WsdlServiceGenerator in the database containing the UDFs you want to work with.
      It is explained in the B1WS detailed documentation at http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c0904cbd-b47f-2a10-b689-f1d683c2285c (the link is accessible from the B1WS main page and blog SAP Business One Web Services wrapper 1.1, new web services available!).

      Regards
      Trinidad.

      (0) 
  4. Michael Baulch
    Just wondering if anyone is going to provide some instructions on using this with Win 2008?  I dont think many people are still using Win 2003.  I’ve had no end of problems trying to get this working.
    (0) 
      1. Michael Baulch

        Heres some tips for people that are going to use Windows 2008 and SQL 2008 (which is probably everyone now). Use the ‘Network Service’ account instead of the ASPNET account from the documentation. Also, you should set the app pool for the B1WS to use the classic .net app pool instead of the default app pool.<br/><br/>Finally on the loginservice.wsdl you need to modify it to add in the following lines.<br/><br/>* This one as another enumeration type under ‘Database Type'<br/><s:enumeration value=”dst_MSSQL2008″ /><br/><br/>* Then these two lines after the database type and before the company username line<br/><s:element minOccurs=”0″ maxOccurs=”1″ name=”DatabaseUsername” type=”s:string” /><br/><s:element minOccurs=”0″ maxOccurs=”1″ name=”DatabasePassword” type=”s:string” />

        (0) 
        1. Maria Trinidad MARTINEZ GEA Post author
          Hi Michael,

          Thanks for sharing your tips ;o)

          Only one comment: If you are using B1 8.8 you don’t need anymore to specify the DatabaseUsername and DatabasePassword (that’s why they have been removed in the latest B1WS version of the Login service).

          Best Regards
          Trinidad.

          (0) 
  5. John Slaats
    Hi,

    Is there an instruction off how to install the B1WS on a IIS7.

    The instruction works perfectly on IIS6. Even for a IIS newbe like me.

    Thanks,
    John

    (0) 
      1. Maria Trinidad MARTINEZ GEA Post author
        Hi,

        A partner has tried installation of B1WS on Windows 2008 and IIS7 (no IIS6 installed) and discovered that installation of .NET 4.0 was required in order to make B1WS work. If you encounter any problems while working with IIS7 please try to install .NET 4.0 and let me know if then B1WS works.

        Hope it helps
        Trinidad.

        (0) 
            1. Mark van der Steen
              Hi Trinidad,

              IIS 7 is now running in classic mode but now I have another error: (Could not load type ‘B1WSHandler’).

              I checkt all the security settings but i can’t find anything.

              I’m running B1WS 1.0 for SAp B1 2007

              (0) 
    1. Ilangovan Rajaram
      Hi John,

      For configuring you B1WS with Win 7 OS, you need to give access permission in Ur component services.

      Control Panel –>
      Administrator Tools –>
      Component Services.
         – Expand Component Services
         – Expand Computers
         – Expand My Computer
         – Click on “DCOM Config”
         – Right click SBODI_Server from the right side list
         – Goto secutiry tab & Add new security “SERVICE” for the 3 “Launch & Activation Permissions”, “Access Permissions” & “Configuration Permissions” by click edit.
         – After added these click “Ok”.

      For more info. shot me a mail.


      Warm Regards,

      Rajaram
      rajaram@alenu-it.com

      (0) 
  6. Karin Libinson
    Hello,

    We are trying to add a journal entry using B1WS – JournalEntriesService using version 1.1 for SBO 8.8.
    When trying to add the journal entry we are getting an exception – “transaction without amount”,althought there is an amount in each line.

    The code we are using is:

                Dim jeService = New WS_JournalEntriesService.JournalEntriesService()
                Dim je As WS_JournalEntriesService.JournalEntry = New WS_JournalEntriesService.JournalEntry()

                Dim msgHeader = New WS_JournalEntriesService.MsgHeader()
                msgHeader.SessionID = sessionID
                msgHeader.ServiceName = WS_JournalEntriesService.MsgHeaderServiceName.JournalEntriesService
                msgHeader.ServiceNameSpecified = True
                jeService.MsgHeaderValue = msgHeader

                je.ReferenceDate = Date.Now

                je.JournalEntryLines = New WS_JournalEntriesService.JournalEntryJournalEntryLine(1) {}

                je.JournalEntryLines(0) = New WS_JournalEntriesService.JournalEntryJournalEntryLine()
                je.JournalEntryLines(0).ShortName = “1000”
                je.JournalEntryLines(0).Debit = 100
                je.JournalEntryLines(0).FCDebit = 25
                je.JournalEntryLines(0).FCCurrency = “$”

                je.JournalEntryLines(1) = New WS_JournalEntriesService.JournalEntryJournalEntryLine()
                je.JournalEntryLines(1).ShortName = “1001”
                je.JournalEntryLines(1).Credit = 100
                je.JournalEntryLines(0).FCCredit = 25
                je.JournalEntryLines(0).FCCurrency = “$”

                Dim stParams As WS_JournalEntriesService.JournalEntryParams

                stParams = jeService.Add(je)

    Please advice, thanks in advance.
    Best regards
    Karin

    (0) 
    1. Maria Trinidad MARTINEZ GEA Post author
      Hi Karin,

      You are filling the Debit and FCDebit properties in each line but you forgot to set the Specified property per each one of those fields to true.

      It is explained in the B1WS documentation the following:
      Per each object property with a type different of string an associated Boolean property with the same name but finishing with “Specified” is automatically created by .NET environment. You are forced to set this property value to “true” if you want the associated property to be correctly set in the DI Server SOAP
      message automatically formatted.

      Hope it helps
      Trinidad.

      (0) 
  7. Omer Lizerovsky
    Hi Trinidad,

    Is the B1WS supports the StockTaking object?

    If not, can I manually create the WSDL (using the XSD) for this object and use it with the B1WS?

    Best regards,
    Omer

    (0) 
  8. David Brown
    Hi, I have installed SAP B1 and the B1WS wrapper and followed the instructions in the B1WS.doc verbatim.

    SAP B1 is running
    MSSQL server is running
    SAP B1WS wrapper is running
    IIS is running

    Running the B1 Web Services sample Login tab returns the following in the B1DI_Server.log

    L_NOT_AUTHENTICATED

    (0) 
  9. Stephen Bryne

    Hi Trinidad,

    can you give an example of adding a new ContactEmployee to a Business Partner? I can update the BP Master no problem using the B1WS but the ContactEmployees member collection is read-only and there doesn’t seem to be a separate ContactEmployees Service? many thanks,Stephen

    (0) 
    1. VIJAY RAJ PALANISAMY

      Hi trinidad,

              i  developed the integration application for adding business partner master data by using BusinessPartnerService   WSDL web service,but i am unable to rectify the error

      “SOAP Exception was Unhandled by UserCode — 10000908 – Enter P.A.N. number for business partner.How can i solve this Issuse.

      If u done this before can u kindly share your Knowledge!!!

      I hope for your reply!!!

      (0) 
      1. Ravi Sheth

        hi Vijay,

        to solve this issue you need to add the code of the withholding tax to tNO.

        this will be help you to solve the error.

        Thanks,

        Ravi.

        (0) 
  10. Ian Galloway

    Is there more documentation on each service exposed? Like the methods and properties? I am trying to figure out which property to use for gl account code to pass into documentline object

    (0) 
  11. Soraia Cruz

    Hello Trinidad.

    I am working with UDO’s in B1WS.

    The wsdl that I generated with “WsdlServicesGenerator.exe” provided me the method in Netbeans “InvokeMethod,” I realized that “InvokeMethod” gives me access to all the fields of the object, which is what I intend to achieve.

    But I have an error on execution:

    javax.xml.ws.soap.SOAPFaultException: Path name or invalid dll

    [@ EBR_OFNC.CreateTime]

    Can you help me solve this problem?

    Is it possible to use B1WS with Java like we use B1IF (without a web application)? If yes can you tell me the URL i have to use to execute the wsdl on server?

    Thanks a lot,

    Soraia Oliveira

    (0) 
  12. Pieter Roos

    Hi Trinidad,

    I have this issue using the B1WS that it appears to fail because it seems to me it does not close connections (increasing or decreasing the number of connections affects the period between errors). When it fails it stops processing requests and returns unclear errors. After a restart everything works again and the same requests are accepted without errors.

    http://scn.sap.com/thread/3304886

    Thanks for any help!

    (0) 
  13. VIJAY RAJ PALANISAMY

    Dear All,

            i  developed the integration application for adding business partner master data by using BusinessPartnerService   WSDL web service,but i am unable to rectify the error

    “SOAP Exception was Unhandled by UserCode — 10000908 – Enter P.A.N. number for business partner”

    (0) 
  14. Kishore Yerra

    Hi Maria,

    I would want to consume one of the DI service in external Application and I would want to know where can i find details of input/output parameters of each service

    e.g. DeliveryNotesService (What would be input and what would this service return)

    Many thanks in advance.

    Regards,

    Kishore

    (0) 
    1. Brenden Draper

      Hi All,

      I am looking for the Inventory Counting B1Object,Service or Function to update existing Inventory Counting quantities.

      I noticed that the DI API SAP 9 PL10 exposes the Inventory Counting but not PL6.

      Please assist…

      Kind Regards,

      Brenden Draper

      (0) 
            1. Brenden Draper

              Hi Raphael,

              Its only exposed in B1IF on SAP 9 PL bigger than 6.

              Do you want .NET (C#) code or the B1IF xsl code ?

              Kind Regards,

              Brenden Draper

              (0) 
  15. Joerg Aldinger

    In case you are installing B1WS on a server with a newer Windows/IIS version, here is some information about the configuration (which I think should be included in the original documentation):

    • The installer automatically creates a new IIS Application Pool called AppPool4B1WS, using .NET 4 and Integrated Pipeline mode. This is correct and does not need to be changed.
    • When configuring DCOM security, as per the manual, the correct user account to give the permissions to is IIS AppPools\AppPool4B1WS (account on local machine, not domain). No need to give rights to ASP.NET account, IUSR, NetworkService or any other account. You will have to type in the account name and then click “Check name”, it will not be listed by default.
    • Make sure ASP.NET 4 or later has been enabled as a feature within the IIS server role, or else you will get a 500.21 internal server error when connecting to B1WS.

    Hope that saves some of you some time in the future.

    All the best,

    Joerg.

    (0) 
    1. Andi Admin

      Hello,

      i tried your solution instead of using AppPool4B1WS with NetworService, but the OS refuses to accept “IIS AppPools\AppPool4B1WS” as local user to assign permissions to. Is the spelling the same independat of OS language used? We have Windows 2008 R2 german.

      Thanks

      Andi

      (0) 
      1. RZASA Artur

        Hi Ravi,

        That seems to go down the SDK path, which we are looking into.

        We were hoping that we could use Web Services as that has a quicker development time for us and easier to maintain.

        But it looks like maybe SAP is not updating WS as much/anymore and so the SDK may be the only way forward.

        Thanks for reaching out.

        Artur

        (0) 
      2. RZASA Artur

        As it seems the wrapper is no longer being updated, we have gone with DI API and that is working great. A little extra development time but all good now.

        Thanks again.

        (0) 
        1. Joerg Aldinger

          Hello Artur:

          DI Server itself is likely to be phased out in the future in favor of the “Service Layer” in B1 HANA. As an intermediate solution you could use DI API, as you seem to have decided, or set up the required Web Services in the B1 Integration Solution.

          Best regards,

          Joerg.

          (0) 
          1. RZASA Artur

            Thanks for the heads up Joerg.

            Do you know of any documentation for Web Services with B1 Integration Services, so we can start to look at this for when DI drops off?

            (0) 
  16. Pedro Coelho

    Hi All,

    Do you have any news about a possible new version of B1WS for SAP B1 9.1?

    Any ideia if/when it will be available? Or is that B1WS will not be updated anymore for the new versions of SAP B1 and SQL Server?

    Thanks in advance for the information.

    Kind regards,

    Pedro V. Coelho

    (0) 
    1. RZASA Artur

      Hi Pedro,

      There is no longer a wrapper available for 9.1, it is not going to happen. We have built our own solution now using DI API, and this is working great. Please note from Joerg:-

      DI Server itself is likely to be phased out in the future in favor of the “Service Layer” in B1 HANA. As an intermediate solution you could use DI API, as you seem to have decided, or set up the required Web Services in the B1 Integration Solution.

      (0) 

Leave a Reply