-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTPS Endpoints #34
Comments
Ever figure this out? I am having the same issue. Full stack trace:
|
Same issue here! Would be great if somebody could post a workaround or fix... |
UPDATE: When I add a port to the URI passed in the builder, I get the following exception:
Can you check if this is also the case in your situation? Then I can determine if it is the server's fault. |
Well, for me, the fix was just to add port 443 to the url, though I know in some, or maybe most, cases that won't work as in the OP's and your cases. I think a workaround, if you wanted to internalize the code until a fix is made is to hardcode the port here:
and/or here
What happens is the port ends up being null in those cases. Or perhaps a check here if port is null than set port to 443 or something?
|
I just set the URI port like it is done here: http://stackoverflow.com/questions/6490014/modifying-the-port-of-a-uri . So it should find 443 and I think it does. So hardcoding is not the solution here. Could it be that the SOAP Server doesn't allow connections on this port (which would be very weird)? |
Hello,
I am using your jar to create dinamic ws client in java. You have done a good job with this .jar
All was going good until I have to connect with https endpoint.
This is my example code:
String wsdl="https://des-gesat.redsara.es/ws/catalog/services/call/carpetaciudadana?wsdl";
String bindingName = "WS_Services_CarpetaciudadanaBinding";
String operationName = "consultaExpedientes";
String endpointUrl="https://des-gesat.redsara.es/ws/catalog/services/call/carpetaciudadana";
String request="soapenv:Envelope... my request ....</soapenv:Envelope>";
int timeout=1000;
// WSDL
final Wsdl wsdl = Wsdl.parse(wsdl);
// CLIENT
final SoapBuilder soapBuilder = wsdl.binding().localPart(bindingName).find();
final SoapOperation operation = soapBuilder.operation().name(operationName).find();
final Builder builder = SoapClient.builder();
builder.connectTimeoutInMillis(timeout);
URI endpointURI = new URI(endpointUrl);
builder.endpointUri(endpointURI);
final SoapClient client = builder.build();
// RESPONSE
final String response = client.post(operation.getSoapAction(), request);
In this case, at line
final SoapClient client = builder.build() throws this exception:
java.lang.IllegalArgumentException: Port is invalid: -1
If I use the following endpoint url it works but the server dont listen prorperly to the url.
endpointUrl="https://des-gesat.redsara.es:443/ws/catalog/services/call/carpetaciudadana";
How can I use https endpoint without including the port in the url?
Thank you so much. Im looking forward your answer.
The text was updated successfully, but these errors were encountered: