axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "giuseppe nocente" <gnoce...@gmail.com>
Subject SSL and Web Service
Date Mon, 10 Apr 2006 15:00:52 GMT
There is anyone that help me to understand the problem that i have whel y
execute
my client.

Java Client

import java.net.URL;

import javax.xml.rpc.ParameterMode;

import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;

public class clientMatematicaSSL

{
    public static void main(String[] args) throws Exception {

        System
                .setProperty(
                        "javax.net.ssl.keyStore",
                        "C:\\Programmi\\Apache_Software_Foundation\\Tomcat
5.5.16\\keystore\\keystoreclient.jks");

        System.setProperty("javax.net.ssl.keyStorePassword", "changeit");

        System
                .setProperty(
                        "javax.net.ssl.trustStore",
                        "C:\\Programmi\\Apache_Software_Foundation\\Tomcat
5.5.16\\keystore\\cacerts.jks");

        System.setProperty("javax.net.ssl.trustStorePassword", "changeit");

        Integer numero = new Integer(args[0]);
        String nameWS = "http://localhost:8443/axis/matematica.jws";
        URL endPointWS = new URL(nameWS);
        // inizializzazione WS

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

        // configurazione parametri WS

        call.setTargetEndpointAddress(endPointWS);
        call.addParameter("numero", XMLType.XSD_INT, ParameterMode.IN);
        call.setOperationName("pari");
        call.setReturnType(XMLType.XSD_STRING);

        // invocazione WS

        String risultato = (String) call.invoke(new Object[] { numero });

        //

        System.out.println("Il numero " + numero + " e' " + risultato);

        //

    }

}


This is the error that return me when i execute the java code

Exception in thread "main" AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: java.lang.NumberFormatException: For input string:
&quot;&quot;
 faultActor:
 faultNode:
 faultDetail:
    {http://xml.apache.org/axis/}stackTrace:java.lang.NumberFormatException:
For input string: &quot;&quot;
    at java.lang.NumberFormatException.forInputString(
NumberFormatException.java:48)
    at java.lang.Integer.parseInt(Integer.java:468)
    at java.lang.Integer.parseInt(Integer.java:497)
    at org.apache.axis.transport.http.HTTPSender.readHeadersFromSocket(
HTTPSender.java:640)
    at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:143)
    at org.apache.axis.strategies.InvocationStrategy.visit(
InvocationStrategy.java:32)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
    at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
    at org.apache.axis.client.Call.invoke(Call.java:2767)
    at org.apache.axis.client.Call.invoke(Call.java:2443)
    at org.apache.axis.client.Call.invoke(Call.java:2366)
    at org.apache.axis.client.Call.invoke(Call.java:1812)
    at clientMatematicaSSL.main(clientMatematicaSSL.java:46)

    {http://xml.apache.org/axis/}hostname:mediacon-91110f

java.lang.NumberFormatException: For input string: ""
    at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
    at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:154)
    at org.apache.axis.strategies.InvocationStrategy.visit(
InvocationStrategy.java:32)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
    at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
    at org.apache.axis.client.Call.invoke(Call.java:2767)
    at org.apache.axis.client.Call.invoke(Call.java:2443)
    at org.apache.axis.client.Call.invoke(Call.java:2366)
    at org.apache.axis.client.Call.invoke(Call.java:1812)
    at clientMatematicaSSL.main(clientMatematicaSSL.java:46)
Caused by: java.lang.NumberFormatException: For input string: ""
    at java.lang.NumberFormatException.forInputString(
NumberFormatException.java:48)
    at java.lang.Integer.parseInt(Integer.java:468)
    at java.lang.Integer.parseInt(Integer.java:497)
    at org.apache.axis.transport.http.HTTPSender.readHeadersFromSocket(
HTTPSender.java:640)
    at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:143)
    ... 10 more

thancks

Giuseppe

Mime
View raw message