How do I return a strongly typed dataset from a PSI extension

G

Guest

I really like the way many of the Office Project Server 2007 web services
return strongly typed datasets. For example, when you examine the Project web
service wsdl you see that the ReadProjectResponse is defined as:

<s:element name="ReadProjectResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="ReadProjectResult">
<s:complexType>
<s:sequence>
<s:any
namespace="http://schemas.microsoft.com/office/project/server/webservices/ProjectDataSet/"
/>
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>

I am working on a PSI web service extension and would like to implement a
similar interface. Following the SDK guidance and PSIExtensions example
everything is easy and straight forward. If I add another method that returns
a strongly typed dataset things get complicated. For example:

[WebMethod]
public HelloWorldPSI.AssignmentData Test()
{
HelloWorldPSI.AssignmentData dsAssn = new AssignmentData();
HelloWorldPSI.AssignmentData.AssignmentsRow assnRow =
dsAssn.Assignments.NewAssignmentsRow();

return dsAssn;
}

If I execute the following disco command:

c:\disco http://localhost:56737/SharedServices1/PSI/HelloWorldPSI.asmx >
results.htm 2>&1

My AssignmentData.xsd file is copied and the resulting disco file includes:

<s:element name="TestResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="TestResult">
<s:complexType>
<s:sequence>
<s:any namespace="http://tempuri.org/AssignmentData.xsd" />
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>

If I try to update the web reference in the HelloWorldPSIClient, the update
fails indicating a problem with downloading the wsdl.

Now it is clear that I am missing a couple of things here. The tempuri.org
namespace obviously isn't right. I have tried several variations, but haven't
gotten it to work.

If anyone has figured out how to do this I would really appreciate an example
or pointers.

Bob
 
P

Paul Conroy

Hi Bob

Can I suggest you re-post your question to the Project Developer forum ?

Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top