org.apache.axis2.AxisFault: No address information in EPR, cannot infer
transpor t
----------------------------------------------------------------------------------
Key: AXIS2-4112
URL: https://issues.apache.org/jira/browse/AXIS2-4112
Project: Axis 2.0 (Axis2)
Issue Type: Bug
Components: Addressing, transports
Environment: WebService (REST)
Reporter: charitha
Priority: Critical
Hi,
By using callback mechanism i am invoking the webservice...
Here iam using REST as WebService..
ERROR is
org.apache.axis2.AxisFault: No address information in EPR, cannot infer transpor
t
at org.apache.axis2.description.ClientUtils.inferOutTransport(ClientUtil
s.java:40)
at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAx
isOperation.java:237)
at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:
457)
at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:
399)
at org.kaizen.eagleeye.gui.eeservice.client.EEServiceClient.callService(
Unknown Source)
at org.kaizen.eagleeye.gui.timerservice.ScheduledTask.fetchDataFromServi
ce(Unknown Source)
at org.kaizen.eagleeye.gui.timerservice.ScheduledTask.run(Unknown Source
)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
i have written on client side code is
OMElement response = null;
try {
/* Setting up configurations for forwarding REST request */
Options options = new Options();
options.setTo(new EndpointReference(GUIStartUp.serviceUrl));// this
sets the location of MyService service
options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
options.setProperty(Constants.Configuration.ENABLE_REST,
Constants.VALUE_TRUE);
options.setUseSeparateListener(true);
options.setAction("urn:echo"); // this is the action mapping we
put within the service.xml
//Callback to handle the response
Callback callback = new Callback() {
public void onComplete(AsyncResult result) {
System.out.println("Response in
AsyncResult format is "+result.getResponseEnvelope());
}
public void onError(Exception e) {
System.out.println("ON ERROR");
e.printStackTrace();
}
};
//Non-Blocking Invocation
//loading the configurations made to ServiceClient.
sClient = new ServiceClient();
response = sClient.sendReceive(request);
sClient.engageModule(new QName(Constants.MODULE_ADDRESSING));
sClient.setOptions(options);
sClient.sendReceiveNonBlocking(response, callback);
EEService.invoke(response);
logger.info("Response from Web Service Received...");
//Wait till the callback receives the response.
while (!callback.isComplete()) {
Thread.sleep(1000);
}
//Need to close the Client Side Listener.
} catch (AxisFault axisFault) {
logger.error("Cannot Instantiate ServiceClient Instance : "
+ axisFault);
axisFault.printStackTrace();
} catch (Exception ex) {
ex.printStackTrace();
} finally {
try {
sClient.finalizeInvoke();
} catch (AxisFault axisFault) {
//have to ignore this
}
}
return response;
}
Server side code is
// constrcuting response OMElement
OMFactory omFactory = OMAbstractFactory.getOMFactory();
OMNamespace omNamespace = omFactory.createOMNamespace(
"http://www.info.ebn.restresponse", "resp");
OMElement rootElement = omFactory.createOMElement("response", omNamespace);
OMElement responseElement = omFactory.createOMElement("responseData",
omNamespace);
responseElement.setText(response);
rootElement.addChild(responseElement);
Is it necessary to change code on server side?
Can anybody shed some light on what's going wrong here?
Thanking you,
Charitha.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]