Rails and WebService usage

Use this forum for all questions related to the source code of OpenEMM

Moderator: moderator

Rails and WebService usage

Postby ecoment » Tue Nov 16, 2010 6:50 pm

Hi guys,

at first I'm very new to OpenEMM. I installed it on one of our servers and it is running. We want to use OpenEMM to send out the newsletter for our community meinsportplatz.de.

So far OpenEMM is running including the webservice. Because our site is written in Rails we want to access the OpenEMM by the provided webservice. So I created a webservice user and gave them a password. Access is possible.

But I have one major problem I cannot solve: I only can retrieve data but not add new data, e.g. add a new subscriber. I think it's because of the Rails generated classes.

I always get this error when I want to add a new subscriber:

Code: Select all
undefined method `[]' for #<SOAP::Mapping::SchemaSequenceDefinition:0x1816964>


Therefore I looked into the sourcecode of the generated Ruby-classes and there is a definition for StringArrayType I do not understand.

Code: Select all
class StringArraytype << ::Array
end


That means, the class StringArrayType is just an subclass of array. But when I look at the sourcecode of the orginal webservice client written in Java the StringArrayType has at least one attribute called "x". Therefore I extended the rubyclass StringArrayType with this attribute and did try it again. Without any success.

Maybe it is becaue I'm using the extension 'soap4r' and not the builtin ruby soap driver. But the built-in ruby soap driver doesn't understand the WSDL generated by OpenEMM so I have to use 'soap4r'.

Maybe some of you can help me out on my problem and give me some useful tricks.

Thanks,
Martin
ecoment
 
Posts: 4
Joined: Tue Nov 16, 2010 6:38 pm

Return to Development

Who is online

Users browsing this forum: No registered users and 0 guests

cron