Solved

"Unable to import binding" error

Posted on 2011-02-11
3
933 Views
Last Modified: 2013-11-18
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"
	xmlns:common="http://common.test.com/v1_0"
	xmlns:commonAPI="http://common.test.com/api/v1_0"
	xmlns:model="http://useraccount.test.com/v1_0"
	elementFormDefault="qualified"
	targetNamespace="http://useraccount.test.com/api/v1_0"
	xmlns="http://www.w3.org/2001/XMLSchema">
	<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>
	<wsdl:message name="authenticateResponse">
		<wsdl:part name="authenticateResponse" element="api:authenticateResponse" />
	</wsdl:message>

[snip]

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

Open in new window

0
Comment
Question by:JimBeveridge
  • 2
3 Comments
 
LVL 20

Expert Comment

by:ChristoferDutz
Comment Utility
I would assume that there is an element authenticateRequest but it is in the wrong namespace.
0
 
LVL 7

Accepted Solution

by:
JimBeveridge earned 0 total points
Comment Utility
Problem was caused by nested xsd files silently failing to load/validate.
0
 
LVL 7

Author Closing Comment

by:JimBeveridge
Comment Utility
Found my own answer to the problem.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

The task of choosing a web design company to build a website for your business should never be taken in a light manner. Provided the fact that your website will act as a representative to your business and will be responsible for imposing an online …
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now