Page 1 of 1

Using webservices

Posted: Wed Feb 04, 2009 2:23 pm
by Jurgen
Hi there :)

I've installed openemm on windows using the guide provided.
Everything works fine without probs.
The only thing I can't seem to be able to get working are the webservices...

I already generated the ws.wsdl using the cmd file provided

When accessing http://localhost:8080/emm_webservice I get

Code: Select all

And now... Some Services

    * urn:agnitas-webservice (wsdl)
          o newEmailMailing
          o insertContent
          o deleteContent
          o sendMailing
          o addSubscriber
          o getSubscriber
          o findSubscriber
          o deleteSubscriber
          o setSubscriberBinding
          o newEmailMailingWithReply
          o updateEmailMailing
          o getSubscriberBinding
          o updateSubscriber 
but when accessing http://localhost:8080/services/urn:agni ... rvice?wsdl
I get

Code: Select all

404 Not Found
/services/urn:agnitas-webservice was not found on this server.

Resin-3.0.19 (built Mon, 15 May 2006 04:50:47 PDT) 
Any ideas, tips?

Re: Using webservices

Posted: Wed Feb 04, 2009 3:19 pm
by mkalen
Jurgen wrote:The only thing I can't seem to be able to get working are the webservices...

I already generated the ws.wsdl using the cmd file provided

but when accessing http://localhost:8080/services/urn:agni ... rvice?wsdl
I get

Code: Select all

404 Not Found
/services/urn:agnitas-webservice was not found on this server.
Not to worry. The WSDL-link on the "hello world"-page is wrong, but the only consequence is that you cannot view the WSDL in your web browser.

The important part to start using SOAP-calls to the web service is that you have WSDL available, which you say you do. If you want to inspect the WSDL yourself, just open the "ws.wsdl" as XML and have a look.

To get up to speed with your programming language of choice, just feed the WSDL-file to your SOAP-client and start making remote calls.

If you use PHP you might want to have a look at the third party contributed code for an OpenEMM PHP-wrapper, hiding much of the SOAP-workings and simplifying your life as a web service consumer:
http://enarion.net/programming/php/openemm/

Agnitas themselves also link to this wrapper from the OpenEMM Download Center:
http://www.openemm.org/downloads.html (see "Downloads from Contributors")

Good luck!
Martin

Posted: Thu Feb 05, 2009 8:48 am
by Jurgen
Ok thanks, it's working now :)

The only problem I'm having is that the webservice doesn't seem to be working correctly.
It always returns 0 for addSubscriber

Does anybody know the default username and password for the webservices?
I'm now using 'admin' and 'openemm', but there is no error or anything when I change to some other random value... :?

How to add the WebService user

Posted: Thu Feb 05, 2009 3:40 pm
by mkalen
Jurgen wrote:Does anybody know the default username and password for the webservices?
You need to read the "Deployment information" section at the start of the document called "Documentation of OpenEMM webservices interface"(available from the OpenEMM Download Center).

There you will find information about how to set the username and password in the database.

Posted: Fri Feb 06, 2009 9:07 am
by Jurgen
Thank you so much :)
I've overlooked this in the document.

Thx again :) :) :)

/me happy now ;)