call.addParameter("emp_no", XMLType.XSD_INT,ParameterMode.PARAM_MODE_IN);
call.addParameter("op2", XMLType.XSD_INT, ParameterMode.PARAM_MODE_IN);

These two statements has some errors.The constants variable in class 
ParameterMode are IN,OUT,and INOUT.You can go through ParameterMode's API.

Best Regards,

Robert Zhang
Email:[EMAIL PROTECTED]
Tel:86-010-62014411-2437
Content-Type: multipart/alternative;
        boundary="0-1222714899-1120562803=:54008"


--0-1222714899-1120562803=:54008
Content-Type: text/plain; charset=GB2312
Content-Transfer-Encoding: 8bit

hi

I deployed a java class as web service in apache axis and tried calling it 
using a client code. But i encountered some problem which i have listed after 
the code.

 import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;
import org.apache.axis.utils.Options;
import javax.xml.rpc.ParameterMode;
public class client {
   public static void main(String [] args) throws Exception {
       Options options = new Options(args);
       String endpoint = "http://localhost:"; + options.getPort() +
                         "/axis/employee.jws";
// Do argument checking
       args = options.getRemainingArgs();
       if (args == null || args.length != 3) {
           System.err.println("Usage: CalcClient <add|subtract arg1 arg2");
           return;
       }
       String method = args[0];
       //if (!(method.equals("add") || method.equals("subtract"))) {
       //  System.err.println("Usage: CalcClient <add|subtract arg1 arg2");
       //  return;
       //}
// Make the call
       Integer i1 = new Integer(args[1]);
       Integer i2 = new Integer(args[2]);
       Service  service = new Service();
       Call     call    = (Call) service.createCall();
       call.setTargetEndpointAddress(new java.net.URL(endpoint));
       call.setOperationName( method );
       call.addParameter("emp_no", XMLType.XSD_INT,ParameterMode.PARAM_MODE_IN);
       call.addParameter("op2", XMLType.XSD_INT, ParameterMode.PARAM_MODE_IN);
       Integer ret = (Integer) call.invoke( new Object [] { i1, i2 });
       //System.out.println("Got result : " + ret);
    }
}


when i compile the code i get the error that the "PARAM_MODE_IN symbol can be 
resolved"

since i am new to Web services and software oriented architecture, i have no 
clue to this error. Can someone help me put in this.

bye
deepak




---------------------------------
Yahoo! Sports
 Rekindle the Rivalries. Sign up for Fantasy Football
--0-1222714899-1120562803=:54008
Content-Type: text/html; charset=GB2312
Content-Transfer-Encoding: 8bit

<DIV>
<DIV>
<DIV>hi</DIV>
<DIV>&nbsp;</DIV>
<DIV>I deployed a java class as web service in apache axis and tried calling it 
using a client code. But i&nbsp;encountered some problem which i have listed 
after the code.</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;import org.apache.axis.client.Call;<BR>import 
org.apache.axis.client.Service;<BR>import 
org.apache.axis.encoding.XMLType;<BR>import org.apache.axis.utils.Options;</DIV>
<DIV>import javax.xml.rpc.ParameterMode;</DIV>
<DIV>public class client {<BR>&nbsp;&nbsp; public static void main(String [] 
args) throws Exception {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Options 
options = new Options(args);</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String endpoint = "<A 
href="http://localhost/"; target=_blank><FONT 
color=#003399>http://localhost</FONT></A>:" + options.getPort() 
+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 "/axis/employee.jws";</DIV>
<DIV>// Do argument checking<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; args = 
options.getRemainingArgs();</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (args == null || args.length != 3) 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
System.err.println("Usage: CalcClient &lt;add|subtract arg1 
arg2");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
return;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String method = 
args[0];<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //if (!(method.equals("add") 
|| method.equals("subtract"))) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
//&nbsp; System.err.println("Usage: CalcClient &lt;add|subtract arg1 
arg2");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //&nbsp; 
return;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //}</DIV>
<DIV>// Make the call<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Integer i1 = new 
Integer(args[1]);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Integer i2 = new 
Integer(args[2]);</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Service&nbsp; service = new 
Service();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Call&nbsp;&nbsp;&nbsp;&nbsp; 
call&nbsp;&nbsp;&nbsp; = (Call) service.createCall();</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; call.setTargetEndpointAddress(new 
java.net.URL(endpoint));<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
call.setOperationName( method );<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
call.addParameter("emp_no", 
XMLType.XSD_INT,ParameterMode.PARAM_MODE_IN);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 call.addParameter("op2", XMLType.XSD_INT, ParameterMode.PARAM_MODE_IN);</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;Integer ret = (Integer) call.invoke( 
new Object [] { i1, i2 });</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //System.out.println("Got result : " 
+ ret);</DIV>
<DIV>&nbsp;&nbsp;&nbsp; }</DIV>
<DIV>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>when i compile the code i get the error that the "PARAM_MODE_IN symbol can 
be resolved"</DIV>
<DIV>&nbsp;</DIV>
<DIV>since i am new to Web services and software oriented architecture, i have 
no clue to this error. Can someone help me put in this.</DIV>
<DIV>&nbsp;</DIV>
<DIV>bye</DIV>
<DIV>deepak</DIV></DIV></DIV><p>
                <hr size=1>Yahoo! Sports<br>
<a 
href="http://pa.yahoo.com/*http://us.rd.yahoo.com/evt3539/*http://football.fantasysports.yahoo.com?ovchn=YAH&ovcpn=Integration&ovcrn=Mail+footer&ovrfd=YAH&ovtac­
 ">Rekindle the Rivalries. Sign up for Fantasy Football</a>



--0-1222714899-1120562803=:54008--

Reply via email to