Dev - SOAP Services

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

Dev - SOAP Services

S Pole
No takers?
 
I love OFBiz for the wealth of business knowledge it embodies, but it is a requirement that OFBiz services may be exposed in a standard way, WS-I at a minimum. I find many web services assertions on your web sites and presentations, but find no support in the code, given a week's code evaluation. Please point me to some guidelines for implementing SOAP-based services with OFBiz, even if it's only a roadmap.

 
Thanks.
 
 
-----Original Message-----
From: [hidden email] [mailto:[hidden email]]On Behalf Of S Pole
Sent: Wednesday, March 15, 2006 2:43 PM
To: [hidden email]
Subject: [OFBiz] Users - SOAP Services

Hi all,
I am new to OFBiz and am starting out to build a simple SOAP service. So far I have been successful in creating a simple 'HelloWorld' service and generating the wsdl file.

My questions:

-- The generated wsdl defaults to a document/literal style. Axis1 on the other hand defaults to rpc/encoded and is supporting rpc/literal in Axis2. How does OFBiz support rpc styles?
-- Is there any kind of a SOAPMOnitor utility in OFbiz?
-- I need to have the wsdl exposed automatically to a URL for non-Java clients. How do we make this possible with OFbiz?
-- Is there any way of porting wsdd files directly to OFbiz or do we need to work with the services def file?

I cannot find a whole lot of documentation/discussions on this topic. Any pointers are appreciated.

Thanks.
SBP.

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Dev - SOAP Services

BJ Freeman
if you search the dev for SOAP will see some links to code for QB export.
that should get you going in the right direction.



S Pole sent the following on 3/17/06 11:13 AM:

> No takers?
>
> I love OFBiz for the wealth of business knowledge it embodies, but it is a
> requirement that OFBiz services may be exposed in a standard way, WS-I at a
> minimum. I find many web services assertions on your web sites and
> presentations, but find no support in the code, given a week's code
> evaluation. Please point me to some guidelines for implementing SOAP-based
> services with OFBiz, even if it's only a roadmap.
>
>
> Thanks.
>
>
> -----Original Message-----
> *From:* [hidden email] [mailto:[hidden email]]
> *On Behalf Of *S Pole
> *Sent:* Wednesday, March 15, 2006 2:43 PM
> *To:* [hidden email]
> *Subject:* [OFBiz] Users - SOAP Services
>
> Hi all,
> I am new to OFBiz and am starting out to build a simple SOAP service. So far
> I have been successful in creating a simple 'HelloWorld' service and
> generating the wsdl file.
>
> My questions:
>
> -- The generated wsdl defaults to a document/literal style. Axis1 on the
> other hand defaults to rpc/encoded and is supporting rpc/literal in Axis2.
> How does OFBiz support rpc styles?
> -- Is there any kind of a SOAPMOnitor utility in OFbiz?
> -- I need to have the wsdl exposed automatically to a URL for non-Java
> clients. How do we make this possible with OFbiz?
> -- Is there any way of porting wsdd files directly to OFbiz or do we need to
> work with the services def file?
>
> I cannot find a whole lot of documentation/discussions on this topic. Any
> pointers are appreciated.
>
> Thanks.
> SBP.
>
>
>
> ------------------------------------------------------------------------
>
>  
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev
 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Dev - SOAP Services

David E. Jones
In reply to this post by S Pole

Where have you looked for information on this? There has been a fair amount of discussion in the mailing lists, and probably some good information in the Wiki as well.

The Service Engine in OFBiz is _not_ web services based, but it does have stuff to automatically map Service Engine service definitions to WSDL (which is the WSDL you can get through the WebTools webapp in the service reference area), but these mappings are VERY simple. If you need more complex service interactions it is usually necessary to create web services in Java inside OFBiz using a tool like Axis (or whatever you like) and do the more complex data mapping manually and call OFBiz services inside your new web services code.

You can also certainly contribute to the effort of better default data mapping for SOAP services calling to/from the OFBiz Service Engine. What exists now is what people have needed in the past and been willing to contribute (as with _everything_ in OFBiz). Web services standards and APIs change over time, and the current code is a few generations from the original code for this and much better than it was before. So, I guess the old mantra applies: make it do or do without...

As you have probably already noticed this isn't a huge priority for OFBiz from a business level. We have basic enabling technology and some recommended best practices for it (as mentioned above), but it hasn't seen as much attention as other parts of OFBiz (not to diminish the hundreds of man-hours that have gone into this particular thing of course...).

-David


S Pole wrote:

> No takers?
>  
> I love OFBiz for the wealth of business knowledge it embodies, but it is
> a requirement that OFBiz services may be exposed in a standard way, WS-I
> at a minimum. I find many web services assertions on your web sites and
> presentations, but find no support in the code, given a week's code
> evaluation. Please point me to some guidelines for implementing
> SOAP-based services with OFBiz, even if it's only a roadmap.
>
>  
> Thanks.
>  
>  
> -----Original Message-----
> *From:* [hidden email]
> <mailto:[hidden email]>
> [mailto:[hidden email]
> <mailto:[hidden email]>]*On Behalf Of *S Pole
> *Sent:* Wednesday, March 15, 2006 2:43 PM
> *To:* [hidden email] <mailto:[hidden email]>
> *Subject:* [OFBiz] Users - SOAP Services
>
> Hi all,
> I am new to OFBiz and am starting out to build a simple SOAP service. So
> far I have been successful in creating a simple 'HelloWorld' service and
> generating the wsdl file.
>
> My questions:
>
> -- The generated wsdl defaults to a document/literal style. Axis1 on the
> other hand defaults to rpc/encoded and is supporting rpc/literal in
> Axis2. How does OFBiz support rpc styles?
> -- Is there any kind of a SOAPMOnitor utility in OFbiz?
> -- I need to have the wsdl exposed automatically to a URL for non-Java
> clients. How do we make this possible with OFbiz?
> -- Is there any way of porting wsdd files directly to OFbiz or do we
> need to work with the services def file?
>
> I cannot find a whole lot of documentation/discussions on this topic.
> Any pointers are appreciated.
>
> Thanks.
> SBP.
>
>
> ------------------------------------------------------------------------
>
>  
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev
 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Dev - SOAP Services

Ryan Warnick-2
In reply to this post by S Pole
We looked into the Ofbiz capabilities in this area some time ago and
tried to come to a community consensus on how to move the SOAP
capabilities in the Ofbiz service layer forward.  Here is what I recall
of how things work in Ofbiz today.  

It is possible to expose (export) Ofbiz services as SOAP service
provided that the service has an interface that only includes simple
types.  Ofbiz even generates and serves up WSDL for simple exported
services.  As I recall, the generated WSDL is not correct though as it
is some kind of invalid combination of RPC/encoded and doc/literal.
There was also a lot of discussion around how to extend the service XML
schema to support more precise service definitions for services with
complex interfaces so that they could be exposed over SOAP.  However, we
couldn't agree or even agree to disagree on the right approach; some saw
the extended service definition schema as way to peform more precise
validation of service inputs and outputs and others were much more
concerned with generating reasonable WSDL interfaces.  So, from the
community point-of-view nothing really went any further as far as I
know.

In order to meet our customers needs, we went ahead and developed a set
of core capabilities for exposing any service over SOAP (doc/literal
with WSDL generation) and JSON.  We took a simple approach to extending
the service definition language by defining a way to attach XML schema
fragments to complex service inputs/outputs in the service definitions.
These fragments can also be nested arbitrarily deep, meaning that a
fragment can include other fragments and so on.  Also, we completely
changed how Axis is integrated with Ofbiz.  Previously, Axis was being
used more at the API level.  We now mount the standard Axis servlet and
allow the full power of the Axis processing pipeline.  Also, we
developed a set of Axis handlers to handle authentication, session
handling, etc.  Currently, we use simple HTTP-level authentication, but
it could be extended to support WS-Security.  

The only aspect of our approach that we aren't super pleased with is the
disconnect that we have between WSDL generation and XML
serialization/deserialization.  As I said before, we use manually built
schema fragments to generate WSDL for complex service inputs/outputs.
This is completely disconnected with the way that we use JiBX to
serialize/deserialize XML.  Even so, JiBX is a great framework and if
its XML schema generation capabilities were extended to support <choice>
and some other XML schema constructs, then it would be perfect.  This
would allow you to specify a mapping for any Java class to XML and then
generate the schema fragments required to generate the WSDL.

SOAP aside, the most useful external service interface so far has been
JSON.  We took the json-rpc framework and created a JSON service servlet
(similar to the Axis servlet) that allows us to export any service over
JSON.  Of course, we did have to write some of our own JSON
serializers/deserializers, which was fairly straightforward.

Ryan  

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of David E Jones
> Sent: Friday, March 17, 2006 12:26 PM
> To: OFBiz Project Development Discussion
> Subject: Re: [OFBiz] Dev - SOAP Services
>
>
> Where have you looked for information on this? There has been
> a fair amount of discussion in the mailing lists, and
> probably some good information in the Wiki as well.
>
> The Service Engine in OFBiz is _not_ web services based, but
> it does have stuff to automatically map Service Engine
> service definitions to WSDL (which is the WSDL you can get
> through the WebTools webapp in the service reference area),
> but these mappings are VERY simple. If you need more complex
> service interactions it is usually necessary to create web
> services in Java inside OFBiz using a tool like Axis (or
> whatever you like) and do the more complex data mapping
> manually and call OFBiz services inside your new web services code.
>
> You can also certainly contribute to the effort of better
> default data mapping for SOAP services calling to/from the
> OFBiz Service Engine. What exists now is what people have
> needed in the past and been willing to contribute (as with
> _everything_ in OFBiz). Web services standards and APIs
> change over time, and the current code is a few generations
> from the original code for this and much better than it was
> before. So, I guess the old mantra applies: make it do or do
> without...
>
> As you have probably already noticed this isn't a huge
> priority for OFBiz from a business level. We have basic
> enabling technology and some recommended best practices for
> it (as mentioned above), but it hasn't seen as much attention
> as other parts of OFBiz (not to diminish the hundreds of
> man-hours that have gone into this particular thing of course...).
>
> -David
>
>
> S Pole wrote:
> > No takers?
> >  
> > I love OFBiz for the wealth of business knowledge it
> embodies, but it
> > is a requirement that OFBiz services may be exposed in a
> standard way,
> > WS-I at a minimum. I find many web services assertions on your web
> > sites and presentations, but find no support in the code, given a
> > week's code evaluation. Please point me to some guidelines for
> > implementing SOAP-based services with OFBiz, even if it's
> only a roadmap.
> >
> >  
> > Thanks.
> >  
> >  
> > -----Original Message-----
> > *From:* [hidden email]
> > <mailto:[hidden email]>
> > [mailto:[hidden email]
> > <mailto:[hidden email]>]*On Behalf Of *S Pole
> > *Sent:* Wednesday, March 15, 2006 2:43 PM
> > *To:* [hidden email] <mailto:[hidden email]>
> > *Subject:* [OFBiz] Users - SOAP Services
> >
> > Hi all,
> > I am new to OFBiz and am starting out to build a simple
> SOAP service.
> > So far I have been successful in creating a simple 'HelloWorld'
> > service and generating the wsdl file.
> >
> > My questions:
> >
> > -- The generated wsdl defaults to a document/literal style.
> Axis1 on
> > the other hand defaults to rpc/encoded and is supporting
> rpc/literal
> > in Axis2. How does OFBiz support rpc styles?
> > -- Is there any kind of a SOAPMOnitor utility in OFbiz?
> > -- I need to have the wsdl exposed automatically to a URL
> for non-Java
> > clients. How do we make this possible with OFbiz?
> > -- Is there any way of porting wsdd files directly to OFbiz
> or do we
> > need to work with the services def file?
> >
> > I cannot find a whole lot of documentation/discussions on
> this topic.
> > Any pointers are appreciated.
> >
> > Thanks.
> > SBP.
> >
> >
> >
> ----------------------------------------------------------------------
> > --
> >
> >  
> > _______________________________________________
> > Dev mailing list
> > [hidden email]
> > http://lists.ofbiz.org/mailman/listinfo/dev
>  
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev
>
>
 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev