Last modified by Matthew Taylor on 2008/09/13 12:25

Hide last authors
Pascal Robert 3.1 1 == NullPointerException calling WebService with Axis ==
smmccraw 1.1 2
3 If you get an exception like the following:
4
5 {{panel}}
Pascal Robert 3.1 6 Caused by: java.lang.NullPointerException
Matthew Taylor 5.1 7 at java.util.Hashtable.put(Hashtable.java:396)
8 at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.setProperty(SAXParserImpl.java:395)
9 at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:246)
10 at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
11 at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
12 at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
13 at org.apache.axis.client.Call.invoke(Call.java:2553)
14 at org.apache.axis.client.Call.invoke(Call.java:2248)
15 ... 5 more
smmccraw 1.1 16 {{/panel}}
17
Matthew Taylor 5.1 18 It's most likely because you are using Java 1.5 with Axis 1.1. If you want your client to run on Java 1.5, you will need to upgrade to Axis 1.2RC2.
smmccraw 1.1 19
Pascal Robert 3.1 20 == Losing Session with Axis Client ==
smmccraw 1.1 21
Matthew Taylor 5.1 22 For more information about cookie-based sessions with Axis clients, read the [[Consuming with Axis in Java>>doc:WO.Programming__WebObjects-Web_Services-Web_Service_Provider||anchor="Consuming_with_Axis_in_Java"]] section.
Matthew Taylor 4.1 23
24 == SAXParseException only when clients use https ==
25
26 If, in WebObjects 5.4.x, your web services work normally over insecure http connections, but fail with the following exception when connecting via HTTPS to Apache (using the WebObjects apache adaptor):
27
28 {{panel}}
Matthew Taylor 5.1 29 org.xml.sax.SAXParseException: Premature end of file.
30 at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source
31 at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
32 at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
33 at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
34 at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source))
35 ... more
Matthew Taylor 4.1 36 {{/panel}}
37
Matthew Taylor 5.1 38 You will need to add additional information to the file server.wsdd to tell Apache AXIS what to do when it believes the transport mechanism is 'https.' AXIS will make the transport mechanism determination based on the HTTP header information sent to your application by the Apache WebObjects adaptor (which may include: HTTPS:on and SERVER_PORT:443). If no entry is made to tell AXIS how to handle 'https', it will assume the incoming data from the adaptor is encrypted via SSL, even though the communication between the adaptor and the instance is actually in the clear. To change the behavior of AXIS to handle these cases in the same way as http connections, change the file server.wsdd from:
Matthew Taylor 4.1 39
40 {{panel}}
Matthew Taylor 5.1 41 <transport name="http">
42 <requestFlow>
43 <handler type="HTTPActionHandler"/>
44 <handler type="URLMapper"/>
45 </requestFlow>
Matthew Taylor 4.1 46 </transport>
47 {{/panel}}
48
49 To:
50
51 {{panel}}
Matthew Taylor 5.1 52 <transport name="http">
53 <requestFlow>
54 <handler type="HTTPActionHandler"/>
55 <handler type="URLMapper"/>
56 </requestFlow>
Matthew Taylor 4.1 57 </transport>
58 <transport name="https">
Matthew Taylor 5.1 59 <requestFlow>
60 <handler type="HTTPActionHandler"/>
61 <handler type="URLMapper"/>
62 </requestFlow>
Matthew Taylor 4.1 63 </transport>
64 {{/panel}}