This project is read-only.

Import New Service Failure

Topics: Usage Scenarios, Technical Questions
Mar 5, 2008 at 11:36 PM
Edited Mar 5, 2008 at 11:37 PM
I'm trying to import a WSDL that was created using a tool other than asmx's automagic mechanism. However, I'm getting the following error when the tool gets to one of my XSDs. Since I can't debug, I have no idea where the problem is:

Failed to import schema [<?xml version="1.0" encoding="utf-16"?><xs:schema xmlns:im="http://AvidXchange.com/ImportService/v1.0" xmlns:id="http://AvidXchange.com/ImportData/v1.0" xmlns:mstns="http://AvidXchange.com/ImportService/v1.0" xmlns="http://AvidXchange.com/ImportService/v1.0" elementFormDefault="qualified" targetNamespace="http://AvidXchange.com/ImportService/v1.0" id="ImportMessages" xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:import schemaLocation="ImportData.xsd" namespace="http://AvidXchange.com/ImportData/v1.0" /><xs:element name="Import"><xs:complexType><xs:sequence><xs:element name="ImportRequest" type="id:ImportFile" /></xs:sequence></xs:complexType></xs:element><xs:element name="Validate"><xs:complexType><xs:sequence><xs:element name="ValidateRequest" type="id:ImportFileInfo" /></xs:sequence></xs:complexType></xs:element><xs:element name="ValidateResponse"><xs:complexType><xs:sequence><xs:element name="Corrupt" type="xs:boolean" /><xs:element name="ProperlyFormatted" type="xs:boolean" /><xs:element name="Unique" type="xs:boolean" /><xs:element name="Valid" type="xs:boolean" /></xs:sequence></xs:complexType></xs:element><xs:complexType name="ImportException"><xs:sequence><xs:element name="FileName" type="xs:string" /><xs:element name="Message" type="xs:string" /></xs:sequence></xs:complexType><xs:complexType name="ImportExceptionList"><xs:sequence><xs:element minOccurs="0" maxOccurs="unbounded" name="ImportException" type="mstns:ImportException" /></xs:sequence></xs:complexType><xs:complexType name="MessageList"><xs:sequence><xs:element minOccurs="0" maxOccurs="unbounded" name="Message" type="mstns:Message" /></xs:sequence></xs:complexType><xs:complexType name="Message"><xs:sequence><xs:element name="Message" type="xs:string" /><xs:element name="Severity" type="mstns:Severity" /><xs:element name="CreatedTime" type="xs:dateTime" /></xs:sequence></xs:complexType><xs:simpleType name="Severity"><xs:restriction base="xs:string"><xs:enumeration value="Information" /><xs:enumeration value="Error" /><xs:enumeration value="Warning" /></xs:restriction></xs:simpleType><xs:element name="GetImportEntityTypeList"><xs:complexType><xs:sequence><xs:element name="AccountingSystemID" type="id:guid" /></xs:sequence></xs:complexType></xs:element><xs:element name="GetAccountingSystemList"><xs:complexType><xs:sequence /></xs:complexType></xs:element><xs:element name="GetImportEntityTypeListResponse" type="mstns:GetImportEntityTypeListResponse" /><xs:complexType name="Response"><xs:sequence><xs:element name="Successful" type="xs:boolean" /><xs:element name="Messages" type="mstns:MessageList" /></xs:sequence></xs:complexType><xs:complexType name="GetAccountingSystemListResponse"><xs:complexContent mixed="false"><xs:extension base="mstns:Response"><xs:sequence><xs:element name="AccountingSystemList" type="id:AccountingSystemList" /></xs:sequence></xs:extension></xs:complexContent></xs:complexType><xs:complexType name="GetImportEntityTypeListResponse"><xs:complexContent mixed="false"><xs:extension base="mstns:Response"><xs:sequence><xs:element name="ImportEntityTypeList" type="id:ImportEntityTypeList" /></xs:sequence></xs:extension></xs:complexContent></xs:complexType><xs:element name="ImportResponse" type="mstns:Response" /><xs:element name="GetAccountingSystemListResponse" type="mstns:GetAccountingSystemListResponse" /></xs:schema>] due to error [Exception Information Type[UriFormatException] Message[Invalid URI: The format of the URI could not be determined.] ]
Mar 6, 2008 at 2:44 PM
In the schema import element i.e. xs:import schemaLocation="ImportData.xsd" namespace="http://AvidXchange.com/ImportData/v1.0" />, schemaLocation should be valid URI which it is not? How you generated this schema?
Mar 6, 2008 at 3:28 PM
Edited Mar 6, 2008 at 3:31 PM
We used this tool:
http://www.thinktecture.com/resourcearchive/tools-and-software/wscf

The wsdl structure is a little complicated. I can send you the whole thing via email if you like. The top level wsdl generated by navigating to <service>.asmx?wsdl points to an imported wsdl, which in turn imports 3 xsds (messages, data, soapheaders). So, the problem could potentially be with any of the imports I guess. I've tried changing some things around, but I keep getting the same error.
Mar 6, 2008 at 4:01 PM
Will it be possible for you to post a .zip of your .asmx project file including all the WSDLs and XSDs?
Mar 6, 2008 at 5:08 PM
Edited Mar 6, 2008 at 10:56 PM
Try this link:
http://cid-afe13ef95311de22.skydrive.live.com/self.aspx/Public/MSE%20testing/sync%20wsdls.zip

The file to reference is:
avidxchangesynchronizationservice.asmx.wsdl

Everything imported is in the Contracts sub folder.
Mar 7, 2008 at 3:48 PM
Were you able to get the file?

And reproduce the error?
Mar 13, 2008 at 3:27 PM
Since I have been able to import this wsdl using svcutil.exe and other tools, I'm going to list this as an issue.
Mar 19, 2008 at 12:35 AM
Thanks for providing this information. I've also been able to import the wsdl via svcutil, but the import through the MSE fails.

We'll look into this further.


ctinsley wrote:
Since I have been able to import this wsdl using svcutil.exe and other tools, I'm going to list this as an issue.


Mar 19, 2008 at 9:25 PM
I have a solution for the problem importing your service definition.

First, all schemaLocation attribute values in each of your files need to be absolute Uri's.
Second, in AvidXchangeSynchronizationService.wsdl you need to create a targetNamespace attribute for the xsd:schema element, for example:
<xsd:schema targetNamespace="http://AvidXchange.com/Imports" >
<xsd:import schemaLocation="http://localhost/wsdltest/contract/ImportMessages.xsd" namespace="http://AvidXchange.com/ImportService/v1.0" />
<xsd:import schemaLocation="http://localhost/wsdltest/contract/ImportHeaderData.xsd" namespace="http://tempuri.org/ImportHeaderData.xsd" />
<xsd:import schemaLocation="http://localhost/wsdltest/contract/ImportData.xsd" namespace="http://AvidXchange.com/ImportData/v1.0" />
</xsd:schema>

This should get you going. We'll continue to look at this issue to improve the flexibility of our service import process.


botto wrote:
Thanks for providing this information. I've also been able to import the wsdl via svcutil, but the import through the MSE fails.

We'll look into this further.


ctinsley wrote:
Since I have been able to import this wsdl using svcutil.exe and other tools, I'm going to list this as an issue.



Mar 27, 2008 at 7:32 PM
Your workaround got me past the issue.

Thanks for your help!