在.net中使用p6 web服务

时间:2011-09-30 18:13:29

标签: wcf web-services interop weblogic primavera

Primavera P6上安装了很多Web服务。 WSDL:ActivityCodeAssignment.wsdl

主键字段:由以下元素组成的多部分键:

ActivityObjectId
ActivityCodeTypeObjectId

目标命名空间:http://xmlns.oracle.com/Primavera/P6/WS/ActivityCodeAssignment/V1

默认传输网址:

http://<hostname>:<port number>/p6ws/services/ActivityCodeAssignment?wsdl
https://<hostname>:<port number>/p6ws/services/ActivityCodeAssignment?wsdl 

但是如果我在网络浏览器上输入这个:     http://my-machine:7005/p6ws/services/ActivityCodeAssignment?wsdl

它显示“找不到服务。”

如果我尝试在Visual Studio中添加服务引用,它会说。

There was an error downloading 'http://my-machine:7005/p6ws/services/ActivityCodeAssignment?wsdl'.
The request failed with HTTP status 404: Not Found.
Metadata contains a reference that cannot be resolved: 'http://my-machine:7005/p6ws/services/ActivityCodeAssignment?wsdl'.
There was no endpoint listening at http://my-machine:7005/p6ws/services/ActivityCodeAssignment?wsdl that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
The remote server returned an error: (404) Not Found.
If the service is defined in the current solution, try building the solution and adding the service reference again.

P6是否使用了一些不同的Web服务?

2 个答案:

答案 0 :(得分:3)

在我的机器上运行Oracle数据库,带有P6版本8.1 Web服务的Weblogic服务器,其URL是:

http://<hostname>:<port number>/p6ws/services/ActivityCodeAssignmentService?wsdl

请注意最后加上“服务”一词。

答案 1 :(得分:0)

不确定您使用的是哪个版本的P6。

首先,请检查根网站服务网址是否有效:

[HTTP://主机名:端口/ p6ws]

如果没有,您可能需要检查P6 Web服务是否已正确安装和部署。

这是版本7.0的P6 Web服务管理员指南:

http://docs.oracle.com/cd/E16281_01/Technical_Documentation/Web_Services/wsadmin.pdf

如果您可以访问根Web服务和其他端点,例如ActivityService [http:// host:port / p6ws / services / ActivityService?wsdl]而不是ActivityCodeAssignmentService,但您想要使用它,则可能需要构建你自己的WS Stubs有以下步骤:

  
      
  1. 使用名称P6WSStubs
  2. 在.NET中创建一个类库项目   
  3. 将根名称空间更改为Primavera
  4.   
  5. 添加对Microsoft WSE 3.0的引用。
  6.   
  7. 添加以下Web参考Ws.P6.ActivityCodeAssignment - [http:// hostname:port / p6ws / services / ActivityCodeAssignmentService?wsdl]
  8.   
  9. 构建P6WSStubs.dll
  10.   

希望它会对你有帮助,

瑜珈