Rossella Osso

Greenhorn
+ Follow
since Sep 16, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Rossella Osso

ok thanks! i will set psw in the client and i will tell you the result!
thank you!!
13 years ago
i have add a role in my tomcat user.xml with username e pwd.. do you think that this is the problem?? must i write somethingh in the code of my client??
please help me!! thank you very much!
ps. sorry for my english
13 years ago
Hi, I created a Web Service and I used Axis2.
I have generate all classes ( skeleton, stub) but when i try to run my client i have this problem:

org.apache.axis2.AxisFault: Transport error: 401 Error: Unauthorized
at org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:296)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:190)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:364)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:208)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at ws.example.TemperatureConverterStub.c2FConvertion(TemperatureConverterStub.java:463)
at ws.example.TemperatureConverterServiceClient.main(TemperatureConverterServiceClient.java:63)

i don't understand why
i post you the code of my client :

import java.rmi.RemoteException;

import org.apache.axis2.AxisFault;

/**

* Client for Temperature Converter Service

*/

public class TemperatureConverterServiceClient {

public static void main(String[] args) {

TemperatureConverterStub stub;

try {

double c_value = 32;

stub = new TemperatureConverterStub ("http://localhost:8080/axis2/services/TemperatureConverter");

TemperatureConverterStub.C2FConvertion c2f = new TemperatureConverterStub.C2FConvertion();

c2f.setCValue(c_value);

TemperatureConverterStub.C2FConvertionResponse res = stub.c2FConvertion(c2f);

System.out.println("C Value : "+c_value+ "\tResult : " +res.get_return());



TemperatureConverterStub.F2CConvertion f2c = new TemperatureConverterStub.F2CConvertion();

f2c.setFValue(res.get_return());

TemperatureConverterStub.F2CConvertionResponse res1 = stub.f2CConvertion(f2c);

System.out.println("F Value : "+res.get_return()+ "\tResult : " +res1.get_return());

} catch (AxisFault e) {

e.printStackTrace();

} catch (RemoteException e) {

e.printStackTrace();

}

}

}


please help me!! is very important!! thanks!!!


13 years ago