开发者

Consume a wcf Service with a Java Client

开发者 https://www.devze.com 2023-04-08 19:10 出处:网络
I try to consume a wcf service hosted on an iis with a simple java client. my service is a basicHttpService.

I try to consume a wcf service hosted on an iis with a simple java client.

my service is a basicHttpService.

now my Question. What do i need in java to access the service methods?

i build a little example:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
开发者_开发问答using System.ServiceModel.Web;


namespace android.Web
{
    [ServiceContract]
    public interface ITestService
    {
        [OperationContract]
        void DoWork();
        [WebGet(UriTemplate = "Login/")]
        String Login();
    }
}

the login Method only returns a simple string that want to test in my java client. I tried some tutorials found in the internet, but nothing wokrs ;)

thx alot.


I do not think that your problem is due to a Java client.

You are using basicHttpBinding, at the same time you are using a WebGet attribute which points to using REST and webhttpbinding.

Try making sure that it works from a windows WCF client first.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号