Hi Souvik,
I want to passing parameters from service or
simple-method to request-
map uri.
Step by step:
1. User fill the new shipping address form and then
submit to
createandsetshippingaddress request.
2. The request calls createAndSetShippingAddress
service.
3. If success response from service then calls
checkoutoptions request.
I want to passing the service OUT parameters to
checkoutoptions request
here.
Here is the form submitting request in controler.xml:
<request-map uri="createandsetshippingaddress">
<security https="true" auth="true"/>
<event type="service" path=""
invoke="createAndSetShippingAddress"/>
<response name="success" type="request"
value="checkoutoptions"/>
<response name="error" type="view"
value="checkoutshippingaddress"/>
</request-map>
Thanks,
Ismail
On 12/26/06 16:32 +0530, Souvik Saha Bhowmik wrote:
> Then call it as a service..dont give the path in the
request-mapping.....
> The Mode should be IN if u want to recieve
parameters from the gui to ur
> Simple service...It needs to be OUT when u want to
produce a value from the
> service to output....u can use INOUT...
>
>
> On 12/26/06, Ismail CANSIZ <[EMAIL PROTECTED]>
wrote:
> >
> > Hi Souvik and All,
> >
> > I have defined a service.
> >
> > Here is the service:
> >
> > <service name="createAndSetShippingAddress"
> > engine="simple"
> >
> >
location="org/ofbiz/ecommerce/customer/CustomerEvents.xml"
> > invoke="createAndSetShippingAddress" auth="false">
> > <description>Create Shipping
> > Address</description>
> > <implements
> > service="createPartyPostalAddress"/>
> > <attribute name="contactMechId"
type="String"
> > mode="OUT"
> > optional="true"/>
> > <attribute name="shipping_contact_mech_id"
> > type="String"
> > mode="OUT" optional="false"/>
> > <attribute name="checkoutpage"
type="String"
> > mode="OUT"
> > optional="false"/>
> > </service>
> >
> >
> > and called this service in controller.xml.
> >
> > <request-map uri="createandsetshippingaddress">
> > <security https="true" auth="true"/>
> > <event type="service" path=""
> > invoke="createAndSetShippingAddress"/>
> > <response name="success" type="request"
> > value="checkoutoptions"/>
> > <response name="error" type="view"
> > value="checkoutshippingaddress"/>
> > </request-map>
> >
> >
> > I want to passing service OUT parameters
> > (shipping_contact_mech_id and
> > checkoutpage) to <response "success"
type="request"
> > value="checkoutoptions">
> >
> > But OUT parameters don't pass to checkoutoptions.
> >
> > Where do i mistake?
> >
> > Thanks,
> > Ismail
> >
> >
> > On 12/26/06 14:43 +0530, Souvik Saha Bhowmik
> > <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > > Use a service definition file and add an
attribute
> > with the name of the
> > > parameter. thenuse parameter.<attribute-name> to
> > access the attribute in
> > > theminilang file...u dont need to give the path
in
> > request map, invoke it as
> > > a service, and provide the path in the service
> > definition file.
> > > Or
> > > U might get a request-to-field in minilang to
assign
> > a request parameter toa
> > > field value.
> > >
> > > Souvik
> > >
> > >
> > > On 12/26/06, Ismail CANSIZ <[EMAIL PROTECTED]>
> > wrote:
> > > >
> > > > Hi all,
> > > >
> > > > I've added a request-map in Controller.xml
> > > >
> > > > <request-map
uri="createandsetshippingaddress">
> > > > <security https="true" auth="true"/>
> > > > <event type="simple"
> > > >
> >
path="org/ofbiz/ecommerce/customer/CustomerEvents.xml"
> > > > invoke="createAndSetShippingAddress"/>
> > > > <response name="success" type="request"
> > > > value="checkoutoptions"/>
> > > > <response name="error" type="view"
> > > > value="checkoutshippingaddress"/>
> > > > </request-map>
> > > >
> > > >
> > > >
> > > > and I've added a simple-method in
> > CustomerEvents.xml
> > > >
> > > >
> > > > <simple-method
> > > > method-name="createAndSetShippingAddress"
short-
> > > > description="Create Shipping Address and Set
> > Checkout
> > > > Shipping Address"
> > > > login-required="false">
> > > >
> > > > <!-- create shipping address -->
> > > > <call-service
> > > > service-name="createPartyPostalAddress"
in-map-
> > > > name="parameters">
> > > > <result-to-field
> > > > result-name="contactMechId" map-
> > > > name="addressPurposeContext"/>
> > > > </call-service>
> > > >
> > > > <!-- create the shipping location -->
> > > > <set value="SHIPPING_LOCATION"
> > > >
> >
field="addressPurposeContext.contactMechPurposeTypeId"/>
> > > > <call-service
> > > > service-name="createPartyContactMechPurpose"
in-
> > > > map-name="addressPurposeContext"/>
> > > >
> > > > <!-- Set Checkout Shipping Address -->
> > > > <set value="shippingaddress"
> > > > field="checkoutpage"/>
> > > > <field-to-result
field-name="checkoutpage"
> > > > result-
> > > > name="checkoutpage"/>
> > > > <field-to-result field-
> > > > name="addressPurposeContext.contactMechId"
result-
> > > > name="shipping_contact_mech_id"/>
> > > >
> > > > </simple-method>
> > > >
> > > > I want to passing parameters
> > > > (shipping_contact_mech_id, checkoutpage) to
> > > > request-map uri (checkoutoptions).
> > > >
> > > > I'm submitting a form with
> > > > "createandsetshippingaddress" uri.
> > > >
> > > > But the parameters don't pass to
checkoutoptions
> > > > request-map uri .
> > > >
> > > > Can anybody help me?
> > > >
> > > > Thanks,
> > > > Ismail
> > > >
> > > >
> > > >
__________________________________________________
> > > > Do You Yahoo!?
> > > > Tired of spam? Yahoo! Mail has the best spam
> > protection around
> > > > http://mail.yahoo.com
> > > >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam
protection around
> > http://mail.yahoo.com
> >
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com