G
Guest
I have written a PSI extension called ClientPSISvc.
I need some help figuring out how to pass strongly typed dataset
between the ClientPSISvc web service and its clients.
Passing a common System.Dataset is not a problem and I am using
this approach as an interim solution. The problem with this approach
is that the schema is not transmitted with the dataset and I am
subsequently required to validate and copy or merge the received
dataset into a local typed dataset. This is messy and inefficient to say
the least.
I can create and build a web service method that passes typed
datasets in Visual Studio without any difficulties. The problem
surfaces later in the deployment process with the Web Service
Description Language (WSDL) file.
Let me step through the process…
If I add the following Test method to the ClientPSISvc web service,
it builds without any problem:
[WebMethod]
public ClientPSISvc.AssignmentData Test()
{
ClientPSISvc.AssignmentData dsAssn = new AssignmentData();
ClientPSISvc.AssignmentData.AssignmentsRow assnRow =
dsAssn.Assignments.NewAssignmentsRow();
return dsAssn;
}
After moving the web service library to the project server the
DISCO and WSDL files are created by executing the following Disco
command line:
c:\disco http://localhost:56737/SharedServices1/PSI/ClientPSISvc.asmx
If I then open one of my client application projects in Visual Studio
and tell it to Update the Web Reference for this web service a
Discovery Service warning dialog pops up indicating:
“Unable to download following files from
http://cbpcargops3/_vti_bin/psi/ClientPSISvc.asmx?wsdl”
If I use this URL to open the WSDL in a web browser, no errors are
encountered. However, closer observation reveals the following
oddity in the TestResponse node:
<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>
Clearly the tempuri.org namespace is rubbish. I figured out where
and how to change this reference in the Visual Studio designer, but
none of the namespace variations that I tried had any impact on the
problem.
It may be worth mentioning that because this web service is being
deployed as a Project Server Interface (PSI) extension, the WSDL and
DISCO files are generated in the
C:\Program Files\Common Files\Microsoft Shared\web server
extensions\12\ISAPI\PSI
directory. The XML header information, the SOAP and SOAP12
addresses in the WSDL are edited manually per instructions in the
Project Server SDK (Reference http://msdn2.microsoft.com/en-us/
library/bb428837.aspx#pj12_PSIExtension_GeneratingDisco).
I have observed that when I execute the Disco command line
mentioned earlier, an AssignmentData.xsd file is created in the
same directory with the DISCO and WSDL files.
While I know the tempuri.org namespace isn’t right, I suspect
it is not the root of my problem. It seems to me that the issue
is more likely to be some obscure (at least to the ignorant)
mechanism that links (in this example) AssignmentData.xsd
to the WSDL.
I would really really really like to get through this knot hole.
Any assistance you might be able to coordinate would be
greatly appreciated.
Bob
I need some help figuring out how to pass strongly typed dataset
between the ClientPSISvc web service and its clients.
Passing a common System.Dataset is not a problem and I am using
this approach as an interim solution. The problem with this approach
is that the schema is not transmitted with the dataset and I am
subsequently required to validate and copy or merge the received
dataset into a local typed dataset. This is messy and inefficient to say
the least.
I can create and build a web service method that passes typed
datasets in Visual Studio without any difficulties. The problem
surfaces later in the deployment process with the Web Service
Description Language (WSDL) file.
Let me step through the process…
If I add the following Test method to the ClientPSISvc web service,
it builds without any problem:
[WebMethod]
public ClientPSISvc.AssignmentData Test()
{
ClientPSISvc.AssignmentData dsAssn = new AssignmentData();
ClientPSISvc.AssignmentData.AssignmentsRow assnRow =
dsAssn.Assignments.NewAssignmentsRow();
return dsAssn;
}
After moving the web service library to the project server the
DISCO and WSDL files are created by executing the following Disco
command line:
c:\disco http://localhost:56737/SharedServices1/PSI/ClientPSISvc.asmx
results.htm 2>&1
If I then open one of my client application projects in Visual Studio
and tell it to Update the Web Reference for this web service a
Discovery Service warning dialog pops up indicating:
“Unable to download following files from
http://cbpcargops3/_vti_bin/psi/ClientPSISvc.asmx?wsdl”
If I use this URL to open the WSDL in a web browser, no errors are
encountered. However, closer observation reveals the following
oddity in the TestResponse node:
<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>
Clearly the tempuri.org namespace is rubbish. I figured out where
and how to change this reference in the Visual Studio designer, but
none of the namespace variations that I tried had any impact on the
problem.
It may be worth mentioning that because this web service is being
deployed as a Project Server Interface (PSI) extension, the WSDL and
DISCO files are generated in the
C:\Program Files\Common Files\Microsoft Shared\web server
extensions\12\ISAPI\PSI
directory. The XML header information, the SOAP and SOAP12
addresses in the WSDL are edited manually per instructions in the
Project Server SDK (Reference http://msdn2.microsoft.com/en-us/
library/bb428837.aspx#pj12_PSIExtension_GeneratingDisco).
I have observed that when I execute the Disco command line
mentioned earlier, an AssignmentData.xsd file is created in the
same directory with the DISCO and WSDL files.
While I know the tempuri.org namespace isn’t right, I suspect
it is not the root of my problem. It seems to me that the issue
is more likely to be some obscure (at least to the ignorant)
mechanism that links (in this example) AssignmentData.xsd
to the WSDL.
I would really really really like to get through this knot hole.
Any assistance you might be able to coordinate would be
greatly appreciated.
Bob