none
schemaLocation problem while publishing schema through WCF Web Publishing Wizard RRS feed

  • Question

  • I'm using BizTalk WCF Web Service Publishing to publish schemas (that import external schema in the same physcial location) as web service.

    But the URL of the external schema includes the server name that cannot be resolved by the client (the client may not inside the same network), as following. 

    <xsd:schema targetNamespace="http://ln.cmcc.com/Imports">
    
     <xsd:import schemaLocation="http://win2k3sql2008.mosslab.com:80/InquiryContractService/InquiryContractService.svc?xsd=xsd2" namespace="http://LNLabs.MsgHeader" /> 
    
     <xsd:import schemaLocation="http://win2k3sql2008.mosslab.com:80/InquiryContractService/InquiryContractService.svc?xsd=xsd3" namespace="http://LNLabs.InquiryContract" /> 
    
     </xsd:schema>
    
    

     Is it possible to remove the server name and let it as:

    <xsd:schema targetNamespace="http://ln.cmcc.com/Imports">
    
     <xsd:import schemaLocation="/InquiryContractService/InquiryContractService.svc?xsd=xsd2" namespace="http://LNLabs.MsgHeader" /> 
    
     <xsd:import schemaLocation="/InquiryContractService/InquiryContractService.svc?xsd=xsd3" namespace="http://LNLabs.InquiryContract" /> 
    
     </xsd:schema>
    
    
    or like this:
    
    
     <xsd:schema targetNamespace="http://ln.cmcc.com/Imports">
    
     <xsd:import schemaLocation="MsgHeader.xsd" namespace="http://LNLabs.MsgHeader" /> 
    
     <xsd:import schemaLocation="InquiryContractService.xsd" namespace="http://LNLabs.InquiryContract" /> 
    
     </xsd:schema>
    
    Here is the complete schema definition:
    
    
    <?xml version="1.0" encoding="utf-16"?>
    
    <xs:schema xmlns:ns0="http://LNLabs.MsgHeader" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns="http://LNLabs.InquiryContract" targetNamespace="http://LNLabs.InquiryContract" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    
     <xs:import schemaLocation=".\msgheader.xsd" namespace="http://LNLabs.MsgHeader" />
    
     <xs:annotation>
    
     <xs:appinfo>
    
      <b:references>
    
      <b:reference targetNamespace="http://LNLabs.MsgHeader" />
    
      </b:references>
    
     </xs:appinfo>
    
     </xs:annotation>
    
     <xs:element name="InquiryContractRequest">
    
     <xs:complexType>
    
      <xs:sequence>
    
      <xs:element name="MsgHeader" type="ns0:MsgHeader" />
    
      <xs:element name="ContractNo" type="xs:string" />
    
      </xs:sequence>
    
     </xs:complexType>
    
     </xs:element>
    
     <xs:element name="InquiryContractResponse">
    
     <xs:complexType>
    
      <xs:sequence>
    
      <xs:element name="ErrorFlag" type="xs:string" />
    
      <xs:element name="ErrorCode" type="xs:string" />
    
      </xs:sequence>
    
     </xs:complexType>
    
     </xs:element>
    
    </xs:schema>
    
    
    Tuesday, June 8, 2010 8:21 AM

All replies