[Seasar-user:5553] [S2Axis] org.w3c.dom.Documentを引数に持つサービスメソッド呼出でエラーとなる
笹部 敦之
[E-MAIL ADDRESS DELETED]
2006年 12月 20日 (水) 16:06:57 JST
笹部と申します。
S2Axisでorg.w3c.dom.Documentを引数に持つサービスメソッド呼出で
エラーとなってしまいます。
S2Axis2で似た記事が挙げられていたのですが
=>[Seasar-user:4249] [S2Axis] Calendarを含んだDtoを送るとエラーになる
「S2Axis2の問題」とされていたことと、
同様のサンプルを「S2Axis2」で実施した場合も
エラーが発生したため、投稿させていただきました。
解決策、アドバイスがございましたらご教示ください。
よろしくお願いいたします。
■サンプル(s2axis-examplesのexamples.ex01を流用しました)
public interface Echo {
String echoDoc(org.w3c.dom.Document doc);
}
public class EchoImpl implements Echo {
public String echoDoc(Document doc){
return "ok";
}
}
public class EchoTest extends S2TestCase {
public void testDoc() throws ParserConfigurationException {
javax.xml.parsers.DocumentBuilderFactory dbf =
javax.xml.parsers.DocumentBuilderFactory.newInstance();
javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder();
Document doc = db.newDocument();
Element e = doc.createElement("document");
Element name = doc.createElement("name");
name.appendChild(doc.createTextNode("TEST"));
e.appendChild(name);
doc.appendChild(e);
Echo echo = (Echo) getComponent(Echo.class);
String result="";
result = echo.echoDoc(doc);
assertNotNull(result);
}
}
■スタックトレース
java.lang.reflect.UndeclaredThrowableException
at
org.seasar.remoting.axis.examples.ex01.Echo$$EnhancedByS2AOP$$5fcf29.echoDoc
(Echo$$EnhancedByS2AOP$$5fcf29.java)
at org.seasar.remoting.axis.examples.ex01.EchoTest.testDoc(EchoTest.
java:71)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:154)
at
org.seasar.framework.unit.S2FrameworkTestCase.doRunTest(S2FrameworkTestCase.
java:233)
at
org.seasar.extension.unit.S2TestCase.doRunTest(S2TestCase.java:89)
at
org.seasar.framework.unit.S2FrameworkTestCase.runBare(S2FrameworkTestCase.ja
va:150)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
nner.java:478)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.
java:344)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner
.java:196)
Caused by: org.xml.sax.SAXException
at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
at
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:1
74)
at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:12
9)
at
org.apache.axis.encoding.DeserializationContext.endElement(DeserializationCo
ntext.java:1087)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unkn
own Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.
scanEndElement(Unknown Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$Fragm
entContentDispatcher.dispatch(Unknown Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanD
ocument(Unknown Source)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at
org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext
.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at
org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChe
cker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at
org.seasar.remoting.axis.connector.AxisConnector.invoke(AxisConnector.java:1
27)
at
org.seasar.remoting.common.connector.impl.TargetSpecificURLBasedConnector.in
voke(TargetSpecificURLBasedConnector.java:105)
at
org.seasar.remoting.common.interceptor.RemotingInterceptor.invoke(RemotingIn
terceptor.java:84)
at
org.seasar.remoting.axis.examples.ex01.Echo$$EnhancedByS2AOP$$5fcf29$$Method
Invocation$$echoDoc2.proceed(MethodInvocationClassGenerator.java)
... 19 more
Caused by: org.xml.sax.SAXException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at
org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:1
04)
at
org.apache.axis.encoding.ser.BeanDeserializerFactory.getGeneralPurpose(BeanD
eserializerFactory.java:89)
at
org.apache.axis.encoding.ser.BaseDeserializerFactory.getDeserializerAs(BaseD
eserializerFactory.java:89)
at
org.apache.axis.encoding.DeserializationContext.getDeserializer(Deserializat
ionContext.java:464)
at
org.apache.axis.encoding.DeserializationContext.getDeserializerForType(Deser
ializationContext.java:547)
at
org.apache.axis.message.SOAPFaultDetailsBuilder.onStartChild(SOAPFaultDetail
sBuilder.java:157)
at
org.apache.axis.encoding.DeserializationContext.startElement(Deserialization
Context.java:1035)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Un
known Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.
scanStartElement(Unknown Source)
... 40 more
以上となります。
Seasar-user メーリングリストの案内