client with Axis:

import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import javax.xml.namespace.QName;
import java.net.*;

....
                URL url=new URL("http://127.0.0.1:80/axis2_or/services/Eco";);
                
                
                Service service = new Service();
                Call call = (Call) service.createCall();
                
                
                // we set up our endpoint URL
                call.setTargetEndpointAddress(url);
                
                

                call.setOperationName(new QName("doEcho"));
                
                
                
                call.addParameter("doEcho", 
org.apache.axis.Constants.XSD_STRING,
javax.xml.rpc.ParameterMode.IN);
                
                
                call.setReturnType(org.apache.axis.Constants.XSD_STRING); 
                // we actually invoke the desired service
                call.setOperationStyle("document");

                ret = (String) call.invoke(new Object[] { "hello" } );
                
                System.out.println(ret);        



Service (Axis2 1.3 and Tomcat) pojo/Echo:

public class Echo {
        public String doEcho(String f) {
                        return "ECo..." + f;
        }
}



With SOAPmonitor:

<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
  <soapenv:Body>
    <hacerEco xsi:type="xsd:string">pucco</hacerEco>
  </soapenv:Body>
</soapenv:Envelope>

<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
  <soapenv:Body>
    <soapenv:Fault>
      <faultcode>soapenv:Server</faultcode>
      <faultstring>namespace mismatch require http://ws.apache.org/axis2
found none</faultstring>
      <detail />
    </soapenv:Fault>
  </soapenv:Body>
</soapenv:Envelope>


I have tried many ways, but no result. Any suggestion, please.
-- 
View this message in context: 
http://www.nabble.com/axis-Client-and-axis2-server-and-not-works.-help-tp16894835p16894835.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to