Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <system.serviceModel>
- <bindings>
- <basicHttpBinding>
- <binding name="QAS_QRY_SERVICE_Binding">
- <security mode="TransportWithMessageCredential">
- <message clientCredentialType="UserName" />
- </security>
- </binding>
- </basicHttpBinding>
- </bindings>
- <client>
- <endpoint address="https://service.url/PSIGW/PeopleSoftServiceListeningConnector/PSFT_FS91DEV2"
- binding="basicHttpBinding" bindingConfiguration="QAS_QRY_SERVICE_Binding"
- contract="PeopleSoft.QAS_QRY_SERVICE_PortType" name="QAS_QRY_SERVICE_Port" />
- </client>
- </system.serviceModel>
- var connection = new PeopleSoft.QAS_QRY_SERVICE_PortTypeClient();
- connection.ClientCredentials.UserName.UserName = "XXXXXX";
- connection.ClientCredentials.UserName.Password = "YYYYYY";
- var param = new PeopleSoft.QAS_EXEQRY_SYNC_REQ_MSGType();
- param.QAS_EXEQRY_SYNC_REQ = new PeopleSoft.QAS_EXEQRY_SYNC_REQ_TypeShape();
- param.QAS_EXEQRY_SYNC_REQ.QueryName = "SOIAP_OBJECT_STATUS";
- param.QAS_EXEQRY_SYNC_REQ.isConnectedQuery = PeopleSoft.isConnectedQuery_TypeDef1.N;
- param.QAS_EXEQRY_SYNC_REQ.OwnerType = "PUBLIC";
- param.QAS_EXEQRY_SYNC_REQ.BlockSizeKB = "0";
- param.QAS_EXEQRY_SYNC_REQ.MaxRow = "9999";
- param.QAS_EXEQRY_SYNC_REQ.OutResultType = PeopleSoft.OutResultType_TypeDef1.WEBROWSET;
- param.QAS_EXEQRY_SYNC_REQ.OutResultFormat = PeopleSoft.OutResultFormat_TypeDef1.NONFILE;
- param.QAS_EXEQRY_SYNC_REQ.Prompts = new PeopleSoft.Prompts_TypeDefPROMPT1[] {
- new PeopleSoft.Prompts_TypeDefPROMPT1() { FieldValue = "Data1", UniquePromptName = "BIND1" } ,
- new PeopleSoft.Prompts_TypeDefPROMPT1() { FieldValue = "Data2", UniquePromptName = "BIND2" } ,
- new PeopleSoft.Prompts_TypeDefPROMPT1() { FieldValue = "Data3", UniquePromptName = "BIND3" } ,
- };
- try
- {
- var results = connection.QAS_EXECUTEQRYSYNC_OPER( param );
- Console.WriteLine( results.QAS_QUERYRESULTS_STATUS_RESP.status );
- }
- catch( FaultException e )
- {
- DisplayFault( e );
- }
- catch( Exception e )
- {
- if( e.InnerException != null && e.InnerException is FaultException )
- {
- DisplayFault( e.InnerException as FaultException );
- }
- else
- {
- Console.WriteLine( e.ToString() );
- }
- }
- Console.WriteLine( "Done" );
- Console.ReadLine();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement