![](/img/trans.png)
[英]RAD - How to add username token for JAX-WS in websphere application server admin console
[英]JAX-WS in RAD with websphere7 javaAccessorNotSet error
SEVERE: javaAccessorNotSet
java.net.MalformedURLException:/WEB-INF/wsdl/TestWebServiceService.wsdl在模块中不存在。 在com.tcs.testwebservice.TestWebServiceService。(TestWebServiceService.java:27)在java.lang.J9VMInternals.initializeImpl(本机方法)在java.lang.J9VMInternals.initialize(J9VMInternals.java:200)在com.tcs.testwebservice。 com.tcs.testwebservice.TestWebServicePortProxy。(TestWebServicePortProxy.java:86)位于com.tcs.testwebservice.client.CheckResponseClient.main(CheckResponseClient.java:12)处的TestWebServicePortProxy $ Descriptor。(TestWebServicePortProxy.java:38) com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java处的com.sun.xml.internal.ws.client.WSServiceDelegate.getPortModel(WSServiceDelegate.java:571)处的main“ java.lang.NullPointerException :274),位于com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:268),位于com.tcs.testwebservice的javax.xml.ws.Service.getPort(Service.java:103)。位于com.tcs.testwebservice.TestWebServicePortProxy $ Descrip的TestWebServiceService.getTestWebServicePort(TestWebServiceService.java:49) com.tcs.testwebservice.TestWebServicePortProxy $ Descriptor的tor.initCommon(TestWebServicePortProxy.java:48).com.tcs.testwebservice.TestWebServicePortProxy。(TestWebServicePortProxy.java:86)的com.tcs.testwebservice.TestWebServicePortProxy.java:39) .client.CheckResponseClient.main(CheckResponseClient.java:12)
我使用Websphere 7服务器在RAD中创建了JAX-WS服务,当我通过SOAP UI进行测试时,它可以正常工作,但是我创建了客户端代理,但是从客户端调用时出现了错误。 这里是客户端代码。
公共类CheckResponseClient {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
TestWebServicePortProxy testWebServicePortProxy = new TestWebServicePortProxy();
System.out.println("webservice Response"+testWebServicePortProxy.checkGender("MALE"));
}
在这里,您有一些使用RAD创建Web服务客户端的资源:
Rational Application Developer V7.5编程指南 -第18章
Web服务指南 -第4章
简而言之,切换到“服务”视图,右键单击您的服务,然后选择“生成”>“客户端”。 您应该能够使用将成为您的服务客户端的jsp文件创建新的Web应用程序。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.