David - we are running Axis within the OFBiz container to have access natively 
to OFBiz services. We are not using OFBiz to render the UI. Basically we want 
to consume all the ecommerce functionality, but do it thru web services so we 
can build our interface using PHP. 

----- Original Message ----- 
From: "David E Jones" <[email protected]> 
To: [email protected] 
Sent: Sunday, February 22, 2009 4:51:16 PM (GMT-0700) America/Denver 
Subject: Re: Using Axis w/ OFBiz 


If you're running in-container, why use web services? 

As for the ShoppingCartEvents.getCartObject() method... is the request 
you are passing to it in the web session of the user? No, it is in the 
web session of the SOAP service... 

-David 


On Feb 22, 2009, at 12:36 PM, atoner wrote: 

> 
> Hi. 
> 
> I am trying to expose services in OFBiz through Axis2 deployed in 
> the same 
> container. Basically I am trying to use a Symfony front-end to make 
> SOAP 
> calls to perform functions such as adding an item to a shopping cart 
> or 
> retrieving shopping cart contents. I am doing this by writing a few 
> (what I 
> thought would be) simple SOAP services in Axis to accomplish this. 
> 
> But I am having a lot of problems and haven’t found much in the 
> mailing list 
> archives or on the forums which helps. 
> 
> I am able to call the SOAP services, the problem is using the OFBiz 
> internals within the services. For instance, calling 
> ShoppingCartEvents.getCartObject() always returns a null pointer. 
> Perhaps I 
> am just looking in the wrong place. 
> 
> Could anyone steer me in the direction of how I would go about 
> creating and 
> then adding a product/item to a shopping cart and getting its 
> contents? 
> This is the current code I have: 
> 
> public String addItemToCart( String productId ) 
> { 
> MessageContext msgCtx = MessageContext.getCurrentMessageContext(); 
> HttpServletRequest request = (HttpServletRequest) 
> msgCtx.getProperty( 
> "transport.http.servletRequest" ); 
> 
> Locale locale = UtilHttp.getLocale(request); 
> 
> ShoppingCart shoppingCart = 
> ShoppingCartEvents.getCartObject( request, 
> locale, "USD" ); 
> 
> return (String) shoppingCart.getOrderType(); 
> } 
> 
> Thanks! 
> 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/Using-Axis-w--OFBiz-tp22150583p22150583.html 
> Sent from the OFBiz - User mailing list archive at Nabble.com. 
> 

Reply via email to