Changes for page Web Services-Common Pitfalls and Troubleshooting
Last modified by Matthew Taylor on 2008/09/13 12:25
From version 4.1
edited by Matthew Taylor
on 2008/09/13 12:25
on 2008/09/13 12:25
Change comment:
added info about https to wikibook by mistake, now adding it here.
To version 6.1
edited by Matthew Taylor
on 2008/09/13 12:25
on 2008/09/13 12:25
Change comment:
Migrated to Confluence 5.3
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Parent
-
... ... @@ -1,0 +1,1 @@ 1 +Web Services - Content
-
... ... @@ -3,25 +3,23 @@ 3 3 If you get an exception like the following: 4 4 5 5 {{panel}} 6 - 7 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 17 - 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 18 18 {{/panel}} 19 19 20 -It's most likely because you are using Java 1.5 with Axis 1.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. 21 21 22 22 == Losing Session with Axis Client == 23 23 24 -For more information about cookie-based sessions with Axis clients, read the [[Consuming with Axis in Java>>WO :Programming__WebObjects-Web_Services-Web_Service_Provider||anchor="Consuming_with_Axis_in_Java"]] section.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. 25 25 26 26 == SAXParseException only when clients use https == 27 27 ... ... @@ -28,45 +28,39 @@ 28 28 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): 29 29 30 30 {{panel}} 31 - 32 - org.xml.sax.SAXParseException: Premature end of file. 33 - at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source 34 - at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source) 35 - at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) 36 - at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) 37 - at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)) 38 - ... more 39 - 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 40 40 {{/panel}} 41 41 42 -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 //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.~://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: 43 43 44 44 {{panel}} 45 - 46 - <transport name="http"> 47 - <requestFlow> 48 - <handler type="HTTPActionHandler"/> 49 - <handler type="URLMapper"/> 50 - </requestFlow> 41 +<transport name="http"> 42 + <requestFlow> 43 + <handler type="HTTPActionHandler"/> 44 + <handler type="URLMapper"/> 45 + </requestFlow> 51 51 </transport> 52 - 53 53 {{/panel}} 54 54 55 55 To: 56 56 57 57 {{panel}} 58 - 59 - <transport name="http"> 60 - <requestFlow> 61 - <handler type="HTTPActionHandler"/> 62 - <handler type="URLMapper"/> 63 - </requestFlow> 52 +<transport name="http"> 53 + <requestFlow> 54 + <handler type="HTTPActionHandler"/> 55 + <handler type="URLMapper"/> 56 + </requestFlow> 64 64 </transport> 65 65 <transport name="https"> 66 - 67 - 68 - 69 - 59 + <requestFlow> 60 + <handler type="HTTPActionHandler"/> 61 + <handler type="URLMapper"/> 62 + </requestFlow> 70 70 </transport> 71 - 72 72 {{/panel}}