我希望你能帮助我。我使用JAX-WS创建了SOAP客户端。我有用于处理从WSDL文件生成的请求的类。在发送给我的客户端的请求中,传输的对象始终为零。我已经实现了SOAP LogicalHandler,可以看到有效负载中有数据。有谁知道这可能是什么原因?
这是我的webService类
@WebService (targetNamespace = "http://xmldefs.volkswagenag.com/Technical/Security/UserNotificationService/V2")
@Addressing(enabled=true, required=false)
public interface GRPSoapService {
@WebMethod
@Action(
input="http://xmldefs.volkswagenag.com/Technical/Security/UserNotificationService/V2/UserNotificationServicePortType/SyncUserMessage",
output="http://xmldefs.volkswagenag.com/Technical/Security/UserNotificationService/V2/UserNotificationServicePortType/SyncUserResponse")
public SyncUserResponseType SyncUser(@WebParam(name = "syncUser") SyncUserType syncUser) throws FaultType;
}
@WebService( serviceName = "GRPSoapService",endpointInterface="de.skoda.grp.GRPSoapService")
@Addressing(enabled=true, required=false)
@HandlerChain(file="handlers.xml")
@SchemaValidation
public class GRPSoapServiceImpl implements GRPSoapService {
static {
File log4j2File = new File("I:\\GRPSoapService\\log4j2.xml");
System.setProperty("log4j2.configurationFile", log4j2File.toURI().toString());
System.setProperty("jaxb.debug", "true");
}
public static final Logger ProcessAlivelogger = LogManager.getLogger("de.skoda.grp.ProcessAlive");
public static final Logger SyncUserlogger =LogManager.getLogger("de.skoda.grp.SyncUSer");
public static String messageID;
@Resource
private WebServiceContext wsContext;
@Override
public SyncUserResponseType SyncUser(SyncUserType syncUser) throws FaultType {
SyncUserlogger.debug(messageID + ": SyncUser started " + syncUser) ;
// logging
String loggingInfo = "";
UserType user = syncUser.getUser();
}
syncUser对象ist始终为空