Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javax.rpc.call problem

 
aman hindustani
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello...

i have written a client programme for calling webservices...method. ..and kept axix.jar and soap.jar..in the classpath but..the programme is not compling saying...can't axcess javax.xml.rpc.call;

please tell what might be the problem..

import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import javax.xml.namespace.QName;

public class TestClient {
public static void main(String [] args) {
try {
String endpoint = "http://100.0.1.1/Apple/OpBilling/Billing.asmx";

// "http://ws.apache.org:5049/axis/services/echo";


Service service = new Service();
Call call = (Call) service.createCall();

call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperationName(new QName("http://tempuri.org/", "ChargeUser"));
//targetNamespace= http://tempuri.org/

String ret = (String) call.invoke( new Object[] { "9866655320","1","sebtain","imi@123" } );

System.out.println("sending four parameters mobileno,rs 1,sebtain,password...output is "+ret);
} catch (Exception e) {
System.err.println(e.toString());
}
}
}

Thanks to all...
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13077
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks to me like a version problem. Axis2 does not have that class but Axis1.4 does have org.apache.axis.client.Call.

Looks like Axis 2 made some major changes.

Bill
 
aman hindustani
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for you reply...

i wrote a new code which compiled properly while in execution it is throwing ..exception..can you please help me out.



please help me out..
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13077
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Server did not recognize the value of HTTP Header SOAPAction: .


If this was my problem I would use TCPMON (comes with axis) to trap the exact text of the SOAP request. I would compare the SOAPAction header value to that specified by the service.

Bill
 
aman hindustani
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello to all..

please ..help me in fixing this ....

Server did not recognize the value of HTTP Header SOAPAction..
what i need to add in my code so that this Exception will not be thrown....

Thanks,
Aman
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic