views:

371

answers:

1

Hi,

I am trying to create a web service which is a consumer to another webservice. Here is the layout..

I developed a java class and created a webservice out of it.

Then i used eclipse tools to generate a client side stub and other files.

I packed these files in a jar and used it in another project. I tested the files in the jar I was able to access the first webservice.

Now I created another webservices from the project that I tested the first one from.

Now when I write a client to the second web service it seemingly is not able to find the stubs for the first one. gives me the following error

org.apache.axis2.AxisFault: com/cats/patient/PatientDataStub at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:512) at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:370) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163) at com.esps.patient.PatientDataESPSStub.getPatientByID(PatientDataESPSStub.java:186) at com.esps.patient.ESPSTestClient.main(ESPSTestClient.java:22)

I have incoorporated all the jars in all the projects.

Any help will be appreciated. Adhir

+1  A: 

Looking at the exception client have found the stub of WS1. The exception fault happened when reading response.

Try tcpmon to see what was the request and response. Before tcpmon you can check in WS1 if its recieving any requests from client by putting some debug info.

Bhushan
the client talks to WS1 and WS1 talks to WS2. I have packed the stub jars of WS2 in the client but still no go. I am using the stubs of the WS2 in WS1 not the client, just FYI.Thanks, but the situation still prevails
Adhir
Dude you really need correctly put your question, so have created so much confusion. Read your comment again, you say client talks to WS1 but you put stubs of WS2. If you will not put stub of WS1 in client how will it get the stub?
Bhushan
Adhir
sorry again this thing does not preserve formatting...againthe client consumes WS1 and WS1 consumes WS2.. WS1 contains the jars for WS1 stubs and client has jars for both WS2 and WS1 stubs..this is the scenario. Hope it is clearer
Adhir