how to redirect to a URL returned from a service.

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

how to redirect to a URL returned from a service.

joelfradkin@gmail.com
In my EDI stuff, one of my suppliers uses services.
I just added the code to send them a xml file via http.
If it goes well they respond with a URL for the client saying its all good, or recommending products that might replace products not available, so they can fix up their order.
I am using widgets to call a java service that calls their service.
I get back a httpresponse that will either have error or url.
I was not sure how to get to the URL.
I know in java you can redireect, as I do this in my auth stuff.
Is that the best way? I did a out param with a url, but not sure I need it, or if there is a better technique compared to the java redirect?
Joel Fradkin
Reply | Threaded
Open this post in threaded view
|

Re: how to redirect to a URL returned from a service.

Pranay Pandey-2
Hi Joel,

Not sure if I entirely understood the case but In such case you can go with
a java event instead of service as you can deal with request and response
there.
https://cwiki.apache.org/confluence/display/OFBIZ/OFBiz+Tutorial+-+A+Beginners+Development+Guide#OFBizTutorial-ABeginnersDevelopmentGuide-JavaEvent


-
Pranay

On Wednesday, November 12, 2014, [hidden email] <
[hidden email]> wrote:

> In my EDI stuff, one of my suppliers uses services.
> I just added the code to send them a xml file via http.
> If it goes well they respond with a URL for the client saying its all good,
> or recommending products that might replace products not available, so they
> can fix up their order.
> I am using widgets to call a java service that calls their service.
> I get back a httpresponse that will either have error or url.
> I was not sure how to get to the URL.
> I know in java you can redireect, as I do this in my auth stuff.
> Is that the best way? I did a out param with a url, but not sure I need it,
> or if there is a better technique compared to the java redirect?
>
>
>
> -----
> Joel Fradkin
> --
> View this message in context:
> http://ofbiz.135035.n4.nabble.com/how-to-redirect-to-a-URL-returned-from-a-service-tp4658117.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>


--
Thanks,

Pranay Pandey
Senior Manager, Enterprise Software Development
HotWax Media
www.hotwaxmedia.com
Reply | Threaded
Open this post in threaded view
|

Re: how to redirect to a URL returned from a service.

joelfradkin@gmail.com
I can try that. Thank you.
I thought if I got the response from the context I could sendredirect, but no luck.
I will try using an event type where they are passed in.
appreciate the idea.
Joel Fradkin
Reply | Threaded
Open this post in threaded view
|

Re: how to redirect to a URL returned from a service.

joelfradkin@gmail.com
In reply to this post by Pranay Pandey-2
That worked great! Thanks again for the idea.
I kind of thought of trying it, but figured if I could get the response it would work in the service, but it worked fine as a event.
Joel Fradkin
Reply | Threaded
Open this post in threaded view
|

Re: how to redirect to a URL returned from a service.

Pranay Pandey-2
Good to know that it worked, thanks Joel.

--
Thanks,

Pranay Pandey
Senior Manager, Enterprise Software Development
HotWax Media
www.hotwaxmedia.com

On Thu, Nov 13, 2014 at 9:11 PM, [hidden email] <
[hidden email]> wrote:

> That worked great! Thanks again for the idea.
> I kind of thought of trying it, but figured if I could get the response it
> would work in the service, but it worked fine as a event.
>
>
>
> -----
> Joel Fradkin
> --
> View this message in context:
> http://ofbiz.135035.n4.nabble.com/how-to-redirect-to-a-URL-returned-from-a-service-tp4658117p4658177.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>