You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by "bdol@email.it" <bd...@email.it> on 2002/01/21 11:07:53 UTC

SOAP & JDOM

Hello folks!

I'm trying to build an Envelope using a JDOM Document read from an INput
Source. I get the XML source using (jdom)DOMBuilder, then I create the
DOM (org.w3c.)Document using (jdom) DOMOutputter's
output(org.w3c.Document) method.

However, when I invoke the Envelope.unmarshall, I've got the following
exception


2002-01-21 10:49:03,869 [ bdol.soap] run ERROR - while unmarshalling
java.lang.NullPointerException
at org.apache.soap.util.xml.QName.setLocalPart(QName.java:118)
at org.apache.soap.util.xml.QName.<init>(QName.java:103)
at
org.apache.soap.AttributeHandler.unmarshall(AttributeHandler.java:238)
at org.apache.soap.Envelope.unmarshall(Envelope.java:240)
at org.apache.soap.Envelope.unmarshall(Envelope.java:228)
at
com.ilsole24ore.bdol.frontend.soap.SoapMessageClient.run(SoapMessageClient.java:125)
at
com.ilsole24ore.bdol.frontend.soap.SoapMessageClient.<init>(SoapMessageClient.java:64)
at
com.ilsole24ore.bdol.frontend.soap.SoapMessageClientTest.testRun(SoapMessageClientTest.java:66)
at java.lang.reflect.Method.invoke(Native Method)
at junit.framework.TestCase.runTest(TestCase.java:166)
at junit.framework.TestCase.runBare(TestCase.java:140)
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:131)
at org.netbeans.junit.NbTestCase.run(Unknown Source)
at junit.framework.TestSuite.runTest(TestSuite.java:173)
at junit.framework.TestSuite.run(TestSuite.java:168)
at junit.textui.TestRunner.doRun(TestRunner.java:74)
at junit.textui.TestRunner.run(TestRunner.java:200)
at
com.ilsole24ore.bdol.frontend.soap.SoapMessageClientTest.main(SoapMessageClientTest.java:53)
F


The original XML (got it from JDOM's XMLOutputter) is

<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<s:Envelope xmlns:s=3D"http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<search xmlns=3D"urn:Product">
<user_info>
<name>bdol</name>
<passwd>bdol</passwd>
</user_info>
<product_name>BIG</product_name>
<operation_name>semplificata</operation_name>
<parameters>
<parameter>
<name>date_from</name>
<value>12/10/2001</value>
</parameter>
<parameter>
<name>area</name>
<value>finanza</value>
</parameter>
<parameter>
<name>numero</name>
<value>20</value>
</parameter>
</parameters>
</search>
</s:Body>
</s:Envelope>

Does anyone get problem(s) like this?
Do you think this is JDOM problem (bug)?

Thanks a log!
BDOL




--
Prendi GRATIS l'email universale che... risparmia: http://www.email.it/f

Sponsor:
Sponsor: 10.000 lire ti aspettano semplicemente cliccando qui:
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=9&d=21-1  

RE: SOAP & JDOM

Posted by William Brogden <wb...@bga.com>.
> -----Original Message-----
> From: bdol@email.it [mailto:bdol@email.it] 
> Sent: Monday, January 21, 2002 5:08 AM
> To: soap-user@xml.apache.org
> Subject: SOAP & JDOM
> 
> 
> Hello folks!
> 
> I'm trying to build an Envelope using a JDOM Document read 
> from an INput
> Source. I get the XML source using (jdom)DOMBuilder, then I create the
> DOM (org.w3c.)Document using (jdom) DOMOutputter's
> output(org.w3c.Document) method.
> 
> However, when I invoke the Envelope.unmarshall, I've got the following
> exception
> 
> 
> 2002-01-21 10:49:03,869 [ bdol.soap] run ERROR - while unmarshalling
> java.lang.NullPointerException
> at org.apache.soap.util.xml.QName.setLocalPart(QName.java:118)
> at org.apache.soap.util.xml.QName.<init>(QName.java:103)
> at
> org.apache.soap.AttributeHandler.unmarshall(AttributeHandler.java:238)
> at org.apache.soap.Envelope.unmarshall(Envelope.java:240)
> at org.apache.soap.Envelope.unmarshall(Envelope.java:228)
> at
> com.ilsole24ore.bdol.frontend.soap.SoapMessageClient.run(SoapM
> essageClient.java:125)
> at
> com.ilsole24ore.bdol.frontend.soap.SoapMessageClient.<init>(So
> apMessageClient.java:64)
> at
> com.ilsole24ore.bdol.frontend.soap.SoapMessageClientTest.testR
> un(SoapMessageClientTest.java:66)
> at java.lang.reflect.Method.invoke(Native Method)
> at junit.framework.TestCase.runTest(TestCase.java:166)
> at junit.framework.TestCase.runBare(TestCase.java:140)
> 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:131)
> at org.netbeans.junit.NbTestCase.run(Unknown Source)
> at junit.framework.TestSuite.runTest(TestSuite.java:173)
> at junit.framework.TestSuite.run(TestSuite.java:168)
> at junit.textui.TestRunner.doRun(TestRunner.java:74)
> at junit.textui.TestRunner.run(TestRunner.java:200)
> at
> com.ilsole24ore.bdol.frontend.soap.SoapMessageClientTest.main(
> SoapMessageClientTest.java:53)
> F
> 
> 
> The original XML (got it from JDOM's XMLOutputter) is
> 
> <?xml version=3D"1.0" encoding=3D"UTF-8"?>
> <s:Envelope xmlns:s=3D"http://schemas.xmlsoap.org/soap/envelope/">
> <s:Body>
> <search xmlns=3D"urn:Product">

That does not look right - what is that 3D doing in there?



wbrogden@bga.com
Author of Soap Programming with Java - Sybex; ISBN: 0782129285





RE: SOAP & JDOM

Posted by William Brogden <wb...@bga.com>.
> -----Original Message-----
> From: bdol@email.it [mailto:bdol@email.it] 
> Sent: Monday, January 21, 2002 5:08 AM
> To: soap-user@xml.apache.org
> Subject: SOAP & JDOM
> 
> 
> Hello folks!
> 
> I'm trying to build an Envelope using a JDOM Document read 
> from an INput
> Source. I get the XML source using (jdom)DOMBuilder, then I create the
> DOM (org.w3c.)Document using (jdom) DOMOutputter's
> output(org.w3c.Document) method.
> 
> However, when I invoke the Envelope.unmarshall, I've got the following
> exception
> 
> 
> 2002-01-21 10:49:03,869 [ bdol.soap] run ERROR - while unmarshalling
> java.lang.NullPointerException
> at org.apache.soap.util.xml.QName.setLocalPart(QName.java:118)
> at org.apache.soap.util.xml.QName.<init>(QName.java:103)
> at
> org.apache.soap.AttributeHandler.unmarshall(AttributeHandler.java:238)
> at org.apache.soap.Envelope.unmarshall(Envelope.java:240)
> at org.apache.soap.Envelope.unmarshall(Envelope.java:228)
> at
> com.ilsole24ore.bdol.frontend.soap.SoapMessageClient.run(SoapM
> essageClient.java:125)
> at
> com.ilsole24ore.bdol.frontend.soap.SoapMessageClient.<init>(So
> apMessageClient.java:64)
> at
> com.ilsole24ore.bdol.frontend.soap.SoapMessageClientTest.testR
> un(SoapMessageClientTest.java:66)
> at java.lang.reflect.Method.invoke(Native Method)
> at junit.framework.TestCase.runTest(TestCase.java:166)
> at junit.framework.TestCase.runBare(TestCase.java:140)
> 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:131)
> at org.netbeans.junit.NbTestCase.run(Unknown Source)
> at junit.framework.TestSuite.runTest(TestSuite.java:173)
> at junit.framework.TestSuite.run(TestSuite.java:168)
> at junit.textui.TestRunner.doRun(TestRunner.java:74)
> at junit.textui.TestRunner.run(TestRunner.java:200)
> at
> com.ilsole24ore.bdol.frontend.soap.SoapMessageClientTest.main(
> SoapMessageClientTest.java:53)
> F
> 
> 
> The original XML (got it from JDOM's XMLOutputter) is
> 
> <?xml version=3D"1.0" encoding=3D"UTF-8"?>
> <s:Envelope xmlns:s=3D"http://schemas.xmlsoap.org/soap/envelope/">
> <s:Body>
> <search xmlns=3D"urn:Product">

That does not look right - what is that 3D doing in there?



wbrogden@bga.com
Author of Soap Programming with Java - Sybex; ISBN: 0782129285