Tom,

Forgive me if I seem a bit dense here, but I may actually understand
what you're saying. ;) I hope you don't mind if I rephrase just to
prove to us all that I'm not a True Dolt.

A while back, I blew a day trying to create a struct in which an
element contained both a string and another struct... all I ended up
proving is that it can't be done. At least not by me (and I don't
think it's technically possible, so if you can do it, you've got Some
Voodoo). The point of this pointless excercise was to match the
structure of an XML schema that someone's webservice was expecting...
and, in doing so, I am apparently not alone.

What I understand from what you're saying above is that CF/Java/Axis
takes as an argument a struct which contains the values expected by
the schema, but that is not *organized* was the schema expects... and
the values are matched to their appropriate locations in the XML
schema based on their names.

So given a schema like this (this is close to the schema I was fighting with):

<complex-type attr1="Charlie">
        <another-complex-type itemA="name">
                <name type="first">Jacqueline</name>
                <name type="last">Smith</name>
        </another-complex-type>
        <some-data>The second Angel</some-data>
</complex-type>

My struct could look like this:

k.attr1 = "Charlie";
k["another-complex-type"].itemA = "name";
k["another-complex-type"].name.first = "Jacqueline";
k["another-complex-type"].name.last = "Smith";
k["some-data"] = "The second  Angel";

Although that seems wrong, since first and last should be at the same
level in the struct as the elements to which they belong. BUT that
would mean having something that looks like this:

k.attr1 = "Charlie";
k["another-complex-type"].itemA = "name";
k["another-complex-type"].type = "first";
k["another-complex-type"].name = "Jacqueline";
k["another-complex-type"].type = "last";
k["another-complex-type"].name = "Smith";
k["some-data"] = "The second  Angel";

And that Won't Work because of the conflict between the multiple
elements with the same label in the structure... which consequently
causes me to wonder if this might work:

k.attr1 = "Charlie";
k["another-complex-type"].itemA = "name";
k["another-complex-type"].a.type = "first";
k["another-complex-type"].a.name = "Jacqueline";
k["another-complex-type"].b.type = "last";
k["another-complex-type"].b.name = "Smith";
k["some-data"] = "The second  Angel";

But that doesn't seem like it would work because the Axis stub would
create getters and setters for A and B, even though there aren't
really A and B values in the XML... so maybe reverse the order of the
attributes:

k.attr1 = "Charlie";
k["another-complex-type"].itemA = "name";
k["another-complex-type"].type.a = "first";
k["another-complex-type"].name.a = "Jacqueline";
k["another-complex-type"].type.b = "last";
k["another-complex-type"].name.b = "Smith";
k["some-data"] = "The second  Angel";

But, it seems to me that we'd again be creating getters and setters
for items A and B, which don't appear in the schema, we just have a
pair of complex-type entries that have the same element name but are
differentiated by an attribute... and I can't quite get my head around
how we can guarantee that, even if we could create a struct that would
work, that we can guarantee that the system will get first and
Jacqueline in the same element and last and Smith in the same element.

The XML schema that I was looking at are somewhere in the CF-Talk
archives... I'll see if I can drum it up. It's been weeks, if not
months, so I can't recall the details. However, unless there's
specific rules in WSDL to keep this scenario from arising, how do we
overcome the problem using CF structures?

Incidentally, I read the documentation, over and over again, as did
others, to little avail. I'm not complaining... I think, honestly,
that if the docs don't answer questions it's time to test, try, and
start sending emails or just move on... but, I think you should
know... the liveDocs pages on this particular issue were of very
little value. Maybe now, after reading your description above, they
may make more sense... however, without that further explanation
they're Not Helpful for this particular situation.

Thanks for the input, Tom... it's wonderful that Macromedianiates are
so willing to actually provide support on the lists, on a Sunday. :)

Laterz,
J

On Fri, 4 Mar 2005 16:06:55 -0500, Tom Jordahl <[EMAIL PROTECTED]> wrote:
> First, see the documentation for more info.
<snippage>



-- 
Continuum Media Group LLC
Burnsville, MN 55337
http://www.web-relevant.com
http://cfobjective.neo.servequake.com

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:198629
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to