Adding subsribers via soap - date format problem

Use this forum to report bugs and to check for bugfixes and new releases of OpenEMM

Moderator: moderator

jacpad
Posts: 11
Joined: Tue Apr 29, 2008 9:27 am

Adding subsribers via soap - date format problem

Post by jacpad »

Hi all,
I have a problem adding subscribers with user defined fields to our system via the webservice.
The subsribers are successfully added to the DB, but the fields with type date seems to be ignored. I tried some formats now and I want to ask which format the webservice accepts ? Is this documented somewhere - I can't find anything about it.

Thanks for any help
Patrik
maschoff
Site Admin
Posts: 2628
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Post by maschoff »

You can find the webservices documentation in the download section of project OpenEMM at SourceForge:

http://sourceforge.net/project/showfile ... _id=168937
OpenEMM Maintainer
jacpad
Posts: 11
Joined: Tue Apr 29, 2008 9:27 am

Post by jacpad »

Thanks, but the documentation does not mention the format for a user defined date type field. Only the parameter type for the soap call (StringArrayType) is given.
maschoff
Site Admin
Posts: 2628
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

split of dates

Post by maschoff »

You have to split a date like this:

necessary parts:
- fieldname_DAY_DATE
- fieldname_MONTH_DATE
- fieldname_YEAR_DATE

optional parts:
- fieldname_HOUR_DATE
- fieldname_MINUTE_DATE
- fieldname_SECOND_DATE

Does this help?
OpenEMM Maintainer
jacpad
Posts: 11
Joined: Tue Apr 29, 2008 9:27 am

Post by jacpad »

Thanks a lot, this is the information I was looking for.
I couldn't find it in any documentation.

ma == best :)

edit: Looks like the webservice doesn't want my dates anyway.
I tried like you wrote (including time parameter), but none of the dates where written to the database and I didn't even get an exception just the ID. So I still in need for help....
Last edited by jacpad on Wed Apr 30, 2008 2:21 pm, edited 1 time in total.
maschoff
Site Admin
Posts: 2628
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Post by maschoff »

Well, I sit next door to the core developers ... If you can confirm that it works for you I will add this information to the webservice documentation.
OpenEMM Maintainer
jacpad
Posts: 11
Joined: Tue Apr 29, 2008 9:27 am

Post by jacpad »

As I wrote in my edit - sorry I didn't see your answer that moment - the date values are not written to the database. I could post or send the soap request. Or maybe is there a switch to log everything ?
maschoff
Site Admin
Posts: 2628
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Post by maschoff »

Posting your SOAP request would be the easiest.
OpenEMM Maintainer
jacpad
Posts: 11
Joined: Tue Apr 29, 2008 9:27 am

Post by jacpad »

ok - so here is my request:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="urn:agnitas-webservice"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:addSubscriber>
<in0 xsi:type="SOAP-ENC:string">account</in0>
<in1 xsi:type="SOAP-ENC:string">pw</in1>
<in2 xsi:type="xsd:boolean">true</in2>
<in3 xsi:type="SOAP-ENC:string">email</in3>
<in4 xsi:type="xsd:boolean">false</in4>
<in5 xsi:type="ns1:StringArrayType">
<x xsi:type="xsd:string">firstname</x>
<x xsi:type="xsd:string">lastname</x>
<x xsi:type="xsd:string">email</x>
<x xsi:type="xsd:string">udef_home_country</x>
<x xsi:type="xsd:string">udef_home_city</x>
<x xsi:type="xsd:string">
udef_home_newsletter_DAY_DATE
</x>
<x xsi:type="xsd:string">
udef_home_newsletter_MONTH_DATE
</x>
<x xsi:type="xsd:string">
udef_home_newsletter_YEAR_DATE
</x>
<x xsi:type="xsd:string">
udef_home_newsletter_HOUR_DATE
</x>
<x xsi:type="xsd:string">
udef_home_newsletter_MINUTE_DATE
</x>
<x xsi:type="xsd:string">
udef_home_newsletter_SECOND_DATE
</x>
<x xsi:type="xsd:string">udef_home_customer_DAY_DATE</x>
<x xsi:type="xsd:string">
udef_home_customer_MONTH_DATE
</x>
<x xsi:type="xsd:string">
udef_home_customer_YEAR_DATE
</x>
<x xsi:type="xsd:string">
udef_home_customer_HOUR_DATE
</x>
<x xsi:type="xsd:string">
udef_home_customer_MINUTE_DATE
</x>
<x xsi:type="xsd:string">
udef_home_customer_SECOND_DATE
</x>
<x xsi:type="xsd:string">udef_home_contact_type</x>
</in5>
<in6 xsi:type="ns1:StringArrayType">
<x xsi:type="xsd:string">Horst</x>
<x xsi:type="xsd:string">Klotz</x>
<x xsi:type="xsd:string">test@aol.com</x>
<x xsi:type="xsd:string">DE</x>
<x xsi:type="xsd:string">Berlin</x>
<x xsi:type="xsd:string">14</x>
<x xsi:type="xsd:string">9</x>
<x xsi:type="xsd:string">2006</x>
<x xsi:type="xsd:string">0</x>
<x xsi:type="xsd:string">0</x>
<x xsi:type="xsd:string">0</x>
<x xsi:type="xsd:string">26</x>
<x xsi:type="xsd:string">7</x>
<x xsi:type="xsd:string">2007</x>
<x xsi:type="xsd:string">0</x>
<x xsi:type="xsd:string">0</x>
<x xsi:type="xsd:string">0</x>
<x xsi:type="xsd:string">C</x>
</in6>
</ns1:addSubscriber>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
maschoff
Site Admin
Posts: 2628
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Bug fixed

Post by maschoff »

We found a bug and posted the bug fix to the SourceForge bugtracker here:

http://sourceforge.net/tracker/index.ph ... tid=848488

Could you please confirm that the fix works for you? Thank you!
OpenEMM Maintainer
jacpad
Posts: 11
Joined: Tue Apr 29, 2008 9:27 am

Post by jacpad »

This is looking very good - yes, the date values are inserted correctly now.
Thanks to you and the developers for the fast reponse on this issue.

Best regards
Patrik
Post Reply