This discussion is archived
6 Replies Latest reply: Sep 25, 2013 10:37 AM by MikeK_ RSS

Web service issue

MikeK_ Newbie
Currently Being Moderated

Greetings,

 

We recently changed our secuirty to ADFS on some of our servers.  Unfortunately, now our PLM web services are not working on those servers.   The following is the error message I am getting in Visual Studio when I attempt to configure a service reference for our web servic client.

 

---------------------------
The HTML document does not contain Web service discovery information.

Metadata contains a reference that cannot be resolved: 'https://99.999.9.999/Integration/Contracts/Prodika/Nutrition/v25/NutritionService.svc

The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Negotiate,NTLM'.

The remote server returned an error: (401) Unauthorized.
---------------------------

 

Any thoughts on this?  Do I need to change the prodika API config settings somwhere?

 

Thanks!

  • 1. Re: Web service issue
    Ron M Pro
    Currently Being Moderated

    It looks like you are referencing the wrong URL.

    you should be using

    https://<servername>/Integration/ProdikaContracts/....

    and not:

    https://<servername>/Integration/Contracts/Prodika/....

     

    ProdikaContracts is the name of the virtual directory that should have been configured in the Integration web application. It points to the directory Contracts\Prodika, but the virtual directory name is ProdikaContracts.

     

    Let me know if that addresses the issue, or if you have other questions.

     

    Thanks,

    Ron

  • 2. Re: Web service issue
    MikeK_ Newbie
    Currently Being Moderated

    Hi Ron, thanks for the response.  Unfortunately,  using the virutal directory  https://<servername>/Integration/ProdikaContracts/....   gives the same error.  So I have temporarily excluded the service from security, and now I get the following error:

     

    Configuration Error

    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

    Parser Error Message: There is no service behavior named 'serviceBehavior'.

    Source Error:

     

    Line 2:    <system.serviceModel>  Line 3:      <services>  Line 4: <service behaviorConfiguration="serviceBehavior" name="Xeno.Prodika.ProdikaAPI.GSM.Nutrition.Services.v21.NutritionService">  Line 5:          <endpoint binding="basicHttpBinding" contract="Xeno.Prodika.ProdikaAPI.GSM.Nutrition.Services.v21.INutritionService" />  Line 6:          <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />


    Source File: E:\PRODIKA_HOME\Web\Integration\Contracts\Prodika\web.config Line: 4

     

    Thoughts on this one?


    Thanks

  • 3. Re: Web service issue
    Ron M Pro
    Currently Being Moderated

    There may be several different issues. Unfortunately, I don't have experience around AD FS and its impact.


    • In your error message, I see the following https://99.999.9.999/ . But, are you using an IP address or the server name to target the web service endpoint? This could be one issue.
    • If you are using https, the WCF Mex endpoint needs to also be exposed over https. Here is an example for the v30 GeneralSpecServices endpoint, found in web\Integration\Contracts\Prodika\web.config:


    <service behaviorConfiguration="serviceBehavior" name="Xeno.Prodika.ProdikaAPI.GSM.Common.Services.v30.GeneralSpecServices">
            <!--<endpoint binding="basicHttpBinding" contract="Xeno.Prodika.ProdikaAPI.GSM.Common.Services.v30.IGeneralSpecServices" />-->
      <!--<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />-->
            <endpoint binding="wsHttpBinding" bindingConfiguration="prodikaAPIBinding" contract="Xeno.Prodika.ProdikaAPI.GSM.Common.Services.v30.IGeneralSpecServices" />
            <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />   
    </service>
    
    


    I see that you just disabled the security and are getting some configuration error. The serviceBehavior behavior is defined in the Integration\web.config, and then referenced by each web service in web\Integration\Contracts\Prodika\web.config. Did you comment out that service behavior in Integration\web.config? It should still be there.

    If you are using SSL, then you should have a node that looks like:


    <system.serviceModel>
       <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
      <behaviors>
      <serviceBehaviors>
      <behavior name="serviceBehavior">
      <serviceDebug includeExceptionDetailInFaults="true"/>
      <serviceMetadata httpGetEnabled="false" httpsGetEnabled="true"/>
      <serviceCredentials>
      <serviceCertificate findValue="RMILNER-PC.oradev.oraclecorp.com" storeLocation="LocalMachine" x509FindType="FindBySubjectName" storeName="My"/>
      <userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="WCFPlatformExtensions.WCFProdikaUserNamePasswordValidator, ProdikaAPILib"/>
      </serviceCredentials>
      </behavior>
      </serviceBehaviors>
      </behaviors>
    ...
    
    

     

    Message was edited by: RonM

  • 4. Re: Web service issue
    MikeK_ Newbie
    Currently Being Moderated

      In our  <PLM4P-install-folder>\Integration\Web.config  file we don't have any tags like that.  Is there a certain node I should put the <system.serviceModel> within?

  • 5. Re: Web service issue
    Ron M Pro
    Currently Being Moderated

    The default PLM4P installation does not, but the Extensibility Pack's web services install files do. You should copy the Extensibility Pack's \web\Integration folder over, including the web.config

  • 6. Re: Web service issue
    MikeK_ Newbie
    Currently Being Moderated

    Am I replacing  <PLM4P-install-folder>\Integration\  or <PLM4P-install-folder>\web\Integration\

     

    EDIT: Nevermind, it is web\integration.

     

    I simply compied over the web.config and it's working now.  Thanks Ron!

     

     

     

     

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points