The moment you start going through the 43 page OBA SAP SAK 2.0 installation document you will realize that once you come to the end which is installing the ADF components for Sharepoint Server 2007 BDC web parts, it doesn’t work. When you try to put a BDC web part for the ADF’s, you get an error which states that something has happened and look for the log file. I was wondering what happened and which log file? So I decided to take this off my demo that I was preparing for a major event next day as it was very late night. I went back home and started to dig what the issue was about and it turned out to be that the SAPBridge web services were a bit outdated. The webservices are quite improved with the new versions of SAP Netweaver (the version I am using is 7.0) hence the code needs to be updated. While the old versions of SAP had a multitude of webservices, which is 3 different in the original SAP SAK code, the new versions had a few with updated namespaces, method names and URLs. The schemas and method signatures is not drastically different, but needs a bit of a modification.
I dropped all web service definitions and created two instead for the following:
- Z_FLIGHTCUSTOMER_WS : http://<SAP Host Name>:8000/sap/bc/srt/rfc/sap/Z_FLIGHTCUSTOMER_WS?sap-client=000
- Z_FLIGHT_WS : http://<SAP Host Name>:8000/sap/bc/srt/rfc/sap/Z_FLIGHT_WS?sap-client=000
Wait, read the rest, although this is a simple ad web reference or add service reference exercise it doesn’t work as expected:
First and foremost, instead of directing the wizard to the above url, you should get the wsdl and copy it to a local text file. Then you need to do a Ctrl+H (find and replace) job. Do the following
Save the files with a WSDL extension are you’re all set. Point your browser to the file and generate the proxies, don’t forget to change the URL in the web.config pointing to your SAP Server.
Second, once you create your proxies and try connecting to SAP you might get the error “Virtual Interface not found” (I got this with the FLIGHTCUSTOMER web service but other one was working) You keep on wondering what virtualization and what interface, it turns out to be that this related with the SAP side. You can follow the below steps to resolve the issue or ask you SAP administrator for help.
Symptom: The attempted use of an SAP BW query returns a virtual interface not found error: Error 32010: Cannot execute query. No result returned or XML returned in the result contains an error. Virtual Interface not found.
The reason is that the virtual interface … is not activated or needs to be reactivated.
- Log on to SAP, go to the Object Navigator (Transaction SE80), and click on the Edit Object button.
- On the Enterprise Services tab, select the Virtual Interface radio button and enter the name of the virtual interface.
- Click on the Continue icon.
- In the next screen, click on the Activate button. The Virtual Interface is activated.
Last but not least, if you’re using Add Service Reference and decide using WCF instead of asmx, you should change the binding at the client side after creating the proxy, it doesn’t work with the standard bindings the custom binding that worked for me is below.
<?xml version="1.0" encoding="utf-8" ?>
<textMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16"
<readerQuotas maxDepth="10000000" maxStringContentLength="10000000"
maxArrayLength="67108864" maxBytesPerRead="65536" maxNameTableCharCount="100000" />
<httpTransport authenticationScheme="Basic" bypassProxyOnLocal="false"
proxyAuthenticationScheme="Basic" realm="NSP" useDefaultWebProxy="true" maxReceivedMessageSize="653630" />
<endpoint address="http://<SAP Host Name>:8000/sap/bc/srt/rfc/sap/Z_FLIGHT_WS?sap-client=000"
contract="ServiceReference1.Z_Flight_WS" name="Z_Flight_WSSoapBinding" />
I have posted the updated version of SAPBridge web services to the following location http://sapbridge.codeplex.com
Happy Integration projects with SAP.