rmiller

How to access Service Desk web services in .NET (C#)

Discussion created by rmiller on Jan 20, 2012
Latest reply on Oct 30, 2012 by TMACUL

I am new to ServiceDesk and have been asked to write code that accesses the Service Desk web services in C#. I have the document on the Service Desk web services API and I have the wsdl location on our network. I suspect that the binding in the app.config is not being generated correctly by vs2008.

 

Here is the error I receive:

An error occurred while making the HTTP request to http://service.***.com:8080/servicedesk/webservices/Incident.IncidentHttpSoap11Endpoint/. This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security binding between the client and the server.

 

Notice the end of the endpoint? "Incident dot IncidentHttpSoap11Endpoint/" 

 

Also, the wsdl shows as:

<wsdl:service name="Incident">
<wsdl:smileytongue:ort name="IncidentHttpSoap11Endpoint" binding="ns:IncidentSoap11Binding">
  <soap:address location="http://service.***.com:8080/servicedesk/webservices/Incident.IncidentHttpSoap11Endpoint/" />
  </wsdl:smileytongue:ort>
<wsdl:smileytongue:ort name="IncidentHttpSoap12Endpoint" binding="ns:IncidentSoap12Binding">
  <soap12:address location="http://service.***.com:8080/servicedesk/webservices/Incident.IncidentHttpSoap12Endpoint/" />
  </wsdl:smileytongue:ort>
<wsdl:smileytongue:ort name="IncidentHttpEndpoint" binding="ns:IncidentHttpBinding">
  <http:address location="http://service.***.com:8080/servicedesk/webservices/Incident.IncidentHttpEndpoint/" />
  </wsdl:smileytongue:ort>
  </wsdl:service>

 

The generated binding is:

<

bindingname="IncidentSoap11Binding"closeTimeout="00:01:00"openTimeout="00:01:00"receiveTimeout="00:10:00"sendTimeout="00:01:00"allowCookies="false"bypassProxyOnLocal="false"hostNameComparisonMode="StrongWildcard"maxBufferSize="65536"maxBufferPoolSize="524288"maxReceivedMessageSize="65536"messageEncoding="Text"textEncoding="utf-8"transferMode="Buffered"useDefaultWebProxy="true">

<

readerQuotasmaxDepth="32"maxStringContentLength="8192"maxArrayLength="16384"maxBytesPerRead="4096"maxNameTableCharCount="16384"/>

<

securitymode="None">

<

transportclientCredentialType="None"proxyCredentialType="None"realm=""/>

<

messageclientCredentialType="UserName"algorithmSuite="Default"/>

</

security>

</

binding>

 

Any thoughts?

 

Thank you,

Ron

Outcomes