Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

771 lines
31 KiB

  1. using System;
  2. using System.IO;
  3. using System.Diagnostics;
  4. using System.Net;
  5. using System.Web.Services;
  6. using System.Web.Services.Description;
  7. using System.Web.Services.Protocols;
  8. using System.Xml;
  9. using System.Xml.Serialization;
  10. using System.Xml.Xsl;
  11. using System.Xml.XPath;
  12. using System.Text;
  13. using Microsoft.Uddi;
  14. using Microsoft.Uddi.Authentication;
  15. using Microsoft.Uddi.VersionSupport;
  16. using Microsoft.Uddi.Binding;
  17. using Microsoft.Uddi.Business;
  18. using Microsoft.Uddi.Service;
  19. using Microsoft.Uddi.ServiceType;
  20. using Microsoft.Uddi.Extensions;
  21. using Microsoft.Uddi.Web;
  22. namespace Microsoft.Uddi
  23. {
  24. /// <summary>
  25. /// UddiOperator is the class the user will use to send their Uddi messages.
  26. /// </summary>
  27. public class UddiOperator
  28. {
  29. private SoapClient soapClient;
  30. private AuthenticationMode authenticationMode;
  31. private bool refreshAuthToken;
  32. public UddiOperator()
  33. {
  34. soapClient = new SoapClient();
  35. }
  36. public string Url
  37. {
  38. get { return soapClient.Url; }
  39. set { soapClient.Url = value; }
  40. }
  41. public SoapHttpClientProtocol HttpClient
  42. {
  43. get { return ( SoapHttpClientProtocol ) soapClient; }
  44. }
  45. public bool RefreshAuthToken
  46. {
  47. get { return refreshAuthToken; }
  48. set { refreshAuthToken = value; }
  49. }
  50. public UddiVersion Version
  51. {
  52. get { return soapClient.Version; }
  53. set { soapClient.Version = value; }
  54. }
  55. public AuthenticationMode AuthenticationMode
  56. {
  57. get { return authenticationMode; }
  58. set
  59. {
  60. authenticationMode = value;
  61. if( Microsoft.Uddi.AuthenticationMode.WindowsAuthentication == authenticationMode )
  62. {
  63. soapClient.Credentials = CredentialCache.DefaultCredentials;
  64. soapClient.PreAuthenticate = true;
  65. }
  66. }
  67. }
  68. /////////////////////////////////////////////////////////////////////////////////////////////////
  69. /// Uddi Authentication API messages
  70. /////////////////////////////////////////////////////////////////////////////////////////////////
  71. public DispositionReport Send( DiscardAuthToken discardAuthToken, AuthToken authToken )
  72. {
  73. if( discardAuthToken.AuthInfo != authToken.AuthInfo )
  74. {
  75. discardAuthToken.AuthInfo = authToken.AuthInfo;
  76. }
  77. return soapClient.DiscardAuthToken( discardAuthToken );
  78. }
  79. public AuthToken Send( GetAuthToken getAuthToken)
  80. {
  81. AuthToken authToken = soapClient.GetAuthToken( getAuthToken );
  82. authToken.OriginatingAuthToken = getAuthToken;
  83. return authToken;
  84. }
  85. /////////////////////////////////////////////////////////////////////////////////////////////////
  86. /// Uddi Publish API messages
  87. /////////////////////////////////////////////////////////////////////////////////////////////////
  88. public RegisteredInfo Send( GetRegisteredInfo getRegisteredInfo, AuthToken authToken )
  89. {
  90. SetAuthToken( getRegisteredInfo, authToken );
  91. try
  92. {
  93. return soapClient.GetRegisteredInfo( getRegisteredInfo );
  94. }
  95. catch( UddiException uddiException )
  96. {
  97. AttemptRefreshAuthInfo( uddiException, authToken );
  98. return soapClient.GetRegisteredInfo( getRegisteredInfo );
  99. }
  100. }
  101. public DispositionReport Send( DeleteBinding deleteBinding, AuthToken authToken )
  102. {
  103. SetAuthToken( deleteBinding, authToken );
  104. try
  105. {
  106. return soapClient.DeleteBinding( deleteBinding );
  107. }
  108. catch( UddiException uddiException )
  109. {
  110. AttemptRefreshAuthInfo( uddiException, authToken );
  111. return soapClient.DeleteBinding( deleteBinding );
  112. }
  113. }
  114. public DispositionReport Send( DeleteBusiness deleteBusiness, AuthToken authToken )
  115. {
  116. SetAuthToken( deleteBusiness, authToken );
  117. try
  118. {
  119. return soapClient.DeleteBusiness( deleteBusiness );
  120. }
  121. catch( UddiException uddiException )
  122. {
  123. AttemptRefreshAuthInfo( uddiException, authToken );
  124. return soapClient.DeleteBusiness( deleteBusiness );
  125. }
  126. }
  127. public DispositionReport Send( DeleteService deleteService, AuthToken authToken )
  128. {
  129. SetAuthToken( deleteService, authToken );
  130. try
  131. {
  132. return soapClient.DeleteService( deleteService );
  133. }
  134. catch( UddiException uddiException )
  135. {
  136. AttemptRefreshAuthInfo( uddiException, authToken );
  137. return soapClient.DeleteService( deleteService );
  138. }
  139. }
  140. public DispositionReport Send( DeleteTModel deleteTModel, AuthToken authToken )
  141. {
  142. SetAuthToken( deleteTModel, authToken );
  143. try
  144. {
  145. return soapClient.DeleteTModel( deleteTModel );
  146. }
  147. catch( UddiException uddiException )
  148. {
  149. AttemptRefreshAuthInfo( uddiException, authToken );
  150. return soapClient.DeleteTModel( deleteTModel );
  151. }
  152. }
  153. public BindingDetail Send( SaveBinding saveBinding, AuthToken authToken )
  154. {
  155. SetAuthToken( saveBinding, authToken );
  156. try
  157. {
  158. return soapClient.SaveBinding( saveBinding );
  159. }
  160. catch( UddiException uddiException )
  161. {
  162. AttemptRefreshAuthInfo( uddiException, authToken );
  163. return soapClient.SaveBinding( saveBinding );
  164. }
  165. }
  166. public BusinessDetail Send( SaveBusiness saveBusiness, AuthToken authToken )
  167. {
  168. SetAuthToken( saveBusiness, authToken );
  169. try
  170. {
  171. return soapClient.SaveBusiness( saveBusiness );
  172. }
  173. catch( UddiException uddiException )
  174. {
  175. AttemptRefreshAuthInfo( uddiException, authToken );
  176. return soapClient.SaveBusiness( saveBusiness );
  177. }
  178. }
  179. public ServiceDetail Send( SaveService saveService, AuthToken authToken )
  180. {
  181. SetAuthToken( saveService, authToken );
  182. try
  183. {
  184. return soapClient.SaveService( saveService );
  185. }
  186. catch( UddiException uddiException )
  187. {
  188. AttemptRefreshAuthInfo( uddiException, authToken );
  189. return soapClient.SaveService( saveService );
  190. }
  191. }
  192. public TModelDetail Send( SaveTModel saveTModel, AuthToken authToken )
  193. {
  194. SetAuthToken( saveTModel, authToken );
  195. try
  196. {
  197. return soapClient.SaveTModel( saveTModel );
  198. }
  199. catch( UddiException uddiException )
  200. {
  201. AttemptRefreshAuthInfo( uddiException, authToken );
  202. return soapClient.SaveTModel( saveTModel );
  203. }
  204. }
  205. public DispositionReport Send( AddPublisherAssertions addPublisherAssertions, AuthToken authToken)
  206. {
  207. SetAuthToken( addPublisherAssertions, authToken );
  208. try
  209. {
  210. return soapClient.AddPublisherAssertions( addPublisherAssertions );
  211. }
  212. catch( UddiException uddiException )
  213. {
  214. AttemptRefreshAuthInfo( uddiException, authToken );
  215. return soapClient.AddPublisherAssertions( addPublisherAssertions );
  216. }
  217. }
  218. public DispositionReport Send( DeletePublisherAssertions deletePublisherAssertions, AuthToken authToken )
  219. {
  220. SetAuthToken( deletePublisherAssertions, authToken );
  221. try
  222. {
  223. return soapClient.DeletePublisherAssertions( deletePublisherAssertions );
  224. }
  225. catch( UddiException uddiException )
  226. {
  227. AttemptRefreshAuthInfo( uddiException, authToken );
  228. return soapClient.DeletePublisherAssertions( deletePublisherAssertions );
  229. }
  230. }
  231. public AssertionStatusReport Send( GetAssertionStatusReport getAssertionStatusReport, AuthToken authToken )
  232. {
  233. SetAuthToken( getAssertionStatusReport, authToken );
  234. try
  235. {
  236. return soapClient.GetAssertionStatusReport( getAssertionStatusReport );
  237. }
  238. catch( UddiException uddiException )
  239. {
  240. AttemptRefreshAuthInfo( uddiException, authToken );
  241. return soapClient.GetAssertionStatusReport( getAssertionStatusReport );
  242. }
  243. }
  244. public PublisherAssertionDetail Send( GetPublisherAssertions getPublisherAssertions, AuthToken authToken )
  245. {
  246. SetAuthToken( getPublisherAssertions, authToken );
  247. try
  248. {
  249. return soapClient.GetPublisherAssertions( getPublisherAssertions );
  250. }
  251. catch( UddiException uddiException )
  252. {
  253. AttemptRefreshAuthInfo( uddiException, authToken );
  254. return soapClient.GetPublisherAssertions( getPublisherAssertions );
  255. }
  256. }
  257. public PublisherAssertionDetail Send( SetPublisherAssertions setPublisherAssertions, AuthToken authToken )
  258. {
  259. SetAuthToken( setPublisherAssertions, authToken );
  260. try
  261. {
  262. return soapClient.SetPublisherAssertions( setPublisherAssertions );
  263. }
  264. catch( UddiException uddiException )
  265. {
  266. AttemptRefreshAuthInfo( uddiException, authToken );
  267. return soapClient.SetPublisherAssertions( setPublisherAssertions );
  268. }
  269. }
  270. /////////////////////////////////////////////////////////////////////////////////////////////////
  271. /// Uddi Inquire API messages
  272. /////////////////////////////////////////////////////////////////////////////////////////////////
  273. public BindingDetail Send( FindBinding findBinding )
  274. {
  275. return soapClient.FindBinding( findBinding );
  276. }
  277. public BusinessList Send( FindBusiness findBusiness )
  278. {
  279. return soapClient.FindBusiness( findBusiness );
  280. }
  281. public RelatedBusinessList Send( FindRelatedBusinesses findRelatedBusinesses )
  282. {
  283. return soapClient.FindRelatedBusinesses( findRelatedBusinesses );
  284. }
  285. public ServiceList Send( FindService findService )
  286. {
  287. return soapClient.FindService( findService );
  288. }
  289. public TModelList Send( FindTModel findTModel )
  290. {
  291. return soapClient.FindTModel( findTModel );
  292. }
  293. public BindingDetail Send( GetBindingDetail getBindingDetail )
  294. {
  295. return soapClient.GetBindingDetail( getBindingDetail );
  296. }
  297. public BusinessDetail Send( GetBusinessDetail getBusinessDetail )
  298. {
  299. return soapClient.GetBusinessDetail( getBusinessDetail );
  300. }
  301. public BusinessDetailExt Send( GetBusinessDetailExt getBusinessDetailExt )
  302. {
  303. return soapClient.GetBusinessDetailExt( getBusinessDetailExt );
  304. }
  305. public ServiceDetail Send( GetServiceDetail getServiceDetail )
  306. {
  307. return soapClient.GetServiceDetail( getServiceDetail );
  308. }
  309. public TModelDetail Send( GetTModelDetail getTModelDetail )
  310. {
  311. return soapClient.GetTModelDetail( getTModelDetail );
  312. }
  313. /////////////////////////////////////////////////////////////////////////////////////////////////
  314. /// Uddi Extensions API messages
  315. /////////////////////////////////////////////////////////////////////////////////////////////////
  316. public CategoryList Send( GetRelatedCategories getRelatedCategories )
  317. {
  318. return soapClient.GetRelatedCategories( getRelatedCategories );
  319. }
  320. private void SetAuthToken( UddiSecureMessage uddiSecureMessage, AuthToken authToken )
  321. {
  322. if( uddiSecureMessage.AuthInfo != authToken.AuthInfo )
  323. {
  324. uddiSecureMessage.AuthInfo = authToken.AuthInfo;
  325. }
  326. }
  327. private void AttemptRefreshAuthInfo( UddiException uddiException, AuthToken authToken )
  328. {
  329. if( UddiException.ErrorType.E_authTokenExpired == uddiException.Type &&
  330. true == RefreshAuthToken )
  331. {
  332. authToken = Send( authToken.OriginatingAuthToken );
  333. }
  334. else
  335. {
  336. throw uddiException;
  337. }
  338. }
  339. }
  340. [System.Web.Services.WebServiceBindingAttribute( Name="MessageHandlersSoap", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace )]
  341. internal class SoapClient : SoapHttpClientProtocol
  342. {
  343. private static readonly string UddiUserAgent;
  344. private UddiVersion uddiVersion;
  345. public SoapClient()
  346. {
  347. uddiVersion = UddiVersion.Negotiate;
  348. UserAgent = UddiUserAgent;
  349. }
  350. static SoapClient()
  351. {
  352. System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();
  353. //
  354. //
  355. // The assembly.FullName looks like this
  356. // Microsoft.Uddi.Sdk, Version=1.1.1.1, Culture=neutral, PublicKeyToken=a48752033f5d4384
  357. // I just want to use the first 2 sections.
  358. // To convert this: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 1.0.3328.4)
  359. // To this: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 1.0.3328.4; MS Uddi .Net SDK 1.0.xxxx.1)
  360. //
  361. UddiUserAgent = new Char[] { ' ', ')' } + "; MS Uddi .Net SDK " + FileVersionInfo.GetVersionInfo( assembly.Location ).FileVersion + ")";
  362. }
  363. public UddiVersion Version
  364. {
  365. get { return uddiVersion; }
  366. set { uddiVersion = value; }
  367. }
  368. protected override WebRequest GetWebRequest( Uri uri )
  369. {
  370. UddiWebRequest webRequest = new UddiWebRequest( base.GetWebRequest( uri ), uddiVersion );
  371. return webRequest;
  372. }
  373. private object[] InvokeWebMethod( string webMethodName, object[] parameters )
  374. {
  375. object[] results = null;
  376. //
  377. // The first (and only) parameter is the Uddi message we are about to send.
  378. //
  379. UddiCore uddiMessage = parameters[ 0 ] as UddiCore;
  380. try
  381. {
  382. uddiMessage.SerializeMode = true;
  383. results = Invoke( webMethodName, parameters );
  384. }
  385. catch( SoapException soapException )
  386. {
  387. //
  388. // We have no meaningful results at this point.
  389. //
  390. results = null;
  391. UddiException uddiException = new UddiException( soapException );
  392. UddiVersion originalVersion = uddiVersion;
  393. //
  394. // If the exception is either a fatal error or a unrecognized version error, we will
  395. // assume that the exception had something to do with a versioning problem. This is about
  396. // the most reliable way to do this, since there is no standard way of reporting a version
  397. // mismatch. If IterateOverVersions still does not return results, then we use the original
  398. // exception and assume that that exception was indeed not version related.
  399. //
  400. if( ( uddiException.Type == UddiException.ErrorType.E_unrecognizedVersion ||
  401. uddiException.Type == UddiException.ErrorType.E_fatalError ) &&
  402. uddiVersion == UddiVersion.Negotiate )
  403. {
  404. results = InvokeForVersions( webMethodName, parameters, ref uddiException);
  405. //
  406. // Restore the original version. TODO: should we just keep this version as is?
  407. //
  408. uddiVersion = originalVersion;
  409. }
  410. if( null == results )
  411. {
  412. throw uddiException;
  413. }
  414. }
  415. finally
  416. {
  417. uddiMessage.SerializeMode = false;
  418. }
  419. return results;
  420. }
  421. private object[] InvokeForVersions( string webMethodName, object[] parameters, ref UddiException returnException )
  422. {
  423. object[] results = null;
  424. //
  425. // Try to invoke this web method for each supported version
  426. //
  427. int numVersions = UddiVersionSupport.SupportedVersions.Length;
  428. int index = 0;
  429. while( index < numVersions && null == results )
  430. {
  431. try
  432. {
  433. UddiVersion versionToTry = UddiVersionSupport.SupportedVersions[ index++ ];
  434. //
  435. // Don't repeat versions.
  436. //
  437. if( versionToTry != uddiVersion )
  438. {
  439. uddiVersion = versionToTry;
  440. }
  441. results = Invoke( webMethodName, parameters );
  442. }
  443. catch( UddiException uddiException )
  444. {
  445. returnException = uddiException;
  446. }
  447. catch( Exception exception )
  448. {
  449. returnException = new UddiException( exception );
  450. }
  451. }
  452. return results;
  453. }
  454. /////////////////////////////////////////////////////////////////////////////////////////////////
  455. /// Uddi Publish API messages
  456. /////////////////////////////////////////////////////////////////////////////////////////////////
  457. [SoapDocumentMethod("", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Bare)]
  458. [return: XmlElement("registeredInfo", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)]
  459. public RegisteredInfo GetRegisteredInfo([XmlElement( Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)] GetRegisteredInfo getRegisteredInfo)
  460. {
  461. object[] results = InvokeWebMethod("GetRegisteredInfo", new object[] {getRegisteredInfo});
  462. return ((RegisteredInfo)results[0]);
  463. }
  464. [SoapDocumentMethod("", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Bare)]
  465. [return: XmlElement("dispositionReport", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)]
  466. public DispositionReport DeleteBinding([XmlElement(Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)] DeleteBinding deleteBinding)
  467. {
  468. object[] results = InvokeWebMethod("DeleteBinding", new object[] {deleteBinding});
  469. return ((DispositionReport)results[0]);
  470. }
  471. [SoapDocumentMethod("", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Bare)]
  472. [return: XmlElement("dispositionReport", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)]
  473. public DispositionReport DeleteBusiness([XmlElement(Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)] DeleteBusiness deleteBusiness)
  474. {
  475. object[] results = InvokeWebMethod("DeleteBusiness", new object[] {deleteBusiness});
  476. return ((DispositionReport)results[0]);
  477. }
  478. [SoapDocumentMethod("", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Bare)]
  479. [return: XmlElement("dispositionReport", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)]
  480. public DispositionReport DeleteService([XmlElement(Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)] DeleteService deleteService)
  481. {
  482. object[] results = InvokeWebMethod("DeleteService", new object[] {deleteService});
  483. return ((DispositionReport)results[0]);
  484. }
  485. [SoapDocumentMethod("", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Bare)]
  486. [return: XmlElement("dispositionReport", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)]
  487. public DispositionReport DeleteTModel([XmlElement(Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)] DeleteTModel deleteTModel)
  488. {
  489. object[] results = InvokeWebMethod("DeleteTModel", new object[] {deleteTModel});
  490. return ((DispositionReport)results[0]);
  491. }
  492. [SoapDocumentMethod("", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Bare)]
  493. [return: XmlElement("bindingDetail", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)]
  494. public BindingDetail SaveBinding([XmlElement(Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)] SaveBinding saveBinding)
  495. {
  496. object[] results = InvokeWebMethod("SaveBinding", new object[] {saveBinding});
  497. return ((BindingDetail)results[0]);
  498. }
  499. [SoapDocumentMethod("", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Bare)]
  500. [return: XmlElement("businessDetail", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)]
  501. public BusinessDetail SaveBusiness([XmlElement(Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)] SaveBusiness saveBusiness)
  502. {
  503. object[] results = InvokeWebMethod("SaveBusiness", new object[] {saveBusiness});
  504. return ((BusinessDetail)results[0]);
  505. }
  506. [SoapDocumentMethod("", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Bare)]
  507. [return: XmlElement("serviceDetail", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)]
  508. public ServiceDetail SaveService([XmlElement(Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)] SaveService saveService)
  509. {
  510. object[] results = InvokeWebMethod("SaveService", new object[] {saveService});
  511. return ((ServiceDetail)results[0]);
  512. }
  513. [SoapDocumentMethod("", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Bare)]
  514. [return: XmlElement("tModelDetail", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)]
  515. public TModelDetail SaveTModel([XmlElement(Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)] SaveTModel saveTModel)
  516. {
  517. object[] results = InvokeWebMethod("SaveTModel", new object[] {saveTModel});
  518. return ((TModelDetail)results[0]);
  519. }
  520. [SoapDocumentMethod("", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Bare)]
  521. [return: XmlElement("dispositionReport", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)]
  522. public DispositionReport DiscardAuthToken([XmlElement(Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)] DiscardAuthToken discardAuthToken)
  523. {
  524. object[] results = InvokeWebMethod("DiscardAuthToken", new object[] {discardAuthToken});
  525. return ((DispositionReport)results[0]);
  526. }
  527. [SoapDocumentMethod("", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Bare)]
  528. [return: XmlElement("authToken", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)]
  529. public AuthToken GetAuthToken([XmlElement(Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)] GetAuthToken getAuthToken)
  530. {
  531. object[] results = InvokeWebMethod("GetAuthToken", new object[] {getAuthToken});
  532. return ((AuthToken)results[0]);
  533. }
  534. [SoapDocumentMethod( "", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Bare )]
  535. [return: XmlElement( "dispositionReport", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false )]
  536. public DispositionReport AddPublisherAssertions( [XmlElement( Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false )] AddPublisherAssertions addPublisherAssertions)
  537. {
  538. object[] results = InvokeWebMethod( "AddPublisherAssertions", new object[] { addPublisherAssertions });
  539. return ( (DispositionReport)results[ 0 ] );
  540. }
  541. [SoapDocumentMethod( "", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Bare )]
  542. [return: XmlElement( "dispositionReport", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false )]
  543. public DispositionReport DeletePublisherAssertions( [XmlElement( Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false )] DeletePublisherAssertions deletePublisherAssertions )
  544. {
  545. object[] results = InvokeWebMethod( "DeletePublisherAssertions", new object[] { deletePublisherAssertions } );
  546. return ( (DispositionReport)results[ 0 ] );
  547. }
  548. [SoapDocumentMethod( "", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Bare )]
  549. [return: XmlElement( "assertionStatusReport", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false )]
  550. public AssertionStatusReport GetAssertionStatusReport( [XmlElement( Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false )] GetAssertionStatusReport getAssertionStatusReport )
  551. {
  552. object[] results = InvokeWebMethod( "GetAssertionStatusReport", new object[] { getAssertionStatusReport } );
  553. return ( (AssertionStatusReport)results[ 0 ] );
  554. }
  555. [SoapDocumentMethod( "", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Bare )]
  556. [return: XmlElement( "publisherAssertions", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false )]
  557. public PublisherAssertionDetail GetPublisherAssertions( [XmlElement( Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false )] GetPublisherAssertions getPublisherAssertions )
  558. {
  559. object[] results = InvokeWebMethod( "GetPublisherAssertions", new object[] { getPublisherAssertions } );
  560. return ( (PublisherAssertionDetail)results[ 0 ] );
  561. }
  562. [SoapDocumentMethod( "", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Bare )]
  563. [return: XmlElement("publisherAssertions", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)]
  564. public PublisherAssertionDetail SetPublisherAssertions( [XmlElement( Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false )] SetPublisherAssertions setPublisherAssertions )
  565. {
  566. object[] results = InvokeWebMethod( "SetPublisherAssertions", new object[] { setPublisherAssertions } );
  567. return ( (PublisherAssertionDetail)results[ 0 ] );
  568. }
  569. /////////////////////////////////////////////////////////////////////////////////////////////////
  570. /// Uddi Inquire API messages
  571. /////////////////////////////////////////////////////////////////////////////////////////////////
  572. [SoapDocumentMethod("", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Bare)]
  573. [return: XmlElement("bindingDetail", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)]
  574. public BindingDetail FindBinding([XmlElement(Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)] FindBinding findBinding)
  575. {
  576. object[] results = InvokeWebMethod("FindBinding", new object[] {findBinding});
  577. return ((BindingDetail)results[0]);
  578. }
  579. [SoapDocumentMethod("", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Bare)]
  580. [return: XmlElement("businessList", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)]
  581. public BusinessList FindBusiness([XmlElement(Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)] FindBusiness findBusiness)
  582. {
  583. object[] results = InvokeWebMethod( "FindBusiness", new object[] { findBusiness } );
  584. return ( ( BusinessList )results[0] );
  585. }
  586. [SoapDocumentMethod("", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Bare)]
  587. [return: XmlElement("relatedBusinessesList", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)]
  588. public RelatedBusinessList FindRelatedBusinesses([XmlElement(Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)] FindRelatedBusinesses findRelatedBusinesses )
  589. {
  590. object[] results = InvokeWebMethod( "FindRelatedBusinesses", new object[] { findRelatedBusinesses });
  591. return ((RelatedBusinessList)results[0]);
  592. }
  593. [SoapDocumentMethod("", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Bare)]
  594. [return: XmlElement("serviceList", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)]
  595. public ServiceList FindService([XmlElement(Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)] FindService findService)
  596. {
  597. object[] results = InvokeWebMethod("FindService", new object[] {findService});
  598. return ((ServiceList)results[0]);
  599. }
  600. [SoapDocumentMethod( "", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Bare )]
  601. [return: XmlElement( "tModelList", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false )]
  602. public TModelList FindTModel( [XmlElement( Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false )] FindTModel findTModel )
  603. {
  604. object[] results = InvokeWebMethod( "FindTModel", new object[] { findTModel } );
  605. return ( (TModelList)results[ 0 ] );
  606. }
  607. [SoapDocumentMethod("", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Bare)]
  608. [return: XmlElement("bindingDetail", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)]
  609. public BindingDetail GetBindingDetail([XmlElement(Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)] GetBindingDetail getBindingDetail)
  610. {
  611. object[] results = InvokeWebMethod("GetBindingDetail", new object[] {getBindingDetail});
  612. return ((BindingDetail)results[0]);
  613. }
  614. [SoapDocumentMethod("", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Bare)]
  615. [return: XmlElement("businessDetail", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)]
  616. public BusinessDetail GetBusinessDetail([XmlElement(Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)] GetBusinessDetail getBusinessDetail)
  617. {
  618. object[] results = InvokeWebMethod("GetBusinessDetail", new object[] {getBusinessDetail});
  619. return ((BusinessDetail)results[0]);
  620. }
  621. [SoapDocumentMethod("", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Bare)]
  622. [return: XmlElement("businessDetailExt", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)]
  623. public BusinessDetailExt GetBusinessDetailExt([XmlElement(Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)] GetBusinessDetailExt getBusinessDetailExt )
  624. {
  625. object[] results = InvokeWebMethod("GetBusinessDetailExt", new object[] {getBusinessDetailExt});
  626. return ((BusinessDetailExt)results[0]);
  627. }
  628. [SoapDocumentMethod("", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Bare)]
  629. [return: XmlElement("serviceDetail", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)]
  630. public ServiceDetail GetServiceDetail([XmlElement(Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)] GetServiceDetail getServiceDetail)
  631. {
  632. object[] results = InvokeWebMethod("GetServiceDetail", new object[] {getServiceDetail});
  633. return ((ServiceDetail)results[0]);
  634. }
  635. [SoapDocumentMethod("", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Bare)]
  636. [return: XmlElement("tModelDetail", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)]
  637. public TModelDetail GetTModelDetail([XmlElement(Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace, IsNullable=false)] GetTModelDetail getTModelDetail)
  638. {
  639. object[] results = InvokeWebMethod("GetTModelDetail", new object[] {getTModelDetail});
  640. return ((TModelDetail)results[0]);
  641. }
  642. /////////////////////////////////////////////////////////////////////////////////////////////////
  643. /// Uddi Extensions API messages
  644. /////////////////////////////////////////////////////////////////////////////////////////////////
  645. [SoapDocumentMethod("", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Bare)]
  646. [return: XmlElement("tModelDetail", Namespace=Microsoft.Uddi.Extensions.Namespaces.GetRelatedCategories, IsNullable=false)]
  647. public CategoryList GetRelatedCategories( GetRelatedCategories getRelatedCategories )
  648. {
  649. object[] results = InvokeWebMethod("GetRelatedCategories", new object[] {getRelatedCategories});
  650. return ((CategoryList)results[0]);
  651. }
  652. }
  653. }