Error accessing a java web service
anand nalya
anand.nalya at gmail.com
Tue Dec 11 07:13:40 EST 2007
Hi,
I'm trying to access a web service written in java from python, but it is
returning a NullPointerException. The parameter that I'm passing is somehow
not reaching the server.
Here is the code I'm using for invoking the service
import SOAPpy
from SOAPpy import SOAPProxy
import fpconst
import xml
namespace = 'http://wev.onyomo.com/'
url = 'http://localhost:8176/XSLTTransformerService/XSLTTransformer'
server = SOAPProxy(url,namespace)
server.config.dumpSOAPOut = 1
server.config.dumpSOAPIn = 1
server.convert('<results />');
*** Outgoing SOAP ******************************************************
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
>
<SOAP-ENV:Body>
<ns1:convert xmlns:ns1="http://wev.onyomo.com/" SOAP-ENC:root="1">
<v1 xsi:type="xsd:string"><results /></v1>
</ns1:convert>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
************************************************************************
*** Incoming SOAP ******************************************************
<?xml version="1.0" ?><soapenv:Envelope xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="
http://www.w3.org/2001/XMLSchema"
xmlns:ns1="http://wev.onyomo.com/"><soapenv:Body><soapenv:Fault
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
"><faultcode>soapenv:Server</faultcode><faultstring>
java.lang.NullPointerException
</faultstring></soapenv:Fault></soapenv:Body></soapenv:Envelope>
************************************************************************
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/home/anand/Desktop/SOAPpy-0.12.0/SOAPpy/Client.py", line 470, in
__call__
File "/home/anand/Desktop/SOAPpy-0.12.0/SOAPpy/Client.py", line 492, in
__r_call
File "/home/anand/Desktop/SOAPpy-0.12.0/SOAPpy/Client.py", line 406, in
__call
SOAPpy.Types.faultType: <Fault soapenv:Server:
java.lang.NullPointerException>
When I access the same web service through a java client, it works fine.
Am I missing something here??
Cheers,
Anand Nalya
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20071211/f01cba28/attachment.html>
More information about the Python-list
mailing list