You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Benson Margulies <bi...@gmail.com> on 2008/01/24 03:23:40 UTC

exit xmime:contentType, stage left?

I somehow neglected to commit most of what I thought I committed last
night, which is why my little commit of this afternoon busted the build.

Thank you, Dan, for scraping up the mess.

However, what shall we do about my xmime:contentType that you
expurgated? The JavaScript code wants to see the attribute.

Should I recreate it in its own package where it might not bust the
schema?





Re: exit xmime:contentType, stage left?

Posted by Benson Margulies <bi...@gmail.com>.
On Thu, 2008-01-24 at 10:51 -0500, Daniel Kulp wrote:
> On Thursday 24 January 2008, Benson Margulies wrote:
> > Are you really comfy with Aegis using xmine:base64Binary all the time
> > for MTOM?
> 
> Hmm......    noodle noodle noodle....      Hmm........
> 
> I'm not really sure.   :-)
> 
> Seriously, I guess I'd have to see what other toolkits (and CXF for that 
> matter) do when they run wsdl2XXX with that wsdl/schema.   Example: what 
> does .NET do?    If it does something wacky, it's probably not the best 
> idea.

We'd have to fix Aegis to do the WS-Policy stuff for MTOM first,
else .NET won't pay any useful attention.

The other problem is that I posted a JIRA that the command-line tools
are not feeling too good on the trunk (CXF-1389) and no one has done
anything yet. I'd want to start with the validator.

I can surely make it be controlled by a flag on the data binding, that's
simple enough.



Re: exit xmime:contentType, stage left?

Posted by Daniel Kulp <dk...@apache.org>.
On Thursday 24 January 2008, Benson Margulies wrote:
> Are you really comfy with Aegis using xmine:base64Binary all the time
> for MTOM?

Hmm......    noodle noodle noodle....      Hmm........

I'm not really sure.   :-)

Seriously, I guess I'd have to see what other toolkits (and CXF for that 
matter) do when they run wsdl2XXX with that wsdl/schema.   Example: what 
does .NET do?    If it does something wacky, it's probably not the best 
idea.


Dan



>
>
> --benson
>
> On Thu, 2008-01-24 at 10:32 -0500, Daniel Kulp wrote:
> > I really have no problem with the solution you came up with if it
> > could work with JAXB.    If the MToM test was using Aegis, I'd be
> > completely OK.    The issue is JAXB is broken in a few areas so the
> > solution just doesn't work there.   :-(   Not your fault.
> >
> > If JAXB would have actually generated a valid schema, I wouldn't
> > have even noticed.   While debugging some issues with schema
> > generation/validation, I made the EndpointReferenceUtils "assert
> > false;" if it couldn't process the schema.   I then also forced it
> > to process the schema for every invokation.   Thus, I was able to
> > find a BUNCH of places where invalid schema was being used and/or
> > generated.  Fixed most of them.   The MToM was the one I couldn't
> > figure out a sollution for.
> >
> > Dan
> >
> > On Thursday 24 January 2008, Benson Margulies wrote:
> > > I thought that the contentType attribute looked really clever and
> > > useful for my goal of using MTOM to solve the XML 1.0 issue. In
> > > fact, I made Aegis do this all the time. So if I've really drunk
> > > the wrong koolaid with the XMIME standard, we probably need to
> > > undo what I did to Aegis.
> > >
> > > Needless to say, I found the MIME type business on the Metro site.
> > > With some pretty silly bugs in the description (a restriction
> > > instead of an extension), but it was there.
> > >
> > > The problem is that, for the problem I was trying to solve, I
> > > really wanted a more deterministic approach to MTOM than the mush
> > > with the service-level flag plus the threshold. The content-type
> > > attribute seemed just the ticket to allowing deciding when MTOM
> > > was desired, deterministically, in the JavaScript code generator.
> > > In Aegis, as you will see, I arranged for the entire XMIME XSD,
> > > that I collected from the W3C, to be added to the WSDL. If all
> > > else fails, I guess I could now make the JavaScript do the entire
> > > nondeterministic threshold-based feature business.
> > >
> > > Could we do that in JAXB?
> > >
> > > An alternative to the XMIME thing would be to add a CXF-specific
> > > annotation that marked an element as wanting (or not) XMIME. That,
> > > of course, would be easier after you find time to implement the
> > > annotation code you are planning to implement.



-- 
J. Daniel Kulp
Principal Engineer, IONA
dkulp@apache.org
http://www.dankulp.com/blog

Re: exit xmime:contentType, stage left?

Posted by Benson Margulies <bi...@gmail.com>.
Dan,

Are you really comfy with Aegis using xmine:base64Binary all the time
for MTOM?


--benson


On Thu, 2008-01-24 at 10:32 -0500, Daniel Kulp wrote:
> I really have no problem with the solution you came up with if it could 
> work with JAXB.    If the MToM test was using Aegis, I'd be completely 
> OK.    The issue is JAXB is broken in a few areas so the solution just 
> doesn't work there.   :-(   Not your fault.
> 
> If JAXB would have actually generated a valid schema, I wouldn't have 
> even noticed.   While debugging some issues with schema 
> generation/validation, I made the EndpointReferenceUtils "assert false;" 
> if it couldn't process the schema.   I then also forced it to process 
> the schema for every invokation.   Thus, I was able to find a BUNCH of 
> places where invalid schema was being used and/or generated.  Fixed most 
> of them.   The MToM was the one I couldn't figure out a sollution for.
> 
> Dan
> 
> 
> 
> On Thursday 24 January 2008, Benson Margulies wrote:
> > I thought that the contentType attribute looked really clever and
> > useful for my goal of using MTOM to solve the XML 1.0 issue. In fact,
> > I made Aegis do this all the time. So if I've really drunk the wrong
> > koolaid with the XMIME standard, we probably need to undo what I did
> > to Aegis.
> >
> > Needless to say, I found the MIME type business on the Metro site.
> > With some pretty silly bugs in the description (a restriction instead
> > of an extension), but it was there.
> >
> > The problem is that, for the problem I was trying to solve, I really
> > wanted a more deterministic approach to MTOM than the mush with the
> > service-level flag plus the threshold. The content-type attribute
> > seemed just the ticket to allowing deciding when MTOM was desired,
> > deterministically, in the JavaScript code generator. In Aegis, as you
> > will see, I arranged for the entire XMIME XSD, that I collected from
> > the W3C, to be added to the WSDL. If all else fails, I guess I could
> > now make the JavaScript do the entire nondeterministic threshold-based
> > feature business.
> >
> > Could we do that in JAXB?
> >
> > An alternative to the XMIME thing would be to add a CXF-specific
> > annotation that marked an element as wanting (or not) XMIME. That, of
> > course, would be easier after you find time to implement the
> > annotation code you are planning to implement.
> 
> 
> 


Re: exit xmime:contentType, stage left?

Posted by Daniel Kulp <dk...@apache.org>.
I really have no problem with the solution you came up with if it could 
work with JAXB.    If the MToM test was using Aegis, I'd be completely 
OK.    The issue is JAXB is broken in a few areas so the solution just 
doesn't work there.   :-(   Not your fault.

If JAXB would have actually generated a valid schema, I wouldn't have 
even noticed.   While debugging some issues with schema 
generation/validation, I made the EndpointReferenceUtils "assert false;" 
if it couldn't process the schema.   I then also forced it to process 
the schema for every invokation.   Thus, I was able to find a BUNCH of 
places where invalid schema was being used and/or generated.  Fixed most 
of them.   The MToM was the one I couldn't figure out a sollution for.

Dan



On Thursday 24 January 2008, Benson Margulies wrote:
> I thought that the contentType attribute looked really clever and
> useful for my goal of using MTOM to solve the XML 1.0 issue. In fact,
> I made Aegis do this all the time. So if I've really drunk the wrong
> koolaid with the XMIME standard, we probably need to undo what I did
> to Aegis.
>
> Needless to say, I found the MIME type business on the Metro site.
> With some pretty silly bugs in the description (a restriction instead
> of an extension), but it was there.
>
> The problem is that, for the problem I was trying to solve, I really
> wanted a more deterministic approach to MTOM than the mush with the
> service-level flag plus the threshold. The content-type attribute
> seemed just the ticket to allowing deciding when MTOM was desired,
> deterministically, in the JavaScript code generator. In Aegis, as you
> will see, I arranged for the entire XMIME XSD, that I collected from
> the W3C, to be added to the WSDL. If all else fails, I guess I could
> now make the JavaScript do the entire nondeterministic threshold-based
> feature business.
>
> Could we do that in JAXB?
>
> An alternative to the XMIME thing would be to add a CXF-specific
> annotation that marked an element as wanting (or not) XMIME. That, of
> course, would be easier after you find time to implement the
> annotation code you are planning to implement.



-- 
J. Daniel Kulp
Principal Engineer, IONA
dkulp@apache.org
http://www.dankulp.com/blog

Re: exit xmime:contentType, stage left?

Posted by Benson Margulies <bi...@gmail.com>.
I thought that the contentType attribute looked really clever and useful
for my goal of using MTOM to solve the XML 1.0 issue. In fact, I made
Aegis do this all the time. So if I've really drunk the wrong koolaid
with the XMIME standard, we probably need to undo what I did to Aegis.

Needless to say, I found the MIME type business on the Metro site. With
some pretty silly bugs in the description (a restriction instead of an
extension), but it was there.

The problem is that, for the problem I was trying to solve, I really
wanted a more deterministic approach to MTOM than the mush with the
service-level flag plus the threshold. The content-type attribute seemed
just the ticket to allowing deciding when MTOM was desired,
deterministically, in the JavaScript code generator. In Aegis, as you
will see, I arranged for the entire XMIME XSD, that I collected from the
W3C, to be added to the WSDL. If all else fails, I guess I could now
make the JavaScript do the entire nondeterministic threshold-based
feature business.

Could we do that in JAXB?

An alternative to the XMIME thing would be to add a CXF-specific
annotation that marked an element as wanting (or not) XMIME. That, of
course, would be easier after you find time to implement the annotation
code you are planning to implement.





Re: exit xmime:contentType, stage left?

Posted by Daniel Kulp <dk...@apache.org>.
On Wednesday 23 January 2008, Benson Margulies wrote:
> I somehow neglected to commit most of what I thought I committed last
> night, which is why my little commit of this afternoon busted the
> build.
>
> Thank you, Dan, for scraping up the mess.

I figured you were doing something with the AbstractDataBinding stuff.   
I just did the bare minimum to get the build building and cruisecontrol 
to stop spamming me.   :-)


> However, what shall we do about my xmime:contentType that you
> expurgated? The JavaScript code wants to see the attribute.
>
> Should I recreate it in its own package where it might not bust the
> schema?

Well, that was part of the issue.   The test wasn't actually using it 
even though you thought it was.   :-)

Seriously, I spent quit a bit of time yesterday on that test trying to 
get it to work, and failed.   Basically, it looks like there is no way 
to get schema validation working with mtom turned on with JAXB.   Kind 
of sucks.   This is already logged as:
https://issues.apache.org/jira/browse/CXF-1194


Basically, you had set the mime type to be the xmime:base64Binary instead 
of the xsd:base64Binary and providing the xmime version of a 
Base64Binary class.   This really has two issues:
1) No "real world" service would normally do that so you are testing 
something noone would really do.  (minor nit)
2) There was no way to get JAXB to generate a valid schema if you do so.   
It always ommitted the xsd:import for the xmime.  I spent a bit of time 
trying to figure this out and failed to get a valid schema out of it.

Because of 2, we couldn't create the schema object and thus validation 
wasn't happening anyway.   Since validation wasn't occuring, I figured 
it was just better to turn validation off and dispense with the hack 
that wasn't working anyway.   

Thoughts?

-- 
J. Daniel Kulp
Principal Engineer, IONA
dkulp@apache.org
http://www.dankulp.com/blog