MTOM with CXF WS-I Validation Failure

View: New views
5 Messages — Rating Filter:   Alert me  

MTOM with CXF WS-I Validation Failure

by bharath thippireddy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

by bimargulies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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<bharath.thippireddy@...> 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

by dkulp :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


That's probably a bug in JAXB as we don't really do anything with the schema
other than to pass it into JAXB.   Most likely, a bug would need to be
reported with them:
http://jaxb.dev.java.net

Dan

On Thu June 18 2009 2:26:49 pm bharath thippireddy 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-g
>zip"/>
>
>
>
> 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

--
Daniel Kulp
dkulp@...
http://www.dankulp.com/blog

RE: MTOM with CXF WS-I Validation Failure

by bharath thippireddy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...]
Sent: Thursday, June 18, 2009 2:33 PM
To: users@...; bharath.thippireddy@...
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<bharath.thippireddy@...> 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

by bharath thippireddy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have reported the issue in JAXB.

https://jaxb.dev.java.net/issues/show_bug.cgi?id=656

thanks and regards,
Bharath

-----Original Message-----
From: Daniel Kulp [mailto:dkulp@...]
Sent: Thursday, June 18, 2009 2:36 PM
To: users@...
Cc: bharath thippireddy
Subject: Re: MTOM with CXF WS-I Validation Failure


That's probably a bug in JAXB as we don't really do anything with the schema
other than to pass it into JAXB.   Most likely, a bug would need to be
reported with them:
http://jaxb.dev.java.net

Dan

On Thu June 18 2009 2:26:49 pm bharath thippireddy 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-g
>zip"/>
>
>
>
> 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

--
Daniel Kulp
dkulp@...
http://www.dankulp.com/blog