Web服务无法调用客户端 [英] Webservice couldnot able to call client
问题描述
我正在使用jax rpc样式的Web服务客户端和服务应用程序.它工作正常,但是当我在Google App Engine中部署客户端时,客户端无法调用我的服务器应用程序.
I am using jax rpc style webservice client and service applications.It is working fine,But when I deployed the client in Google app engine.The client is unable to call my server application.
我已将我的IP地址设为静态.
I have made my Ip address static.
这是部署在应用引擎中的客户端应用代码段.
Here is the client application piece of code which is deployed in app engine.
public class HelloWorldClient{
public String main(String name,String field2) throws Exception {
URL url = new URL("http://XXX.XX.9.2X:9997/ws/hello?wsdl");
这是我系统中已发布的服务器应用程序代码
Here is the server application code which is in my system and published
public static void main(String[] args) {
Endpoint.publish("http://xxx.0.x.1:9997/ws/hello", new HelloWorldImpl());
我保持防火墙处于关闭状态.这种奇怪行为的原因是什么?我什至无法在appengine日志中看到错误.
I have kept my firewall to off state.What is the reason for this strange behaviour.I even couldnot able to see the error in appengine log.
这足以使我的ip保持静态,还是应该使我的ip portforward.这两者是相同的.
Is this enough that I made my ip static or should i make my ip portforward.Is both the things are same.
推荐答案
我认为问题是您没有使用google fetch库.这是从Google App Engine发送出站请求的唯一受支持的方式
I think the problem is that you are not use the google fetch library. This is the only supported way to send outbound request from Google App Engine
这两个链接将为您提供更多有关此的信息
This two links will give you some more infos about that
https://cloud.google.com/appengine/docs/standard/java/outbound-requests
我可以使用org吗? google app引擎中的apache.http.client.HttpClient?
致谢
迈克尔
这篇关于Web服务无法调用客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!