Click here to Skip to main content
15,918,976 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I would like to deploy a C# Web Service on IIS, and then be able to access it through a simple IP Address and Port configuration. This will allow me to use this address with a Java Client consuming such a web service, namely using this code:

Java
String endpointIP = jTextField1.getText().toString();
        String endpointURL = endpointIP + "/cws.StudentsDB/cDBaccess.asmx";
        BindingProvider bp = (BindingProvider)port;
        bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointURL);


Unfortunately, when I use http://192.168.2.101/cws.StudentsDB/cDBaccess.asmx[^] as my address, I am being given an unsuitable format error from the Java compiler. I cannot find a way to deploy the web service which will make it compatible with Java Clients too. As one can see I would like the "endpointURL part" to be dynamically entered, which will allow a user to enter an IP address which is hosting the webservice, and connect to it.

Any help or nudge in the right direction would be greatly appreciated.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900