1
Answer

How Do I create a Webservice in WPF?

Humi

Humi

10y
576
1
I need to create encryption method that is embedded in the web methods for all messages that will pass through the API.
 
 Sample Message to Invoke Request Session method:
RetSession sess = requestSession(string sUsr, string sPwd, string signature)
Where:
signature = (sUsr + sPwd + secretKey)
Response:
0 - Invalid Reference Number
1 - Transaction Successful
2 - Invalid Login (Username/Password)
 
 
I have created like this 
App.config
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="Fx_Pro.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BankComApiSoap">
<security mode="Transport" />
</binding>
<binding name="BankComApiSoap1" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="https://124.6.141.118:8443/bankcomapi.asmx"
binding="basicHttpBinding" bindingConfiguration="BankComApiSoap"
contract="BOC_Service.BankComApiSoap" name="BankComApiSoap" />
</client>
</system.serviceModel>
<applicationSettings>
<Fx_Pro.Properties.Settings>
<requestSession name="Fx_Pro_BOC_Service_BankComApi" serializeAs="String">
<value>https://124.6.141.118:8443/bankcomapi.asmx</value>
</requestSession >
<userSettings>
<Witty.Properties.Settings>
<requestSession name="sUsr" serializeAs="String">
<value>REMOXAPI </value>
</requestSession>

<setting name="sPwd" serializeAs="String">
<value>b183bd3e765eecacd74edaf5bb3c102a545d89c3 </value>
</setting>
<setting name="secretKey" serializesAs="String">
<value>"passwordtest"</value>
</setting>
</Witty.Properties.Settings>
</userSettings>
</Fx_Pro.Properties.Settings>
</applicationSettings>
</configuration>
 
But am getting error in the Page : 
  //Final Process Button click
private void btn_process_Click(object sender, RoutedEventArgs e)
{

BOC_Service.RetSession sess = re
sess.



}
 
 
Answers (1)