views:

698

answers:

2

I want to make a client in C# in order to create Blog posts in Drupal, so the situation is the following. In Drupal i have Services module and soap_server both enabled and when i consume the wsdl file from http://example.com/services/soap?wsdl is recognizes it properly but i don't know what to do next... I'm stuck. The lack of documentation is a big disappointment for me. Does any one try this before? Any advise will be welcome ...

+2  A: 

Maybe you chose this design for a specific reason that you did not illustrate in your question, but - just in case this is not the case - let me point out how you could leverage the built-in functionalities of Drupal and known API's to achieve what you want in less steps.

  1. Use the Blog API module (shipped with Drupal Core) to expose widely known and well documented API's to the outside world, via the built-in XML-RPC interface.
  2. Blog API exposes various blog-oriented API's, which are documented here, here and here.
  3. Use code available online to implement the webservice consumer. I know nothing about C#, but from a quick google search, it seems such code is not difficult at all to be found. For example, here's some code from microsoft for metaweblog API's.

If for some reason you need or want to implement your own API with SOAP, then you should specify what your difficulties are. I assume you already created the SOAP services by following the documentation available online, and in particular this comment and this series of screencasts.

If this is the case, what is the difficult on the C# side? As stated before, I do not develop in C#, but - at least by googling it - it does seem like there is plenty of documentation and sample code available for this.

mac
I don't want to use the Blog API, instead i want to create my own module in order to create blog posts to Drupal and i want to use SOAP and not XMLRPC which is the dominant in Bloggin Clients.
dimos
Fair enough. You should still tell us what's your difficult though, otherwise it won't be possible to help.
mac
A: 

Eventually i will reinvent the wheel ... NuSoap library is much more simple to use. After extensive survey i have successfully accomplish to consume PHP web services based on NuSoap through C# client. I will make a custom module for drupal that will use NuSoap in order to call it from my C# client.

dimos
If it works for you... go for it! :) I had better luck with the built-in SOAP capability of PHP 5, but nosoap is certainly a valid tool! :)
mac