Any plans to support and/or implement parsing of SOAP or WSDL feeds?

CommentFileSizeAuthor
#4 FeedsSOAPFetcher.inc_.txt5.16 KBroderik

Comments

alex_b’s picture

No plans from the side of the maintainers ATM.

ccoppen’s picture

Okay, thanks. We're just looking at different options. It looks like we'll be looking at RSS. We're pulling some information from a SQL Server database on a .NET setup. I suppose one could write a parser for this.

alex_b’s picture

Yes, that's straightforward to do. I recommend working off the example of some of the existing parsers in Feeds' plugins/ directory.

roderik’s picture

StatusFileSize
new5.16 KB

Not an option for me :)
I needed to fetch a document from a remote server that I've got no control over.

So... here's a functional SOAP fetcher. (I fiddled with Feeds XPath Parser for the parsing part.)
It depends on the Soap client module.

For completeness sake: put this somewhere in your own module:



/**
 * Implementation of hook_feeds_plugins().
 */
function YOURMODULE_feeds_plugins() {
  $info = array();
  $info['SOAPFetcher'] = array(
    'name' => 'SOAP Fetcher',
    'description' => 'Fetches SOAP feed.',
    'handler' => array(
      'parent' => 'FeedsFetcher', // A plugin needs to derive either directly or indirectly from FeedsFetcher, FeedsParser or FeedsProcessor.
      'class' => 'FeedsSOAPFetcher',
      'file' => 'FeedsSOAPFetcher.inc',
      'path' => drupal_get_path('module', 'YOURMODULE'),
    ),
  );
  return $info;
}

So... where would people want to put this?
The feeds distribution?
soapclient?
It just seems too small to me, to warrant its own module. (It's purely "copy-paste, modify, test" code.) Not that I'd be against it, per se... :)

alex_b’s picture

I'd rather see this in a separate module, I don't want to maintain it.

verta’s picture

subscribing - looks useful!

made4w3’s picture

subscribing

korayal’s picture

I couldn't manage to set up a parser on feeds. Is there any example for this?

cyberwolf’s picture

subscribing.

cyberwolf’s picture

I hacked roderik's code a to remove the dependency on the soapclient module, as I don't think the abstraction layer it provides is still necessary now in the days of PHP 5, and PHP 4 and NuSOAP are dead AFAIK :) In my version it uses PHP 5's soap client straight to the point.

I am still thinking about how to handle best the final outcome of the SOAP call, as what you got left eventually are PHP strings / objects / arrays / ..., depending on what the SOAP server has sent you back. I currently just return the full http SOAP response body (and not just the result contained in it) so that's in any case parseable with the xpath parser, but I am also thinking about adding an option to switch output formats. Two additional ones off the top of my head:

  • just the SOAP result, if it's a string (that is what Roderik's initial work did if I understood the code right)
  • a JSON respresentation of the soap result (really easy with PHP 5's JSON functions), which is parseable again with the JSONPath parser

Does there exist some kind of Feeds parser already that provides a xpath/querypath/jsonpath-like syntax to navigate over PHP arrays/objects/...? In PHP userland I was only able to find CakePHP's Set::extract() (http://book.cakephp.org/view/1501/extract) so far by using my favorite search engine. Looks cool at first sight. I might give it a try.

@roderik, fine for you if I initialize a new project here on DO for the SOAP fetcher? I will of course mention you as the author of the initial code. Unless you feel like taking the lead of this yourself... :)

roderik’s picture

@Cyberwolf: fine with me - I am not finding the time.

Better, even - because I just whipped this up from my Feeds module knowledge and some copypaste from soapclient... but I am not using either of them extensively. It'd be hard for me to give support on the SOAP part of things.

kika’s picture

Any update on separate module for SOAP fetcher?

zilverdistel’s picture

subscribing

cyberwolf’s picture

I just returned from holidays, will initialize a new project asap.

greggmarshall’s picture

Subscribe

@Cyberwolf, any idea when you'll have a project (or sandbox) set up?

cyberwolf’s picture

Hi,

I initialized a Sandbox project here: http://drupal.org/sandbox/Cyberwolf/1288548

greggmarshall’s picture

Great, thank you!!!

ericmulder1980’s picture

This looks great, exactly what i need for a project i'm working on. I will be following the sandbox project closely.

sachbearbeiter’s picture

i need it too - thanks

damatmadeforcom’s picture

Version: 6.x-1.x-dev » 7.x-2.x-dev

subscribing

adamgerthel’s picture

Does anyone know of any updates regarding this?

cyberwolf’s picture

Looks like magico forked my sandbox already into a full project: http://drupal.org/project/feeds_soap

petria’s picture

Here's my new sandbox project "Feeds FetchXML" witch is using library from http://code.google.com/p/php-dynamics-crm-2011 for integration with CRM 2011 and claim based authentication. Feel free to test it.

http://drupal.org/sandbox/petria/1916146

It's already in production on our site.

bluegeek9’s picture

Issue summary: View changes
Status: Active » Closed (outdated)
//www.flaticon.com/free-icons/thank-you Thank you for your contribution!

Unfortunately, Drupal 7 is End of Life and no longer supported. We strongly encourage you to upgrade to a supported version of Drupal.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.