Hey guys
Has anyone had any experience working with xsd2ruby? I am getting the
following error and there seems to be little or no documentation on what
the devil it means!
I, [2007-07-17T16:07:27.445714 #1264] INFO – app: Creates file
‘v_3.rb’.
F, [2007-07-17T16:07:27.453521 #1264] FATAL – app: Detected an
exception. Stopping … base type definition not found:
{http://www.cip4.org/Schema/JDFSchema_1_3}BaseElement_ (RuntimeError)
Cheers for any help in advance
Tim
On Tuesday 17 July 2007 15:45, Tim P. wrote:
{http://www.cip4.org/Schema/JDFSchema_1_3}BaseElement_ (RuntimeError)
Cheers for any help in advance
Tim
xsd2ruby is still beta (if not alfa) and have lots of errors, I tried
working
with it and it failed me few times,
I’m working on diffirent solution to generate classes from xsd but i’m
not
sure when it’ll be availble 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
Tim, the message says that the referred ‘BaseElement_’ definition is not
found in schema files. I’ve found the schema at
http://www.cip4.org/Schema/JDFSchema_1_3/JDF.xsd and tried to generate
the class file with xsd2ruby.rb but timeout occurred while getting
schema files. Network problem? I’ll try again later.
And please try the newest xsd2ruby.rb in soap4r-1.5.7. Let me know if
it won’t work.
http://dev.ctor.org/soap4r/wiki#a2007-07-16:1.5.7
http://dev.ctor.org/soap4r/wiki#BugreportorFeaturerequest
Marcin R. wrote:
xsd2ruby is still beta (if not alfa) and have lots of errors, I tried working
with it and it failed me few times,
I’m working on diffirent solution to generate classes from xsd but i’m not
sure when it’ll be availble 
Please please let me know when you find a bug of soap4r!
http://dev.ctor.org/soap4r/wiki#BugreportorFeaturerequest
Beside this, I’m very looking forward to your xsd implementation.
// NaHi
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
iQEVAwUBRp3Wwx9L2jg5EEGlAQKSVgf/ZEbE4mRid3y+EbkLfXXBuaTaOTNG7773
LKBWuXT3f1o1hi8+4SdhKaqqSeI0fR+VkzcM8dm65u7Gce89kWu/8hd/p6XP9jQX
1wJdcYVQ6Q4hLp9gea/fWDG/y7E05MpWuLobGRZxc5Q7iWcab4Y5AINP+PVZSXb/
/EZMbzVqX2ZuU/i61apLLRBgwyJtAZqdsI+Pb8guANmY2bIJA0MSTkPkzrxf8uQA
kCwrFfj3cLEV7KQkgbL67M4+cMhrgL10j96wr9wqwpJLDc2ky8fIRfmiX+5fKVZK
ipTJMRqn4ZSLOyAoADfB3oUGIni6ZPV9UfACm9Qdmff4cBZOwlFFkw==
=MGEl
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Marcin,
Marcin R. wrote:
Please please let me know when you find a bug of soap4r!
i sent you 2 bug reports - one in wsdl2ruby and one in soap4r i never recived
any feedback - i also started thread here, and posted my bug fixes to one of
the problems, i’m still working on another one, but mayby it was already
fixed in latest release.
Oops. Sorry for that. I should have remembered it. I certainly read
the post [ruby-talk:258411] but after I confirmed that the posted patch
was referring to an old version of soap4r (1.5.5?), I slipped to reply
it.
Yes, the latest soap4r version is 1.5.7 and it must fix the problem you
wrote. Please let me know it isn’t.
// NaHi
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
iQEVAwUBRp3kvB9L2jg5EEGlAQJ2owgAq1PRYZRBOccFsy5zOxlcH3UJV/CQtf14
6sSY4S10NU4N5XBcVDEbaJW5OKqwsvlLOcE4vsVybQqWP1wPDWEq0jZa38KpaWPv
jveag75vndm4gWB1qySpb1tMbtkNLvaSSuH2Fu7okrcIzU3wVN+FK6QU9blpPbTV
qypbrlcRQS7JjEwgOt2AV21afV1HI8ktcKj78/XeXj6TRyRpWenrsqtE0Yy2SGFv
XmKr6Uy3U3sxIKpuXv8vKNa4Dw5znw9igN0gi9BMRTY0lqtrUmNeqTunqfIxvYRz
wHEfnZoEHjrDDuzRI1Qx71jMx78mchU4FJp5eWeWv+yu9oWDg/oMng==
=oizX
-----END PGP SIGNATURE-----
Hey all
Thanks for all your replys 
I have tried it with soap4r 1.5.7 but still no joy im afraid. The schema
I am needing to use is at
http://www.cip4.org/Schema/JDFSchema_1_3_20070212.zip - its an open
standard used in the printing industry. However, when I take that schema
and validate it, it all appears to be fine (as you would expect being an
industry standard)
When I then look to validate the following xml (at bottom of post)
against the JDF schema it fails in rather spectacular fashion (using
libxml) - the error using XML Nanny is “JDF.xsd has a different target
namespace from the one specified in the instance document .” However I
have checked them and they appear to be the same!!
Also, Marcin, when will your XSD class gens be available? I would be
really interested in seeing those 
Any help would be great
Cheers
Tim
<?xml version="1.0"?>
On Wednesday 18 July 2007 09:01, NAKAMURA, Hiroshi wrote:
http://dev.ctor.org/soap4r/wiki#a2007-07-16:1.5.7
Beside this, I’m very looking forward to your xsd implementation.
// NaHi
i sent you 2 bug reports - one in wsdl2ruby and one in soap4r i never
recived
any feedback - i also started thread here, and posted my bug fixes to
one of
the problems, i’m still working on another one, but mayby it was already
fixed in latest release.
here’s problem and solution :
file in question was “/soap/mapping/wsdlliteralregistry.rb” there might
be
similar problem in /soap/mapping/wsdlencodedregistry.rb
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/258411
anyway my xml to ruby objects mapping library is out for testing - it’s
based
on libxml so it’s fast, now i’m
right now it can generate classes from xml files
I’m working on generating classes from xsd with validators
On Thursday 19 July 2007 11:24, Tim P. wrote:
Cheers
Tim
unfortunatelly implementing whole schema is boring and boring and long
and
long and di si say fucking boring job?
I’m working on it, but probably not sooner then 2 weeks from now becouse
i’m
going rafting for 10 days 
i can commit everything i done tho, and mayby you can take a look and
suggest
someting (i’ll try to test it against your schema too)
cheers
unfortunatelly implementing whole schema is boring and boring and long
and long and di si say f***ing boring job?
LOL - i would imagine it is 
I’m working on it, but probably not sooner then 2 weeks from now becouse
i’m going rafting for 10 days 
Very nice - have a good time!
i can commit everything i done tho, and mayby you can take a look and
suggest someting (i’ll try to test it against your schema too)
That would be brilliant if you could - i could take a look at it then
while your away rafting…
Whats the SVN url?
Cheers
Tim
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
Tim P. wrote:
I have tried it with soap4r 1.5.7 but still no joy im afraid. The schema
I am needing to use is at
http://www.cip4.org/Schema/JDFSchema_1_3_20070212.zip - its an open
standard used in the printing industry.
Thanks! I found that soap4r-1.5.7 fails to cyclic schema inclusion. I
filed a ticket here: http://dev.ctor.org/soap4r/ticket/385 and fixed it.
Now the following command should run through the schema with many
warnings.
xsd2ruby.rb --xsd JDF.xsd --classdef --mapping_registry --mapper
Anyway, you seem to need XSD validation but xsd2ruby.rb is for
XML <-> Ruby object mapping so it won’t help you. After the above
command invoked, the following script can be used to convert an XML into
Ruby object.
require ‘v_1_mapper’
xml = File.read(“sample.xml”) # loads the sample XML you posted
mapper = JDF::V_1Mapper.new
p mapper.xml2obj(xml)
// NaHi
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
iQEVAwUBRp+BFh9L2jg5EEGlAQIvfwf9EIIHeNSxQthMlA8wRKosgVrCH7i1+jaC
hG+9wij9DwSpUKkgjx4bVEa5t1ufqs8wNi0rYhUGTScea7iEM88Mbn3HV6q96cgl
QfVO6oyHKwXJyHnX13gFhhlN1qvd9NtW1Cf3dK4Zfgjrk7S9al/xlcE3Au23QTtK
bBSFlKlfUIXUJnqNEzja00ASP7DBoeVPZbeZFHHuNFgT2xwViCJyWvK4ADTir2V/
Jy4FmYEXZtpyagn/4rp3yap7IyjzRu3jUwZNSGF7JWwtCmTnnU1Uhdk8jMnELrwf
n/kOrx/+0jGckaWJI+9v6vFOpJxIPt8bjSu0RFSNxC3AIhRhl3YSdQ==
=asQS
-----END PGP SIGNATURE-----
Hey!
I did want to map my xml to ruby objects, as I will need to construct
new messages and things, so wanted some programatic way of doing this
without having to manually code all the classes.
This might be a stupid question, but am i barking up the wrong tree here
if I wanted to programatically construct xml messages to then post out -
I have worked with your soap4 r lib before and thats effectively whats
happening isnt it when you call your specific soap service classes?
My XSD schema wont give me all the class information as wsdl tho will
it? Appologies for the stupid question but I have done very very little
with XSD in the past 
Cheers
Tim
Thanks! I found that soap4r-1.5.7 fails to cyclic schema inclusion. I
filed a ticket here: http://dev.ctor.org/soap4r/ticket/385 and fixed it.
Now the following command should run through the schema with many
warnings.
xsd2ruby.rb --xsd JDF.xsd --classdef --mapping_registry --mapper
Anyway, you seem to need XSD validation but xsd2ruby.rb is for
XML <-> Ruby object mapping so it won’t help you. After the above
command invoked, the following script can be used to convert an XML into
Ruby object.
require ‘v_1_mapper’
xml = File.read(“sample.xml”) # loads the sample XML you posted
mapper = JDF::V_1Mapper.new
p mapper.xml2obj(xml)