OFBiz Beginner's Development Guide Using Practice Application

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

OFBiz Beginner's Development Guide Using Practice Application

Pranay Pandey
Hello All,

Here is the link for the document which will be helpful for the beginners to
get ready for working in Ofbiz.
http://docs.ofbiz.org/display/OFBIZ/OFBiz+Beginner%27s+Development+Guide+Using+Practice+Application

Thanks to everybody involved directly or indirectly in the creation of this
document.
We will try to improve this document as soon as time permits.
Improvement suggestions are more then welcome and looking for the positive
contribution from community members to make it much better document.

--
Thanks & Regards
--
Pranay Pandey
Indore, India
Reply | Threaded
Open this post in threaded view
|

Re: OFBiz Beginner's Development Guide Using Practice Application

RolandH-2
Hello Pranay,

great work :)
Perfect for beginners like myself.

As I'm trying to write my first service, implemented with java, maybe
you could add a few words about that in your tutorial.

Maybe someone could answer a question about that:
how do I call services which need authentication (e.g.
createPartyEmailAddress from framework/party/services)?
What I'm doing:
my service requires already authentication, which works, creating
persons is no problem at all (createPerson has auth="false", which i
don't get why today, but i'm sure that's because of my limited knowledge
of ofbiz)
calling createPartyEmailAddress throws:
[  ServiceDispatcher.java:522:ERROR] Error in Service
[partyContactMechPermissionCheck]: You must be logged in to complete the
[Party contact mech permission logic] process.
a snipped of my code is below.

Thanks again for this tutorial and thanks for any answers,

Roland

--- code ---
[...]
Map createPartyEmailAddressMap = UtilMisc.toMap(
    "emailAddress", context.get("emailAddress"),
    "contactMechPurposeTypeId", "PRIMARY_EMAIL",
    "login.username", context.get("login.username"),
    "login.password", context.get("login.password"));
[...]

// create Person
Map createPersonResult = dispatcher.runSync("createPerson",
createPersonMap);
if (ServiceUtil.isError(createPersonResult)) {
 return createPersonResult;
}

// create EmailAddress
createPartyEmailAddressMap.put("partyId",
createPersonResult.get("partyId"));
Map createPartyEmailAddressResult =
dispatcher.runSync("createPartyEmailAddress", createPartyEmailAddressMap);
if (ServiceUtil.isError(createPartyEmailAddressResult)) {
 return createPartyEmailAddressResult;
}

Reply | Threaded
Open this post in threaded view
|

Re: OFBiz Beginner's Development Guide Using Practice Application

Adrian Crum
createPerson has auth set to false so that new users can create
themselves. It's an exception to the standard practice.

-Adrian


RolandH wrote:

> Hello Pranay,
>
> great work :)
> Perfect for beginners like myself.
>
> As I'm trying to write my first service, implemented with java, maybe
> you could add a few words about that in your tutorial.
>
> Maybe someone could answer a question about that:
> how do I call services which need authentication (e.g.
> createPartyEmailAddress from framework/party/services)?
> What I'm doing:
> my service requires already authentication, which works, creating
> persons is no problem at all (createPerson has auth="false", which i
> don't get why today, but i'm sure that's because of my limited knowledge
> of ofbiz)
> calling createPartyEmailAddress throws:
> [  ServiceDispatcher.java:522:ERROR] Error in Service
> [partyContactMechPermissionCheck]: You must be logged in to complete the
> [Party contact mech permission logic] process.
> a snipped of my code is below.
>
> Thanks again for this tutorial and thanks for any answers,
>
> Roland
>
> --- code ---
> [...]
> Map createPartyEmailAddressMap = UtilMisc.toMap(
>    "emailAddress", context.get("emailAddress"),
>    "contactMechPurposeTypeId", "PRIMARY_EMAIL",
>    "login.username", context.get("login.username"),
>    "login.password", context.get("login.password"));
> [...]
>
> // create Person
> Map createPersonResult = dispatcher.runSync("createPerson",
> createPersonMap);
> if (ServiceUtil.isError(createPersonResult)) {
> return createPersonResult;
> }
>
> // create EmailAddress
> createPartyEmailAddressMap.put("partyId",
> createPersonResult.get("partyId"));
> Map createPartyEmailAddressResult =
> dispatcher.runSync("createPartyEmailAddress", createPartyEmailAddressMap);
> if (ServiceUtil.isError(createPartyEmailAddressResult)) {
> return createPartyEmailAddressResult;
> }
>
>
Reply | Threaded
Open this post in threaded view
|

Re: OFBiz Beginner's Development Guide Using Practice Application

BJ Freeman
In reply to this post by Pranay Pandey
thanks for the effort

Pranay Pandey sent the following on 6/5/2008 8:22 AM:

> Hello All,
>
> Here is the link for the document which will be helpful for the beginners to
> get ready for working in Ofbiz.
> http://docs.ofbiz.org/display/OFBIZ/OFBiz+Beginner%27s+Development+Guide+Using+Practice+Application
>
> Thanks to everybody involved directly or indirectly in the creation of this
> document.
> We will try to improve this document as soon as time permits.
> Improvement suggestions are more then welcome and looking for the positive
> contribution from community members to make it much better document.
>

Reply | Threaded
Open this post in threaded view
|

Re: OFBiz Beginner's Development Guide Using Practice Application

Ashish Vijaywargiya
Pranay ,

Thanks for putting this document on the Ofbiz Confluence .

--
Ashish

On Thu, Jun 5, 2008 at 2:41 PM, BJ Freeman <[hidden email]> wrote:

> thanks for the effort
>
> Pranay Pandey sent the following on 6/5/2008 8:22 AM:
> > Hello All,
> >
> > Here is the link for the document which will be helpful for the beginners
> to
> > get ready for working in Ofbiz.
> >
> http://docs.ofbiz.org/display/OFBIZ/OFBiz+Beginner%27s+Development+Guide+Using+Practice+Application
> >
> > Thanks to everybody involved directly or indirectly in the creation of
> this
> > document.
> > We will try to improve this document as soon as time permits.
> > Improvement suggestions are more then welcome and looking for the
> positive
> > contribution from community members to make it much better document.
> >
>
>
Reply | Threaded
Open this post in threaded view
|

Re: OFBiz Beginner's Development Guide Using Practice Application

Pranay Pandey
In reply to this post by RolandH-2
Hello Ronald,

I hope this will be of help.
The service you are calling is createPartyEmailAddress requires
authentication so you need to send the userLogin value to it.
Something like this:

// perform actions as the system user
            GenericValue userLogin =
delegator.findByPrimaryKeyCache("UserLogin", UtilMisc.toMap("userLoginId",
"system"));

            input = UtilMisc.toMap("userLogin", userLogin, "emailAddress",
email, "partyId", "_NA_", "fromDate", fromDate, "contactMechPurposeTypeId",
"OTHER_EMAIL");
            Map serviceResults =
dispatcher.runSync("createPartyEmailAddress", input);
            if (ServiceUtil.isError(serviceResults)) {
                throw new
GenericServiceException(ServiceUtil.getErrorMessage(serviceResults));
            }

Thanks & Regrads
--
Pranay Pandey


On Thu, Jun 5, 2008 at 9:38 PM, RolandH <[hidden email]> wrote:

> Hello Pranay,
>
> great work :)
> Perfect for beginners like myself.
>
> As I'm trying to write my first service, implemented with java, maybe you
> could add a few words about that in your tutorial.
>
> Maybe someone could answer a question about that:
> how do I call services which need authentication (e.g.
> createPartyEmailAddress from framework/party/services)?
> What I'm doing:
> my service requires already authentication, which works, creating persons
> is no problem at all (createPerson has auth="false", which i don't get why
> today, but i'm sure that's because of my limited knowledge of ofbiz)
> calling createPartyEmailAddress throws:
> [  ServiceDispatcher.java:522:ERROR] Error in Service
> [partyContactMechPermissionCheck]: You must be logged in to complete the
> [Party contact mech permission logic] process.
> a snipped of my code is below.
>
> Thanks again for this tutorial and thanks for any answers,
>
> Roland
>
> --- code ---
> [...]
> Map createPartyEmailAddressMap = UtilMisc.toMap(
>   "emailAddress", context.get("emailAddress"),
>   "contactMechPurposeTypeId", "PRIMARY_EMAIL",
>   "login.username", context.get("login.username"),
>   "login.password", context.get("login.password"));
> [...]
>
> // create Person
> Map createPersonResult = dispatcher.runSync("createPerson",
> createPersonMap);
> if (ServiceUtil.isError(createPersonResult)) {
> return createPersonResult;
> }
>
> // create EmailAddress
> createPartyEmailAddressMap.put("partyId",
> createPersonResult.get("partyId"));
> Map createPartyEmailAddressResult =
> dispatcher.runSync("createPartyEmailAddress", createPartyEmailAddressMap);
> if (ServiceUtil.isError(createPartyEmailAddressResult)) {
> return createPartyEmailAddressResult;
> }
>
>
Reply | Threaded
Open this post in threaded view
|

Re: OFBiz Beginner's Development Guide Using Practice Application

RolandH-2
In reply to this post by Adrian Crum
Thanks for this clarification, Adrian

--Roland

Adrian Crum wrote:
> createPerson has auth set to false so that new users can create
> themselves. It's an exception to the standard practice.
>
> -Adrian

Reply | Threaded
Open this post in threaded view
|

Re: OFBiz Beginner's Development Guide Using Practice Application

RolandH-2
In reply to this post by Pranay Pandey
Hi Pranay,

thanks for your answer, after this mail i found my real solution:

    Map createPartyEmailAddressMap =
        UtilMisc.toMap(
               "emailAddress", context.get("emailAddress"),
               "contactMechPurposeTypeId", "PRIMARY_EMAIL",
               "userLogin", context.get("userLogin")
               );
userLogin holds the actual user, if I read existing code correctly.

Thanks for your help,
Roland

Pranay Pandey wrote:

> I hope this will be of help.
> The service you are calling is createPartyEmailAddress requires
> authentication so you need to send the userLogin value to it.
> Something like this:
>
> // perform actions as the system user
>             GenericValue userLogin =
> delegator.findByPrimaryKeyCache("UserLogin", UtilMisc.toMap("userLoginId",
> "system"));
>
>             input = UtilMisc.toMap("userLogin", userLogin, "emailAddress",
> email, "partyId", "_NA_", "fromDate", fromDate, "contactMechPurposeTypeId",
> "OTHER_EMAIL");
>             Map serviceResults =
> dispatcher.runSync("createPartyEmailAddress", input);
>             if (ServiceUtil.isError(serviceResults)) {
>                 throw new
> GenericServiceException(ServiceUtil.getErrorMessage(serviceResults));
>             }
>  
Reply | Threaded
Open this post in threaded view
|

Re: OFBiz Beginner's Development Guide Using Practice Application

Edson Chavez
thnx by effort but i have a problem i follow the steps in

"Creating the web app on the back end" but when i try charge aplication i
cant see nothing only especial characters : 

somebody have same result?

regards

Edson

2008/6/6 RolandH <[hidden email]>:

> Hi Pranay,
>
> thanks for your answer, after this mail i found my real solution:
>
>   Map createPartyEmailAddressMap =
>       UtilMisc.toMap(
>              "emailAddress", context.get("emailAddress"),
>              "contactMechPurposeTypeId", "PRIMARY_EMAIL",
>              "userLogin", context.get("userLogin")
>              );
> userLogin holds the actual user, if I read existing code correctly.
>
> Thanks for your help,
> Roland
>
>
> Pranay Pandey wrote:
>
>> I hope this will be of help.
>> The service you are calling is createPartyEmailAddress requires
>> authentication so you need to send the userLogin value to it.
>> Something like this:
>>
>> // perform actions as the system user
>>            GenericValue userLogin =
>> delegator.findByPrimaryKeyCache("UserLogin", UtilMisc.toMap("userLoginId",
>> "system"));
>>
>>            input = UtilMisc.toMap("userLogin", userLogin, "emailAddress",
>> email, "partyId", "_NA_", "fromDate", fromDate,
>> "contactMechPurposeTypeId",
>> "OTHER_EMAIL");
>>            Map serviceResults =
>> dispatcher.runSync("createPartyEmailAddress", input);
>>            if (ServiceUtil.isError(serviceResults)) {
>>                throw new
>> GenericServiceException(ServiceUtil.getErrorMessage(serviceResults));
>>            }
>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: OFBiz Beginner's Development Guide Using Practice Application

Pranay Pandey
Hi Edson,
Your question is not clear. Please be verbose when you are asking questions.
BTW there is one zip file of source is also attached with this you can take
a reference from that.

Thanks & Regards
--
Pranay Pandey


On Wed, Jun 11, 2008 at 3:38 AM, Edson Chavez <[hidden email]> wrote:

> thnx by effort but i have a problem i follow the steps in
>
> "Creating the web app on the back end" but when i try charge aplication i
> cant see nothing only especial characters :
>
> somebody have same result?
>
> regards
>
> Edson
>
> 2008/6/6 RolandH <[hidden email]>:
>
> > Hi Pranay,
> >
> > thanks for your answer, after this mail i found my real solution:
> >
> >   Map createPartyEmailAddressMap =
> >       UtilMisc.toMap(
> >              "emailAddress", context.get("emailAddress"),
> >              "contactMechPurposeTypeId", "PRIMARY_EMAIL",
> >              "userLogin", context.get("userLogin")
> >              );
> > userLogin holds the actual user, if I read existing code correctly.
> >
> > Thanks for your help,
> > Roland
> >
> >
> > Pranay Pandey wrote:
> >
> >> I hope this will be of help.
> >> The service you are calling is createPartyEmailAddress requires
> >> authentication so you need to send the userLogin value to it.
> >> Something like this:
> >>
> >> // perform actions as the system user
> >>            GenericValue userLogin =
> >> delegator.findByPrimaryKeyCache("UserLogin",
> UtilMisc.toMap("userLoginId",
> >> "system"));
> >>
> >>            input = UtilMisc.toMap("userLogin", userLogin,
> "emailAddress",
> >> email, "partyId", "_NA_", "fromDate", fromDate,
> >> "contactMechPurposeTypeId",
> >> "OTHER_EMAIL");
> >>            Map serviceResults =
> >> dispatcher.runSync("createPartyEmailAddress", input);
> >>            if (ServiceUtil.isError(serviceResults)) {
> >>                throw new
> >> GenericServiceException(ServiceUtil.getErrorMessage(serviceResults));
> >>            }
> >>
> >>
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: OFBiz Beginner's Development Guide Using Practice Application

Edson Chavez
hi Pranay tnx for reply

first place tnx by the work!!!! :)

y tried download the zip but is a 93.4 Kb size, is right? i try download it
9 times and always i receive a corrupted File :(

i say and my earlier message:

i follow the steps 1 to 11 detailed in the
"Creating the web app" section of the
tutorial<http://docs.ofbiz.org/pages/editpage.action?pageId=4432>and
when i start ofbiz and i put the addres
https://localhost:8443/practice/control/main

and load a blank page, when i put
http://localhost:8443/practice/control/main i receive a download dialog for
a main file. i'm curious and downlad it but is only 6 specials characters
file and no data nor "first practice" message i don't know what is wrong
with my files :(

somebody, know what happened or can fix the zip file for download ?

regards
Edson



2008/6/11 Pranay Pandey <[hidden email]>:

> Hi Edson,
> Your question is not clear. Please be verbose when you are asking
> questions.
> BTW there is one zip file of source is also attached with this you can take
> a reference from that.
>
> Thanks & Regards
> --
> Pranay Pandey
>
>
> On Wed, Jun 11, 2008 at 3:38 AM, Edson Chavez <[hidden email]>
> wrote:
>
> > thnx by effort but i have a problem i follow the steps in
> >
> > "Creating the web app on the back end" but when i try charge aplication i
> > cant see nothing only especial characters :
> >
> > somebody have same result?
> >
> > regards
> >
> > Edson
> >
> > 2008/6/6 RolandH <[hidden email]>:
> >
> > > Hi Pranay,
> > >
> > > thanks for your answer, after this mail i found my real solution:
> > >
> > >   Map createPartyEmailAddressMap =
> > >       UtilMisc.toMap(
> > >              "emailAddress", context.get("emailAddress"),
> > >              "contactMechPurposeTypeId", "PRIMARY_EMAIL",
> > >              "userLogin", context.get("userLogin")
> > >              );
> > > userLogin holds the actual user, if I read existing code correctly.
> > >
> > > Thanks for your help,
> > > Roland
> > >
> > >
> > > Pranay Pandey wrote:
> > >
> > >> I hope this will be of help.
> > >> The service you are calling is createPartyEmailAddress requires
> > >> authentication so you need to send the userLogin value to it.
> > >> Something like this:
> > >>
> > >> // perform actions as the system user
> > >>            GenericValue userLogin =
> > >> delegator.findByPrimaryKeyCache("UserLogin",
> > UtilMisc.toMap("userLoginId",
> > >> "system"));
> > >>
> > >>            input = UtilMisc.toMap("userLogin", userLogin,
> > "emailAddress",
> > >> email, "partyId", "_NA_", "fromDate", fromDate,
> > >> "contactMechPurposeTypeId",
> > >> "OTHER_EMAIL");
> > >>            Map serviceResults =
> > >> dispatcher.runSync("createPartyEmailAddress", input);
> > >>            if (ServiceUtil.isError(serviceResults)) {
> > >>                throw new
> > >> GenericServiceException(ServiceUtil.getErrorMessage(serviceResults));
> > >>            }
> > >>
> > >>
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: OFBiz Beginner's Development Guide Using Practice Application

Pranay Pandey
Hello Edson,

Thanks for this.
I have uploaded the new zip file for the source now try this.
BTW for your problem you can recheck the ofbiz-component.xml file. It seems
your component is not loaded.
Always go through the log on consol, thats the best place to find the
problem and make practice of it. This will really help you in understanding
things. If your component is loaded properly then you will get message over
consol like :
2008-06-12 09:45:34,573 (main) [ ComponentContainer.java:157:INFO ]
Auto-Loading component directory :
[${ofbizHome}/hot-deploy]
2008-06-12 09:45:34,631 (main) [            UtilXml.java:241:INFO ] XML Read
0.032s: file:/${ofbizHome}/hot-deploy/practice/ofbiz-component.xml
2008-06-12 09:45:34,632 (main) [ ComponentContainer.java:216:INFO ] Loading
component : [practice]
2008-06-12 09:45:34,669 (main) [ ComponentContainer.java:126:INFO ] All
components loaded

Check this out :)


Regards
--
Pranay Pandey


On Wed, Jun 11, 2008 at 8:52 PM, Edson Chavez <[hidden email]> wrote:

> hi Pranay tnx for reply
>
> first place tnx by the work!!!! :)
>
> y tried download the zip but is a 93.4 Kb size, is right? i try download it
> 9 times and always i receive a corrupted File :(
>
> i say and my earlier message:
>
> i follow the steps 1 to 11 detailed in the
> "Creating the web app" section of the
> tutorial<http://docs.ofbiz.org/pages/editpage.action?pageId=4432>and
> when i start ofbiz and i put the addres
> https://localhost:8443/practice/control/main
>
> and load a blank page, when i put
> http://localhost:8443/practice/control/main i receive a download dialog
> for
> a main file. i'm curious and downlad it but is only 6 specials characters
> file and no data nor "first practice" message i don't know what is wrong
> with my files :(
>
> somebody, know what happened or can fix the zip file for download ?
>
> regards
> Edson
>
>
>
> 2008/6/11 Pranay Pandey <[hidden email]>:
>
> > Hi Edson,
> > Your question is not clear. Please be verbose when you are asking
> > questions.
> > BTW there is one zip file of source is also attached with this you can
> take
> > a reference from that.
> >
> > Thanks & Regards
> > --
> > Pranay Pandey
> >
> >
> > On Wed, Jun 11, 2008 at 3:38 AM, Edson Chavez <[hidden email]>
> > wrote:
> >
> > > thnx by effort but i have a problem i follow the steps in
> > >
> > > "Creating the web app on the back end" but when i try charge aplication
> i
> > > cant see nothing only especial characters :
> > >
> > > somebody have same result?
> > >
> > > regards
> > >
> > > Edson
> > >
> > > 2008/6/6 RolandH <[hidden email]>:
> > >
> > > > Hi Pranay,
> > > >
> > > > thanks for your answer, after this mail i found my real solution:
> > > >
> > > >   Map createPartyEmailAddressMap =
> > > >       UtilMisc.toMap(
> > > >              "emailAddress", context.get("emailAddress"),
> > > >              "contactMechPurposeTypeId", "PRIMARY_EMAIL",
> > > >              "userLogin", context.get("userLogin")
> > > >              );
> > > > userLogin holds the actual user, if I read existing code correctly.
> > > >
> > > > Thanks for your help,
> > > > Roland
> > > >
> > > >
> > > > Pranay Pandey wrote:
> > > >
> > > >> I hope this will be of help.
> > > >> The service you are calling is createPartyEmailAddress requires
> > > >> authentication so you need to send the userLogin value to it.
> > > >> Something like this:
> > > >>
> > > >> // perform actions as the system user
> > > >>            GenericValue userLogin =
> > > >> delegator.findByPrimaryKeyCache("UserLogin",
> > > UtilMisc.toMap("userLoginId",
> > > >> "system"));
> > > >>
> > > >>            input = UtilMisc.toMap("userLogin", userLogin,
> > > "emailAddress",
> > > >> email, "partyId", "_NA_", "fromDate", fromDate,
> > > >> "contactMechPurposeTypeId",
> > > >> "OTHER_EMAIL");
> > > >>            Map serviceResults =
> > > >> dispatcher.runSync("createPartyEmailAddress", input);
> > > >>            if (ServiceUtil.isError(serviceResults)) {
> > > >>                throw new
> > > >>
> GenericServiceException(ServiceUtil.getErrorMessage(serviceResults));
> > > >>            }
> > > >>
> > > >>
> > > >
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: OFBiz Beginner's Development Guide Using Practice Application

Chirag Manocha
Hello Edson,

I tried the new Zip File.
Now its working fine.

--
Thanks & Regards
Chirag Manocha
Hotwax Media Inc.
(M) +91-982-631-9099
Reply | Threaded
Open this post in threaded view
|

Re: OFBiz Beginner's Development Guide Using Practice Application

Alex D. Fleming-2
In reply to this post by Pranay Pandey
Dear Pranay,

The document shared by you for the beginner looks very good to me.
Thank you for hard work , I appreciate your efforts :).



On Thu, Jun 12, 2008 at 12:46 AM, Pranay Pandey <[hidden email]>
wrote:

> Hello Edson,
>
> Thanks for this.
> I have uploaded the new zip file for the source now try this.
> BTW for your problem you can recheck the ofbiz-component.xml file. It seems
> your component is not loaded.
> Always go through the log on consol, thats the best place to find the
> problem and make practice of it. This will really help you in understanding
> things. If your component is loaded properly then you will get message over
> consol like :
> 2008-06-12 09:45:34,573 (main) [ ComponentContainer.java:157:INFO ]
> Auto-Loading component directory :
> [${ofbizHome}/hot-deploy]
> 2008-06-12 09:45:34,631 (main) [            UtilXml.java:241:INFO ] XML
> Read
> 0.032s: file:/${ofbizHome}/hot-deploy/practice/ofbiz-component.xml
> 2008-06-12 09:45:34,632 (main) [ ComponentContainer.java:216:INFO ] Loading
> component : [practice]
> 2008-06-12 09:45:34,669 (main) [ ComponentContainer.java:126:INFO ] All
> components loaded
>
> Check this out :)
>
>
> Regards
> --
> Pranay Pandey
>
>
> On Wed, Jun 11, 2008 at 8:52 PM, Edson Chavez <[hidden email]>
> wrote:
>
> > hi Pranay tnx for reply
> >
> > first place tnx by the work!!!! :)
> >
> > y tried download the zip but is a 93.4 Kb size, is right? i try download
> it
> > 9 times and always i receive a corrupted File :(
> >
> > i say and my earlier message:
> >
> > i follow the steps 1 to 11 detailed in the
> > "Creating the web app" section of the
> > tutorial<http://docs.ofbiz.org/pages/editpage.action?pageId=4432>and
> > when i start ofbiz and i put the addres
> > https://localhost:8443/practice/control/main
> >
> > and load a blank page, when i put
> > http://localhost:8443/practice/control/main i receive a download dialog
> > for
> > a main file. i'm curious and downlad it but is only 6 specials characters
> > file and no data nor "first practice" message i don't know what is wrong
> > with my files :(
> >
> > somebody, know what happened or can fix the zip file for download ?
> >
> > regards
> > Edson
> >
> >
> >
> > 2008/6/11 Pranay Pandey <[hidden email]>:
> >
> > > Hi Edson,
> > > Your question is not clear. Please be verbose when you are asking
> > > questions.
> > > BTW there is one zip file of source is also attached with this you can
> > take
> > > a reference from that.
> > >
> > > Thanks & Regards
> > > --
> > > Pranay Pandey
> > >
> > >
> > > On Wed, Jun 11, 2008 at 3:38 AM, Edson Chavez <[hidden email]>
> > > wrote:
> > >
> > > > thnx by effort but i have a problem i follow the steps in
> > > >
> > > > "Creating the web app on the back end" but when i try charge
> aplication
> > i
> > > > cant see nothing only especial characters :
> > > >
> > > > somebody have same result?
> > > >
> > > > regards
> > > >
> > > > Edson
> > > >
> > > > 2008/6/6 RolandH <[hidden email]>:
> > > >
> > > > > Hi Pranay,
> > > > >
> > > > > thanks for your answer, after this mail i found my real solution:
> > > > >
> > > > >   Map createPartyEmailAddressMap =
> > > > >       UtilMisc.toMap(
> > > > >              "emailAddress", context.get("emailAddress"),
> > > > >              "contactMechPurposeTypeId", "PRIMARY_EMAIL",
> > > > >              "userLogin", context.get("userLogin")
> > > > >              );
> > > > > userLogin holds the actual user, if I read existing code correctly.
> > > > >
> > > > > Thanks for your help,
> > > > > Roland
> > > > >
> > > > >
> > > > > Pranay Pandey wrote:
> > > > >
> > > > >> I hope this will be of help.
> > > > >> The service you are calling is createPartyEmailAddress requires
> > > > >> authentication so you need to send the userLogin value to it.
> > > > >> Something like this:
> > > > >>
> > > > >> // perform actions as the system user
> > > > >>            GenericValue userLogin =
> > > > >> delegator.findByPrimaryKeyCache("UserLogin",
> > > > UtilMisc.toMap("userLoginId",
> > > > >> "system"));
> > > > >>
> > > > >>            input = UtilMisc.toMap("userLogin", userLogin,
> > > > "emailAddress",
> > > > >> email, "partyId", "_NA_", "fromDate", fromDate,
> > > > >> "contactMechPurposeTypeId",
> > > > >> "OTHER_EMAIL");
> > > > >>            Map serviceResults =
> > > > >> dispatcher.runSync("createPartyEmailAddress", input);
> > > > >>            if (ServiceUtil.isError(serviceResults)) {
> > > > >>                throw new
> > > > >>
> > GenericServiceException(ServiceUtil.getErrorMessage(serviceResults));
> > > > >>            }
> > > > >>
> > > > >>
> > > > >
> > > >
> > >
> >
>



--
Regards
Alex D. Fleming
Reply | Threaded
Open this post in threaded view
|

Re: OFBiz Beginner's Development Guide Using Practice Application

Pranay Pandey
Hello Alex,

Thank you very much :)

Regards
--
Pranay Pandey

On Thu, Jun 12, 2008 at 11:01 AM, Alex D. Fleming <[hidden email]>
wrote:

> Dear Pranay,
>
> The document shared by you for the beginner looks very good to me.
> Thank you for hard work , I appreciate your efforts :).
>
>
>
> On Thu, Jun 12, 2008 at 12:46 AM, Pranay Pandey <[hidden email]>
> wrote:
>
> > Hello Edson,
> >
> > Thanks for this.
> > I have uploaded the new zip file for the source now try this.
> > BTW for your problem you can recheck the ofbiz-component.xml file. It
> seems
> > your component is not loaded.
> > Always go through the log on consol, thats the best place to find the
> > problem and make practice of it. This will really help you in
> understanding
> > things. If your component is loaded properly then you will get message
> over
> > consol like :
> > 2008-06-12 09:45:34,573 (main) [ ComponentContainer.java:157:INFO ]
> > Auto-Loading component directory :
> > [${ofbizHome}/hot-deploy]
> > 2008-06-12 09:45:34,631 (main) [            UtilXml.java:241:INFO ] XML
> > Read
> > 0.032s: file:/${ofbizHome}/hot-deploy/practice/ofbiz-component.xml
> > 2008-06-12 09:45:34,632 (main) [ ComponentContainer.java:216:INFO ]
> Loading
> > component : [practice]
> > 2008-06-12 09:45:34,669 (main) [ ComponentContainer.java:126:INFO ] All
> > components loaded
> >
> > Check this out :)
> >
> >
> > Regards
> > --
> > Pranay Pandey
> >
> >
> > On Wed, Jun 11, 2008 at 8:52 PM, Edson Chavez <[hidden email]>
> > wrote:
> >
> > > hi Pranay tnx for reply
> > >
> > > first place tnx by the work!!!! :)
> > >
> > > y tried download the zip but is a 93.4 Kb size, is right? i try
> download
> > it
> > > 9 times and always i receive a corrupted File :(
> > >
> > > i say and my earlier message:
> > >
> > > i follow the steps 1 to 11 detailed in the
> > > "Creating the web app" section of the
> > > tutorial<http://docs.ofbiz.org/pages/editpage.action?pageId=4432>and
> > > when i start ofbiz and i put the addres
> > > https://localhost:8443/practice/control/main
> > >
> > > and load a blank page, when i put
> > > http://localhost:8443/practice/control/main i receive a download
> dialog
> > > for
> > > a main file. i'm curious and downlad it but is only 6 specials
> characters
> > > file and no data nor "first practice" message i don't know what is
> wrong
> > > with my files :(
> > >
> > > somebody, know what happened or can fix the zip file for download ?
> > >
> > > regards
> > > Edson
> > >
> > >
> > >
> > > 2008/6/11 Pranay Pandey <[hidden email]>:
> > >
> > > > Hi Edson,
> > > > Your question is not clear. Please be verbose when you are asking
> > > > questions.
> > > > BTW there is one zip file of source is also attached with this you
> can
> > > take
> > > > a reference from that.
> > > >
> > > > Thanks & Regards
> > > > --
> > > > Pranay Pandey
> > > >
> > > >
> > > > On Wed, Jun 11, 2008 at 3:38 AM, Edson Chavez <[hidden email]
> >
> > > > wrote:
> > > >
> > > > > thnx by effort but i have a problem i follow the steps in
> > > > >
> > > > > "Creating the web app on the back end" but when i try charge
> > aplication
> > > i
> > > > > cant see nothing only especial characters :
> > > > >
> > > > > somebody have same result?
> > > > >
> > > > > regards
> > > > >
> > > > > Edson
> > > > >
> > > > > 2008/6/6 RolandH <[hidden email]>:
> > > > >
> > > > > > Hi Pranay,
> > > > > >
> > > > > > thanks for your answer, after this mail i found my real solution:
> > > > > >
> > > > > >   Map createPartyEmailAddressMap =
> > > > > >       UtilMisc.toMap(
> > > > > >              "emailAddress", context.get("emailAddress"),
> > > > > >              "contactMechPurposeTypeId", "PRIMARY_EMAIL",
> > > > > >              "userLogin", context.get("userLogin")
> > > > > >              );
> > > > > > userLogin holds the actual user, if I read existing code
> correctly.
> > > > > >
> > > > > > Thanks for your help,
> > > > > > Roland
> > > > > >
> > > > > >
> > > > > > Pranay Pandey wrote:
> > > > > >
> > > > > >> I hope this will be of help.
> > > > > >> The service you are calling is createPartyEmailAddress requires
> > > > > >> authentication so you need to send the userLogin value to it.
> > > > > >> Something like this:
> > > > > >>
> > > > > >> // perform actions as the system user
> > > > > >>            GenericValue userLogin =
> > > > > >> delegator.findByPrimaryKeyCache("UserLogin",
> > > > > UtilMisc.toMap("userLoginId",
> > > > > >> "system"));
> > > > > >>
> > > > > >>            input = UtilMisc.toMap("userLogin", userLogin,
> > > > > "emailAddress",
> > > > > >> email, "partyId", "_NA_", "fromDate", fromDate,
> > > > > >> "contactMechPurposeTypeId",
> > > > > >> "OTHER_EMAIL");
> > > > > >>            Map serviceResults =
> > > > > >> dispatcher.runSync("createPartyEmailAddress", input);
> > > > > >>            if (ServiceUtil.isError(serviceResults)) {
> > > > > >>                throw new
> > > > > >>
> > > GenericServiceException(ServiceUtil.getErrorMessage(serviceResults));
> > > > > >>            }
> > > > > >>
> > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
>
>
>
> --
> Regards
> Alex D. Fleming
>
Reply | Threaded
Open this post in threaded view
|

Re: OFBiz Beginner's Development Guide Using Practice Application

nilesh_patil
In reply to this post by Pranay Pandey
Hi Pranay Pandey,

      I have tried lots to go on given link but I am not able to find the Practice application Zip file,Will you please guide me.


Thanks n Regards,
Nilesh Patil