none
WCF service and other technology can consume it RRS feed

  • Question

  • how to design wcf service so other technology (java, php, python) can consume my service and call function. what binding i should use.

    i often heard people say baisc http binding use in this kind of scenario but i like to know the real reason why other binding should not be used? other technology do not support dualhttp or tcpbinding ?

    if not then what is the reason?

    how other technology can understand .Net data type because .Net has many data type which is not available in java or php and in other technology too.


    guide me with detail discussion. thanks
    • Edited by Mou_kolkata Saturday, November 14, 2015 10:44 AM
    Saturday, November 14, 2015 10:44 AM

Answers

All replies

  • how to design wcf service so other technology (java, php, python) can consume my service and call function. what binding i should use.

    https://en.wikipedia.org/wiki/Web_Services_Description_Language

    https://msdn.microsoft.com/en-us/library/ff648181.aspx

    https://msdn.microsoft.com/en-us/library/ff649887.aspx?f=255&MSPPError=-2147217396

    how other technology can understand .Net data type because .Net has many data type which is not available in java or php and in other technology too.

    https://en.wikipedia.org/wiki/XML

    <copied>

    XML has come into common use for the interchange of data over the Internet.

    <end>

    Saturday, November 14, 2015 4:51 PM
  • link was not very helpful. it would be nice if some one discuss each issue which their personal experience.

    suppose my service function can return data table or dictionary or tuples etc then how java or php can understand it.

    i heard people always design their service and their function return string always not other type and this way .Net service become compatible for other technology but i am not sure this is the right design thought for making wcf service compatible for any other tools and technology?

    share with real life experience. thanks

    Saturday, November 14, 2015 5:40 PM
  • i heard people always design their service and their function return string always not other type and this way .Net service become compatible for other technology but i am not sure this is the right design thought for making wcf service compatible for any other tools and technology?

    What the heck man? Look man, no one here is going to hold your hand, which you have a bad habit of wanting someone to do for you, instead of looking up the howto(s) yourself.

    What do you think XML is but string a primitive data type that is understood by all platforms and all languages?  XML is the  universal data definition solution, a data markup that defines the data, that is sent between languages and platforms.

    And by the usage of attributes used in XML,  one can define the data type of int, double, etc etc that a single XML <Tag> the string data represents that someone knowing how to use XML absolutely knows what it is, how to use it and what is going on.

    share with real life experience. thanks

    Nonsense....

    Saturday, November 14, 2015 6:10 PM
  • i do not want anyone to hold my hand. wcf always return data in xml format if anyone use basichttp or wshttp binding ? if yes then my service method can return dataset and how java, php can consumer can understand dataset ?

    Saturday, November 14, 2015 6:21 PM
  • i do not want anyone to hold my hand. wcf always return data in xml format if anyone use basichttp or wshttp binding ? if yes then my service method can return dataset and how java, php can consumer can understand dataset ?

    They can't and they don't have a clue as to what a dataset or datatable are about let alone what is in the link below, and I don't care what type of SOA, service-oriented architecture, technology is be used WCF or not.

    http://www.hanselman.com/blog/ReturningDataSetsFromWebServicesIsTheSpawnOfSatanAndRepresentsAllThatIsTrulyEvilInTheWorld.aspx

    wcf always return data in xml format if anyone use basichttp or wshttp binding

    Yeah that is XML based on a known class/object being XML serialized and deserialized back to the known class/object.

    How does something on the Java platform know anything about a .NET class/object or its primitive types?

    Therefore, one makes the XML themselves,  and they send and receive the XML based on a definition of the XML that known and understood by the client and the service, like a <Tag for Rent> is holding data for primitive type 'double' by using an XML attribute that defines it as being a primitive type double, and then the client knows to convert it over to a primitive type double, like on a platform that is using Linux and Java and work with the data.

    Have you really thought this out man?

    Saturday, November 14, 2015 6:50 PM
  • Hi Mou_Kolkata,

    As DA924 said, "the XML that known and understood by the client and the service".

    Because, the WCF can use the serialization and deserialization, we can serialize object

    as xml file. Then we can use the deserialization to deserialize the xml file java client.

    For more information, please refer to the following articles:

    1.Serialization and Deserialization

    2.Consuming a WCF Service in Java Application

    3.Consuming WCF Services with Java Client

    4.Consuming WCF Web Service Using Java Client

    Best Regards,

    Grady

    • Proposed as answer by Sudip_inn Monday, November 16, 2015 9:12 AM
    Monday, November 16, 2015 6:28 AM
    Moderator
  • i need a good tutorial for wcf service design when the same service will be consumed by variety of technologies like php, java, python and many more.

    i like to know how to write specialized code when developing wcf service as a result other technology can consume it. i like to know what are the data type we should work with and what are the data type we should avoid when developing wcf service for variety of technologies like php, java, python and many more.

    please help me to get more relevant article on this issue. thanks

    Monday, November 16, 2015 9:12 AM
  • Hi Mou_inn,

    Here is some articles about how to consume WCF Service via PHP client.

    It will be better for you to read the following articles:

    #Using WCF Services With PHP:
    http://cgeers.com/2009/08/20/using-wcf-services-with-php-5/ .

    #Calling a WCF service from PHP :
    http://www.rizalalmashoor.com/blog/calling-a-wcf-service-from-php/ .

    #How to use WCF service from PHPclient(SOAP) with HTTPS protocol:
    http://forums.asp.net/t/1602125.aspx .

    Best Regards,

    Grady

    • Marked as answer by Mou_kolkata Tuesday, November 17, 2015 10:29 AM
    Tuesday, November 17, 2015 7:55 AM
    Moderator