Just in case anybody still uses Apache
Soap, here are my migration experiences from Soap to Axis:
----- Forwarded by Johannes
Fiala/Johannes Fiala on 02.05.2003 09:34 -----
| "Johannes Fiala"
<soap@fwd.at>
23.03.2003 11:10
|
|
| Apache Soap 2.3.1 | Apache Axis 1.1 |
| Call call = new Call();
call.setTargetObjectURI(service); call.setMethodName(methodname); call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC); // prepare parameters Vector params = new Vector(); params.addElement(new Parameter("command", String.class, command, Constants.NS_URI_SOAP_ENC)); params.addElement(new Parameter("portalUserId", String.class, portalUserId, Constants.NS_URI_SOAP_ENC)); params.addElement(new Parameter("vorname", String.class, vorname, Constants.NS_URI_SOAP_ENC)); params.addElement(new Parameter("nachname", String.class, nachname, Constants.NS_URI_SOAP_ENC)); params.addElement(new Parameter("geburtsDatum", java.util.Date.class, geburtsDatum, Constants.NS_URI_SOAP_ENC)); call.setParams(params); // Invoke the call. Response resp; try { resp = call.invoke(url, ""); } catch (SOAPException exception) { logger.error("Caught SOAPException (" + exception.getFaultCode() + "): " + exception.getMessage()); return(null); } | Service service = new Service();
Call call = (Call) service.createCall(); call.setTargetEndpointAddress( url ); call.setOperationName( new QName(servicename, methodname) ); call.addParameter( "command", XMLType.XSD_STRING, ParameterMode.IN); call.addParameter( "portalUserId", XMLType.XSD_STRING, ParameterMode.IN); call.addParameter( "vorname", XMLType.XSD_STRING, ParameterMode.IN); call.addParameter( "nachname", XMLType.XSD_STRING, ParameterMode.IN); call.addParameter( "geburtsDatum", XMLType.XSD_DATETIME, ParameterMode.IN); call.setReturnType( XMLType.XSD_STRING ); result = (String) call.invoke( new Object[] { command, portalUserId, vorname, nachname, geburtsDatum } ); |
| Apache Soap 2.3.1 | Apache Axis 1.1 |
| public myfunction (SOAPContext ctx, ...)
HttpServlet servlet = (HttpServlet)ctx.getProperty(Constants.BAG_HTTPSERVLET); ServletContext context = servlet.getServletContext(); | MessageContext mycontext = MessageContext.getCurrentContext();
HttpServlet servlet = (HttpServlet)mycontext.getProperty(HTTPConstants.MC_HTTP_SERVLET); ServletContext context = servlet.getServletContext(); |