Port a tiny C# demo application to Java
$30-250 USD
Pago na entrega
We provide a SOAP address parsing web service for which we developped a Visual C# demo application. The demo shows how to use our web service.
This C# demo application needs to be ported to Java.
The source code of the demo app is below.
A screenshot of the demo app is attached.
Please use only freely available development tools and include instructions how to re-compile the project.
Project budget is 50 US$
using System;
using [login to view URL];
using [login to view URL];
using [login to view URL];
using [login to view URL];
using [login to view URL];
using [login to view URL];
using [login to view URL];
using [login to view URL];
namespace RecogniContactDemo
{
public partial class RecogniContactDemoForm : Form
{
public RecogniContactDemoForm()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
[login to view URL] = "";
try
{
//----------------------------------------------------------------
// Create Web Service object
//----------------------------------------------------------------
IRecogniContactWebServiceservice RecogniContact = new IRecogniContactWebServiceservice();
//----------------------------------------------------------------
// Show License Information
//----------------------------------------------------------------
LicenseInfo myLicenseInfo = [login to view URL]([login to view URL]);
[login to view URL] += "LICENSE INFORMATION\r\n";
//license expiry date (as a string)
//empty string = no time limit
[login to view URL] += "LicenseExpiryDateAsString= " + [login to view URL] + "\r\n";
//permitted total number of parsing operations
//0 = unlimited
[login to view URL] += "MaxParsings= " + [login to view URL] + "\r\n";
//permitted number of parsing operations per period of time
//0 = unlimited
[login to view URL] += "MaxParsingsPerDay= " + [login to view URL] + "\r\n";
[login to view URL] += "MaxParsingsPerWeek= " + [login to view URL] + "\r\n";
[login to view URL] += "MaxParsingsPerMonth= " + [login to view URL] + "\r\n";
[login to view URL] += "MaxParsingsPerQuarter= " + [login to view URL] + "\r\n";
[login to view URL] += "MaxParsingsPerYear= " + [login to view URL] + "\r\n";
//IP addresses allowed to call RecogniContact web service
//Empty string = no limitation
[login to view URL] += "CallerIPRange= " + [login to view URL] + "\r\n";
//licensed Parser countries
//Empty string = no limitation
[login to view URL] += "ParserCountries= " + [login to view URL] + "\r\n";
//user name associated with license key
[login to view URL] += "UserName= " + [login to view URL] + "\r\n";
//Additional info about license owner
[login to view URL] += "UserInfo= " + [login to view URL] + "\r\n";
//----------------------------------------------------------------
// Show Usage Statistics
//----------------------------------------------------------------
[login to view URL] += "\r\n";
[login to view URL] += "USAGE STATISTICS\r\n";
UsageStats myUsageStats = [login to view URL]([login to view URL]);
//total number of completed parsing operations so far
[login to view URL] += "NumberParsings= " + [login to view URL] + "\r\n";
//number of completed parsing operations per period of time
[login to view URL] += "NumberParsingsToday= " + [login to view URL] + "\r\n";
[login to view URL] += "NumberParsingsThisWeek= " + [login to view URL] + "\r\n";
[login to view URL] += "NumberParsingsThisMonth= " + [login to view URL] + "\r\n";
[login to view URL] += "NumberParsingsThisQuarter= " + [login to view URL] + "\r\n";
[login to view URL] += "NumberParsingsThisYear= " + [login to view URL] + "\r\n";
//----------------------------------------------------------------
// Show Version Information for Parser and Parser Interface
//----------------------------------------------------------------
[login to view URL] += "\r\n";
[login to view URL] += "VERSION INFORMATION\r\n";
[login to view URL] += "GetParserVersionAsString()= " + [login to view URL]() + "\r\n";
[login to view URL] += "GetInterfaceVersionAsString()=" + [login to view URL]() + "\r\n";
[login to view URL] += "\r\n";
//----------------------------------------------------------------
// Parse Text and Show Result
//----------------------------------------------------------------
ParsingResult myParsingResult = [login to view URL]([login to view URL], [login to view URL]);
[login to view URL] += "\r\n";
[login to view URL] += "PARSING RESULT\r\n";
[login to view URL] += "Prefix= " + [login to view URL] + "\r\n";
[login to view URL] += "FirstName= " + [login to view URL] + "\r\n";
[login to view URL] += "MiddleName= " + [login to view URL] + "\r\n";
[login to view URL] += "LastName= " + [login to view URL] + "\r\n";
[login to view URL] += "Suffix= " + [login to view URL] + "\r\n";
[login to view URL] += "Company= " + [login to view URL] + "\r\n";
[login to view URL] += "Company2= " + [login to view URL] + "\r\n";
[login to view URL] += "Position= " + [login to view URL] + "\r\n";
[login to view URL] += "StreetAddress1= " + [login to view URL] + "\r\n";
[login to view URL] += "StreetAddress2= " + [login to view URL] + "\r\n";
[login to view URL] += "PostboxAddress= " + [login to view URL] + "\r\n";
[login to view URL] += "PostboxPostCode=" + [login to view URL] + "\r\n";
[login to view URL] += "PostCode= " + [login to view URL] + "\r\n";
[login to view URL] += "PlaceName= " + [login to view URL] + "\r\n";
[login to view URL] += "Province= " + [login to view URL] + "\r\n";
[login to view URL] += "Country= " + [login to view URL] + "\r\n";
[login to view URL] += "Phone1= " + [login to view URL] + "\r\n";
[login to view URL] += "Phone2= " + [login to view URL] + "\r\n";
[login to view URL] += "Mobile= " + [login to view URL] + "\r\n";
[login to view URL] += "Fax= " + [login to view URL] + "\r\n";
[login to view URL] += "Email= " + [login to view URL] + "\r\n";
[login to view URL] += "Url= " + [login to view URL] + "\r\n";
[login to view URL] += "Gender= " + [login to view URL] + "\r\n";
[login to view URL] += "CountryIsoCode= " + [login to view URL] + "\r\n";
[login to view URL] += "\r\n";
[login to view URL] += "Number of unrecognized items: " + [login to view URL] + "\r\n";
for (int i = 0; i < [login to view URL]; i++)
{
[login to view URL] += "Unrecognized item " + i + "= " + [login to view URL][i] + "\r\n";
}
}
catch (SystemException myException)
{
[login to view URL] += [login to view URL] + "\r\n";
string errorcodeid = "RecogniContact Error ";
if ([login to view URL](errorcodeid)) {
string errorcodestring = [login to view URL]([login to view URL], 2).TrimEnd(':');
int errorcode = [login to view URL](errorcodestring);
switch (errorcode) {
case 1: //Invalid license key
//-----------------------------
//The license key provided is invalid
[login to view URL] += "errorcode = " + [login to view URL](errorcode) + "\r\n";
break;
case 2: //Invalid request IP
//-----------------------------
//The license does not allow web service requests from the current IP address
[login to view URL] += "errorcode = " + [login to view URL](errorcode) + "\r\n";
break;
case 10://License has expired
//-----------------------------
//A time limit was set for your license and this limit was reached
[login to view URL] += "errorcode = " + [login to view URL](errorcode) + "\r\n";
break;
case 20://Parsing quota exceeded
//-----------------------------
//A maximum number of permitted parsing operations is set for your license
//and this limit was exceeded.
//The quota can be set per day/week/month/quarter/year or as a total limit
[login to view URL] += "errorcode = " + [login to view URL](errorcode) + "\r\n";
break;
case 30://Unlicensed country
//-----------------------------
//The country of the specified address or contact data is
//not included in your license
[login to view URL] += "errorcode = " + [login to view URL](errorcode) + "\r\n";
break;
case 99://Internal RecogniContact server error
//------------------------------------
//An unexprected error occured on the RecogniContact server.
//Please contact LoquiSoft for assistance.
[login to view URL] += "errorcode = " + [login to view URL](errorcode) + "\r\n";
break;
case 0: //Other error
//-----------------------------
//Exception was not created by RecogniContact
break;
}
}
}
//scroll to end of outputTextBox
[login to view URL] = [login to view URL];
[login to view URL]();
}
}
}
ID do Projeto: #445443
Sobre o projeto
Concedido a:
13 freelancers estão ofertando em média $40 nesse trabalho
I am interested in this project. Have been working .net (C#/C++) for a long time. BR Kurt
Sir , I can do this project .I have experiance in Both Java and C #. I can conert your C # code to java.
I'm certified java programmer. i've 14 years experience in C / C++/ visual C++ / C# development. I'll implement it as you expected and i'll guide and support you untill it work 100% with u.