Hi Sherif,
I managed to invoke the webservice by using a java class that sends the soap message expected by the webservice.
here is an example:
import com.audium.server.AudiumException;
import com.audium.server.voiceElement.ActionElementBase;
import com.audium.server.session.ActionElementData;
import java.util.regex.*;
import java.net.*;
import java.io.*;
public class Authentication3 extends ActionElementBase
{
public void doAction(String name, ActionElementData data) throws AudiumException
{
String type = "text/xml";
String SOAPTOTAL = "<soapenv:Envelope xmlns:soapenv=\"
http://schemas.xmlsoap.org/soap/envelope/\" xmlns:web=\"
http://192.168.6.160/webservice1\">"
+ "<soapenv:Header/>"
+"<soapenv:Body>"
+"<web:FabienRose>"
+"<web:Message1>test</web:Message1>"
+"</web:FabienRose>"
+"</soapenv:Body>"
+"</soapenv:Envelope>";
System.out.println(SOAPTOTAL);
try {
URL url = new URL("
http://192.168.6.160/webservice1/service1.asmx");
HttpURLConnection conn = (HttpURLConnection)url.openConnection();
conn.setRequestMethod("POST");
conn.setRequestProperty("content-Type",type);
conn.setUseCaches(false);
conn.setDoOutput(true);
conn.setDoInput(true);
DataOutputStream os = new DataOutputStream(conn.getOutputStream());
os.writeBytes (SOAPTOTAL);
os.flush();
os.close();
BufferedReader reader = new BufferedReader( new InputStreamReader( conn.getInputStream() ) );
System.out.println("1");
String response = reader.readLine();
String result=response.substring( response.indexOf("<FabienRoseResult>") +"<FabienRoseResult>".length() , response.indexOf("</FabienRoseResult>"));
ElementData("Authentication_Status");
data.setElementData("Authentication_Status",result);
}
catch (IOException e) {
data.addToLog("Problem connecting to Web Service Socket", ""+e);
}
}
private void ElementData(String string) {
// TODO Auto-generated method stub
}
}
Fabien