我在查找託管在服務器上的EJB時遇到問題。服務器本身是一個SAP環境,它基本上是一個修改後的tomcat。使用InitialContext進行EJB查找
我試了幾個lookupstrings開始
java:comp/env/
和
ejb:/
但沒有任何工程。
這是服務器說關於lookupstrings:
ejb:/appName=mycompany.de/reboard~report~cs, jarName=mycompany.de~reboard~report~cs.jar, beanName=com.sap.bpem.facade.api._simplified.adapted.BPMFacadeBeanSimplifiedEjb, interfaceName=com.sap.bpem.facade.api._simplified.adapted.BPMFacadeBeanSimplifiedLocal
和遠程部分:
ejb:/appName=mycompany.de/reboard~report~cs, jarName=mycompany.de~reboard~report~cs.jar, beanName=com.sap.bpem.facade.api._simplified.adapted.BPMFacadeBeanSimplifiedEjb, interfaceName=com.sap.bpem.facade.api._simplified.adapted.BPMFacadeBeanSimplifiedRemote
我嘗試這個查詢字符串diferent組合,但都失敗。我能壽使用此獲得代理對象到Bean:
InitialContext().lookup("ejb:/com.sap.bpem.facade.api._simplified.adapted.BPMFacadeBeanSimplifiedLocal");
,但我需要爲直接訪問豆。
這裏是豆是如何定義的:
@com.sap.engine.services.webservices.espbase.configuration.ann.rt.TransportBindingRT(AltPath="reboard/report/cs~ibsolution.de_com.sap.bpem.facade.api._simplified.adapted.BPMFacadeBeanSimplifiedEjb")
@UsedReferences(srIds="05bc3ba3-fd85-4381-b6f8-f8a4734b2815, 05bc3ba3-fd85-4381-b6f8-f8a4734b2815, 05bc3ba3-fd85-4381-b6f8-f8a4734b2815", wsdlLocations="ibsolution.de~reboard~report~cs.jar#META-INF/wsdl/consumed/src/wsdl/rootwsdl_BPMFacadeBeanImplService_BPMFacadeBeanImpl.wsdl, ibsolution.de~reboard~report~cs.jar#META-INF/wsdl/consumed/src/wsdl/rootwsdl_BPMFacadeBeanImplService_BPMFacadeBeanImpl.wsdl, ibsolution.de~reboard~report~cs.jar#META-INF/wsdl/consumed/src/wsdl/rootwsdl_BPMFacadeBeanImplService_BPMFacadeBeanImpl.wsdl")
@Stateless(name="com.sap.bpem.facade.api._simplified.adapted.BPMFacadeBeanSimplifiedEjb")
@EJB(name="BPMBean", beanInterface=BPMFacadeBeanSimplifiedLocal.class)
@WebService(
portName="BPMFacadeBean_simplifiedBindingPort",
endpointInterface="com.sap.bpem.facade.api._simplified.BPMFacadeBeanSimplified",
serviceName="BPMFacadeBean_simplifiedBindingService",
targetNamespace="http://api.facade.bpem.sap.com/_simplified",
wsdlLocation="META-INF/wsdl/composed/src/wsdl/rootwsdl_importedwsdl_1_BPMFacadeBeanImplService_BPMFacadeBeanImpl_simplified.wsdl")
public class BPMFacadeBeanSimplifiedEjb implements
BPMFacadeBeanSimplifiedLocal,
BPMFacadeBeanSimplifiedRemote
本地接口:
@Local
public interface BPMFacadeBeanSimplifiedLocal
extends com.sap.bpem.facade.api._simplified.BPMFacadeBeanSimplified {}
遠程接口:
@Remote
public interface BPMFacadeBeanSimplifiedRemote
extends com.sap.bpem.facade.api._simplified.BPMFacadeBeanSimplified {}
BPMFacadeBeanSimplified接口:
@javax.jws.WebService(name = "BPMFacadeBean_simplified", targetNamespace = "http://api.facade.bpem.sap.com/_simplified")
@javax.jws.soap.SOAPBinding(parameterStyle = javax.jws.soap.SOAPBinding.ParameterStyle.WRAPPED, style = javax.jws.soap.SOAPBinding.Style.DOCUMENT, use = javax.jws.soap.SOAPBinding.Use.LITERAL)
public interface BPMFacadeBeanSimplified {
@javax.jws.WebMethod(operationName = "getActiveProcesses", action = "http://api.facade.bpem.sap.com/_simplified/getActiveProcesses")
@javax.xml.ws.RequestWrapper(localName = "getActiveProcesses", targetNamespace = "http://api.facade.bpem.sap.com/", className = "com.sap.bpem.facade.api.GetActiveProcesses")
@javax.xml.ws.ResponseWrapper(localName = "getActiveProcessesResponse", targetNamespace = "http://api.facade.bpem.sap.com/", className = "com.sap.bpem.facade.api.GetActiveProcessesResponse")
@javax.jws.WebResult(name = "return", targetNamespace = "")
public java.util.List<com.sap.bpem.facade.api.ProcessInfo> getActiveProcesses(@javax.jws.WebParam(name = "locale", targetNamespace = "") java.lang.String locale);
/**
* Java representation of web method [getProcessDescription].
*/
@javax.jws.WebMethod(operationName = "getProcessDescription", action = "http://api.facade.bpem.sap.com/_simplified/getProcessDescription")
@javax.xml.ws.RequestWrapper(localName = "getProcessDescription", targetNamespace = "http://api.facade.bpem.sap.com/", className = "com.sap.bpem.facade.api.GetProcessDescription")
@javax.xml.ws.ResponseWrapper(localName = "getProcessDescriptionResponse", targetNamespace = "http://api.facade.bpem.sap.com/", className = "com.sap.bpem.facade.api.GetProcessDescriptionResponse")
@javax.jws.WebResult(name = "return", targetNamespace = "")
public java.lang.String getProcessDescription(@javax.jws.WebParam(name = "activeVersionId", targetNamespace = "") java.lang.String activeVersionId, @javax.jws.WebParam(name = "locale", targetNamespace = "") java.lang.String locale);
}
在這種情況下,正確的查找字符串是什麼?
謝謝你的幫助!
你能解釋一下直接訪問你爲什麼試圖查找時,你顯然試圖做一個本地接口遠程查詢?你也沒有提到你的環境是什麼。其中服務器/容器,它的版本......這可以極大地確定適當的查找名稱是什麼,雖然你的容器的文件應該是正確的信息的第一步。 – Gimby
添加服務器的問題說明。基本上它是一個tomcat。 –
我的本地接口上的評論是不變的。 – Gimby