在.net或sharepoint中使用SAP Web Service

时间:2013-07-10 08:27:20

标签: web-services sap

我收到了SAP团队的这三个链接。

http://nmb.net:2525/sap/opu/odata/sap/empl/

服务文档的网址:

http://nmb.net:2525/sap/opu/odata/sap/empl/?$format=xml

元数据的网址:

http://nmb.net:2525/sap/opu/odata/sap/empl/?$metadata

如果我在浏览器中打开它,我会得到这个结果:

<app:service xml:lang="en" xml:base="http://os0.nmb.net:2525/sap/opu/odata/sap/ZEMPLOYEERFCGEBO/">
<app:workspace>
<atom:title type="text">Data</atom:title>
<app:collection sap:deletable="false" sap:content-version="1" href="EmployeeCollection">
<atom:title type="text">EmployeeCollection</atom:title><sap:member-title>Bank</sap:member-title>
</app:collection>
</app:workspace>
<atom:link rel="self" href="http://os0wdddc.ores.net:8021/sap/opu/odata/sap/ZEMPLOYEERFCGEBO/"/>
<atom:link rel="latest-version" href="http://os0wdddc.ores.net:8021/sap/opu/odata/sap/ZEMPLOYEERFCGEBO/"/>
</app:service>

这是我们通常得到的wsdl吗?当我在.net中创建自定义服务并在浏览器中查看时,如何格式化上面的URL以获取一些数据?

修改1:

如果我使用提供的URL并在visual studio项目中添加服务引用,我会得到:

Operations: WCF Data Service: No operations found

1 个答案:

答案 0 :(得分:0)

它相当简单。打开元数据(通过在浏览器中打开http://os0.nmb.net:2525/sap/opu/odata/sap/ZEMPLOYEERFCGEBO/?$ metadata),然后在URL末尾附加实体集的名称。请参阅几个示例herehere