Netweaver里使用事务码SM59创建Destination:
Java
新建一个destination:
测试代码:
try {
Context ctx = new InitialContext();
ConnectivityConfiguration configuration = (ConnectivityConfiguration) ctx.lookup("java:comp/env/connectivityConfiguration");
DestinationConfiguration destConfiguration = configuration.getConfiguration(destinationName);
if (destConfiguration == null) {
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
String.format("Destination %s is not found. Hint:"
+ " Make sure to have the destination configured.", destinationName));
return;
}
// Get the destination URL
String value = destConfiguration.getProperty("URL");
URL url = new URL(value + "xml?origins=Walldorf&destinations=Paris");
String proxyType = destConfiguration.getProperty("ProxyType");
Proxy proxy = getProxy(proxyType);
urlConnection = (HttpURLConnection) url.openConnection(proxy);
injectHeader(urlConnection, proxyType);
// Copy content from the incoming response to the outgoing response
InputStream instream = urlConnection.getInputStream();
OutputStream outstream = response.getOutputStream();
copyStream(instream, outstream);
} catch (Exception e) {
// Connectivity operation failed
String errorMessage = "Connectivity operation failed with reason: "
+ e.getMessage()
+ ". See "
+ "logs for details. Hint: Make sure to have an HTTP proxy configured in your "
+ "local environment in case your environment uses "
+ "an HTTP proxy for the outbound Internet "
+ "communication.";
LOGGER.error("Connectivity operation failed", e);
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
errorMessage);
}
通过JNDI获得destination配置的url:
要获取更多Jerry的原创技术文章,请关注公众号"汪子熙"或者扫描下面二维码:
相关推荐
文档详细介绍了用myeclipse生成webservice的方法步骤,以及abap调用webservice 第一步:myeclipse生成webservice 第二部:发布webservice 第三步:在sap系统生成webservice代理 第四步:生成port 第五步:用实例调用...
JAVA调用ABAP程序,与ABAP调用JAVA程序的实例,包含JCO的API及所需jar文件. 文档文件中是中文实例.
SAP ABAP与JAVA之间通过RFC传递数据实例
基于linux系统oracle数据库sap(ABAP+JAVA)安装手册,语言为纯英文。该文档内部链接全部真实有效。可以规避不必要的错误。
CEON ABAP Eclipse Editor
6.类似Java,ABAP开发的程序能运行于任何操作系统(Java有Java虚拟机,ABAP也有ABAP processor),多种数据库(比如在ABAP字典中实现了透明表对各种底层数据库表的映射,这样在ABAP层看到的透明表就和具体数据库无关),各种...
java连接sap +jco3,代码成功测试,文件含有所需的类库。 限于window X86系统。
ABAP Objects for Java Developers,好资料可以好好看看!
abap 与 java web service 集成
ABAP资料ABAP资料ABAP资料ABAP资料ABAP资料
ABAP 调用ABAP PROXY
ABAP加密和解密
ABAP对JAVA加密的内容进行AES解密,或JAVA对ABAP的加密内容进行解密 提供现成所有源代码(包括ABAP的AES工具类 ),直接拷贝即可使用,达成与JAVA项目互通加密解密。
ABAP - Keyword Documentation This documentation describes the syntax and meaning of the keywords of the ABAP language and its object-oriented part ABAP Objects. Alongside this, language frameworks ...
abap tips abap tips abap tips abap tips abap tips
SAP ABAP开发 BADI 屏幕增强资料,含BADI入门,SAP ABAP与JAVA之间通过RFC传递数据实例,SAP屏幕增强示例,SAP用户出口
jco3.0.5新版本,windows32位的,大家快下啊。
abap逻辑数据库ABAP数据库操作,abap过程中的小积累。用处多多哦
IBM ABAP开发规范和命名规则ABAP开发规范和命名规则
abap 函数大全 abap function abap function