none
Error : Receive location "" for metadata not found. RRS feed

  • Question

  • As mentioned in my previous forum here I followed the steps.

    While creating the WCF Service I choose metadata only endpoint and proceeded next without giving the receive location.

    And didnot select the Add Service Bus Endpoint. Selected Publish schema as web service. Then in the next step

    Gave the Target namespace of the WCF service as Document Schema name space. Then the location as http://localhost/ELIMS/ELIMSServices-CGA and then choose Anonymous access

    It generated

    <?xml version="1.0" encoding="utf-16"?> <BtsServiceDescription xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Name="BizTalkWcfService" TargetNamespace="http://ELIMS_Services.ELIMS_REST_CGA_Schema" xmlns="http://schemas.microsoft.com/BizTalk/2006/01/Adapters/WCF/Publishing">  <Description /> <MessageType Name="ELIMS_Services.ELIMS_REST_CGA_Schema#Root" FileName=".\ELIMS_Services.ELIMS_REST_CGA_Schema.xsd" AssemblyLocation="C:\Windows\Microsoft.Net\assembly\GAC_MSIL\ELIMS-Services\v4.0_1.0.0.0__4a52b61e00b6f8f3\ELIMS-Services.dll" AssemblyName="ELIMS-Services, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4a52b61e00b6f8f3" TypeName="ELIMS_Services.ELIMS_REST_CGA_Schema" TargetNamespace="http://ELIMS_Services.ELIMS_REST_CGA_Schema" RootName="Root">  <Description>ELIMS_Services.ELIMS_REST_CGA_Schema, ELIMS-Services, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4a52b61e00b6f8f3 </Description>  </MessageType>  <MessageType Name="Microsoft.XLANGs.BaseTypes.Any#Root" FileName=".\Microsoft.XLANGs.BaseTypes.Any.xsd" AssemblyLocation="C:\Windows\assembly\GAC_MSIL\Microsoft.XLANGs.BaseTypes\3.0.1.0__31bf3856ad364e35\Microsoft.XLANGs.BaseTypes.dll" AssemblyName="Microsoft.XLANGs.BaseTypes, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" TypeName="Microsoft.XLANGs.BaseTypes.Any" TargetNamespace="http://schemas.microsoft.com/BizTalk/2003/Any" RootName="Root"> 

      <Description>Microsoft.XLANGs.BaseTypes.Any, Microsoft.XLANGs.BaseTypes, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 </Description>  </MessageType>  <Service Name="Service1">     <PortType Name="Service1">      <Operation Name="ELIMSServices" MethodName="ELIMSServices">        <Input Name="Request" MessageType="ELIMS_Services.ELIMS_REST_CGA_Schema#Root" />        <Output Name="Response" MessageType="Microsoft.XLANGs.BaseTypes.Any#Root" />      </Operation>    </PortType>  </Service> </BtsServiceDescription>

    After I set up all the Receive port and the send port configuration. I am getting the below error if I call the http://localhost/ELIMS/ELIMSServices-CGA/Service1.svc

    WebHost failed to process a request.
     Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/4032828
     Exception: System.ServiceModel.ServiceActivationException: The service '/ELIMS/ELIMSServices-CGA/Service1.svc' cannot be activated due to an exception during compilation.  The exception message is: Receive location "" for metadata not found. (Check receive location mapping in Web.config and verify the receive location exists.). ---> Microsoft.BizTalk.Adapter.Wcf.AdapterException: Receive location "" for metadata not found. (Check receive location mapping in Web.config and verify the receive location exists.)

    What have I done wrong I followed the sample and tried to do it. But still getting this error. Can anybody please point me in the right direction.



    • Edited by vdha Friday, October 2, 2015 4:48 AM
    Friday, October 2, 2015 2:22 AM

Answers

All replies

  • Please do help me out with this.

    I see in the webconfig

    <receiveLocationMappings>
    <!--add markupFileName="*.svc" receiveLocationName="?" publicBaseAddress="protocol://host[:port]" /-->
     <add markupFileName="Service1.svc" receiveLocationName="" publicBaseAddress="http://localhost/" />
    </receiveLocationMappings>

    Do I need to edit the cofig file to have the ReceiveLocation I manually created "ELIMS.Services_CGA-ReceivePort". Because I didnt give anything below

    And moved to the next step and manually created the receiveport. Should I give the receive port name in the wizard or I can edit the web config file??

    • Edited by vdha Friday, October 2, 2015 3:06 AM
    Friday, October 2, 2015 2:59 AM
  • Guys please do help me with this.What does the below error mean

    WebHost failed to process a request.
     Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/4032828
     Exception: System.ServiceModel.ServiceActivationException: The service '/ELIMS/ELIMSServices-CGA/Service1.svc' cannot be activated due to an exception during compilation.  The exception message is: Receive location "" for metadata not found. (Check receive location mapping in Web.config and verify the receive location exists.). ---> Microsoft.BizTalk.Adapter.Wcf.AdapterException: Receive location "" for metadata not found. (Check receive location mapping in Web.config and verify the receive location exists.)

    Do I need to create the REST WCF service by just selecting the service endpoints (WebHttp) without choosing the Metadata only.

    Friday, October 2, 2015 12:09 PM
  • Vdha,

    This error indicates that a published isolated WCF receive location could not find the corresponding receive location, take a look at this article How to Use BizTalk Wizard to publish Service Metadata for WCF Rcv Location, if you haven't already done so. There is a note which says the following:

    You must build your BizTalk projects before running the BizTalk WCF Service Publishing Wizard. The BizTalk projects must include schemas to publish as WCF services. Before you publish service metadata for the WCF adapters, you must also create the WCF receive locations by using the BizTalk Server Administration console or the BTSTask command-line tool included with BizTalk Server. For more information about how to create a WCF receive location, see the appropriate topic for each WCF adapter in WCF Adapters.

    On the WCF Service Type page, select the Metdata only endpoint (MEX) option to publish the WCF services to provide service metadata for the WCF receive location that you will select in the next step.


    Thanks, If my reply is helpful please mark as answer or vote as helpful.

    Friday, October 2, 2015 12:36 PM
    Moderator
  • Thanks  a lot Kamlesh. Before creating the service do I need to create the Receive location?? So the Receive location (Request-Response) will have all the configuration set up before??

    Like the URI , HTTP Method, Variable Mapping?? Because the webservice URI will exist only after we create the rweb service right??

    Friday, October 2, 2015 12:45 PM
  • You must build your BizTalk projects before running the BizTalk WCF Service Publishing Wizard. The BizTalk projects must include schemas to publish as WCF services. Before you publish service metadata for the WCF adapters, you must also create the WCF receive locations by using the BizTalk Server Administration console or the BTSTask command-line tool included with BizTalk Server. For more information about how to create a WCF receive location, see the appropriate topic for each WCF adapter in WCF Adapters.

    Yes vdha, you need to create WCF receive location before running the BizTalk WCF Service wizard.

    Thanks, If my reply is helpful please mark as answer or vote as helpful.

    Friday, October 2, 2015 12:56 PM
    Moderator
  • I am getting an error. I deployed the BizTalk application. I created a receive port and receive location with WCF-WebHttp adapter gave some URI like /XYZ_CGA_Service/Service1.svc and then used the wizard to create the service. After the web service is created

    Next I configured the Receive Location. But still I get the error

    [InvalidOperationException: Unexpected adapter name "WCF-WebHttp".]

    [ServiceActivationException: The service '/XYZ_CGA_RESTService/Service1.svc' cannot be activated due to an exception during compilation.  The exception message is: Unexpected adapter name "WCF-WebHttp"..]

    WCF Service Summary has this line

      <AdapterSettings AdapterName="" />

    Is there something to do with this error. But I dont have any place to give the adapter name here.

    I changed the WcfServiceDescription.xml file in C:\inetpub\wwwroot\XYZ_CGA_RESTService\App_Data\Temp

     <AdapterSettings AdapterName="WCF-WebHttp" /> saved and again called the service in browser. But still getting the same error. Guys please help me.Any help is greatly appreciated.



    • Edited by vdha Friday, October 2, 2015 2:15 PM
    Friday, October 2, 2015 1:44 PM
  • Why are you using WCF-webHttp adapter on receive location and have you installed Line of business adapter from BT installation setup ?

    I would suggest please have a look into below articles and some videos,

    REST (WCF-WebHttp) adapter in BizTalk Server 2010 R2

    BizTalk Server 2013: New Adapters Series: WCF-WebHttp

    https://www.youtube.com/watch?v=VFekXaKYJxw

    Invoking REST Services with BizTalk 2010


    Thanks, If my reply is helpful please mark as answer or vote as helpful.

    Friday, October 2, 2015 2:46 PM
    Moderator
  • The adapters are installed

    Friday, October 2, 2015 3:14 PM
  • Please verify have you added operation name under HTTP Method and URL Mapping

    Click on configuration. Under "HTTP Method and URL Mapping" you need to add POST and GET method and the URL.


    Thanks, If my reply is helpful please mark as answer or vote as helpful.


    Friday, October 2, 2015 3:39 PM
    Moderator
  • I have given that. While creating the Service I specified the Operation as ELIMSServices

    So the HTTP Method looks like below

    <BtsHttpUrlMapping>

    <Operation Name="ELIMSServices" Method="GET" Url="/ELIMSServices?STARLIMSuser={STARLIMSuser}&amp;STARLIMSpass={STARLIMSpass}&amp;specimenid={specimenid}" />

    </BtsHttpUrlMapping>

    And Variable mapping as

    Is that correct??

    Friday, October 2, 2015 3:47 PM