Hi,

I have a strage problem.
I need to invoke a .aspx webservice from Java.

Everything works fine for service methods that don't take any parameters.
But for methods that need some input parameter I get an error that system can't 
find provided parameter.

Does anyone know what can be the problem - I have tried almost everything.

The code I use is:
"
String      strEndPoint       = "https://xxxxxxxx/yy/ITBServices.asmx";;
String      strSoapAction     = "https://yyyyyyy/Authenticate";;
String      strSchemaURL      = "https://zzzzzzzzzzzzz";;
String      strFunctionName   = "Authenticate";

Call      call   = (Call) new Service().createCall();
call.setTargetEndpointAddress(new 
URL("https://zzzzzzzzzzzzzzz/ITBServices.asmx";));

call.setOperationName(new QName(strSchemaURL, strFunctionName));

String username = "user";
String pass = "pass";
  
//call.setOperationUse("document");
//call.setOperationStyle("wrapped");
  
call.setReturnType(XMLType.XSD_STRING);
call.addParameter("username", XMLType.XSD_STRING, ParameterMode.IN);
call.addParameter("password", XMLType.XSD_STRING, ParameterMode.IN);

call.setSOAPActionURI(strSoapAction);
String strResult = (String) call.invoke(new Object[]{username, pass});
System.out.println("Result='" + strResult + "'");
"

Regards,
Risto Alt
[email protected] 

Reply via email to