Hello,
I need, for a new projet, to work with a SOAP webservices.
The projet itself is not really hard to understand and to build, but I don't know how to interface with SOAP.
For example, I usually use Views to list Users. In this case, I do not have users because I get them through SOAP. So, how can I list all users while I do not have them ?
It does not work with a list but it the same case with a dedicated user. With Drupal, i would use /user/xxxx/edit but here, I do not have users.

Do someone have a similar experience or documentation about coupling drupal with SOAP ws ?

Comments

WorldFallz’s picture

It depends on what you mean by 'coupling'. My main site is still d6 and uses soapclient for soap interactions. There is a patch in the issue queue to update it for d7, but wsclient is a more full featured option at this point.

And of course, you can always just write soap php directly.

If you want to create a list of users in the remote system, then you'll have to create the soap call to query the ws for the info you want, and manually create the listing page with the drupal api. At minimum you'll need to use hook_menu to create a page at a specific URL to display the listing.

Another option might be to actually import the data if you need to use it regularly. You could use wsclient_feeds to import the info you want, then you can views to create the listings as you normally would.

smorele’s picture

Thanks for your answer.
To me coupling means "introduce SOAP with Drupal"

In your opinion, I should developp my own modules to work with ? In this case, what is the interest to user Drupal if I have to developp things (even if there are hook)
I saw modules like Feeds which appears to be an alternative to create and manager user by giving the SOAP request.
This is a simple worflow of what I could need:
- submit a login form
- check on SOAP if credentials are OK
- click on "see all users"
- get all users via SOAP request
- show all these users
- click on a user
- get user on SOAP
- show an identify form with prepopulate fields with data from the last request
- submit the form
- send data throught SOAP

I think I have to create users on Drupal because I have to open sessions, so I need to create, update and delete users function of SOAP data.

WorldFallz’s picture

To me coupling means "introduce SOAP with Drupal"

That still doesn't tell us anything meaningful or describe any of the details of the use case you have in mind in any way.

In your opinion, I should developp my own modules to work with ? In this case, what is the interest to user Drupal if I have to developp things (even if there are hook)

It's not 'my opinion'. You asked how to use SOAP, which is an API, with drupal in the "Module Development and Code Questions" forum-- what type of answer did you expect? If you're not asking about programming or drupal development then please use one of the other forums.

And no one but you knows what's the point of using drupal in your use case. But to expect drupal to somehow magically understand and implement a foreign soap interface is both unreasonable and unlikely. It may well be that using drupal isn't a good idea for your project-- but we can't say since you haven't described the requirements.

This is a simple worflow of what I could need:
- submit a login form
- check on SOAP if credentials are OK
- click on "see all users"
- get all users via SOAP request
- show all these users
- click on a user
- get user on SOAP
- show an identify form with prepopulate fields with data from the last request
- submit the form
- send data throught SOAP

At least that's some level of detail. Based on this, I think you'll have to write code. Feeds doesn't work like this. If you just want to sync users, then yes, feeds can do it and likely without code.