You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Benson Margulies <bi...@gmail.com> on 2009/06/18 20:32:48 UTC

Re: MTOM with CXF WS-I Validation Failure

I did some work to make xmime work in Aegis, and I hit one bug in
JAXB. Certainly your fragment is wrong isofar as it uses
xmime:expectedContentTypes without including that schema. Have you
tried just using JAXB tools and seeing what you get for generated
code?

On Thu, Jun 18, 2009 at 2:26 PM, bharath
thippireddy<bh...@oracle.com> wrote:
> In our wsdl files for services which use MTOM we have the following element declaration.
>
>
>
> <xsd:element name="AppData"  type="xsd:base64Binary" xmime:expectedContentTypes="application/xml,application/zip,application/x-gzip"/>
>
>
>
> When we run the WS-I validation against the wsdl it fails with the following exception
>
>
>
> Assertion: BP2122
>
>
>
> Result
>
> failed
>
> Failure Message
>
> A wsdl:types element contained a data type definition that is not an XML schema definition.
>
> Failure Detail Message
>
> Schema is structurally invalid.
>
> Fatal error: The prefix "xmime" for attribute "xmime:expectedContentTypes" associated with an element type "xsd:element" is not bound.
>
>
>
>
>
> The validation passes if we change the type to type="xmime:base64Binary".This requires a new xmime schema to be imported.
>
> But the code that gets generated uses byte[] instead of DataHandlers.Looks like the wsdl2java ignores the xmime:expectedContentTypes if the type is not  xsd:base64Binary .Is this a bug in CXF?
>
>
>
> What is the recommended  approach?
>
>
>
> Thanks and regards,
>
> Bharath
>
>

RE: MTOM with CXF WS-I Validation Failure

Posted by bharath thippireddy <bh...@oracle.com>.
It works fine and generates the code with data handlers when we use the following declaration. Even though we don’t import the xmime schema file and by just having the namespace it works fine. But doesn’t pass the WS-I Validation.

<xsd:element name="AppData"  type="xsd:base64Binary" xmime:expectedContentTypes="application/xml,application/zip,application/x-gzip"/>

If we use the xmime types we see that the code that gets generated is of byte array type .Is it a standard to import/include the xmime schema file ?

Thanks,
bharath




-----Original Message-----
From: Benson Margulies [mailto:bimargulies@gmail.com] 
Sent: Thursday, June 18, 2009 2:33 PM
To: users@cxf.apache.org; bharath.thippireddy@oracle.com
Subject: Re: MTOM with CXF WS-I Validation Failure

I did some work to make xmime work in Aegis, and I hit one bug in
JAXB. Certainly your fragment is wrong isofar as it uses
xmime:expectedContentTypes without including that schema. Have you
tried just using JAXB tools and seeing what you get for generated
code?

On Thu, Jun 18, 2009 at 2:26 PM, bharath
thippireddy<bh...@oracle.com> wrote:
> In our wsdl files for services which use MTOM we have the following element declaration.
>
>
>
> <xsd:element name="AppData"  type="xsd:base64Binary" xmime:expectedContentTypes="application/xml,application/zip,application/x-gzip"/>
>
>
>
> When we run the WS-I validation against the wsdl it fails with the following exception
>
>
>
> Assertion: BP2122
>
>
>
> Result
>
> failed
>
> Failure Message
>
> A wsdl:types element contained a data type definition that is not an XML schema definition.
>
> Failure Detail Message
>
> Schema is structurally invalid.
>
> Fatal error: The prefix "xmime" for attribute "xmime:expectedContentTypes" associated with an element type "xsd:element" is not bound.
>
>
>
>
>
> The validation passes if we change the type to type="xmime:base64Binary".This requires a new xmime schema to be imported.
>
> But the code that gets generated uses byte[] instead of DataHandlers.Looks like the wsdl2java ignores the xmime:expectedContentTypes if the type is not  xsd:base64Binary .Is this a bug in CXF?
>
>
>
> What is the recommended  approach?
>
>
>
> Thanks and regards,
>
> Bharath
>
>