[Fedora-suds-list] Extracting Attributes

Walter, Patrick A Patrick.A.Walter at usa-spaceops.com
Mon Nov 3 21:51:54 UTC 2008


I have a web service that requires a complex structure (cartesianVector) to be passed as an argument. 

Here is partial python code.....
    cartesianVector = getCartesianVector(theclient)

    imageTypes = theclient.factory.create("ns0:imageTypes")
    print imageTypes
    durationSeconds = 5400.0
    stepSize = 200.0
    width = 400
    height = 400
    
    print cartesianVector
    
    #Error occurs at this request
    bytes = theclient.service.plotGroundTrack(cartesianVector, durationSeconds, 
                                              stepSize, width, height, imageTypes.GIF)

Here is the structure from a "print cartesianVector".

(cartesianVector){
   attrValues = ""
   date = 272692290.64
   referenceFrame = "J2000"
   units = "STANDARD_METRIC"
   VX = 6306.70073861
   VY = 2986.87361604
   VZ = -3246.75882187
   x = 101062.390714
   y = -5041562.75123
   z = -4446623.59309
 }

When I call the server service I get the following error... suds.WebFault: Server raised fault: 'java.lang.NullPointerException'

Other service methods work, when passing "primitive" types (long, strings) as arguments. Services can also return complex types. 

The service is a Java 1.6 version.

I'm using Python 2.5

THANKS FOR YOUR HELP



ERROR:suds.client:<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:tns="http://dataservices.cts.nasaops/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header/>
   <SOAP-ENV:Body>
      <tns:plotGroundTrack>
         <tns:stateVector xmlns:tns="http://data.dataservices.cts.nasaops">
            <tns:attrValues></tns:attrValues>
            <tns:date>272692290.64</tns:date>
            <tns:referenceFrame>J2000</tns:referenceFrame>
            <tns:units>STANDARD_METRIC</tns:units>
            <tns:VX>6306.70073861</tns:VX>
            <tns:VY>2986.87361604</tns:VY>
            <tns:VZ>-3246.75882187</tns:VZ>
            <tns:x>101062.390714</tns:x>
            <tns:y>-5041562.75123</tns:y>
            <tns:z>-4446623.59309</tns:z>
         </tns:stateVector>
         <durationSeconds>5400.0</durationSeconds>
         <stepSizeSeconds>200.0</stepSizeSeconds>
         <width>400</width>
         <height>400</height>
         <imageType>GIF</imageType>
      </tns:plotGroundTrack>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Traceback (most recent call last):
  File "D:\eclipseJCP\workspace\TestCtsWebService\src\root\examples\ctsWebServiceClient00.py", line 153, in <module>
    displayPlotGroundTrack(theclient)
  File "D:\eclipseJCP\workspace\TestCtsWebService\src\root\examples\ctsWebServiceClient00.py", line 70, in displayPlotGroundTrack
    stepSize, width, height, imageTypes.GIF)
  File "C:\Python25\lib\site-packages\suds\client.py", line 287, in __call__
    raise e
suds.WebFault: Server raised fault: 'java.lang.NullPointerException'




More information about the fedora-suds-list mailing list