如果在Java 8下运行,WebService客户端将返回null

时间:2015-12-29 14:12:29

标签: java web-services

我在Apache Tomcat托管的servlet中有一个Web服务(C#,在IIS下)和WebService Client(Java代码)。如果Tomcat使用Java 7,则与Web Service的通信工作正常,但如果Tomcat使用Java 8,则Web Service客户端方法(WebMethod)将返回null(对于复杂数据)。在这两种情况下,Web Service的方法都被调用并正常工作(我已在Visual Studio下对其进行了调试)。这里有一些来自我客户代码的片段: 代理:

/**
 * This class was generated by the JAX-WS RI.
 * JAX-WS RI 2.1.3.1-hudson-749-SNAPSHOT
 * Generated source version: 2.1
 * 
 */
@WebService(name = "BluePrint", targetNamespace = "artifact.wsclient.vuelink.cimmetry.com")
@XmlSeeAlso({
    ObjectFactory.class
})
public interface BluePrint {

************
/**
 * 
 * @param arg1
 * @param arg0
 * @return
 *     returns com.cimmetry.vuelink.wsclient.artifact.WsDocID
 */
@WebMethod
@WebResult(targetNamespace = "")
@RequestWrapper(localName = "openFile", targetNamespace = "artifact.wsclient.vuelink.cimmetry.com", className = "com.cimmetry.vuelink.wsclient.artifact.OpenFile")
@ResponseWrapper(localName = "openFileResponse", targetNamespace = "artifact.wsclient.vuelink.cimmetry.com", className = "com.cimmetry.vuelink.wsclient.artifact.OpenFileResponse")
public WsDocID openFile(
    @WebParam(name = "arg0", targetNamespace = "")
    String arg0,
    @WebParam(name = "arg1", targetNamespace = "")
    SessionData arg1);

并致电Web服务:

BluePrint proxy = getWSClient(beSession);
*****    
WsDocID docID = proxy.openFile(orginalUrl, data);

如果是Java 8,则docID变量为null。

0 个答案:

没有答案