Hi Aditya, The error is not something to do with your code. It is the Action URI that causes the problem. Sandesha uses Action property to identify different services from the client side. I will correct this soon so that it will use the target URL to identify different services in the client side. Then we don't have to depend on the action property anymore.
Until such time please set a valid action in the client. e.g. call.setProperty(Constants.ClientProperties.ACTION,"urn:abc"); The error due to malformed URI is mainly due to not complying with the URI schemes. For more information on URIs please refer. http://www.gbiv.com/protocols/uri/rfc/rfc3986.html#examples btw; This is the client class that I used ---------------------------------------------------------------------------- package samples.userguide.example3; import org.apache.axis.client.Call; import org.apache.axis.client.Service; import org.apache.axis.encoding.XMLType; import org.apache.axis.utils.Options; import org.apache.sandesha.RMInitiator; import org.apache.sandesha.Constants; import org.apache.sandesha.RMTransport; import javax.xml.namespace.QName; import javax.xml.rpc.ParameterMode; public class Client { private static String defaultServerPort = "8070"; private static String defaultClientPort = "9070"; public static void main(String [] args) { try { RMInitiator.initClient(false); Service service = new Service(); Call call = (Call) service.createCall(); call.setProperty(Constants.ClientProperties.SYNC,new Boolean(false)); call.setProperty(Constants.ClientProperties.ACTION,"urn:abc"); call.setProperty(Constants.ClientProperties.FROM,"http://127.0.0.1:"+default ClientPort+"/axis/services/RMService"); call.setProperty(Constants.ClientProperties.REPLY_TO,"http://127.0.0.1:"+def aultClientPort+"/axis/services/RMService"); call.setTransport(new RMTransport("http://127.0.0.1:8070/axis/services/MyService", "")); call.setTargetEndpointAddress(new java.net.URL("http://127.0.0.1:8070/axis/services/MyService")); call.setOperationName( new QName("http://example3.userguide.samples", "serviceMethod") ); call.addParameter( "arg1", XMLType.XSD_STRING, ParameterMode.IN); call.setReturnType( org.apache.axis.encoding.XMLType.XSD_STRING ); call.setProperty(Constants.ClientProperties.MSG_NUMBER, new Long(1)); call.setProperty(Constants.ClientProperties.LAST_MESSAGE, new Boolean(true)); //For last message. String ret = (String) call.invoke( new Object[] { "Hello" } ); System.out.println("You typed : " + ret); RMInitiator.stopClient(); } catch (Exception e) { System.err.println(e.toString()); } } } ---------------------------------------------------------------------------- Thanks, Jaliya -----Original Message----- From: aditya vikram [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 15, 2005 12:23 PM To: [email protected] Subject: problem using sandesha Hi Has anyone been able to use sandesha outside the interop examples ?...I have been trying to get a very simple echo service (userguide\example3\MyService.java in axis samples) to work but I am having some trouble. It looks like the create-sequence request and response messages are exchanged correctly but after that the invoke() request does not seem to be reaching the service. I have followed the userguide client-side and server-side instructions in setting up this scenario. On running the client, following output is generated: ========================= C:\Tomcat\axis-1_2RC2>java samples.userguide.example3.Client -lhttp://127.0.0.1:8070/axis/services/MyService "A" INFO: SENDER STARTED .... NFO: CLIENT LISTENER STARTED .... INFO: SENDING CREATE SEQUENCE REQUEST .... INFO: SENDING REQUEST MESSAGE .... INFO: SENDING REQUEST MESSAGE .... ========================= While tomcat (running the sandesha enabled MyService) prints the following statements: ========================= INFO: SENDER STARTED .... INFO: RMINVOKER STARTED .... INFO: SENDING CREATE SEQUENCE RESPONSE .... ========================= axis.log on the client side has the following logs: ========================= id does not exist 86625 ERROR [main] (SandeshaQueue.java:574) - Sequence id does not exist 86805 ERROR [Thread-0] (Sender.java:105) - org.apache.axis.types.URI$MalformedURIException: Cannot initialize URI with empty parameters. 87126 ERROR [main] (SandeshaQueue.java:574) - Sequence id does not exist 87626 ERROR [main] (SandeshaQueue.java:574) - Sequence id does not exist ========================= the MalformedURIException exception could be the problem but I am not sure whats causing it. As can be seen in the client logs above the service url being passed to the client is: -http://127.0.0.1:8070/axis/services/MyService My modifications to the Client.java are based on the EchoClientAsyncAck.java interop sample. ie. 1. RMInitiator.initClient(false); 2. call.setProperty(Constants.ClientProperties.SYNC, new Boolean(false)); 3. call.setProperty(Constants.ClientProperties.ACTION, ""); ( This is different from the interop example...here unlike EchoClientAsyncAck.java I am setting ACTION property to an empty string as thats the value in the wsdl for MyService) 4.call.setProperty(Constants.ClientProperties.FROM,"http://127.0.0.1:"+defau ltClientPort+"/axis/services/RMService"); 5. call.setProperty(Constants.ClientProperties.REPLY_TO,"http://127.0.0.1:"+def aultClientPort+"/axis/services/RMService"); (defaultClientPort=9070, tcp mon is running to forward it to 9090) 6.call.setTransport(new RMTransport(endpointURL, "")); (endpointURL=http://127.0.0.1:8070/axis/services/MyService) Could anyone suggest what I might be doing wrong ? Thanks, Aditya __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/
