Happy Business Starts Here

New Student

Connection reset for apisandbox

Hi,

 

I'm using SoapUI to play around with the Zuora REST API. In particular, I'm trying to make this call:

 

https://apisandbox-api.zuora.com/rest/v1/catalog/products

 

I'm not getting any response and the SoapUI log says:

 

Wed Jun 22 17:23:30 EDT 2016Smiley Very HappyEBUG:Attempt 1 to execute request
Wed Jun 22 17:23:30 EDT 2016Smiley Very HappyEBUGSmiley Frustratedending request: GET /rest/v1/catalog/products HTTP/1.1
Wed Jun 22 17:23:30 EDT 2016Smiley Very HappyEBUG:I/O error closing connection
javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: java.net.SocketException: Connection reset
at sun.security.ssl.SSLSocketImpl.checkEOF(SSLSocketImpl.java:1476)
at sun.security.ssl.SSLSocketImpl.checkWrite(SSLSocketImpl.java:1488)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:70)

 

This exact same call does work for the production environment, though:

 

https://api.zuora.com/rest/v1/catalog/products

 

For completeness sake: an API user has been created and confirmed on both environments, the API role has been assigned on both environments and I pass on the "apiAccessKeyId", "apiSecretAccessKey" and "Content-Type" headers with the correct values. Even if I send incorrect values, the production environment responds nicely with JSON telling me to sign in first; no closed connection stack trace...

 

How can I make REST calls to the sandbox?

 

Regards,

 

Patrick

 

Tags (3)
3 REPLIES 3
Support SME

Re: Connection reset for apisandbox

Hi @patricka,

 

This seems to be related to the TLS 1.0 being deprecated in the Sandbox environment.

 

Please have a look at the following post, which discusses these changes, as well as how you can get your SoapUI to work correctly:

 

http://community.zuora.com/t5/Zuora-Announcements/Action-Required-Zuora-is-Disabling-TLS-1-0/bc-p/81...

 

Please let me know if that helps.






If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

Tags (3)
New Student

Re: Connection reset for apisandbox

Nope, making the JAVA_OPTS TLS changes to soap-ui.sh did not help.

 

However, I managed to make a connection to the sandbox with this PHP code:

 

$HOSTNAME = "apisandbox-api.zuora.com";
$USERNAME = "xxxxxxxxxx";
$PASSWORD = "yyyyyyyyyy";

$url = "https://" . $HOSTNAME . "/rest/v1/catalog/products";

$request = curl_init();
curl_setopt($request, CURLOPT_URL, $url);

$headers = array();
$headers[] = "apiAccessKeyId: " . $USERNAME;
$headers[] = "apiSecretAccessKey: " . $PASSWORD;
$headers[] = "Content-Type: application/json";

curl_setopt($request, CURLOPT_HTTPHEADER, $headers);
curl_setopt($request, CURLOPT_SSLVERSION, 6);
curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
$json = curl_exec($request);
curl_close($request);

 

This allows me to work around using SoapUI, so it solves the problem for me.

Thanks for your assistance!

Highlighted
Master

Re: Connection reset for apisandbox

I don't know what the problem was with SOAPUI, but I do know that as a new Zuora technical user, I found https://www.charlesproxy.com/ to be an invaluable tool for understanding why various tools and scripts would not connect for me.

 

 

“All working SOAP tools are alike; each non-working SOAP tool is unhappy in its own way” (but "connection reset" is not too informative).

—Leo Tolstoy