Showing posts with label Deployment. Show all posts
Showing posts with label Deployment. Show all posts

Tuesday, January 18, 2011

RFC related Web Service doesn't seem to update

Situation:

You are exposing a RFC through Biztalk as a Web Service.
An update was made on the RFC and on development environment, and works well. When passing to test/production environment still refers to the old version.

Solution:


You can even delete the application, it has nothing to do with that DLL. The problem is that for applications related to RFC, Biztalk generates another DLL, refering only to the RFC schema. Supposing that all RFC's are SAP-made and unchangeable, those DLL's are not updated when you reinstall your app.

The only way to avoid that problem is:
  • Delete that DLL at a folder similar to C:\Program Files\Microsoft BizTalk Adapter v2.0 for mySAP Business Suite\Bin
  • Install your app MSI
  • Restart application, Host Instance and local IIS

    Thanks to http://timrayburn.net/blog/learning-adapters-sap/
  • Thursday, January 14, 2010

    Pipelines in Biztalk

    Creating pipelines in ports: knowing when to use PassThru Pipelines, XML Pipelines, and when to use Custom Pipelines.

    A PassThru pipeline is straightforward. On a ReceiveLocation it receives a file without further treatment, validation or field promotion. The clear text message can be captured by a Send Port with filter by Receive Port.

    A XML Pipeline is more complex. It analyses the received file and determines its structure. Properties are promoted and therefore more kinds of filters become available (specially the useful namespace).

    In a XML pipeline there are no limitations. The schemas can by converted, envelopes can be splitted, all options are available under the properties section. To avoid time-consuming configurations in that area – and reduce error-proneness – a Custom Pipeline should be made. It stores the configuration inside the DLL and thus can be reused in another port, or even exported to another environment without dues.

    The same logic applies to SendPipelines. Usually a PassThruTransmit is enough because the message is already known in Biztalk. If a format change is needed (to Flat File i.e.) an XMLTransmit with the adequate assembler is the only option. And to place that configuration at development level, a Custom Pipeline.


    Hint: For the Flat File Assembler there is no need to select a schema. According to this MSDN page If no schema is specified, run-time schema discovery is done. It was tested and confirmed. It makes development a lot easier:
  • by reducing the number of pipelines. There's no need for multiple assembler pipelines. Instead of one pipeline for each schema, a single pipeline can be used by the entire application.
  • by making them faster to upgrade. When refering schemas from external DLL's, the assembly version is required. In the past if that DLL was changed (it happens in our dev environment on a weekly basis) we had to manually correct each map and pipeline. Now the pipelines are not a problem.
  • Friday, September 18, 2009

    WCF service publishing wizard settings

    Did you ever had to republish a web service over and over again? Is it fun to go through the wizard and add the methods one by one?

    We were having that problem. The idea was to make a connection between SAP and Sharepoint through web services created by Biztalk. An RFC in SAP receives the request and returns the values to Sharepoint that will use them to create a page. To comunication was quick and stable, but I was losing my mind and time creating the services one by one. Let's see the process step by step with focus on Biztalk:

    1. the new RFC is created in SAP (not my problem)
    2. Biztalk imports reference with the SAP Adapter (easy)
    3. build and deploy dll (too easy)

    4. recreate service through Biztalk WCF Publishing Wizard
    4.1 select Transport Type
    4.2 enable Metadata endpoint
    4.3 select Biztalk application
    4.4 select "publish schemas"
    4.5 rename Web Service
    4.6 rename Web Method
    4.7 define schema type for request and for response, enlarging both the columns to read the schema type
    4.8 repeat 4.6 and 4.7 for every single RFC, old or new...
    4.9 define namespace
    4.10 define the same service location with overwrite
    4.11 allowing anonymous access
    4.12 press Create

    5 update reference on client
    6 do some new methods
    7 test

    The best way to reduce time on Biztalk is never to press the Finish button. Going back the settings are all there and you can deploy it again.

    But there is a better way... I googled for this situation. On this blessed link I found the answers for all my problems. Well, at least for this one.
    So, the deployment stores the configuration inside wwwroot. And more! It is understandable and can be edited!

    I simply made a batch file to call the wizard with the parameter
    cd C:\Program Files\Microsoft BizTalk Server 2006\
    BtsWcfServicePublishingWizard -WcfServiceDescription=C:\Inetpub\wwwroot\BizTalkWcfService\App_Data\Temp\WcfServiceDescription.xml

    and now my work is just with steps 4.3, 4.4, 4.6, 4.7, 4.9, 4.12. The annoying configuration of all old methods, and more than half the checkbox clicks are made for me.

    Question: Shouldn't the wizard allow the loading of a xml file?

    Registering adapters while publishing services

    The Messaging Engine failed to register the adapter for "WCF-BasicHttp" for the receive location "*/*.svc". Please verify that the receive location exists, and that the isolated adapter runs under an account that has access to the BizTalk databases.


    This time the problem is not on BizTalk but on IIS. The Application Pool for this website must be running not under a predefined service, but on an account with permissions over Biztalk.

    Solution:


    Create a new Application Pool for Biztalk, and on the Identity Tab select Configurable and insert the login. Associate the Web Site to this new app and refresh the svc page.