Date: Sat, 13 Sep 2014 00:43:39 +0300
Subject: Axis2: Unable to make the http connection.
From: [email protected]
To: [email protected]

Hi,
I have an environment where we have  multiple 3pp nodes using different 
protocol (SOAP and telnet). For each 3pp node we have different packages 
developed in java for communication.
There are four services which are using  SOAP protocol and 3 are using axis/jax 
rpc and one is developed using axis2 framework.
All application is working fine till the time 2 other application are executed 
(using axis/jax rpc and xml/rpc) executes the commands.
One single command from any application makes the application (developed in  
axis2 framework) unreable .
I have check the connectivity between and the environment, it remains reachable 
but application is unable to get the connection. However the restarting the 
whole environment makes that (axis2 developed) application reachable till the 
time these 2 conflicting application are not executed.
once they executes any command it this axis2 developed application causes the 
same pb.
Below is the exception I am getting 


java.lang.NumberFormatException: For input string: ""        at 
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)   
     at java.lang.Integer.parseInt(Integer.java:470)        at 
java.lang.Integer.parseInt(Integer.java:499)        at 
org.apache.axis2.transport.http.ProxyConfiguration.configure(ProxyConfiguration.java:191)

MG>stop right here because you have a misconfiguration
    public void configure(MessageContext messageContext,
                          HttpClient httpClient,
                          HostConfiguration config) throws AxisFault {

        //        <parameter name="Proxy">
        //              <Configuration>
        //                     <ProxyHost>example.org</ProxyHost>
        //                     <ProxyPort>5678</ProxyPort>
        //                     <ProxyUser>EXAMPLE\saminda</ProxyUser>
        //                     <ProxyPassword>ppp</ProxyPassword>
        //              </Configuration>
        //        </parameter>
        Credentials proxyCred = null;

        //Getting configuration values from Axis2.xml
        Parameter param = 
messageContext.getConfigurationContext().getAxisConfiguration()
                .getParameter(ATTR_PROXY);

MG>are you SURE you have a valid numeric value in <ProxyPort>5678</ProxyPort> 
in axis2.xml or did you leave it as ""?

MG>3 solutions straight from axis documentation:

Prior shown configuration has been deprecated after Axis2 1.2 release and we 
strongly recommend using the new
proxy configuration as below. 

    New proxy configuration would require the user to add a TOP level parameter 
in the axis2.xml named "Proxy".

<parameter name="Proxy">
    <Configuration>
        <ProxyHost>example.org</ProxyHost>
        <ProxyPort>5678</ProxyPort>
        <ProxyUser>EXAMPLE\saminda</ProxyUser>
        <ProxyPassword>ppp</ProxyPassword>
    </Configuration>
</parameter>


    Thus, if its a open proxy, user can ignore ProxyUser and ProxyPassword 
elements.

    In addition to this, if you don't want to go through writing the above 
parameter you could use Java Networking Properties for open proxies,
-Dhttp.proxyHost=10.150.112.254 -Dhttp.proxyPort=8080 

At runtime, the user can override the PROXY settings using the
HttpTransportProperties.ProxyProperties object. Within your client stub, 
create an instance of this object, configure proxy values for it,
and then set it to the MessageContext's property bag via options.setProperty().
For example:

Options options = new Options();
...

HttpTransportProperties.ProxyProperties proxyProperties = new 
HttpTransportProperties.new ProxyProperties();
proxyProperties.setProxyHostName(....);
proxyProperties.setProxyPort(...);
...
options.setProperty(HttpConstants.PROXY, proxyProperties);
MG>so you can set proxyPort via axis2.xml OR SpecifyAtCommmandLine OR supply 
proxyPort to HttpTransportProperties and then set Options in code
MG>your choice

        at 
org.apache.axis2.transport.http.AbstractHTTPSender.getHostConfiguration(AbstractHTTPSender.java:292)
        at 
org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:531)
        at 
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:199)     
   at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:76)       
 at 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:400)
        at 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:225)
        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:438)        
at 
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402)
        at 
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
        at 
org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)       
 at soap.ScfMobileSoapStub.addSubscriber(ScfMobileSoapStub.java:2821)        at 
com.ericsson.ema.downstream.HuaweiPCRFProvisioningClient.doAddSubscriber(HuaweiPCRFProvisioningClient.java:109)
        at 
com.ericsson.ema.downstream.HuaweiPCRFJavaLink.sendMessage(HuaweiPCRFJavaLink.java:82)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)        
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)   
     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)        at 
se.ericsson.ema.downstream.DynamicClassLoader.sendMessage(Unknown Source)       
 at 
com.ericsson.ema.fsc.linkmanager.javalinkhost.JavaLinkSessionOperationsImpl.sendMessage(Unknown
 Source)        at 
com.ericsson.ema.fsc.javalink.JavaLinkSessionPOATie.sendMessage(Unknown Source) 
       at com.ericsson.ema.fsc.javalink.JavaLinkSessionPOA._invoke(Unknown 
Source)        at 
com.ericsson.ema.fsc.javalink.JavaLinkSessionPOA._invoke(Unknown Source)        
at com.inprise.vbroker.poa.POAImpl.invoke(Unknown Source)        at 
com.inprise.vbroker.poa.ActivationRecord.invoke(Unknown Source)        at 
com.inprise.vbroker.GIOP.GiopProtocolAdapter.doRequest(Unknown Source)        
at com.inprise.vbroker.IIOP.ServerProtocolAdapter.doRequest(Unknown Source)     
   at com.inprise.vbroker.GIOP.GiopProtocolAdapter.dispatchMessage(Unknown 
Source)        at 
com.inprise.vbroker.orb.TPDispatcherImpl$TPDispatcher.run(Unknown Source)       
 at com.inprise.vbroker.orb.ThreadPool$PoolWorker.run(Unknown Source)


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]                  
                  

Reply via email to