Thank you very much the is resolved. Proxy was setting was comming from the
IDE where I was developing and testing my application.

Amila Suriarachchi wrote:
> 
> the method which checks istheproxy enabled is like this and  this method
> returns true for your instance.
> 
> public static boolean isProxyEnabled(MessageContext messageContext, URL
> targetURL)
>             throws AxisFault {
> 
>         boolean state = false;
> 
> 
>         Parameter param = messageContext.getConfigurationContext
> ().getAxisConfiguration()
>                 .getParameter(ATTR_PROXY);
> 
>         //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;
> 
>     }
> 
> As you can see  you have declared it in axis2.xml or message context or in
> a
> system property.
> 
> on the other hand finally it checks whether it is a noProxy host or not.
> 
>  private static boolean validateNonProxyHosts(String targetHost) {
> 
>         //From system property http.nonProxyHosts
>         String nonProxyHosts = System.getProperty(HTTP_NON_PROXY_HOSTS);
> 
>         if (nonProxyHosts == null) {
>             return false;
>         }
> 
>         String[] nonProxyHostsArray = nonProxyHosts.split("\\|");
> 
>         if (nonProxyHostsArray.length == 1) {
>             return targetHost.matches(nonProxyHosts);
>         } else {
>             boolean pass = false;
>             for (int i = 0; i < nonProxyHostsArray.length; i++) {
>                 String a = nonProxyHostsArray[i];
>                 if (targetHost.matches(a)) {
>                     pass = true;
>                     break;
>                 }
>             }
>             return pass;
>         }
>     }
> So as a work around you can set your targetEpr as a nonproxy host
> using the HTTP_NON_PROXY_HOSTS = "http.nonProxyHosts" system variable.
> 
> Amila.
> 
> On 8/30/07, shimcha <[EMAIL PROTECTED]> wrote:
>>
>>
>> Thanks folks for your help and actually I am able to use Axis2 client to
>> make
>> calls into Salesforce in standalone program. The problem is when I run
>> the
>> same code from inside a servlet. Another thing I should have mentioned is
>> that in the same WAR I am also exposing my WebServices so it contains all
>> Axis2 config files. In my development environment I don't have any proxy
>> set
>> in Axis2 config or in Tomcat config. Then why is it looking for a proxy?
>> As
>> Amila, mentioned there is some bad setting somewhere and I can't see to
>> locate where. Any ideas?
>>
>>
>> dims wrote:
>> >
>> > I think Amila is right. I did not face this issue when i
>> tested...please
>> > see
>> >
>> > http://wso2.org/blog/dims/2548
>> >
>> > thanks,
>> > dims
>> >
>> > On 8/29/07, Amila Suriarachchi <[EMAIL PROTECTED]> wrote:
>> >> this exception is triggered from this code.
>> >>
>> >> if (port != null) {
>> >>             this.setProxyPort(Integer.parseInt(port));
>> >>         }
>> >> in ProxyConfiguration.java.
>> >> It seems you have given an invalid number to port.
>> >>
>> >> amila.
>> >>
>> >>
>> >> On 8/29/07, shimcha <[EMAIL PROTECTED]> wrote:
>> >> >
>> >> > 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.axis2.transport.http.ProxyConfiguration.configure(
>> ProxyConfiguration.java:185)
>> >> >         at
>> >> >
>> >>
>> org.apache.axis2.transport.http.AbstractHTTPSender.getHostConfiguration
>> >> (AbstractHTTPSender.java:274)
>> >> >         at
>> >> >
>> >> org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(
>> AbstractHTTPSender.java:502)
>> >> >         at
>> >> >
>> >> org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java
>> >> :191)
>> >> >         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
>> >> >
>> >> com.richux.saleforce.servicestubs.SforceServiceStub.login(
>> SforceServiceStub.java:1376)
>> >> >
>> >> > --
>> >> > View this message in context:
>> >>
>> http://www.nabble.com/Getting-exception-invoking-SalesForce-webservice-using-Axis2-client-from-my-servlet-tf4346311.html#a12382542
>> >> > Sent from the Axis - Dev mailing list archive at Nabble.com .
>> >> >
>> >> >
>> >> >
>> >> ---------------------------------------------------------------------
>> >> > To unsubscribe, e-mail:
>> >> [EMAIL PROTECTED]
>> >> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Amila Suriarachchi,
>> >> WSO2 Inc.
>> >
>> >
>> > --
>> > Davanum Srinivas :: http://davanum.wordpress.com
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Getting-exception-invoking-SalesForce-webservice-using-Axis2-client-from-my-servlet-tf4346311.html#a12400168
>> Sent from the Axis - Dev mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -- 
> Amila Suriarachchi,
> WSO2 Inc.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Getting-exception-invoking-SalesForce-webservice-using-Axis2-client-from-my-servlet-tf4346311.html#a12400681
Sent from the Axis - Dev mailing list archive at Nabble.com.


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

Reply via email to