开发者

In wcf , where does the far Java client will have the contract and DataContract files?

开发者 https://www.devze.com 2023-04-02 19:55 出处:网络
If i have a service which has a operationContract that gets as a parameter the type : Myclass , how does the Client Which works in Java, will call my func ?

If i have a service which has a operationContract that gets as a parameter the type : Myclass ,

how does the Client Which works in Java , will call my func ?

He cant create .net classes ... He Doesn't know the MyClass

He can't do this :

public class Clientbs : ClientBase<ICalcMe>, ICalcMe
    {


       ...

    }

nor he can't do this :

 ChannelFactory<ICalcMe> channel = new ChannelFactory<ICalcMe&开发者_开发技巧gt;("endPointName");


Java client will use its own SOAP stack API to consume your service. It is main point of web services: They are described in form of interoperable contracts and policies (WSDL and XSD) which can be used by different API to build the client for given platform.

Unless you have to write Java client yourselves you don't have to bother. Just use interoperable binding and let Java developers to build their clients from your WSDL. If you need to write a client yourselves it is time to learn something about web services - not only what .NET provides but about their core mechanisms which are independent on the platform. It is also time to learn some Java API for service consumption / creation. For example JAX-WS.

0

精彩评论

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