• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1074
  • Last Modified:

"Unable to import binding" error

I need help solving an error using wsdl.exe under Visual Studio 2008. The wsdl and xsd files are from a Java implementation and are in production use with that Java code.

The error I'm getting is:
Error: Unable to import binding 'UserAccountServiceHttpBinding' from namespace 'http://useraccount.test.com/v1_0'.
  - Unable to import operation 'authenticate'.
  - The element 'http://useraccount.test.com/api/v1_0:authenticateRequest' is missing.

However, an element entry does exist for authenticateRequest in the xsd file.

Any suggestions would be greatly appreciated.

What I hope is relevant code is below. (Apologies in advance - I cannot post the entire wsdl file because it's NDA. So I'll post what I can.)

top of xsd file
<?xml version="1.0" encoding="utf-8" ?>
<schema xmlns:tns="http://useraccount.test.com/api/v1_0"
	<import schemaLocation="common_api_1.0.xsd"
		namespace="http://common.test.com/api/v1_0" />
	<import schemaLocation="common_1.0.xsd"
		namespace="http://common.test.com/v1_0" />
	<import schemaLocation="useraccount_service_1.0.xsd"
		namespace="http://useraccount.test.com/v1_0" />
	<!--service api defination-->
	<element name="token" type="common:OID" />
	<element name="authenticateRequest" type="tns:AuthenticateRequest" />
	<element name="authenticateResponse" type="tns:AuthenticateResponse" />
	<element name="impersonateRequest" type="string" />
	<element name="impersonateResponse" type="string" />
	<element name="validateTokenRequest" type="tns:ValidateTokenRequest" />
	<element name="validateTokenResponse" type="tns:ValidateTokenResponse" />

Open in new window

excerpt from wsdl file

	<wsdl:message name="authenticateRequest">
		<wsdl:part name="authenticateRequest" element="api:authenticateRequest" />
	<wsdl:message name="authenticateResponse">
		<wsdl:part name="authenticateResponse" element="api:authenticateResponse" />


	<wsdl:portType name="UserAccountServicePortType">
		<wsdl:operation name="authenticate">
				This API is used ...
			<wsdl:input name="authenticateRequest" message="tns:AuthenticateRequest">
			<wsdl:output name="authenticateResponse" message="tns:AuthenticateResponse">
			<wsdl:fault name="serviceFaultInfoException" message="tns:serviceFaultInfoException">

Open in new window

  • 2
1 Solution
I would assume that there is an element authenticateRequest but it is in the wrong namespace.
JimBeveridgeAuthor Commented:
Problem was caused by nested xsd files silently failing to load/validate.
JimBeveridgeAuthor Commented:
Found my own answer to the problem.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now