简体   繁体   中英

Consuming WCF service in Java

I am trying to call a WCF service from JAVA, the authentication is provided by using service account. As the WCF service by default taking windows credentials,I want to explicitly set username/password instead of using service account. Please suggest a way to set windows credentials in Java to call WCF service.

Thanks, Vempati

On the client-side, we usually call the WCF service by using a client proxy unless the WCF service is Restful style, by calling with a simply Http request. The client authentication credentials can be set up in the client proxy method.
The specific steps to take depends on the client web service framework used in Java, such as Jax-WS, Asix. Here is a related discussion, wish it is useful to you.
Java Web Service client basic authentication
Java client call to Windows Integated Authentication web service
Feel free to let me know if there is anything I can help with.

You should configure your WCF service to use the basicHttpBinding which is inter-operable. Then configure IIS to use basic authentication.

In java first pre-authenticate, then send your request. https://www.baeldung.com/httpclient-4-basic-authentication

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM