各位高手,帮我看看这段客户端程序是否有问题?

kqb1231 2004-12-29 02:15:07
System.setProperty(ServiceFactory.SERVICEFACTORY_PROPERTY,"weblogic.webservice.core.rpc.ServiceFactoryImpl");
ServiceFactory factory = null;
System.out.println("aaaaaaaaaaaaaaaaaaaaaaa");
try {
factory = ServiceFactory.newInstance();

} catch (Exception e) {
System.out.println("11111111111111111111");e.printStackTrace(); //To change body of catch statement use Options | File Templates.
}
System.out.println("bbbbbbbbbbbbbbbbbbbbb");
URL wsdlLocation = null;
QName serviceName = new QName(TARGET_NAMESPACE,SERVICE_NAME);
try {
wsdlLocation = new URL(WSDL_LOCATION);
} catch (MalformedURLException e) {
System.out.println("2222222222222222222");
e.printStackTrace(); //To change body of catch statement use Options | File Templates.
}
System.out.println("ccccccccccccccccccccc");
Service service = null;
try {
service = factory.createService(wsdlLocation,serviceName);
} catch (Exception e) {
System.out.println("33333333333333333333");
e.printStackTrace(); //To change body of catch statement use Options | File Templates.
}
System.out.println("dddddddddddddddddd");
QName portName = new QName(TARGET_NAMESPACE,PORT_NAME);
QName operationName = new QName(TARGET_NAMESPACE,OPERATION_NAME);
Call call = null;
try {
call = service.createCall(portName,operationName);
} catch (Exception e) {
System.out.println("444444444444444444444");
e.printStackTrace(); //To change body of catch statement use Options | File Templates.
}
System.out.println("eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
//cpCode, serviceID,fromUserMobile,toUserMobile, alertTitle, alertURL
Object[]opArgs = new Object[]{"20012", "4002001200","13333333333","13311111111", "V6 PUSH接口测试", "http://wap.ok.com"};
String result = null;
try {
System.out.println("fffffffffffffffffffffffffff");
result = (String)call.invoke(opArgs);
System.out.println("gggggggggggggggggggggggggggg");
} catch (RemoteException e) {
System.out.println("555555555555555555555");
e.printStackTrace(); //To change body of catch statement use Options | File Templates.
}
catch(IOException e){

System.out.println("666666666666666666666666666");
}

System.out.println("result = "+result);
...全文
109 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
drugon 2004-12-31
  • 打赏
  • 举报
回复
Please ensure that your URL is correct, and the web service has deployed. .>


Please ensure that your URL is correct, and the web service has deployed.

看错误提示。然后再找原因。

不过楼上的搞笑,说的也对。
vcvj 2004-12-31
  • 打赏
  • 举报
回复
The server at http://211.74.69.48/pushhq/services/PushService returned a 500 error code (Internal Server Error). Please ensure that your URL is correct, and the web service has deployed. .>

it shows there is not a url of webservices at http://211.74.69.48/pushhq/services/PushService, and it will report a 500 error if you try to access a incorrect web address.

I ensure you've no deploied a successed Services at http://211.74.69.48/pushhq/services/PushService, but you opened you web Server(not deploied your WebServices), thus it will return a 500 error to you.

check your deploy.wsdd
kqb1231 2004-12-31
  • 打赏
  • 举报
回复
该死的信誉值!
我也想知道为什么会变的这么底?
其实我是一个好人,真的。
vcvj 2004-12-31
  • 打赏
  • 举报
回复
I don't agree with your point that there is not master here,
I feel like your 信誉:69 is very low, and it's that why are there many people help you.

I acid look a man who talks nonsense!
kqb1231 2004-12-31
  • 打赏
  • 举报
回复
CSDN现在是真烂了,怪不得都说CSDN是没有高手的
kqb1231 2004-12-30
  • 打赏
  • 举报
回复
上面是异常,

是执行到 result = (String)call.invoke(opArgs); 这一句出的异常!
是不是参数有问题?
kqb1231 2004-12-30
  • 打赏
  • 举报
回复
<Dec 30, 2004 9:38:35 AM CST> <Info> <WebService> <BEA-220025> <Handler weblogic.webservice.core.handler.ClientHandler threw an exception from its handleResponse method. The exception was:
javax.xml.rpc.JAXRPCException: java.io.IOException: The server at http://211.74.69.48/pushhq/services/PushService returned a 500 error code (Internal Server Error). Please ensure that your URL is correct, and the web service has deployed. .>
Exception in thread "main" javax.xml.rpc.soap.SOAPFaultException: Exception during processing: java.io.IOException: The server at http://211.74.69.48/pushhq/services/PushService returned a 500 error code (Internal Server Error). Please ensure that your URL is correct, and the web service has deployed. (see Fault Detail for stacktrace)
at weblogic.webservice.core.ClientDispatcher.receive(ClientDispatcher.java:313)
at weblogic.webservice.core.ClientDispatcher.dispatch(ClientDispatcher.java:144)
at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:457)
at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:443)
at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:558)
at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:411)
at WebServiceClient.testClient(WebServiceClient.java:79)
at WebServiceClient.main(WebServiceClient.java:31)
redex 2004-12-30
  • 打赏
  • 举报
回复
先运行一下,有问题就把问题帖出来.
kqb1231 2004-12-29
  • 打赏
  • 举报
回复
再线急等啊

67,512

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧