After doing following change your code works for me,
> Hi everybody,
> I wrote a basic web service:
> public String test (String t) {
> return (t);
> }
>
> when deployed, I have access to it easily throught my broser:
> http://localhost:8080/axis2/services/Test/test?t=I love axis
>
> But when writing a java client:
> public static void main(String[] args) throws Exception {
> ServiceClient client = new ServiceClient();
> // create option object
> Options opts = new Options();
> //setting target EPR
> opts.setTo(new
> EndpointReference("http://localhost:8080/axis2/services/Test/test"));
> //Setting action ,and which can be found from the wsdl of the
> service
> opts.setAction("urn:test");
> client.setOptions(opts);
> OMElement res = client.sendReceive(createPayLoad());
> System.out.println(res);
>
> }
>
> public static OMElement createPayLoad() {
> OMFactory fac = OMAbstractFactory.getOMFactory();
> OMNamespace omNs = fac.createOMNamespace("http://axis.org", "ns1");
>
OMNamespace omNs = fac.createOMNamespace("http://ws.apache.org/axis2",
"ns1");
Thanks
Deepal
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]