You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Dmitry S.Rogulin" <Dm...@cern.ch> on 2003/07/29 11:09:20 UTC
SOAP messages over SSL
Hi all,
I have to send a SOAP message (and get a response) using HTTPS.
I use Apache Axis for sending the message.
The test client is simple:
----------------------------
System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
System.setProperty("javax.net.ssl.trustStore", System.getProperty("user.home")+File.separator +"client.truststore");
System.setProperty("javax.net.ssl.keyStore", System.getProperty("user.home")+File.separator +"client.keystore");
System.setProperty("javax.net.ssl.keyStorePassword", "changeit");
try {
Call call = ServiceFactory
.newInstance()
.createService(null)
.createCall();
call.setTargetEndpointAddress("https://host:port/Service/MyService" );
call.setOperationName( new QName("Service/MyService","myMethod"));
String ret = (String) call.invoke( null );
System.out.println(ret);
} catch (Exception e) { e.printStackTrace(); }
----------------------------
But I get an error when I invoke the call:
javax.net.ssl.SSLException: SSL V2.0 servers are not supported.
at org.apache.axis.AxisFault.makeFault(AxisFault.java:129)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:131)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
Does anyone know what's wrong with that? How can I make a call over
HTTPS? Or does anyone have an alternative?
Thanks in advance.
Best regards,
Dmitry.
Serialize the return value..
Posted by Szöllosy Balázs <sz...@virgosystems.hu>.
Hi !
I'm using RPC style web service, and a HttpServlet for invoking the
webservice. I wrote a WSDL, and I'm using the generated stub. I'm
successfully called the target method, and get back its return value.
Unfortunately I need the XML instead of the class.
How can I get an XML, from the returned type, using it's own serializer ?
Thanx
Balazs
ps.: here's my servlet code:
terminus.query_webservice.Terminus_Web service = new
terminus.query_webservice.Terminus_WebLocator();
terminus.query_webservice.Terminus_Web port = service.getTerminus_Web();
terminus.query_types.ContextListType ret = port.getContextList();
BeanSerializer bser =
(BeanSerializer)ret.getSerializer("",terminus.query_types.ContextListType.cl
ass,ret.getTypeDesc().getXmlType());