The second way is defined as an event in the
applications/party/webapp/partymgr/WEB-INF/controller.xml
   <request-map uri="createCustomer">
        <security https="true" auth="true"/>
        <event type="simple" path="org/ofbiz/party/user/UserEvents.xml"
invoke="createCustomer"/>
        <response name="success" type="view" value="viewprofile"/>
        <response name="error" type="view" value="NewCustomer"/>
    </request-map>

you can also create a service for it, as many services use the same
minilang methods.
and example:
    <service name="createVendor" engine="simple"
            location="org/ofbiz/party/party/PartyServices.xml"
invoke="createVendor" auth="true">
        <description>Create Vendor Information</description>
        <auto-attributes entity-name="Vendor" include="pk" mode="IN"
optional="false"/>
        <auto-attributes entity-name="Vendor" include="nonpk" mode="IN"
optional="true"/>
    </service>




Yitao_Zhao sent the following on 4/8/2008 8:54 PM:
> Thanks for your info, I can do that follow the first way
> 
> However , for the second way,
> I think you suggest me to use the createCustomer method, however it's not a
> service inside, I couldn't invoke that in the /servicedef/sevice.xml of my
> project
> 
> My problem is:
> Whether I could construct a service in the service.xml , and invoke the
> createCustomer method
> Or has other ways
> 
> Best regards
> 
> 
> -----邮件原件-----
> 发件人: BJ Freeman [mailto:[EMAIL PROTECTED] 
> 发送时间: 2008年4月8日 22:04
> 收件人: user@ofbiz.apache.org
> 主题: Re: Creating a customer.
> 
> there is already a create customer.
> I suggest you follow the create customer from the UI page thru the Services.
> https://demo.hotwaxmedia.com/partymgr/control/createnew
> if you want to create a customer from another source, you supply the
> information required by the createCustomer Service it will handle all this.
> 
> Yitao_Zhao sent the following on 4/8/2008 1:05 AM:
>> Hi, I am trying to create a customer via webservice. I am following these
>> steps
>>
>> 1) Call createPerson 
>> 2) Call createPartyRole
>> Here there are some things I don't understand:
>> Why does it create two roles: CUSTOMER and _NA_, is this correct?, I have
>> only set it to create role type CUSTOMER
>> When a role have been created, should I then get the role ID and use that
>> next time - I cannot find any service methods that have something like
>> getPartyRoleID
>> There are some service methods like ensureNaPartyRole, should I use them
> for
>> anything?
>> 3) call createPartyContactMech service, it generates a record for
>> POSTAL_ADDRESS ,but how can I set the parameters for         POSTAL_ADDRESS
>>
>> 4) Call createPartyPostalAddress
>> This creates another record, where I can fill out address information
>>
>> My question for step 3 and 4 is, how do I create an address with one
> service
>> call? What is the right way?
>>
>> Best regards
>>
>> Tony.
>>
>>
>>
>>
> 
> 
> 
> 


Reply via email to