users@glassfish.java.net

My web service client is t working

From: <forums_at_java.net>
Date: Fri, 30 Dec 2011 10:11:04 -0600 (CST)

Hello GlassFish forum!

I have developed and tested a web service application which tests
successfully on Netbeans and GlassFish.

I then went ahead to create the client to consume the web service and the
page that I have developed is loading on the browser but wont return the
results -- possibly not executing the web service code.

The code that i am using is shown as shown below:

 

<%--
    Document   : index
    Created on : Dec 30, 2011, 2:54:41 PM
    Author     : charles
--%>
<%_at_page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <FORM  ACTION ='<%=request.getRequestURI()%>' METHOD="POST">
           
       
       <%java.lang.String dbName= "";%>
       <%java.lang.String hostName= "";%>
       <%java.lang.String portNumber ="";%>
       <%java.lang.String password = "";%>
       <%java.lang.String cashierID = "";%>
       <%java.lang.String userName = "";%>
      
       HostName<input type='textbox' name='name' value='<%=hostName%>'>
     
         <p>DBName<input type='textbox' name='name'
value='<%=dbName%>'></p>
       <p>Port Number<input type='textbox' name='name'
value='<%=portNumber%>'></p>
       <p>UserName <input type='textbox' name='name'
value='<%=userName%>'></p>
       <p>Password<input type='textbox' name='name'
value='<%=password%>'></p>
      <p>Cashier ID<input type='textbox' name='name'
value='<%=cashierID%>'></p>
      
        <input type ="submit" value ="SUBMIT" >
    <%-- start web service invocation --%><hr/>
    <%
    try {
    com.afrisoftech.funsoft.hmis.webservices.DBConnection_Service service
= new com.afrisoftech.funsoft.hmis.webservices.DBConnection_Service();
    com.afrisoftech.funsoft.hmis.webservices.DBConnection port =
service.getDBConnectionPort();
     // TODO initialize WS operation arguments here
     hostName = request.getParameter(hostName);
    portNumber = request.getParameter(portNumber);
     dbName = request.getParameter(dbName);
    userName = request.getParameter(userName);
    password = request.getParameter(password);
    cashierID = request.getParameter(cashierID);
    // TODO process result here
    java.util.List<java.lang.Object> result =
port.getClosedShifts(hostName, java.lang.Integer.parseInt(portNumber),
dbName, userName, password, cashierID);
    out.println("Result = "+result);
    } catch (Exception ex) {
       //out.println("not possible");
    // TODO handle custom exceptions here
    }
    %>
   
        
          
    <%-- end web service invocation --%><hr/>
   
   
        </form>
    </body>
</html>

I appreciate your assitance.

Thank you. 


--
[Message sent by forum member 'cwaweru']
View Post: http://forums.java.net/node/878673