You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by bu...@apache.org on 2003/05/26 09:03:08 UTC

DO NOT REPLY [Bug 20232] New: - Axis 1.0 over HTTPS

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20232>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20232

Axis 1.0 over HTTPS

           Summary: Axis 1.0 over HTTPS
           Product: Axis
           Version: 1.0
          Platform: Other
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Basic Architecture
        AssignedTo: axis-dev@ws.apache.org
        ReportedBy: buzy_bee@rediffmail.com


Hi, 
I am getting error while invoking a secured web service through a standalone 
java application.

I have created a new webservice using Apache Axis 1.0 version and integrated 
with our "existing application" deployed on websphere 4.0 (Windows NT)

The service is deployed using the command as : 
java org.apache.axis.client.AdminClient deploy.wsdd -
lhttp://hostname:9080/context/services/TrialService 

For our existing application we have our IPlanet webserver as secured. All our 
requests hit the webserver which redirects requests to our websphere 
application server and since our webservice is integrated with this existing 
application I thought not much change will be required ..

Just that I specified the three settings needed at the client end.. 

        System.setProperty("javax.net.ssl.trustStore", trustStoreDirPath); 
        System.setProperty("javax.net.ssl.trustStorePassword", 
trustStorePassword); 

        System.setProperty
("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol"); 
        Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider()); 

but then when I try to invoke our service thru the java client with the URL as 
https://hostname/context/servlet/AxisServlet 
it gives error as follows.. 


- Mapping Exception to AxisFault 
AxisFault 
 faultCode: {http://xml.apache.org/axis/}Server.userException 
 faultString: org.xml.sax.SAXParseException: The root element is required in a 
well-formed document. 
 faultActor: null 
 faultDetail: 
        stackTrace: org.xml.sax.SAXParseException: The root element is required 
in a well-formed document. 
        at org.apache.xerces.framework.XMLParser.reportError
(XMLParser.java:1196) 
        at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError
(XMLDocumentScanner.java:570) 
        at 
org.apache.xerces.framework.XMLDocumentScanner$XMLDeclDispatcher.endOfInput
(XMLDocumentScanner.java:790) 
        at org.apache.xerces.framework.XMLDocumentScanner.endOfInput
(XMLDocumentScanner.java:418) 
        at 
org.apache.xerces.validators.common.XMLValidator.sendEndOfInputNotifications
(XMLValidator.java:694) 
        at org.apache.xerces.readers.DefaultEntityHandler.changeReaders
(DefaultEntityHandler.java:1026) 
        at org.apache.xerces.readers.XMLEntityReader.changeReaders
(XMLEntityReader.java:168) 
        at org.apache.xerces.readers.UTF8Reader.changeReaders
(UTF8Reader.java:182) 
        at org.apache.xerces.readers.UTF8Reader.lookingAtChar(UTF8Reader.java
(Compiled Code)) 
        at 
org.apache.xerces.framework.XMLDocumentScanner$XMLDeclDispatcher.dispatch
(XMLDocumentScanner.java:686) 
        at org.apache.xerces.framework.XMLDocumentScanner.parseSome
(XMLDocumentScanner.java:381) 
        at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081) 
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:379) 
        at org.apache.axis.encoding.DeserializationContextImpl.parse
(DeserializationContextImpl.java:232) 
        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:546) 
        at org.apache.axis.Message.getSOAPEnvelope(Message.java:377) 
        at org.apache.axis.server.AxisServer.invoke(AxisServer.java:304) 
        at org.apache.axis.transport.http.AxisServlet.doPost
(AxisServlet.java:701) 
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) 
        at org.apache.axis.transport.http.AxisServletBase.service
(AxisServletBase.java:335) 
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
        at com.ibm.servlet.engine.webapp.StrictServletInstance.doService
(ServletManager.java:827) 
        at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service
(StrictLifecycleServlet.java:167) 
        at com.ibm.servlet.engine.webapp.IdleServletState.service
(StrictLifecycleServlet.java:297) 
        at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service
(StrictLifecycleServlet.java:110) 
        at com.ibm.servlet.engine.webapp.ServletInstance.service
(ServletManager.java:472) 
        at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch
(ServletManager.java:1012) 
        at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch
(ServletManager.java:913) 
        at 
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch
(WebAppRequestDispatcher.java:523) 
        at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch
(WebAppRequestDispatcher.java:282) 
        at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward
(WebAppRequestDispatcher.java:112) 
        at com.ibm.servlet.engine.srt.WebAppInvoker.doForward
(WebAppInvoker.java:91) 
        at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook
(WebAppInvoker.java:184) 
        at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation
(CachedInvocation.java:67) 
        at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI
(ServletRequestProcessor.java:122) 
        at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service
(OSEListener.java:315) 
        at com.ibm.servlet.engine.http11.HttpConnection.handleRequest
(HttpConnection.java:60) 
        at com.ibm.ws.http.HttpConnection.readAndHandleRequest
(HttpConnection.java:323) 
        at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:252) 
        at com.ibm.ws.util.CachedThread.run(ThreadPool.java:122) 



org.xml.sax.SAXParseException: The root element is required in a well-formed 
document. 
        at org.apache.axis.message.SOAPFaultBuilder.endElement
(SOAPFaultBuilder.java:135) 
        at org.apache.axis.encoding.DeserializationContextImpl.endElement
(DeserializationContextImpl.java:942) 
        at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1528) 
        at org.apache.crimson.parser.Parser2.content(Parser2.java:1779) 
        at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507) 
        at org.apache.crimson.parser.Parser2.content(Parser2.java:1779) 
        at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507) 
        at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500) 
        at org.apache.crimson.parser.Parser2.parse(Parser2.java:305) 
        at org.apache.crimson.parser.XMLReaderImpl.parse
(XMLReaderImpl.java:442) 
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:345) 
        at org.apache.axis.encoding.DeserializationContextImpl.parse
(DeserializationContextImpl.java:232) 
        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:546) 
        at org.apache.axis.Message.getSOAPEnvelope(Message.java:377) 
        at org.apache.axis.client.Call.invokeEngine(Call.java:2132) 
        at org.apache.axis.client.Call.invoke(Call.java:2102) 
        at org.apache.axis.client.Call.invoke(Call.java:1851) 
        at org.apache.axis.client.Call.invoke(Call.java:1777) 
        at org.apache.axis.client.Call.invoke(Call.java:1315) 
        at Client.main(Client.java:52) 
org.xml.sax.SAXParseException: The root element is required in a well-formed 
document. 

I am able to hit the same url i.e. 
https://hostname/context/servlet/AxisServlet  as well as 
http://hostname/context/servlet/AxisServlet 
through the IE browser and could see the result page but through java client I 
am getting the above mentioned error.
Is this some bug in Axis 1.0 release??  I have tried the same with the latest 
axis 1.1 version but with the same result.

I have seen many posts in the user list regarding securing the Axis webservice 
but just want to know whether any body tried out securing their webserver which 
redirects request to the Appserver where Axis service is deployed?
 
Also one thing that I found out is that if I use Apache SOAP 2.0 API's to 
access the Axis 1.0 web service things work fine with URL as 
https://hostname/context/servlet/AxisServlet  as well as 
http://hostname/context/servlet/AxisServlet 

If this is some kind of bug with Axis then request you to fix this asap.
Regards,
Axis Developer.