You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by "Vince M. Clark" <vc...@globalera.com> on 2009/01/10 17:30:31 UTC

SFA - Create Lead from Web Form - Not Logged In

I'm trying to reuse existing createLead service in Marketing component. I have an HTML web form that when submitted calls a URL that maps to an OFBiz request. But the createLead service and other services that it calls requires a login. 

Here is what I have in my custom controller.xml file: 
<request-map uri="webFormSubmit"> 
<security https="false" auth="false"/> 
<event type="service" path="org.ofbiz.sfa.lead.LeadServices.xml" invoke="createLead"/> 
<response name="success" type="url" value="http://www.company.com"/> 
<response name="error" type="url" value="http://www.company.com"/> 
</request-map> 

I'm trying to accomplish this as easily as possible. So far the only thing I have created in my custom component is this request-map. No custom services. What is the best way to automatically login? Can I do it in the request-map? 

Re: SFA - Create Lead from Web Form - Not Logged In

Posted by "Vince M. Clark" <vc...@globalera.com>.
Thanks for the tips. Looks like I'm about there but one last problem. I am getting a locale error: 

java.lang.IllegalArgumentException: locale cannot be null 
null calling service createPartyRole in createLead calling service createLead in createLeadFromWebForm 

----- Original Message ----- 
From: "David E Jones" <da...@hotwaxmedia.com> 
To: user@ofbiz.apache.org 
Sent: Saturday, January 10, 2009 11:27:06 AM (GMT-0700) America/Denver 
Subject: Re: SFA - Create Lead from Web Form - Not Logged In 


1. for an <event type="service" the path attribute is ignored, that is 
part of the service definition 

2. it is typical to require a login for services, and generally 
important 

3. to provide alternatives to secured services just write an 
alternative service, preferably that has alternate security if 
applicable, and it can call existing services using the "system" user 
if needed (ie that's the common pattern) 

-David 


On Jan 10, 2009, at 8:30 AM, Vince M. Clark wrote: 

> I'm trying to reuse existing createLead service in Marketing 
> component. I have an HTML web form that when submitted calls a URL 
> that maps to an OFBiz request. But the createLead service and other 
> services that it calls requires a login. 
> 
> Here is what I have in my custom controller.xml file: 
> <request-map uri="webFormSubmit"> 
> <security https="false" auth="false"/> 
> <event type="service" path="org.ofbiz.sfa.lead.LeadServices.xml" 
> invoke="createLead"/> 
> <response name="success" type="url" value="http://www.company.com"/> 
> <response name="error" type="url" value="http://www.company.com"/> 
> </request-map> 
> 
> I'm trying to accomplish this as easily as possible. So far the only 
> thing I have created in my custom component is this request-map. No 
> custom services. What is the best way to automatically login? Can I 
> do it in the request-map? 


Re: SFA - Create Lead from Web Form - Not Logged In

Posted by David E Jones <da...@hotwaxmedia.com>.
1. for an <event type="service" the path attribute is ignored, that is  
part of the service definition

2. it is typical to require a login for services, and generally  
important

3. to provide alternatives to secured services just write an  
alternative service, preferably that has alternate security if  
applicable, and it can call existing services using the "system" user  
if needed (ie that's the common pattern)

-David


On Jan 10, 2009, at 8:30 AM, Vince M. Clark wrote:

> I'm trying to reuse existing createLead service in Marketing  
> component. I have an HTML web form that when submitted calls a URL  
> that maps to an OFBiz request. But the createLead service and other  
> services that it calls requires a login.
>
> Here is what I have in my custom controller.xml file:
> <request-map uri="webFormSubmit">
> <security https="false" auth="false"/>
> <event type="service" path="org.ofbiz.sfa.lead.LeadServices.xml"  
> invoke="createLead"/>
> <response name="success" type="url" value="http://www.company.com"/>
> <response name="error" type="url" value="http://www.company.com"/>
> </request-map>
>
> I'm trying to accomplish this as easily as possible. So far the only  
> thing I have created in my custom component is this request-map. No  
> custom services. What is the best way to automatically login? Can I  
> do it in the request-map?


Re: SFA - Create Lead from Web Form - Not Logged In

Posted by BJ Freeman <bj...@free-man.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

you have to pass a valid UserID that is in the partymgr, and has the
correct permissions.
Probably you have to create a java service that you html calls to do this.

Vince M. Clark sent the following on 1/10/2009 8:30 AM:
> I'm trying to reuse existing createLead service in Marketing component. I have an HTML web form that when submitted calls a URL that maps to an OFBiz request. But the createLead service and other services that it calls requires a login. 
> 
> Here is what I have in my custom controller.xml file: 
> <request-map uri="webFormSubmit"> 
> <security https="false" auth="false"/> 
> <event type="service" path="org.ofbiz.sfa.lead.LeadServices.xml" invoke="createLead"/> 
> <response name="success" type="url" value="http://www.company.com"/> 
> <response name="error" type="url" value="http://www.company.com"/> 
> </request-map> 
> 
> I'm trying to accomplish this as easily as possible. So far the only thing I have created in my custom component is this request-map. No custom services. What is the best way to automatically login? Can I do it in the request-map? 
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJaORyrP3NbaWWqE4RAsIeAKCgRmQo3ix8cafSQZIl3FApzh4cVgCglCTb
ljNIPkzXVOn7MiYaTgD9Se0=
=d2o+
-----END PGP SIGNATURE-----