Interesting ... after further investigations:

The first problem actually happens if the client stub is used inside a simple web client that is not using the skeleton.

So it seems that the org.apache.axis2.AxisFault: For input string: ""  issue is actually happening when the stub is used from a servlet context and not happening from a standard java application.

What is wrong with this web service? Why the client stub doesn't work in a servlet context?

Any idea?

Cheers,
Patrick.

Patrick Houbaux wrote:
As I think there is a bug in AXIS2 on this issue I created a JIRA one:
https://issues.apache.org/jira/browse/AXIS2-3215

together with stubs/skeleton/test project.

Any help on this would be really appreciated as I'm currently blocked.

Cheers,
Patrick.

Patrick Houbaux wrote:
Hi Joe,

Well that I know and could have done it if that piece of code was not part of AXIS2 libs ... not in my application :)

The real question is why AXIS2 detects a server proxy config while I'm not using any ... i.e. when System.getProperty("http.proxyHost"`) is set to "" by default  when running  AXIS2 in a servlet container. Hence the idea of clearing this system property before invoking the stub.

Cheers,
Patrick.

Horninger, Joe (Contr) (Mission Systems) wrote:

Patrick,

 

I have a simple solution for problem #1.   You’re only checking for null.  What if you rewrite your if to if(port != null && !””.equalsIgnoreCase(port) ).  That should fix the NumberFormatException.  The Unable to sendViaPost to url issue may or may not be resolved with this…

 

Cheers!

 

Joe

 


From: Patrick Houbaux [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 19, 2007 9:07 AM
To: axis-user@ws.apache.org
Subject: Strange behavior with AXIS2_1.3: org.apache.axis2.AxisFault: For input string: ""

 

Hi all,

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[http://vivace.qub.ac.uk/MassService.asmx]
        org.apache.axis2.AxisFault: Transport error: 415 Error: Unsupported Media Type
        at org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:298)
        at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:192)
        at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:327)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:206)
        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
        at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:374)
        at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
        at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
        at uk.ac.qub.vivace.modelservice.MassServiceStub.GetPartMass(MassServiceStub.java:250)

I'm now short of ideas on how to interpret this and would really appreciate some help.
Any idea? What am I missing?

Cheers,
Patrick.

This message contains information that may be privileged or confidential and is the property of Eurostep Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.

--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

--
------------------------------------------------------------------
| Patrick Houbaux
| Senior Consultant
| Eurostep SARL            Email: [EMAIL PROTECTED]
| Promopole                Mobile: +33 611 192 943
| 5 rue Maurice Thorez     Fax: +33 130 510 373
| FR-78190 Trappes         URL: http://www.eurostep.com
| FRANCE                   Skype name: phoubaux
-------------------------------------------------------------------
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to