Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

What is "WebException: The request failed with HTTP status 502: Proxy Error."

Confluence SoapAPI Throws "WebException: The request failed with HTTP status 502: Proxy Error." exception while calling GetAttachmentData() method.

I was trying to get attachments of a wikipage. It was working fine for some attachments but after some moment it gave particualr exception.

WebException: The request failed with HTTP status 502: Proxy Error.
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at ConfluenceAPIWebsServiceVersion2.ConfluenceSoapServiceService.getAttachmentData(String in0, Int64 in1, String in2, Int32 in3)
at APIService.ConfluenceService.GetAttachmentData(Int64 id, String attachmentName, Int32 doc

It was the first exception in the loop.
After then for every remaining attachment call it throws

WebException: The request failed with HTTP status 503: Service Temporarily Unavailable.
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at Tzunami.Common.EcmConfluenceExporter.ConfluenceAPIWebsServiceVersion2.ConfluenceSoapServiceService.getAttachmentData(String in0, Int64 in1, String in2, Int32 in3)

Please help me on what is the cause and resolution for this issue

1 answer

Hi Gopal,

I don't have experience personally with the SOAP API as Atlassian depreciated SOAP some time ago and has been trying to get everyone to switch over to REST. While SOAP still works (but is depreciated), it soon will be removed from Confluence. I'd suggest switching over to the REST API. This will hopefully get you past the error, but will make it easier for the community to troubleshoot even if you still see errors.

More information about the REST API: https://developer.atlassian.com/confdev/confluence-server-rest-api

Getting attachments: https://docs.atlassian.com/confluence/REST/latest-server/#content/{id}/child/attachment-getAttachments

Sample API call using curl: https://developer.atlassian.com/confdev/confluence-server-rest-api/confluence-rest-api-examples

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Confluence Cloud

Please tell us how you use Confluence space settings

Hi there, a few of us at Atlassian would love to learn about how you use "space settings" functionality in Confluence. A facelift to the space settings is long overdue and we want to start with impro...

264 views 8 7
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you