Hi Eric,

I enabled Tomcat HTTPS connector:

    <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
              
maxThreads="150" scheme="https" secure="true"
              
clientAuth="false" sslProtocol="TLS" />

and generated .keystore file with:
    %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA

as described in Tomcat docs. Tomcat is running, I can see its welcome page both on 8080 and 8443.

I put Axis2 1.1.1 WAR file in tomcat/webapps dir. I can see Axis2 welcome page both on 8080 and 8443.

I put korona2.aar (my service archive) into axis2 "services" dir. I can see generated WSDL (both on 8080 and 8443). I can also call REST version of my web service from Firefox on both ports. I can generate client stub using wsdl2java. This client stub can call web service on port 8080, but when I try to call on 8443 (as described earlier), it fails.

Regards,
Ognjen



Eric Chow wrote:
Hi Ognjjen,

Can you show me the steps(include those key generation steps) to setup
in tomcat and your client.

On 4/16/07, Ognjen Blagojevic <[EMAIL PROTECTED]> wrote:
Hi all,

When I try to call Axis2-generated client for Axis2 web service over HTTPS,
an exception is thrown:

 java.lang.IllegalStateException: Can't overwrite cause.

Here is source:

Korona2Stub stubSsl = new
Korona2Stub("https://127.0.0.1:8443/axis2/services/korona2");
Korona2Stub.TestSnimi reqSsl = new Korona2Stub.TestSnimi();
reqSsl.setTestString("Test string.");
reqSsl.setTestInteger(1); // Test integer
Korona2Stub.TestSnimiResponse res1Ssl = stubSsl.testSnimi(req); // Exception
thrown here.
System.out.println(res1Ssl.get_return());

Same code works fine with HTTP on 8080. Is there anything else I need to do
to make HTTPS work?

I'm using Tomcat 6.0.10 with HTTPS connector enabled, and I can call REST
version of my web service from Firefox:
https://127.0.0.1/axis2/rest/korona2/testSnimi?testString=test&testInteger=1


Below is the full stack trace:


Exception in thread "main" java.lang.IllegalStateException: Can't overwrite
cause
    at java.lang.Throwable.initCause(Throwable.java:320)
    at
com.ctc.wstx.compat.Jdk14Impl.setInitCause(Jdk14Impl.java:70)
    at com.ctc.wstx.exc.WstxException.<init>(WstxException.java:46)
    at
com.ctc.wstx.exc.WstxIOException.<init>(WstxIOException.java:16)
    at
com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:313)
    at
org.apache.axiom.om.impl.MTOMXMLStreamWriter.flush(MTOMXMLStreamWriter.java:115)
    at
org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:420)
    at
org.apache.axis2.transport.http.SOAPOverHTTPSender$AxisSOAPRequestEntity.handleOMOutput(SOAPOverHTTPSender.java:190)
    at
org.apache.axis2.transport.http.SOAPOverHTTPSender$AxisSOAPRequestEntity.writeRequest(SOAPOverHTTPSender.java:232)
    at
org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:495)
    at
org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:1973)
    at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:993)
    at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397)
    at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
    at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
    at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
    at
org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:541)
    at
org.apache.axis2.transport.http.SOAPOverHTTPSender.send(SOAPOverHTTPSender.java:119)
    at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:335)
    at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:204)
    at
org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:674)
    at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:237)
    at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:202)
    at
orka.generated.Korona2Stub.testSnimi(Korona2Stub.java:850)
    at orka.Klijent.main(Klijent.java:149)



Regards,
Ognjen


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





Reply via email to