You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Tibor Strausz <Ti...@rapidsugar.nl> on 2011/04/13 08:27:38 UTC

SOAP message MUST NOT contain a Document Type Declaration(DTD)

Hi list,

I successfully generated java code with maven and axis2. But I can't call the SOAP method.
When I do the following I get this error:
Caused by: org.apache.axiom.om.OMException: SOAP message MUST NOT contain a Document Type Declaration(DTD)
// wsdl https://mw20ws.manyware.eu/ifundsmw2_111.wsdl
// post to:  https://mw20ws.manyware.eu/ifundsmw2_111.asp
final Ifundsmw2_111Stub stub = new Ifundsmw2_111Stub();
OpenConnection2Mw2Document openConnection2Mw2Document = OpenConnection2Mw2Document.Factory.newInstance();
openConnection2Mw2Document.addNewOpenConnection2Mw2();
openConnection2Mw2Document.getOpenConnection2Mw2().setCClientLogin("AAAAA");
openConnection2Mw2Document.getOpenConnection2Mw2().setCClientPwd("BBBBBB");
OpenConnection2Mw2ResponseDocument result = stub.openConnection2Mw2(openConnection2Mw2Document);


Any idea what can be wrong?

Thanks,

tibi


RE: SOAP message MUST NOT contain a Document Type Declaration(DTD)

Posted by Tibor Strausz <Ti...@rapidsugar.nl>.
No one has ever seen such an error?

Any help would be great. Like is this an error in respons or request?
Is it an error in axis or the client sending the SOAP message?

The stack trace is this:
org.apache.axis2.AxisFault: SOAP message MUST NOT contain a Document Type Declaration(DTD)
                at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
                at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:123)
                at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:67)
                at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:354)
                at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:417)
                at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
                at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
                at nl.rapidsugar.diabetesfonds.digiaccept.soap.Ifundsmw2_111Stub.openConnection2Mw2(Ifundsmw2_111Stub.java:1529)
                at nl.rapidsugar.diabetesfonds.digiaccept.soap.DigiAcceptIfundsSoapClient.getRelationNr(DigiAcceptIfundsSoapClient.java:38)
                at nl.rapidsugar.diabetesfonds.digiaccept.soap.DigiAcceptIfundsSoapClientTest.testSOAPcall1(DigiAcceptIfundsSoapClientTest.java:11)
                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:168)
                at junit.framework.TestCase.runBare(TestCase.java:134)
                at junit.framework.TestResult$1.protect(TestResult.java:110)
                at junit.framework.TestResult.runProtected(TestResult.java:128)
                at junit.framework.TestResult.run(TestResult.java:113)
                at junit.framework.TestCase.run(TestCase.java:124)
                at junit.framework.TestSuite.runTest(TestSuite.java:232)
                at junit.framework.TestSuite.run(TestSuite.java:227)
                at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
                at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
                at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.apache.axiom.om.OMException: SOAP message MUST NOT contain a Document Type Declaration(DTD)
                at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createDTD(StAXSOAPModelBuilder.java:461)
                at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:282)
                at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:204)
                at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:154)
                at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:140)
                at org.apache.axis2.builder.BuilderUtil.getSOAPBuilder(BuilderUtil.java:686)
                at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:215)
                at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:145)
                at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:108)
                ... 27 more



Thanks,

tibi

From: Tibor Strausz [mailto:Tibor@rapidsugar.nl]
Sent: woensdag 13 april 2011 8:28
To: 'java-user@axis.apache.org'
Subject: SOAP message MUST NOT contain a Document Type Declaration(DTD)


Hi list,

I successfully generated java code with maven and axis2. But I can't call the SOAP method.
When I do the following I get this error:
Caused by: org.apache.axiom.om.OMException: SOAP message MUST NOT contain a Document Type Declaration(DTD)
// wsdl https://mw20ws.manyware.eu/ifundsmw2_111.wsdl
// post to:  https://mw20ws.manyware.eu/ifundsmw2_111.asp
final Ifundsmw2_111Stub stub = new Ifundsmw2_111Stub();
OpenConnection2Mw2Document openConnection2Mw2Document = OpenConnection2Mw2Document.Factory.newInstance();
openConnection2Mw2Document.addNewOpenConnection2Mw2();
openConnection2Mw2Document.getOpenConnection2Mw2().setCClientLogin("AAAAA");
openConnection2Mw2Document.getOpenConnection2Mw2().setCClientPwd("BBBBBB");
OpenConnection2Mw2ResponseDocument result = stub.openConnection2Mw2(openConnection2Mw2Document);


Any idea what can be wrong?

Thanks,

tibi