再会。
我正在研究这个 groovy 脚本
import groovy.xml.MarkupBuilder;
import groovy.xml.*;
def writer = new StringWriter();
def xmlResponse = new MarkupBuilder(writer);
def index = 0;
xmlResponse.CalculatePayoutFigureResponse() {
Identifier([UniqueID:'CalculatedLoanRepayment-1'])
}
String response = writer.toString();
return XmlUtil.serialize(response);
每次调用它时,我都会收到 ff 错误:
SEVERE: java.lang.Exception: No method named 'Identifier' found for arguments [[UniqueID:CalculatedLoanRepayment-1]]
java.lang.Exception: No method named 'Identifier' found for arguments [[UniqueID:CalculatedLoanRepayment-1]]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:80)
at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:74)
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrap.callConstructor(ConstructorSite.java:84)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:247)
有谁熟悉这个?你能指出我正确的方向吗?
我一直在寻找解决方案,但无济于事。我构建 XML 的方式是否错误?我正在使用 groovy 2.4.4。
提前致谢!
克里斯