You've configured your services.xml to use the right message receiver,
ie RPC, right ? Other than that, show us a stack strace and maybe we
can help. Keep in mind these tests do run.
The other thing is I do believe the RPC code has had some bug fixes
since the 1.0 release. You may want to use the nightlies:
http://people.apache.org/dist/axis2/nightly/
HTH,
Robert
http://www.braziloutsource.com/
On 6/30/06, John Duff <[EMAIL PROTECTED]> wrote:
I found the example you are talking about and am trying yo use it but
am running into some problems. this is what i have:
String opName = "sayName";
EndpointReference targetEPR =
new EndpointReference("http://127.0.0.1:" + port +
"/axis2/services/FirstService/");
QName operationName = new QName(opName);
Options options = new Options();
options.setTo(targetEPR);
options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
ConfigurationContext configContext;
try {
configContext =
ConfigurationContextFactory.createConfigurationContextFromFileSystem(null,
null);
RPCServiceClient sender = new RPCServiceClient(configContext, null);
sender.setOptions(options);
ArrayList args = new ArrayList();
args.add("John");
/*
ArrayList ret = new ArrayList();
ret.add(String.class);*/
OMElement response = sender.invokeBlocking(operationName,
args.toArray());
System.out.println(response.toString());
} catch (AxisFault e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Getting a class cast exception, thanks a lot for the help
-John
On 6/30/06, robert lazarski <[EMAIL PROTECTED]> wrote:
> Take a look at RPCMessageReceiver and RPCServiceClient . There's a
> test in the src disto that shows how:
>
> modules/integration/test/org/apache/axis2/rpc/RPCCallTest.java
>
> HTH,
> Robert
> http://www.braziloutsource.com/
>
>
> On 6/30/06, John Duff <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I have looked at a number of samples and Axis2 seems to make things
> > pretty simple, but with all the services the parameters and the return
> > types are OMElement. I want to create a service that uses a simple
> > String or int type as a parameter/return type. I can create this
> > service very easily, and it deploys fine, but when I write the client
> > I am having problems. In earlier versions of Axis it seems like you
> > could pass parameters to the call very easily, but in 2.0 you must
> > pass a OMElement.
> >
> > For a simple Web Service method such as this:
> >
> > public String sayName(String name)
> > {
> > return "Hello " + name + "!!!";
> > }
> >
> > Is there a way to call an instance of ServiceClient.sendReceive
> > passing in a String or Object parameter, dosn't seem like it. How
> > would I construct the OMElement to do something like this? I would
> > like to avoid generating anything from the WSDL if that is at all
> > possible, I really want to keep this simple.
> >
> > Thanks for the help,
> >
> > John
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]