<%@ page language="java" errorPage="error.jsp" %>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/ojsp/wstaglib.tld" prefix="ws" %>
<jsp:include page="header2.html" flush="true" /> 
<%
String[] senders = new String[1];
senders[0] = request.getParameter("senders");
String[] recipients = new String[1];
recipients[0] = request.getParameter("recipients");
String[] replyTo = new String[1];
senders[0] = request.getParameter("replyTo");
String[] associatedKeys = {""};
%>
<ws:webservice id="OTNMobile" 
               wsdlUrl="http://otn.oracle.com/ws/9iasmobile?WSDL"
               binding="OTNMobileWrapperBinding"
               soapLocation="http://otn.oracle.com/ws/oracle.otn.ws.mobile.OTNMobileWrapper"
               scope="page">
</ws:webservice>

<ws:invoke id="obj"
		   operation="sendText"
		   webservice="OTNMobile">
    <ws:part name="otnUsername" value="<%= request.getParameter(\"userName\")%>" />
    <ws:part name="otnPassworsd" value="<%= request.getParameter(\"passwd\")%>"/>
	<ws:part name="senders" value="<%= senders %>" />
	<ws:part name="replyTo" value="<%= replyTo%>" />
	<ws:part name="recipients" value="<%= recipients%>"/>
	<ws:part name="associatedKeys " value="<%= associatedKeys%>"/>
	<ws:part name="subject" value="<%= request.getParameter(\"subject\")%>" />
	<ws:part name="messageBody" value="<%= request.getParameter(\"message\")%>" />
	<ws:part name="encoding" value="text/plain" />
</ws:invoke>
<%
if(obj != null)
	out.print("Message sent !" );
else
	out.print("Message Delivery Failed !" );
%>	
<jsp:include page="copyright.html" flush="true" /> 
</BODY>
</HTML>

