WSP0075: Policy assertion “TransportBinding” was evaluated as “UNKNOWN”. Why?

后端 未结 4 1751
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-19 00:27

I am a client to a SOAP service I do not control (implemented in .NET). The service provides a WSDL. I use Apache CXF to generate the java client from the WSDL (specifically, I

4条回答
  •  旧巷少年郎
    2021-02-19 01:33

    I found that these errors are being logged BEFORE the SOAP request is even sent.

    The warnings did not appear in Java 6. They do appear in Java 7 and Java 8. My hunch is that these warnings are related to the legacy jaxrpc.jar in my source code.

    My "hack" work-around was to download a copy of the WSDL file and modify the policy section. Then point the main class in my web-service to this modified WSDL file.

    //Modified tags in my main class. Change the wsdlLocation to point to a file in my source code (instead of a URL)
    @WebServiceClient(name = "Service1", targetNamespace = "https://example.org/", wsdlLocation = "WebService.wsdl")
    public class Service1
    ...
    

    Modified WebService.wsdl file:

    
        
    
    

提交回复
热议问题