axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Annesley" <>
Subject RE: Issue with AXis2 client code connection
Date Wed, 06 Jun 2012 09:34:20 GMT


"Connection refused: connect at org.apache.axis2." just means it can't
access the SOAP endpoint. Make sure the SOAP server is running and available
and that the client is pointing to it. The parameters when creating a stub
are where you define the endpoint location. As far as the server goes make
sure that you can access it through another means on the server and on
client. E.g. this could be a web browser or another SOAP client. If you can
access it on the server but not the client then it could be a firewall
problem and you should open the correct port on the server.




From: gibyALEX [] 
Sent: 06 June 2012 09:11
Subject: Issue with AXis2 client code connection


I am Getting error like while using AXIs2 .... Can any help me .. i didn't
get what is issue... org.apache.axis2.AxisFault: Connection refused: connect
at org.apache.axis2.AxisFault.makeFault( at
at org.apache.axis2.transport.http.HTTPSender.send( at
ommons( at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTT at
org.apache.axis2.engine.AxisEngine.send( at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperatio at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisO at
org.apache.axis2.client.OperationClient.execute( at at
com.taleo.demo.TaleoDemo.exportRequisition( at
com.taleo.demo.TaleoDemo.main( Caused by: Connection refused: connect at Method) at at at at at at
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
) at
.java:25) at java.lang.reflect.Method.invoke( at
org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket( at
( at
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnect at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethod at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDir at
org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTT at
... 10 more The Client Code is the Below one...
---------------------- public static void main(String[] args) { TaleoDemo
taleDemo = new TaleoDemo(); String returnValue = null; try { returnValue =
taleDemo.exportRequisition(pEndpoint, pUsername, pPassword, pPageIndex); }
catch (RemoteException e) { e.printStackTrace(); } catch (Exception ex) {
ex.printStackTrace(); } System.out.println("The Return value
is"+returnValue); } private String exportRequisition(String pEndpoint,
String pUsername, String pPassword, int pPageIndex) throws
RemoteException,Exception { FindServiceStub stub = new
FindServiceStub(pEndpoint); HttpTransportProperties.Authenticator auth = new
HttpTransportProperties.Authenticator(); auth.setUsername(pUsername);
auth.setPassword(pPassword); auth.setPreemptiveAuthentication(true);
HTTPConstants.AUTHENTICATE, auth); FindPartialEntitiesDocument findDoc =
FindPartialEntitiesDocument.Factory .newInstance();
FindPartialEntitiesDocument.FindPartialEntities find = findDoc
find.setMappingVersion(""); SqxmlQuery
sqxmlquery = find.addNewQuery(); Query query = sqxmlquery.addNewQuery();
query.setAlias("Find Open and Posted Requisitions");
query.setProjectedClass("Requisition"); Projections projections =
query.addNewProjections(); Projection contestNumberProj =
projections.addNewProjection(); Field contestNumberField =
contestNumberField.setPath("ContestNumber"); Projection jobInfoTitleProj =
projections.addNewProjection(); Field jobInfoTitleField =
jobInfoTitleField.setPath("JobInformation,Title"); Filterings filterings =
query.addNewFilterings(); Filtering filtering =
filterings.addNewFiltering(); IncludedIn includedIn =
filtering.addNewIncludedIn(); Field stateField = includedIn.addNewField();
stateField.setPath("State,Number"); List stateList =
includedIn.addNewList(); Long open = stateList.addNewLong();
open.setLongValue(3); Long posted = stateList.addNewLong();
posted.setLongValue(13); Sortings sortings = query.addNewSortings(); Sorting
sorting = sortings.addNewSorting(); Field contestNumberSortingField =
sorting.addNewField(); contestNumberSortingField.setPath("ContestNumber");
String2StringMap attrs = find.addNewAttributes(); Entry entry =
attrs.addNewEntry(); entry.setKey("pageindex");
FindPartialEntitiesResponseDocument response; try { response =
stub.findPartialEntities(findDoc); } catch (WebServiceFault e) {
System.err.println("Error while creating the candidate: " +
e.getFaultMessage().getWebServiceFault().getMessage()); throw new
RuntimeException(e); } FindPartialEntitiesResponse rsp = response
.getFindPartialEntitiesResponse(); Entities entities = rsp.getEntities();
System.out.println("Fetched page: " + entities.getPageIndex() + "/" +
entities.getPageCount()); if
(!entities.getPageCount().equals(entities.getPageIndex())) { return
exportRequisition(pEndpoint, pUsername, pPassword, +pPageIndex); } else {
Requisition requisition = (Requisition) entities.getEntityArray()[entities
.sizeOfEntityArray() - 1]; return requisition.getContestNumber(); } }
etting error like .... 


View this message in context: Issue with AXis2 client code connection
Sent from the Axis - User mailing list archive
<>  at

The content of this e-mail (and any attachment to it) is confidential. 
Any views or opinions do not represent the views or opinions 
of Infoshare Ltd.
If you have received this e-mail in error please notify the sender 
and delete it. You may not use, copy or disclose the information 
in any way. 

Infoshare Ltd monitors incoming and outgoing e-mails.

Please consider the environment. Do you really need to print 
this email?

View raw message