我正在尝试覆盖类“NamespacePrefixMapper”的抽象方法,以为 xml 属性提供我的自定义名称空间。但它不断给出以下错误消息。
.c.compile:
[javac] Compiling 1 source file to C:\isp_development\target\dmc_ac_efulfilment\release\lib
[javac] C:\isp_development\source\dmc_ac_efulfilment\javasource\de\dmc\enfinity\adapter\efulfilment\client\JustForTest.java:3: error: package com.sun.xml.internal.bind.marshaller does not exist
[javac] import com.sun.xml.internal.bind.marshaller.NamespacePrefixMapper;
[javac] ^
[javac] C:\isp_development\source\dmc_ac_efulfilment\javasource\de\dmc\enfinity\adapter\efulfilment\client\JustForTest.java:5: error: cannot find symbol
[javac] public class JustForTest extends NamespacePrefixMapper {
[javac] ^
[javac] symbol: class NamespacePrefixMapper
[javac] C:\isp_development\source\dmc_ac_efulfilment\javasource\de\dmc\enfinity\adapter\efulfilment\client\JustForTest.java:7: error: method does not override or implement a method from a supertype
[javac] @Override
[javac] ^
[javac] 3 errors
下面是我试图覆盖的方法代码。
@Override
public String getPreferredPrefix(String namespaceUri, String suggestion, boolean requirePrefix) {
namespaceUri = "http://base.google.com/ns/1.0";
suggestion="g";
requirePrefix=true;
return suggestion;
}
是什么云的原因。帮助将不胜感激。