Web Services 找不到[SaajSoapMessage {http://com.springbootsoap.allapis}添加产品请求]的终结点Map

q9rjltbz  于 2023-01-13  发布在  Spring
关注(0)|答案(1)|浏览(145)
I have been having issues trying to get endpoint mapping to work for my web service. I am using Tomcat to host my web service and I am using soapUI to send test messages to it.

终点

@Endpoint
public class ProductEndpoint {
    
    private static final String NAMESPACE_URL="http://com.springbootsoap.allapis";
    
    @Autowired
    ProductService productService;
    
    @PayloadRoot(namespace = NAMESPACE_URL, localPart = "addProductRequest")
    @ResponsePayload
    public AddProductResponse addProduct(@RequestPayload AddProductRequest request) {
        
        AddProductResponse response= new AddProductResponse();
        ServiceStatus servicestatus=new ServiceStatus();
        
        Product product=new Product();
        
        BeanUtils.copyProperties(request.getProductInfo(),product);
        productService.addProduct(product);
        servicestatus.setStatus("Success");
        servicestatus.setMessage("Content Added Successfully");
        response.setServiceStatus(servicestatus);
        return response;
    }
    @PayloadRoot(namespace = NAMESPACE_URL, localPart = "getProductByIdRequest")
    @ResponsePayload
    public GetProductResponse GetProduct(@RequestPayload GetProductByIdRequest request) {
        GetProductResponse response=new GetProductResponse();
        ProductInfo productInfo=new ProductInfo();
        BeanUtils.copyProperties(productService.getProductById(request.getProductId()),productInfo);
        response.setProductInfo(productInfo);
        
        return response;
        
    }
}

肥皂用户界面

enter image description here
这是我在肥皂剧里看到
我不知道我应该做些什么才能使它正确,我看到了许多关于这个问题的问题,但没有找到任何解决方案。

sh7euo9m

sh7euo9m1#

我也有同样的问题,当时我把pom.xml文件中的java版本改成了1.8

相关问题