Changes for page Web Services-Common Pitfalls and Troubleshooting
Last modified by Matthew Taylor on 2008/09/13 12:25
From version 2.1
edited by smmccraw
on 2007/07/08 09:46
on 2007/07/08 09:46
Change comment:
There is no comment for this version
To version 5.1
edited by Matthew Taylor
on 2008/09/13 12:25
on 2008/09/13 12:25
Change comment:
There is no comment for this version
Summary
-
Page properties (3 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 - Programming__WebObjects-WebServices-Common Pitfalls and Troubleshooting1 +Web Services-Common Pitfalls and Troubleshooting - Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. smmccraw1 +XWiki.matt - Content
-
... ... @@ -1,26 +1,64 @@ 1 -== NullPointerException calling WebService with Axis 1 +== NullPointerException calling WebService with Axis == 2 2 3 3 If you get an exception like the following: 4 4 5 5 {{panel}} 6 +Caused by: java.lang.NullPointerException 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 16 +{{/panel}} 6 6 7 - Caused by: java.lang.NullPointerException 8 - at java.util.Hashtable.put(Hashtable.java:396) 9 - at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.setProperty(SAXParserImpl.java:395) 10 - at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:246) 11 - at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538) 12 - at org.apache.axis.Message.getSOAPEnvelope(Message.java:376) 13 - at org.apache.axis.client.Call.invokeEngine(Call.java:2583) 14 - at org.apache.axis.client.Call.invoke(Call.java:2553) 15 - at org.apache.axis.client.Call.invoke(Call.java:2248) 16 - ... 5 more 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. 17 17 20 +== Losing Session with Axis Client == 21 + 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. 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}} 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 18 18 {{/panel}} 19 19 20 - It'smost likelybecauseyouareusingJava1.5with Axis1.1.If youwantyourclienttorunonJava1.5,you will needtoupgrade toAxis1.2RC2.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: 21 21 22 -== Losing Session with Axis Client == 40 +{{panel}} 41 +<transport name="http"> 42 + <requestFlow> 43 + <handler type="HTTPActionHandler"/> 44 + <handler type="URLMapper"/> 45 + </requestFlow> 46 + </transport> 47 +{{/panel}} 23 23 24 - For more information about cookie-based sessions with Axis clients, read the [[Consuming with Axis in Java>>Programming__WebObjects-Web_Services-Web_Service_Provider||anchor="Consuming_with_Axis_in_Java"]] section.49 +To: 25 25 26 -Category:WebObjects 51 +{{panel}} 52 +<transport name="http"> 53 + <requestFlow> 54 + <handler type="HTTPActionHandler"/> 55 + <handler type="URLMapper"/> 56 + </requestFlow> 57 + </transport> 58 + <transport name="https"> 59 + <requestFlow> 60 + <handler type="HTTPActionHandler"/> 61 + <handler type="URLMapper"/> 62 + </requestFlow> 63 + </transport> 64 +{{/panel}}