c# - How to configure a WCF client using basicHttpBinding and Username authentication over https -


i'm trying consume web service provided group within our company. service written in java , java test client functions properly. however, cannot .net4.0 or .net 4.5 based wcf client talk it. require https transport , since java i'm using basichttpbinding. require username/password. in java, saying username/password @ binding level , when looking @ message captured test code, there no evidence of username or password being sent. can connect service cannot authenticated because not seeing username & password. username , password being set in code. testing against dev server using self signed cert. our endpoints physically 1500 miles apart connect via internal corporate (secure) network.

i need know proper config settings "binding", "behavior", , "endpoint" use @ client. can post settings misleading i've tried 100's of them , none give desired result.

any can give useful long doesn't involve changes on (or knowledge of) service host side (its not iis).

thanks thoughts.

java client code looks this:

serviceimplservicelocator locator = new serviceimplservicelocator(); locator.setserviceendpointaddress( "https://<hostaddr>:8443/service" ); locator.setservicewsddservicename("service");  serviceimpl service = locator.getservice();  servicesoapbindingstub binding = (servicesoapbindingstub) service; binding.setusername("username"); binding.setpassword("password");  // call web service return = binding.servicemethod( ... ); 


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -