axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amila Chinthaka Suriarachchi (JIRA)" <>
Subject [jira] Resolved: (AXIS2-3215) Strange behavior: org.apache.axis2.AxisFault: For input string: ""
Date Sat, 25 Dec 2010 03:53:46 GMT


Amila Chinthaka Suriarachchi resolved AXIS2-3215.

    Resolution: Fixed

this method 

public static boolean isProxyEnabled(MessageContext messageContext, URL targetURL)
            throws AxisFault {

        boolean state = false;

        Parameter param = messageContext.getConfigurationContext().getAxisConfiguration()

        //If configuration is over ridden
        Object obj = messageContext.getProperty(HTTPConstants.PROXY);

        //From Java Networking Properties
        String sp = System.getProperty(HTTP_PROXY_HOST);

        if (param != null || obj != null || sp != null) {
            state = true;

        boolean isNonProxyHost = validateNonProxyHosts(targetURL.getHost());

        return state && !isNonProxyHost;


returns true only if axis2.xml parameter, client stub property or a system property. Please
check where you have set this by debuging this method too. 

This is not an code gen issue.

> Strange behavior: org.apache.axis2.AxisFault: For input string: ""
> ------------------------------------------------------------------
>                 Key: AXIS2-3215
>                 URL:
>             Project: Axis2
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.3
>         Environment: OS: WindowsXP Pro Sp2
> JVM: sun jsdk 1.5.0_11
> Servlet Container: Apache Tomcat 5.5.17
> IDE: Netbeans 5.5.1
>            Reporter: Patrick Houbaux
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Critical
>         Attachments:,
> I have a weird problem that I am stuck with.
> Here is the situation:
> I have a web service client stub generated with wsdl2java using xmlbeans which works
ok when I used it from a standalone application.
> Now I have the need to use this client stub from an application server (i.e. tomcat +
axis2_1_3) from which I'm exposing other web services as well as this one. So for this web
service I have both the client stub and the server skeleton on the server side (the skeleton
is calling the client stub, actually passing through requests to the underlying server).
> The problem: I'm getting the following exception
>         org.apache.axis2.AxisFault: For input string: "" on the client side and nothing
on the server side.
> When running the server in debug mode I found out that this exception is actually due
to a NumberFormatException thrown by the following line in org.apache.axis2.transport.http.ProxyConfiguration:
>         String port = System.getProperty(HTTP_PROXY_PORT); <-- port = ""
>         if (port != null) {
>             this.setProxyPort(Integer.parseInt(port));  <-- ERROR here
>         }
> But this did not happen when using the client stub directly from a standalone application.
> Debugging further I noticed the following difference:
> In both case the method org.apache.axis2.transport.http.AbstractHTTPSender#getHostConfiguration
is called but the following test is false in case of the standalone application and true in
case of the server application:
>         if (ProxyConfiguration.isProxyEnabled(msgCtx,targetURL)) {
>             log.debug("ProxyConfiguration");
>             ProxyConfiguration proxyConfiguration = new ProxyConfiguration();
>             proxyConfiguration.configure(msgCtx,client,config);
>         }
> So I thought that clearing the System property ("http.proxyHost") would do the trick
in the server skeleton before invoking the method from the client stub but ... this leads
to another exception (this time on the server side) which I don't really understand:
>         [INFO] Unable to sendViaPost to url[]
>         org.apache.axis2.AxisFault: Transport error: 415 Error: Unsupported Media Type
>         at org.apache.axis2.transport.http.HTTPSender.handleResponse(
>         at org.apache.axis2.transport.http.HTTPSender.sendViaPost(
>         at org.apache.axis2.transport.http.HTTPSender.send(
>         at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(
>         at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(
>         at org.apache.axis2.engine.AxisEngine.send(
>         at org.apache.axis2.description.OutInAxisOperationClient.send(
>         at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(
>         at org.apache.axis2.client.OperationClient.execute(
>         at
> I'm now short of ideas on how to interpret this and would really appreciate some help.
> Any idea? What am I missing?

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message