Axis/Radio interop - Draft
This was my scratchpad. The completed essay can be found here.
Calling a Radio
service using JAX RPC and Axis

import javax.xml.rpc.Call;
import javax.xml.rpc.ParameterMode;
import javax.xml.rpc.namespace.QName;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;
import org.apache.axis.transport.http.HTTPConstants;public class HelloDave {
public static void main(String args[]) throws Exception {
Call call = (new Service()).createCall();
call.setTargetEndpointAddress(new java.net.URL(("http://127.0.0.1:5335/")));
call.setOperationName(new QName("", "helloWorld") );
call.addParameter("Name", XMLType.XSD_STRING, ParameterMode.PARAM_MODE_IN);
call.setProperty(HTTPConstants.MC_HTTP_SOAPACTION, "/radio");
System.out.println(call.invoke(new Object[] {"Dave from Axis"}));
}
}
Calling a Axis
service
using soap.rpc.client

on getQuote (name) { local (quote, params={"symbol": name}); quote = soap.rpc.client (
actionURI: "/axis/servlet/AxisServlet",
methodName: "getQuote",
adrParams: @params,
rpcServer: "nagoya.apache.org",
rpcPort: 5049,
username: "user1",
password: "pass1",
methodNamespace: "xdq",
methodNamespaceURI: "urn:xmltoday-delayed-quotes"
); return ("Stock quote for " + name + " is " + quote)}
[Macro error: Poorly formed XML text, string constant is improperly formatted. (At character #421.)]
|
|
© Copyright
2002
Sam Ruby
.
Last update:
9/1/2002; 6:53:35 PM
.
This theme is based on the SoundWaves
(blue) Manila theme. |
|
|