Many thanks for the response.

The main stumbling block that I came across was a "java.net.SocketException: Socket is not connected" error! This may well be a firewall or certificate issue though, but all relevant ports seem to be opened. If you have come across this, or know what may be causing it I would be most grateful.

I have now however tested my client on the same machine that the ofbiz server is on and everything works just fine... I agree that this is the best solution as we can pass objects seamlessly, and relatively quickly. My only concern is that when we have more distributed services we will want to communicate cross machines. Although these machines will still be behind the same part of the network behind a firewall.

If we ever want to access the services from a completely remote location (not sure if we would actually ever want this though!) then web services would be the way to go. However, if we are using complex types that ofbiz cant handle then we may be stuck!

Many thanks

Andrew Crowe

Brett Palmer wrote:
What kind of error did you get with the RMI attempt?

I like using the RMI interface because is handles the object
conversion seamlessly.  If the two web applications are in the same
intranet RMI is a good solution.

Brett

On 5/4/07, Andrew Crowe <[EMAIL PROTECTED]> wrote:
Hi

   We are currently piloting using ofbiz as the back end to some of our
systems.  One of these is a web site for an association.  What we need
to do is to allow that web site to access the data in ofbiz.  Not only
read, but also write new data to it.  The web site is a java/jsp
application.

We have created the entities and services required in Ofbiz, and can get
access to the services.  I have tried using the web service interface to
add data, and this works fine as long as I only use simple types such as
String (xsd:string).  However, one of the things that we have is a date
field.  We have set this up as a java.sql.Date as defined in the
'fieldtypemysql.xml' file.  However, when sending this as soap ofbiz
thinks that the java.sql.Date is a java.util.Date, and so throws an
error.  This is due to roundtripping issues.

We have then tried changing the type to java.util.Date in the entity and
fieldtype defs.  This results in the web service working.  However, then
when creating the entity through the ofbiz interface I get...

The Following Errors Occurred:

   * Type conversion of field [dateSetup] to type [java.util.Date]
failed for value "2007-14-14": org.ofbiz.base.util.GeneralException:
Conversion from String to java.util.Date not currently supported
   * Type conversion of field [dateSetup] to type [java.util.Date]
failed for value "2007-14-14": org.ofbiz.base.util.GeneralException:
Conversion from String to java.util.Date not currently supported

I'm also concerned with this approach as it is altering the core defs
and will break everything else!

Looking at other ofbiz services it uses java.sql.Timestamp objects for
the type.  However, this will also not roundtrip, and comes back as a
Calendar object!

I have also tried to get the wsdl to use for services that use types
other than 'string', but an error is thrown saying that ofbiz cant
handle them!

So the question really is....  How do I set up the web service (ofbiz
and cremote client) to use the correct data type that will work to
create the date?  There are a lot of examples I have found, but they
only deal with strings!

I have also tried RMI, but I could not get this to work from the remote
application.

If anyone has any information on how best to call an ofbiz service from
a remote application (including dates) then I would be most gratefull

Many thanks in advance








Reply via email to