Getting LOB metadata from SAP, OracleDB and Siebel adapter using svcutil


The WCF based adapters that ship in the Biztalk Adapter Pack are WCF bindings. The svcutil tool can be used to get metadata for a LOB method using these bindings. The scheme in the URI determines which adapter binding is loaded by svcutil. However when using the svcutil tool, there is no easy way to specify the LOB credentials that should be used to get metadata from the LOB. One way to specify the LOB credentials to our adapters is to set it in the URI. However, by default (for security reasons) the adapters do not accept credentials in the URI.


To get around this, you need to set the binding property acceptCredentialsInUri to true and then specify the LOB credentials in the URI. To be able to set binding properties or other custom settings when using svcutil.exe, you should use the svcutil.exe.config file. This article describes how to use it.


Attached is a sample svcutil.exe.config which has the endpoint and binding configurations for all the three adapter bindings. Place this in the same folder as svcutil.exe.


The following are sample command lines to use to get metadata from our adapters.



SvcUtil.exe “sap://user=youruser;passwd=yourpassword;Client=800;lang=EN@A/adapsap47/00?op=http://Microsoft.LobServices.Sap/2007/03/Rfc/RFC_GET_FUNCTION_INTERFACE”


SvcUtil.exe “oracledb://User=MYUSER;Password=MYPASSWORD@ADAPTER/?op=http://Microsoft.LobServices.OracleDB/2007/03/SCOTT/Table/AEMP/Insert”


SvcUtil.exe “siebel://Username=MYUSER;Password=MYPASSWORD@mssebldemo:2321?SiebelObjectManager=SSEObjMgr_enu&SiebelEnterpriseServer=ent771&Language=enu&op=http://Microsoft.LobServices.Siebel/2007/03/BusinessObjects/Account/Agreement/Query”


Note the quotation mark around the URI. In the configuration for Siebel (in the attached config file) also note the idleConnectionTimeout without which it will take the default 1 minute for svcutil to terminate. Look for more details on the idleConnectionTimeout in a separate post on Siebel.


Note also that if you use the Add Adapter Service Reference tool (that gets installed with the WCF LOB Adapter SDK) to get metadata for a LOB method for use in a C# or VB project, the AcceptCredentialsInUri binding property will not be visible or settable. You can set the LOB credentials using the credentials tab in the tool.

svcutil.exe.config

Comments (2)

  1. Rvodela says:

    I’am using XP Service pack 2 VS 2008, VS 2005

    without BIZZTALK. When I create a project and right click the project I dont find "Add adapter reference" n the menu and hence I’am not able to try out the WCF connector for SAP.

    I have installed all the components including SDK and Adapter pack as specified in the documentation

    I look forward to hearing about how to solve this issue

  2. MSDN Archive says:

    Hey,

    Can you pls post this question on the Adapters Forum also?

    http://social.msdn.microsoft.com/Forums/en-US/biztalkr2adapters/threads/

    When you installed the ASDK, did you go for typical install or custom install?

    In order to see the "Add Adapter Service Reference" option, you need to

    a. select Full installation option or

    b. In Custom installation option, select the "Tools" option also.

    Pls let us know if this works (on the Forums web page 🙂 ).

    Thanks,

    Murali