Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.19 KB | None | 0 0
  1. <system.serviceModel>
  2. <bindings>
  3. <basicHttpBinding>
  4. <binding name="QAS_QRY_SERVICE_Binding">
  5. <security mode="TransportWithMessageCredential">
  6. <message clientCredentialType="UserName" />
  7. </security>
  8. </binding>
  9. </basicHttpBinding>
  10. </bindings>
  11. <client>
  12. <endpoint address="https://service.url/PSIGW/PeopleSoftServiceListeningConnector/PSFT_FS91DEV2"
  13. binding="basicHttpBinding" bindingConfiguration="QAS_QRY_SERVICE_Binding"
  14. contract="PeopleSoft.QAS_QRY_SERVICE_PortType" name="QAS_QRY_SERVICE_Port" />
  15. </client>
  16. </system.serviceModel>
  17.  
  18. var connection = new PeopleSoft.QAS_QRY_SERVICE_PortTypeClient();
  19. connection.ClientCredentials.UserName.UserName = "XXXXXX";
  20. connection.ClientCredentials.UserName.Password = "YYYYYY";
  21.  
  22. var param = new PeopleSoft.QAS_EXEQRY_SYNC_REQ_MSGType();
  23. param.QAS_EXEQRY_SYNC_REQ = new PeopleSoft.QAS_EXEQRY_SYNC_REQ_TypeShape();
  24. param.QAS_EXEQRY_SYNC_REQ.QueryName = "SOIAP_OBJECT_STATUS";
  25. param.QAS_EXEQRY_SYNC_REQ.isConnectedQuery = PeopleSoft.isConnectedQuery_TypeDef1.N;
  26. param.QAS_EXEQRY_SYNC_REQ.OwnerType = "PUBLIC";
  27. param.QAS_EXEQRY_SYNC_REQ.BlockSizeKB = "0";
  28. param.QAS_EXEQRY_SYNC_REQ.MaxRow = "9999";
  29. param.QAS_EXEQRY_SYNC_REQ.OutResultType = PeopleSoft.OutResultType_TypeDef1.WEBROWSET;
  30. param.QAS_EXEQRY_SYNC_REQ.OutResultFormat = PeopleSoft.OutResultFormat_TypeDef1.NONFILE;
  31. param.QAS_EXEQRY_SYNC_REQ.Prompts = new PeopleSoft.Prompts_TypeDefPROMPT1[] {
  32. new PeopleSoft.Prompts_TypeDefPROMPT1() { FieldValue = "Data1", UniquePromptName = "BIND1" } ,
  33. new PeopleSoft.Prompts_TypeDefPROMPT1() { FieldValue = "Data2", UniquePromptName = "BIND2" } ,
  34. new PeopleSoft.Prompts_TypeDefPROMPT1() { FieldValue = "Data3", UniquePromptName = "BIND3" } ,
  35. };
  36. try
  37. {
  38. var results = connection.QAS_EXECUTEQRYSYNC_OPER( param );
  39.  
  40. Console.WriteLine( results.QAS_QUERYRESULTS_STATUS_RESP.status );
  41. }
  42. catch( FaultException e )
  43. {
  44. DisplayFault( e );
  45. }
  46. catch( Exception e )
  47. {
  48. if( e.InnerException != null && e.InnerException is FaultException )
  49. {
  50. DisplayFault( e.InnerException as FaultException );
  51. }
  52. else
  53. {
  54. Console.WriteLine( e.ToString() );
  55. }
  56. }
  57. Console.WriteLine( "Done" );
  58. Console.ReadLine();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement