问题
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.
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());
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.
Is this enough that I made my ip static or should i make my ip portforward.Is both the things are same.
回答1:
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
Can i use org.apache.http.client.HttpClient in google app engine?
Regards
Michael
来源:https://stackoverflow.com/questions/43870044/webservice-couldnot-able-to-call-client