I need help with choosing an approach and take certain actions based on that help or advise if I can get it.
I am given a URL to a wsdl If I generate stubs, I am using the functionality of that webservice I generate stubbs 3 different ways - (some redundant) - Eclipse - Ant commands (creates the same structure as with an eclipse) - using maven
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
maven creates a slightly different API, but - all workable.
Now, I am given a URL, that I am also generating an API, and able to make a call, however, get an error back - error is system specific. It means, I do have communication with the webservice functionality.
So, the owners of webservice send me the sample code - they are using SOAP Messages to talk to the webservice. And it works fine.
// Create SOAP Connection
SOAPConnectionFactory soapConnectionFactory = null;
SOAPConnection soapConnection = null;
soapConnectionFactory = SOAPConnectionFactory.newInstance();
soapConnection = soapConnectionFactory.createConnection();
System.setProperty("https.protocols",
"TLSv1,TLSv1.1,TLSv1.2");
System.setProperty("java.net.useSystemProxies", "true");
String url = "https://someUrl?wsdl";
SOAPMessage soapResponse =
soapConnection.call(createSOAPRequest(), url);
// Process the SOAP Response
try {
String op = printSOAPResponse(soapResponse);
System.out.println("Res" +op);
} catch (Exception e) {
e.printStackTrace();
}
I know that this is not very reliable and easy way of working with webservices. So, should I force, the webservice owners to do something, to fix the issue, or is there something I am not adding in my stubs, .. or whatever else can go wrong here ?
What is the general advise you could give ?
Thanks