Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 96680 invoked from network); 27 Nov 2007 18:39:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Nov 2007 18:39:18 -0000 Received: (qmail 17833 invoked by uid 500); 27 Nov 2007 18:39:03 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 17788 invoked by uid 500); 27 Nov 2007 18:39:03 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 17777 invoked by uid 99); 27 Nov 2007 18:39:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Nov 2007 10:39:03 -0800 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Nov 2007 18:39:04 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1Ix5KU-0000oZ-Te for axis-dev@ws.apache.org; Tue, 27 Nov 2007 10:38:42 -0800 Message-ID: <13976704.post@talk.nabble.com> Date: Tue, 27 Nov 2007 10:38:42 -0800 (PST) From: stevewu To: axis-dev@ws.apache.org Subject: Re: Axis2 Https Client In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: sthein@primavera.com References: <9315754.post@talk.nabble.com> <9361752.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org Hi Saminda, I am having problem using HTTPS with Axis2 1.3. I follow the steps in your doc and setup the certificates. Also I modified Tomcat's(5.5.25) server.xml to use HTTPS transport. Before I invoked WebService method, I setup system properties as you stated below. When I invoke WebService method I am getting the following exception: org.apache.axis2.AxisFault: unknown at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:486) at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:343) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163) at com.primavera.ws.client.AuthenticationServiceStub.login(AuthenticationServiceStub.java:150) at com.primavera.wsclient.AuthenticationServiceXmlbeanClient.testLogin(AuthenticationServiceXmlbeanClient.java:34) at com.primavera.wsclient.AuthenticationServiceXmlbeanClient.main(AuthenticationServiceXmlbeanClient.java:90) What am I missing? Thanks Steve Saminda Abeyruwan-3 wrote: > > Hi, > > You don't have to dug deep in to stub code to enable ssl. The underline > transport sender, httpclient provides full support for HTTP over Secure > Sockets Layer (SSL) or IETF Transport Layer Security (TLS) protocols by > leveraging the Java Secure Socket Extension > (JSSE). > > ex: Assume your client code has FooStub. > > ======================================== > FooStub fooStub = new FooStub("https://www.cnn.com"); > > // Enabel SSL via JSSE > System.setProperty("javax.net.ssl.trustStore", > "path to client trust store"); > System.setProperty("javax.net.ssl.trustStorePassword","your password"); > > fooStub.invokeWebServiceMethod(); > ========================================= > > That's the only thing you have to do. invokeWebServiceMethod() contains > the > stub logic, which you mightn't have to worry about. > > But you have to properly setup the client trust store. Attached article > will > be help in this aspect. > > Thank you > > Saminda > > > > On 3/8/07, danop wrote: >> >> >> >> Saminda, >> >> Thanks for you reply and the link you included. However, I have spent >> the >> last 2 days reading sslguide.html and trying to apply the information on >> that page while still using the client stub classes that the Axis2 >> Wsdl2Java >> tool created. I cannot seem to find any of the socket logic in the >> client >> stubs, as they are all hidden. >> >> Could you please show an example of how to use the information from the >> sslguide and apply it to the auto axis2 generated client stubs? (Below >> is >> a >> section of the Axis2 generated client stub) >> >> try { >> >> org.apache.axis2.client.OperationClient_operationClient = >> _serviceClient >> >> >> .createClient(_operations[6].getName()); >> _operationClient.getOptions().setAction( >> "SomeService.Signon"); >> >> >> _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault( >> true); >> >> Options opt = _operationClient.getOptions(); >> >> // create SOAP envelope with that payload >> org.apache.axiom.soap.SOAPEnvelope env = null; >> >> // Style is Doc. >> >> env = toEnvelope( >> >> >> getFactory(_operationClient.getOptions() >> >> >> .getSoapVersionURI()), >> param12, >> optimizeContent(new >> javax.xml.namespace.QName("", "Signon"))); >> >> // adding SOAP headers >> _serviceClient.addHeadersToEnvelope(env); >> // create message context with that soap envelope >> >> org.apache.axis2.context.MessageContext_messageContext = new >> org.apache.axis2.context.MessageContext(); >> _messageContext.setEnvelope(env); >> >> // add the message contxt to the operation client >> >> >> _operationClient.addMessageContext(_messageContext); >> >> // execute the operation client >> _operationClient.execute(true); // <----- It >> Brakes Here >> >> >> >> Many Thanks. >> >> >> >> Saminda Abeyruwan-3 wrote: >> > >> > Hope these will help >> > >> > http://jakarta.apache.org/commons/httpclient/sslguide.html >> > >> > Thank you >> > >> > Saminda >> > >> > On 3/5/07, danop wrote: >> >> >> >> >> >> Hello, >> >> >> >> Am hoping someone can help me with an issue that I have encountered. >> I >> >> created an axis2 client stub using the WSDL2Java tool against a wsdl >> from >> >> a >> >> dot net https url. However, when I try to run the new axis2 client >> >> against >> >> the https soap url, I receive an exception indicating that there is no >> >> trusted certificate found. >> >> >> >> sun.security.validator.ValidatorException: No trusted certificate >> found >> >> >> >> Since, the https url does not have any issued certificates, I have no >> >> idea >> >> how to prevent the axis2 client stub excecution from trying to resolve >> >> the >> >> certificate. I've spent 4 days reading this forum extensively, trying >> >> various things, and yet I am no closer to a completing successful soap >> >> call >> >> to the https url. >> >> >> >> Is there any way to disable the axis2 client from trying to find a >> >> trusted >> >> certificate when making the https soap call? >> >> >> >> If so, could someone please show me an example how? >> >> >> >> If not, could someone please show me an example of how to get >> around >> >> this exception? >> >> >> >> Many thanks, >> >> danop >> >> >> >> -- >> >> View this message in context: >> >> http://www.nabble.com/Axis2-Https-Client-tf3350210.html#a9315754 >> >> Sent from the Axis - Dev mailing list archive at Nabble.com. >> >> >> >> >> >> --------------------------------------------------------------------- >> >> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org >> >> For additional commands, e-mail: axis-dev-help@ws.apache.org >> >> >> >> >> > >> > >> > -- >> > Saminda Abeyruwan >> > >> > Software Engineer >> > WSO2 Inc. - www.wso2.org >> > >> > >> > --------------------------------------------------------------------- >> > To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org >> > For additional commands, e-mail: axis-dev-help@ws.apache.org >> > >> >> -- >> View this message in context: >> http://www.nabble.com/Axis2-Https-Client-tf3350210.html#a9361752 >> Sent from the Axis - Dev mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org >> For additional commands, e-mail: axis-dev-help@ws.apache.org >> >> > > > -- > Saminda Abeyruwan > > Software Engineer > WSO2 Inc. - www.wso2.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org > For additional commands, e-mail: axis-dev-help@ws.apache.org > -- View this message in context: http://www.nabble.com/Axis2-Https-Client-tf3350210.html#a13976704 Sent from the Axis - Dev mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org For additional commands, e-mail: axis-dev-help@ws.apache.org