我使用来自WSDL的CXF生成Web Service,并将其部署在包含WSDL的WAR文件中的weblogic上。我需要针对wsdl进行架构验证,但它不起作用。它也忽略了jaxb注释。
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.xml.bind.annotation.XmlSeeAlso;
import org.apache.cxf.annotations.SchemaValidation;
/**
* This class was generated by Apache CXF 2.7.4
*/
@WebService(targetNamespace = "http://tafnit.co.il/MyService/", name = "MyService")
@XmlSeeAlso({ObjectFactory.class})
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
@SchemaValidation
public interface MyService{
@WebResult(name = "RecordImageOut", targetNamespace = "http://tafnit.co.il/MyService/", partName = "parameters")
@WebMethod(operationName = "RecordImage", action = "http://tafnit.co.il/MyService/RecordImage")
public RecordImageOut recordImage(
@WebParam(partName = "parameters", name = "RecordImageIn", targetNamespace = "http://tafnit.co.il/MyService/")
RecordImageIn parameters
);
}
/**
* This class was generated by Apache CXF 2.7.4
*/
@javax.jws.WebService(
serviceName = "MyService",
portName = "MyServiceSOAP",
targetNamespace = "http://tafnit.co.il/MyServiceService/",
wsdlLocation = "file:/D:/TafnitWS/Dev/Workspace/TafnitXml/xml/Shiba/MyService.wsdl",
endpointInterface = "il.co.tafnit.myservice.MyService")
public class MyServiceImpl implements MyService{
public RecordImageOut recordImage(RecordImageIn parameters) { ....
}
}