Background
The webservice service is used for interface communication in the project. In the specific application, the caller does not access the service directly, but forwards the request through a proxy to achieve access.
Problem
The client code generated by using apache axis1.4 tool to invoke the service can be accessed normally; the client code generated by using apache cxf tool reports an error: 2 counts of InaccessibleWSDLException.
Reason
The client code of axis is written with service name, port type and other information fixed in the generated code, while the client code of cxf is parsed by GET to get the wsdl file and bind service name and port name and other information before calling the interface.
In the project, because the proxy redirection interface address is used, the wsdl file cannot be directly obtained through GET for parsing, so an error is reported.
Solution:
- a. Store the wsdl file locally, read the local wsdl file in the client, and fill in the address of the actual interface in the soap address label in the wsdl file
<service name="xxxService">
<port binding="xxxSOAPBinding" name="xxxSOAPPort">
<soap:address location="http://yourActualAddress/xxxService"/>
</port>
</service>
- b. Change the calling code to skip the step of getting the wsdl.
xxxService ss = new xxxService(null, SERVICE_NAME);
XXXServicePortType port = ss.getPort(xxxServicePortType.class);
BindingProvider bindingProvider = (BindingProvider) port;
bindingProvider.getRequestContext()
.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
"http://www.example.com/real_endpoint_url_goes_here");
Response res = port.yourMethods(...);
Read More:
- [Solved] @webservice Error: org.apache.cxf.common.i18n.UncheckedException: No operation was found with
- [vite] http proxy error: Error: self signed certificate in certificate chain vite
- The reason and solution for the error ECONNRESET of the httpClieint request of Node.js
- Tomcat: “localhost:8080” Error 401: Unauthorized
- Encapsulation SDK Call Error: runtime error [How to Solve]
- Filezilla Error: You appear to be behind a NAT router. Please configure the passive mode settings and …
- Nacos Error: server is DOWN now, please try again later! [How to Solve]
- Support for password authentication was removed on August 13, 2021
- C++ Opencv+BaiDu OCR“error“: “unsupported_grant_type“, “error_description“: “The authorization grant
- [Solved] rabbitMQ: factory.newConnection() Error: com.rabbitmq.client.ShutdownSignalException
- DB::Exception: test: Authentication failed: [How to Solve]
- [Solved] Parcel Service Error: regeneratorRuntime is not defined
- How to Fix TNS 12560 Error
- [Solved] webService Error: webservice Interface call error reported.
- XAMPP Error: Apache shutdown unexpectedly.This may be due to a blocked port, missing dependencies…
- [Solved] MinIO Start Error: “WARNING: Console endpoint is listening on a dynamic port…”
- [Nginx] Configure nginx to support websocket to solve the problem of returning 400 error
- [Solved] LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
- [Solved] MetaStoreClient lost connection. Attempting to reconnect (1 of 1) after 1s. getCurrentNotificatio