praneeth gajji

Greenhorn
+ Follow
since Apr 12, 2012
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by praneeth gajji

Hi Thanks for reply,

I am able to get currency codes like INR ,USD ,I am converting them to currency symbols using this locale information (as currency.getSymbol(locale)) and getting symbol .

But I am rendering this into pdf which is not rendering when converted to pdf ,I am using lowagie for converting into pdf.

Please help.

Please let me know if additional information is required.
10 years ago
Hi ,

I have small problem request for your help,there are html currency codes in our application which are showing proper currency symbols in jsp using $(this).html(pa) here pa is ₨ 48,720 where ₨ is rupee symbol ). I want this code to be converted into currency symbol in java side which is not happening,Any one please help .

Request you to please provide any java code/api which converts html numerical codes to currency symbols without knowing the locale .
10 years ago
Hi All,

Thanks iin Advance to all,

I am stucked with exception with my web service consuming code,Please Help me to get out of this issue.

Exception I am getiing is
-------------------------------
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.IO.IOException: There is not enough space on the disk.

I am getting this exception when I am trying to consume external web service which is available in some web site

Initially I didnt get this error but from yesterday when I am trying to consume it throwing this exception,

I have check my disk space there is enough disk space available .

Please requesting anyone to help.

Thanks and Regrads,
Praneeth.
11 years ago
Hi Himah, I have tried typecasting OMELEMENT to object array which is not happening ,getting compilation /runtime errors

OMElement oe = makeAxiomRequest(ejbServiceName, "getCustomers", params);
Object[] o = oe;

WHere we cant type caste OMELEMENT to object array here and code shown above generates me OMELEMNT return type.
Please suggest.
Thanks in Advance..
11 years ago
Hi All,

My problem got solved , I have added following peace of code for my stub inorder to solve the issue, I have provided the domain information also to my proxy settings

Properties prop = new Properties();

try {
String jbossPath="";
Map<String,String> env = System.getenv();
for(String envTemp:env.keySet()){
if(envTemp.equalsIgnoreCase("JBOSS_HOME")){
//System.out.println("Key:"+envTemp+"--Value:"+env.get(envTemp));
jbossPath = env.get(envTemp);
break;
}
}
jbossPath = jbossPath + "\\server\\default\\conf\\application_files";
//load a properties file
prop.load(new FileInputStream(jbossPath +"\\TATA_POWER.properties"));

//get the property value and print it out
System.out.println("USERNAME++++++++++++++++++"+prop.getProperty("userName"));
System.out.println("PWD+++++++++++++++"+prop.getProperty("password"));

} catch (IOException ex) {
ex.printStackTrace();
}
//******************************************************
HttpTransportProperties.ProxyProperties pp = new HttpTransportProperties.ProxyProperties();
pp.setProxyName(prop.getProperty("portName"));
pp.setProxyPort(Integer.parseInt(prop.getProperty("port")));
pp.setDomain(prop.getProperty("domain"));
pp.setUserName(prop.getProperty("userName"));
pp.setPassWord(prop.getProperty("password"));


HttpTransportProperties.Authenticator auth =new HttpTransportProperties.Authenticator();

auth.setUsername(prop.getProperty("userName"));
auth.setPassword(prop.getProperty("password"));
auth.setPreemptiveAuthentication(true);
auth.setRealm(HttpTransportProperties.Authenticator.BASIC);
// auth.setRealm("GSS Auth");
List authPrefs = new Vector<String>(1);
authPrefs.add(AuthPolicy.BASIC);

_serviceClient.getOptions().setProperty(HTTPConstants.PROXY,pp);
_serviceClient.getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.HTTP_PROTOCOL_VERSION,org.apache.axis2.transport.http.HTTPConstants.HEADER_PROTOCOL_10);
org.apache.commons.httpclient.HttpMethod get = new GetMethod("http://www.webservicex.net/CurrencyConvertor.asmx");
get.setFollowRedirects(true);
_serviceClient.getOptions().setProperty(HTTPConstants.AUTHENTICATE,auth);

_serviceClient.getOptions().setProperty(AuthPolicy.AUTH_SCHEME_PRIORITY,authPrefs);
_serviceClient.getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED,Boolean.FALSE);

get.setDoAuthentication(true);
System.out.println("get.getFollowRedirects()*************"+get.getFollowRedirects());
return _serviceClient;
11 years ago
Hi All,Thanks to all in advance
I am unable to consume external web service through Axis2 from resource http://www.webservicex.net/CurrencyConvertor.asmx
Please help me to solve the issue,I am getting this exception in production environment,it is working fine in my development environment

Please help me how to get out of this problem how can I enable redirects do I need to to any axis2 configuration changes or else can it be done from code.
Stack Trace I am getting
----------------------------------
10:36:22,751 INFO [HttpMethodDirector] Redirect requested but followRedirects is disabled
10:36:22,751 INFO [HTTPSender] Unable to sendViaPost to url[http://www.webservicex.net/CurrencyConvertor.asmx]
org.apache.axis2.AxisFault: Transport error: 302 Error: Moved Temporarily
at org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:296)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:190)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:371)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:209)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at com.gsscrmservice.curconv.CurrencyConvertorStub.ConversionRate(CurrencyConvertorStub.java:322)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.gesmallworld.gss.lib.service.Axis2WebService.handleRequest(Axis2WebService.java:279)
at com.gsscrmservice.curconvEJB.CurrencyConvertorBean.ConversionRate(CurrencyConvertorBean.java:77)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.gesmallworld.gss.lib.service.Service.makeRequest(Service.java:489)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Delegati


I have given below code inorder for proxy configuration in dev but same is not working in prod Please help.

HttpTransportProperties.ProxyProperties pp = new HttpTransportProperties.ProxyProperties();
pp.setProxyName("172.16.108.174");
pp.setProxyPort(8080);

pp.setUserName(prop.getProperty("userName"));
pp.setPassWord(prop.getProperty("password"));
_serviceClient.getOptions().setProperty(HTTPConstants.PROXY,pp);

HttpTransportProperties.Authenticator auth =new HttpTransportProperties.Authenticator();

auth.setUsername(prop.getProperty("userName"));
auth.setPassword(prop.getProperty("password"));
auth.setPreemptiveAuthentication(true);
auth.setRealm(HttpTransportProperties.Authenticator.BASIC);
List authPrefs = new Vector<String>(1);
authPrefs.add(AuthPolicy.BASIC);
_serviceClient.getOptions().setProperty(HTTPConstants.AUTHENTICATE,auth);

_serviceClient.getOptions().setProperty(AuthPolicy.AUTH_SCHEME_PRIORITY,authPrefs);
// _serviceClient.getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.HTTP_PROTOCOL_VERSION,org.apache.axis2.transport.http.HTTPConstants.HEADER_PROTOCOL_10);

THANKS IN ADVANCE to all.
11 years ago
Thanks Himah for your reply,I will try n the one you proposed and get back to you
11 years ago
Thanks for your reply Himai Minh.

But my question is I am unable to consume web service if return type inside wsdl is AnyType.For the wsdl skeleton code is returning OMElement for which consuming is not happening properly if we provide any hashmap or list as return.

Is there a way to convert this Axiom Element to any string array.. Sample code of web serviceskeleton from which Anytype is generated I am providing here
public OMElement getNearestCentre (
java.lang.String srNumber,
java.lang.String buffDist,
java.lang.String centerTypes) throws AxisFault {

Map<String,Object> params = new HashMap<String,Object>();
params.put("srNumber", srNumber);
params.put("buffDist", buffDist);
params.put("centerTypes", centerTypes);
if(buffDist != null && !"".equals(buffDist)){
params.put("buffDist", buffDist);
}else{
buffDist = null;
params.put("buffDist", buffDist);
}
if(!"".equals(centerTypes) && centerTypes != null){
params.put("centerTypes", centerTypes);
}else{
params.put("centerTypes", "All");
}
return makeAxiomRequest(ejbServiceName, "getNearestCentre", params);

Here return type is OMElement can I convert this OMElement to object[] which can be consumed properly

Please help..Thanks in Advance
11 years ago
Hi, I have created a bottom up web service for which WSDl type is generated as AnyType when I provide web service return type as OMElement .Web service is processing properly and generating me soapenvelope but while consuming the web service I am getting exception AnyType element not given..
Is there a way we can convert Axiom Element into any object array or any other way to convert Axiom element so that it will generate proper WSDL.Here I am using services to generate web service skeleton. I am stucked here from long back unable to resolve .I dont have any one to help me out here .

Here I dont have acces to edit my WSDL only through URL I can acces my WSDL.

Please help me to resolve the issue.Thanks to all in Advance..

Below is the WSDL generated

<?xml version="1.0" encoding="UTF-8" ?>
- <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ns="http://nearestCollectionCenterWeb.gssexample.com" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://nearestCollectionCenterWeb.gssexample.com">
<wsdl:documentation>NearestCollectionCentreWebService</wsdl:documentation>
- <wsdl:types>
- <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://nearestCollectionCenterWeb.gssexample.com">
- <xs:complexType name="Exception">
- <xs:sequence>
<xs:element minOccurs="0" name="Exception" nillable="true" type="xs:anyType" />
</xs:sequence>
</xs:complexType>
- <xs:element name="getNearestCentre">
- <xs:complexType>
- <xs:sequence>
<xs:element minOccurs="0" name="srNumber" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="buffDist" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="centerTypes" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getNearestCentreResponse">
- <xs:complexType>
- <xs:sequence>
<xs:element minOccurs="0" name="return" nillable="true" type="xs:anyType" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
- <wsdl:message name="getNearestCentreRequest">
<wsdl:part name="parameters" element="ns:getNearestCentre" />
</wsdl:message>
- <wsdl:message name="getNearestCentreResponse">
<wsdl:part name="parameters" element="ns:getNearestCentreResponse" />
</wsdl:message>
- <wsdl:portType name="NearestCollectionCentreWebServicePortType">
- <wsdl:operation name="getNearestCentre">
<wsdl:input message="ns:getNearestCentreRequest" wsaw:Action="urn:getNearestCentre" />
<wsdl:output message="ns:getNearestCentreResponse" wsaw:Action="urn:getNearestCentreResponse" />
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding name="NearestCollectionCentreWebServiceSoap11Binding" type="ns:NearestCollectionCentreWebServicePortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
- <wsdl:operation name="getNearestCentre">
<soap:operation soapAction="urn:getNearestCentre" style="document" />
- <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:binding name="NearestCollectionCentreWebServiceSoap12Binding" type="ns:NearestCollectionCentreWebServicePortType">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
- <wsdl:operation name="getNearestCentre">
<soap12:operation soapAction="urn:getNearestCentre" style="document" />
- <wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:binding name="NearestCollectionCentreWebServiceHttpBinding" type="ns:NearestCollectionCentreWebServicePortType">
<http:binding verb="POST" />
- <wsdl:operation name="getNearestCentre">
<http:operation location="NearestCollectionCentreWebService/getNearestCentre" />
- <wsdl:input>
<mime:content type="text/xml" part="getNearestCentre" />
</wsdl:input>
- <wsdl:output>
<mime:content type="text/xml" part="getNearestCentre" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="NearestCollectionCentreWebService">
- <wsdl:port name="NearestCollectionCentreWebServiceHttpSoap11Endpoint" binding="ns:NearestCollectionCentreWebServiceSoap11Binding">
<soap:address location="http://172.16.211.4:8080/gss/web/services/NearestCollectionCentreWebService.NearestCollectionCentreWebServiceHttpSoap11Endpoint/" />
</wsdl:port>
- <wsdl:port name="NearestCollectionCentreWebServiceHttpSoap12Endpoint" binding="ns:NearestCollectionCentreWebServiceSoap12Binding">
<soap12:address location="http://172.16.211.4:8080/gss/web/services/NearestCollectionCentreWebService.NearestCollectionCentreWebServiceHttpSoap12Endpoint/" />
</wsdl:port>
- <wsdl:port name="NearestCollectionCentreWebServiceHttpEndpoint" binding="ns:NearestCollectionCentreWebServiceHttpBinding">
<http:address location="http://172.16.211.4:8080/gss/web/services/NearestCollectionCentreWebService.NearestCollectionCentreWebServiceHttpEndpoint/" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
11 years ago
Hi,I am very new to webservices.I am developing Axis2 web services .

I am trying to consume web service which exists externally in internet while consuming I am getting exception trace provided below.
Please provide me any solution to the issue How I can come out of this problem .I am using jboss application server . Thanks in Advance..
13:26:12,477 INFO [HttpMethodDirector] Retrying request
13:26:33,506 INFO [HttpMethodDirector] I/O exception (java.net.ConnectException) caught when processing request: Connection timed out: connect
13:26:33,506 INFO [HttpMethodDirector] Retrying request
13:26:54,536 INFO [HttpMethodDirector] I/O exception (java.net.ConnectException) caught when processing request: Connection timed out: connect
13:26:54,536 INFO [HttpMethodDirector] Retrying request
13:27:15,565 INFO [HTTPSender] Unable to sendViaPost to url[http://www.webservicex.net/CurrencyConvertor.asmx]
java.net.ConnectException: Connection timed out: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:75)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:337)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:198)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:180)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:157)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
at java.net.Socket.connect(Socket.java:579)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(Unknown Source)
at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(Unknown Source)
at org.apache.commons.httpclient.HttpConnection.open(Unknown Source)
11 years ago

praneeth gajji wrote:Hi, I read from some forum and added open proxies to my optional arguments to transprtsender of http in axis2.xml while starting jboss
Arguments are
<parameter name="Proxy">
<Configuration>
<ProxyHost>10.150.112.254</ProxyHost>
<ProxyPort>8080</ProxyPort>
</Configuration>
</parameter>
But now I am getting exception:below is the stack trace please help
14:25:25,407 INFO [HttpMethodDirector] I/O exception (java.net.ConnectException) caught when processing request: Connection timed out: connect
14:26:02,193 INFO [HttpMethodDirector] Retrying request
14:26:23,254 INFO [HTTPSender] Unable to sendViaPost to url[http://www.webservicex.net/CurrencyConvertor.asmx]
java.net.ConnectException: Connection timed out: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:75)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:337)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:198)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:180)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:157)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
at java.net.Socket.connect(Socket.java:579)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(Unknown Source)
at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(Unknown Source)
at org.apache.commons.httpclient.HttpConnection.open(Unknown Source)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(Unknown Source)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(Unknown Source)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(Unknown Source)
at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source)
at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source)
at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:542)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:189)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:371)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:209)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at com.gssexample.curconv.CurrencyConvertorStub.ConversionRate(CurrencyConvertorStub.java:187)

11 years ago
Hi, I read from some forum and added open proxies to my optional arguments of myeclipse while starting jboss
Arguments are
Dhttp.proxyHost=172.16.108.174 -Dhttp.proxyPort=8080
-Dhttp.nonProxyHosts=localhost

But now I am getting exception:below is the stack trace please help
14:13:24,926 INFO [HTTPSender] Unable to sendViaPost to url[http://www.webservicex.net/CurrencyConvertor.asmx]
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:150)
at java.net.SocketInputStream.read(SocketInputStream.java:121)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
at java.io.BufferedInputStream.read(BufferedInputStream.java:254)
at org.apache.commons.httpclient.HttpParser.readRawLine(Unknown Source)
at org.apache.commons.httpclient.HttpParser.readLine(Unknown Source)
at org.apache.commons.httpclient.HttpConnection.readLine(Unknown Source)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(Unknown Source)
at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(Unknown Source)
at org.apache.commons.httpclient.HttpMethodBase.readResponse(Unknown Source)
at org.apache.commons.httpclient.HttpMethodBase.execute(Unknown Source)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(Unknown Source)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(Unknown Source)
at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source)
at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source)
at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:542)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:189)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:371)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:209)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
11 years ago
Hi Any one please help,I am very new to web services

I am trying to consume we service that is available at http://www.webservicex.net/CurrencyConvertor.asmx?WSDL
which I am able to acces wsdl from URL and able o get output as required.But same thing when I am trying to access that webservice from deployed code from I am getting the following error request you to help me out in this regard.

12:24:38,396 INFO [HttpMethodDirector] I/O exception (java.net.ConnectException) caught when processing request: Connection refused: connect
12:24:38,396 INFO [HttpMethodDirector] Retrying request
12:24:39,427 INFO [HttpMethodDirector] I/O exception (java.net.ConnectException) caught when processing request: Connection refused: connect
12:24:39,427 INFO [HttpMethodDirector] Retrying request
12:24:40,426 INFO [HttpMethodDirector] I/O exception (java.net.ConnectException) caught when processing request: Connection refused: connect
12:24:40,426 INFO [HttpMethodDirector] Retrying request
12:24:41,440 INFO [HTTPSender] Unable to sendViaPost to url[http://www.webservicex.net/CurrencyConvertor.asmx]
java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:75)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:337)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:198)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:180)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:157)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
at java.net.Socket.connect(Socket.java:579)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(Unknown Source)
at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(Unknown Source)
at org.apache.commons.httpclient.HttpConnection.open(Unknown Source)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(Unknown Source)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(Unknown Source)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(Unknown Source)
at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source)
at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source)
at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:542)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:189)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:371)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:209)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at com.gssexample.curconv.CurrencyConvertorStub.ConversionRate(CurrencyConvertorStub.java:187)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.gesmallworld.gss.lib.service.Axis2WebService.handleRequest(Axis2WebService.java:279)
at com.gssexample.curconvEJB.CurrencyConvertorBean.ConversionRate(CurrencyConvertorBean.java:77)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.gesmallworld.gss.lib.service.Service.makeRequest(Service.java:489)
11 years ago
Can any one please explain difference between thease two along with beloww query.

for example
we have one.jsp having defined String s="1" using scriptlet
two.jsp two.jsp having defined String s="2"
three.jsp with String s="3"

we have included two.jsp into one .jsp with <%@include..> directive
Also we have included three.jsp into one.jsp with <jsp:include..> tag

wheras all jsps have String s defined in it, if we print 's' what will be output,please xplain the reason
12 years ago
JSP
Thanks for reply,I am explaining question clearly please provide me solution.


"In An application server there are 2 war files output of one war file is input to other war file.user is concerned about final output that is coming.Request is made for first war file where as final response i from 2nd war file."

In the above situation which one we use(sendRedirect or forward) and why.Explain me, I am in little bit confusion..
12 years ago