SOAP implementation

Events happening in the community are now at Drupal community events on www.drupal.org.
deck_penguin's picture

I am hoping that some one here can help...

I need to implement a SOAP service and i cant seem to find any "how to". i see that there is a services module, and a soap server, and i understand the "normal" application of the simple object access protocol via php, java etc (building a custom site, no problems )... but how to go about implementing it in drupal 6 ?

please, please i need a hand, as there is NO documentation on this subject.

cheers,
deck_penguin

Comments

I think you need to write a custom service.

chrisfromredfin's picture

The way the services module works is that there's services "servers" and services modules. So, you need the services module first. Then, you need a services "server" that will do SOAP (which I think you've mentioned exists above; Services comes with one for XML-RPC but I don't know about SOAP).

With that enabled, you then need to (I believe, from what you're saying), write your own services "service" module. This screencast is the best one I found to introduce you to writing a services module, which is by the guy who wrote the services module (who sat across from me at the Ubercart Ethiopian dinner at DrupalCon recently; he's a cool guy!)

http://files.thisbythem.com/screencasts/services-1.mov

Hope this helps!

.cw.
http://www.redfinsolutions.com

I wrote a module with curl calls, need better xml parsing

drm's picture

I needed to do SOAP xmlrpc for a client and I wrote a module using the php curl family of functions.

My problem so far is that I have not figured out how to use php 5 or Drupal functions to parse the resulting xml. I'm doing a bit of it myself, but would prefer to figure out how to do so with something much more robust.

But if you want to see what I did with the custom module, I can send it to you. It's not pretty, but it worked.

i would love to see it, if

deck_penguin's picture

i would love to see it, if for nothing else to get an idea on a approach.

another thing i am a little curios about, what of we were just to code the soap requests in php, not in module form and use the data that it retrieved ? hmmmm
:)

"Our thoughts become our words, our words become our deeds, and our deeds become our character. watch your thoughts with care and let them spring from love"

"Our thoughts become our words, our words become our deeds, and our deeds become our character. watch your thoughts with care and let them spring from love"

@drm - I used simplexml to

chrisfromredfin's picture

@drm - I used simplexml to parse incoming data before the services.module existed.

Now that it does, I just let its xmlrpc server handle all the incoming/outgoing XML - I deal only with PHP arrays and objects now! :)

.cw.
http://www.redfinsolutions.com

Services documentation

nonsie's picture

There actually is handbook entry on Services and how to use it - http://drupal.org/handbook/modules/services. It does not have an example on SOAP Server but there's one I wrote on using REST Server so I'm assuming they are similar.

soapclient module

deck_penguin's picture

is anyone using this module ? if so, could i get a little explanation on how it works ? there (still) is NO documentation and i am having the dickens of a time sorting through code trying to understand it.

i have some idea on how to use the API, but i get errors on the demo page when trying to run a test case. if i can't get the demo to work, i am reluctant to attempt to use the api ( i don't like flying blind). when i try to enter the wsdl function arguments, i get errors of empty / null data.

i should be able to put these key=value pairs

"stationId"="9439040"
"beginDate"="20090622"
"endDate"="20090623"
"datum"="MLLW"
"unit"="0"
"timeZone"="0"

in the arguments textbox ( i have tried many variations, with and without quotes etc.) but i get an error declaring "stationID cannot be null or empty". i am confused. i have a simple implementation that is satisfactory (and rigid...), but i would love to use this module as its more flexible that what i have presently. i honestly can't believe that there isn't a tutorial somewhere (if there is, i can't find it) and i will be absolutely happy to document the process when i understand it. i feel like a noob again dangit, lol

all help is appreciated, links advice, and of course (constructive) scolding...

"Our thoughts become our words, our words become our deeds, and our deeds become our character. watch your thoughts with care and let them spring from love"

"Our thoughts become our words, our words become our deeds, and our deeds become our character. watch your thoughts with care and let them spring from love"

Portland (Oregon)

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week