on 2007 Jul 05 3:44 PM
hi there
i am trying to use axis to call a web service using a pojo but unable to get it am i worng in any where here let me know
package mc_style.functions.soap.sap.document.sap_com;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import javax.xml.namespace.QName;
public class TestClient
{
public static void main(String [] args) {
try {
String endpoint =
"http://uscirs5.wdf.sap.corp:8077/sap/bc/srt/rfc/sap/ZCCONVERTER?wsdl=1.1" ;
System.out.println("first" );
Service ZCCONVERTER = new Service();
Call call = (Call) ZCCONVERTER.createCall();
call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperationName(new QName("http://soapinterop.org", "ZCurrency") );
// Call to addParameter/setReturnType as described in user-guide.html
//call.addParameter("testParam",
// org.apache.axis.Constants.XSD_STRING,
// javax.xml.rpc.ParameterMode.IN);
//call.setReturnType(org.apache.axis.Constants.XSD_STRING);
String ret = (String) call.invoke( new Object[] { " 5 " } );
System.out.println("second" );
System.out.println("Sent 'input param', got return value :'" + ret + "'");
} catch (Exception e) {
System.err.println(e.toString());
}
}
}
HI
Can u plz reconfirm that the operation (method) name of the Web Service is correct, ie ZCurrency
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI
Are you getting any Exception while invoking the Service ? If so please post the stack trace
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
is it must to use AXIS for calling it? if not then you can try creating a standalone proxy from the WSDL of your web service and then use the API library to give a call to the web service from standalone java app..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
64 | |
10 | |
8 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.