URL WSDL для Сервиса WCF (basicHttpBinding) размещенный в службе Windows

Вы можете сгенерировать случайный азимут в диапазоне 0..360 и случайное расстояние с sqrt-распределением, чтобы обеспечить равномерное распределение

d = maxR * Sqrt(random(0..1))
theta = random(0..1) * 2 * Pi

Затем получить координаты геопозиции, используя азимут и расстояние, как описано здесь [113 ] (Destination point given distance and bearing from start point)

φ2 = asin( sin φ1 ⋅ cos δ + cos φ1 ⋅ sin δ ⋅ cos θ )
λ2 = λ1 + atan2( sin θ ⋅ sin δ ⋅ cos φ1, cos δ − sin φ1 ⋅ sin φ2 )

where   φ is latitude, λ is longitude, θ is the bearing
(clockwise from north), δ is the angular distance d/R; 
d being the distance travelled, R the earth’s radius

12
задан Andrei Rînea 3 October 2008 в 17:04
поделиться

2 ответа

Это могло бы помочь:

http://msdn.microsoft.com/en-us/library/ms734765.aspx

Вкратце необходимо настроить сервисные конечные точки и поведение. Вот минимальный пример:

<system.serviceModel>
  <services>

    <service 
      <!-- Namespace.ServiceClass implementation -->
      name="WcfService1.Service1" 

      <!-- User behaviour defined below -->
      behaviorConfiguration="SimpleServiceBehaviour"> 

      <endpoint 
        address="" 
        binding="basicHttpBinding"
        <!-- Namespace.Interface that defines our service contract -->
        contract="WcfService1.IService1"/>

    </service>
  </services>
  <behaviors>
    <serviceBehaviors>
      <behavior name="SimpleServiceBehaviour">

        <serviceMetadata 
          <!-- We allow HTTP GET -->
          httpGetEnabled="true" 

          <!-- Conform to WS-Policy 1.5 when generating metadata -->
          policyVersion="Policy15"/>

      </behavior>
    </serviceBehaviors>
  </behaviors>
</system.serviceModel>

Не забывайте удалять XML-комментарии, поскольку они недопустимы, где они.

9
ответ дан 2 December 2019 в 22:23
поделиться

См. эту ссылку:

Представление сервиса WCF с несколькими привязкой и конечными точками

Unlike previous ASMX services, the WSDL (web service definition language) for WCF 
services is not automatically generated.  The previous image even tells us that 
"Metadata publishing for this service is currently disabled.".  
This is because we haven't configured our service to expose any meta data about it. 
 To expose a WSDL for a service we need to configure our service to provide meta information.  Note:  
The mexHttpBinding is also used to share meta information about a service.  While 
the name isn't very "gump" it stands for Meta Data Exchange.
1
ответ дан 2 December 2019 в 22:23
поделиться
Другие вопросы по тегам:

Похожие вопросы: