Programatically Create a Member

Functionality discussions and feature requests

Moderators: hugo, alexandre, rmvanarkel

Post Reply
Patson
Posts: 4
Joined: Mon Mar 11, 2013 3:40 pm

Programatically Create a Member

Post by Patson » Fri May 09, 2014 6:38 am

Hi,

Considering a limited knowledge with Struct,I would like to be able to create a new member, programatically, via a Rest api call
so i guess calling the serverlet that register the member should be enough, if i provide the required field.

I was wondering if someone has gone through the same manipulation, and if someone could outline the main step and pit falls on that way.


Cheers.

Patson
Posts: 4
Joined: Mon Mar 11, 2013 3:40 pm

Re: Programatically Create a Member

Post by Patson » Tue Jun 10, 2014 11:51 am

Hello,

I have to admit, my request was too vague, and too much on the fly.
I found out the webserice available to register a Member, and went ahead tried with soapui, from the wsdl url : cyclos/services/members?wsdl
But still stuck in the middle.

i understand that can be used on a standard channel, no need to create a specific channel, so i'm trying to create a member in the inactive group( id=6), disabled the mail confirmation,
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mem="http://members.webservices.cyclos.strohalm.nl/">
<soapenv:Header/>
<soapenv:Body>
<mem:registerMember>
<!--Optional:-->
<params>
<!--Optional:-->
<groupId>6</groupId>
<!--Optional:-->
<username>doudou</username>
<!--Optional:-->
<name>Martin</name>
<!--Optional:-->
<email>sinm@gmail.com</email>
<!--Optional:-->
<loginPassword>4578</loginPassword>
<!--Optional:-->
<pin>7777</pin>
<!--Optional:-->
<credentials>login</credentials>
<!--Zero or more repetitions:-->
<fields>
<!--Optional:-->
<internalName>?</internalName>
<!--Optional:-->
<fieldId>?</fieldId>
<!--Optional:-->
<displayName>?</displayName>
<!--Optional:-->
<value>?</value>
<!--Optional:-->
<possibleValueId>?</possibleValueId>
<!--Optional:-->
<memberValueId>?</memberValueId>
<!--Optional:-->
<hidden>?</hidden>
</fields>
</params>
</mem:registerMember>
</soapenv:Body>
</soapenv:Envelope>


Questions:

- Are all the field required?
-How should the server be prepared to receive the webservice call.
-Have i missed a step in the middle?

From SAOPUI , i got this:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode xmlns:ns1="cyclos">ns1:unexpected-error</faultcode>
<faultstring>Fault occurred while processing.</faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>

Can you please suggest where to look at?

Thanks

Post Reply