I am accessing a webservice exposed by some other guy as a client using axis2
and I have made a wrapper method for abcStub .java (Stub java file made by running some batch) and tried to instantiate the Stub file inside the wrapper java file. But i get following errors:
INFO: ERROR org.apache.struts.actions.DispatchAction - Dispatch[/remittanceTransaction] to method 'remTransApprove' returned an exception java.lang.reflect.InvocationTargetException 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) Caused by: java.lang.NoSuchMethodError: org.apache.neethi.PolicyEngine.getPolicy(Ljava/lang/Object;)Lorg/apache/neethi/Policy; at org.tempuri.MIRSRemittanceServicesStub.getPolicy(MIRSRemittanceServicesStub.java:3558) at org.tempuri.MIRSRemittanceServicesStub.populateAxisService(MIRSRemittanceServicesStub.java:57) at org.tempuri.MIRSRemittanceServicesStub.(MIRSRemittanceServicesStub.java:268) at org.tempuri.MIRSRemittanceServicesStub.(MIRSRemittanceServicesStub.java:257) at org.tempuri.MIRSRemittanceServicesStub.(MIRSRemittanceServicesStub.java:305) INFO: g.tempuri.MIRSRemittanceServicesStub.(MIRSRemittanceServicesStub.java:297) at com.mtmrs.webservice.MIRSRemittanceTransactionManagerImpl.getAppDeclWrapper(MIRSRemittanceTransactionManagerImpl.java:201) at com.mtmrs.business.backoffice.impl.RemittanceTransactionManagerImpl.remTransApprove(RemittanceTransactionManagerImpl.java:1417) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at com.mtmrs.application.backoffice.action.RemittanceTransactionAction.remTransApprove(RemittanceTransactionAction.java:1409) ... 78 more INFO: WARN org.apache.struts.action.RequestProcessor - Unhandled Exception thrown: class javax.servlet.ServletException WARNING: StandardWrapperValve[action]: PWC1406: Servlet.service() for servlet action threw exception java.lang.NoSuchMethodError: org.apache.neethi.PolicyEngine.getPolicy(Ljava/lang/Object;)Lorg/apache/neethi/Policy; at org.tempuri.MIRSRemittanceServicesStub.getPolicy(MIRSRemittanceServicesStub.java:3558) at org.tempuri.MIRSRemittanceServicesStub.populateAxisService(MIRSRemittanceServicesStub.java:57) at org.tempuri.MIRSRemittanceServicesStub.(MIRSRemittanceServicesStub.java:268)
думаю с этим должны быть проблемы
org.apache.neethi.PolicyEngine.getPolicy(Ljava/lang/Object;)Lorg/apache/neethi/Policy;
или может я ошибаюсь. В любом случае, не знаю, как исправить. Было бы очень полезно, если бы кто-нибудь знал, что сталкивался/решал это раньше.
Я получил это, делая следующий вызов:
public String getAppDeclWrapper(String session, String parentAgent, String mirsTxnNo, String strReason, String isApprove, String modifiedBY){
String returnString = null;
try {
mtmrsLogger.info("Entering into Approve Decline procedure, Starting to send Status to MIRS");
MIRSRemittanceServicesStub stub = new MIRSRemittanceServicesStub(); //Error occurs at this line
ApproveDecline approvedEcline = new ApproveDecline();
ApproveDeclineResponse approveResponse = new ApproveDeclineResponse();
approvedEcline.setCParentAgent(parentAgent);
approvedEcline.setMirsSession(session);
approvedEcline.setModifiedBy(modifiedBY);
approvedEcline.setRefNo(mirsTxnNo);
approvedEcline.setStrReason(strReason);
approvedEcline.setIsApprove(isApprove);