良い一日。
私はこのグルーヴィーなスクリプトに取り組んでいます
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 を使用しています。
前もって感謝します!
クリス