求助 about mtom XmlMimeType and java first

8 views
Skip to first unread message

jansky

unread,
Jun 27, 2008, 5:18:07 AM6/27/08
to cxf-zh
我使用cxf2.1.1 and spring2.5.3 ,

@XmlType
class ****{
@XmlMimeType("application/octet-stream")
private DataHandler content;
}

<jaxws:endpoint id="********"
implementor="#**WebService"
address="/******Service">
<jaxws:properties>
<entry key="mtom-enabled" value="true" />
</jaxws:properties>

</jaxws:endpoint>

但是启动后,wsdl会抛错:[Fatal Error] :6:126: The prefix "ns1" for attribute
"ns1:expectedContentTypes" associated with an element type
"xs:element" is not bound.

去掉@XmlMimeType();时正常

jansky

unread,
Jun 30, 2008, 3:36:31 AM6/30/08
to cxf-zh

找到原因,因为加了
<dependency>
<groupId>jaxen</groupId>
<artifactId>jaxen</artifactId>
<version>1.1</version>
</dependency>

但是我在cxf中把这个exclusions掉,依然抛错,各位大大有没有碰过这类情形的,help!!!

Freeman Fang

unread,
Jun 30, 2008, 3:43:17 AM6/30/08
to cxf...@googlegroups.com
你遇到的新错误是什么?
还有就是你能把你DataHandler wrapper bean完整的贴出来么?

还有我建议你用wsdl first的方式, java first with annotations 是error prone

Freeman

jansky

unread,
Jun 30, 2008, 4:41:37 AM6/30/08
to cxf-zh
解决,xom依赖问题,有碰到的请注意!
Reply all
Reply to author
Forward
0 new messages