472,975 Members | 1,677 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,975 software developers and data experts.

Separate WSDL File

If anyone could help with this, I would greatly appreciate it!

I've created my own WSDL file and referenced an XSD file too. I've generated
a service side interface using wsdl /server, and created an ASMX file from
this. I've then set the Binding for the class and methods and set the
Location to my WSDL file. If I put the wsdl:service element in the WSDL file
that points to my endpoint, I can go to Add Web Reference and my methods show
up, add the reference, and all is ok.

However, what I want to do is to be able to browse to the ASMX file and do
page?WSDL to use my binding, but for Visual Studio to add the service
endpoint. So, I added a Location attribute and binding to the class and
binding to the method, but when I Add Web Reference on the asmx file, I get
no methods dispalyed (I get the error that no ports or methods are available)
and no methods added to my project. The WSDL that Visual Studio creates has
imported my WSDL file without problems, and as I said, if I use the same one
but add my own endpoint in and browse to that to add a web reference, it
works. Is there any reason why I can't create my own XSD and WSDL, set the
Location attribute to my WSDL in my code and for it to work as I expect?

This is my WSDL where I define my own service, which works:
<?xml version="1.0" encoding="utf-8"?>
<definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://test.com/TestService" name="GetCustomerService"
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/" />
namespace="http://test.com/TestService" />
<message name="getCustomerIn">
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/" />
<part name="messagePart" element="tns:TestRequest" />
<message name="getCustomerOut">
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/" />
<part name="messagePart" element="tns:TestResponse" />
<portType name="GetCustomerServiceInterface">
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/" />
<operation name="GetCustomer">
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/" />
<input message="tns:getCustomerIn" />
<output message="tns:getCustomerOut" />
<binding name="CustomerInterface" type="tns:GetCustomerServiceInterface">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document" />
<operation name="GetCustomer">
<soap:operation soapAction="http://test.com/TestService:GetCustomer"
style="document" />
<soap:body use="literal" />
<soap:body use="literal" />
<service name="CustomerService">
<port name="CustomerInterface" binding="tns:CustomerInterface">
<soap:address location="http://localhost/TestService/TestService.asmx"/>

This is the one VS produces:
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
<wsdl:import namespace="http://test.com/TestService"
location="http://localhost/TestService/GetCustomerService.wsdl" />
<wsdl:types />
<wsdl:service name="CustomerService">
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/" />
<wsdl:port name="CustomerInterface" binding="i0:CustomerInterface">
<soap:address location="http://localhost/TestService/TestService.asmx"

This looks ok to me. The code looks like this:
namespace Test.TestService
using System.Diagnostics;
using System.Xml.Serialization;
using System;
using System.Web.Services.Protocols;
using System.ComponentModel;
using System.Web.Services;
/// <remarks/>

[System.Web.Services.WebServiceBindingAttribute(Nam e="CustomerInterface",

[System.Web.Services.WebServiceAttribute(Namespace= "http://test.com/TestService")]
public class CustomerService

/// <remarks/>

[System.Web.Services.Protocols.SoapDocumentMethodAt tribute("http://test.com/TestService:GetCustomer",
Use=System.Web.Services.Description.SoapBindingUse .Literal,
ParameterStyle=System.Web.Services.Protocols.SoapP arameterStyle.Bare,Binding="CustomerInterface")]
System.Xml.Serialization.XmlElementAttribute("Test Response",
public TestResponse
GetCustomer([System.Xml.Serialization.XmlElementAttribute(Names pace="http://test.com/TestService")] TestRequest TestRequest)
return null;

/// <remarks/>
[System.Xml.Serialization.XmlTypeAttribute(Namespac e="http://test.com/TestService")]
public class TestRequest

/// <remarks/>
public string id;

/// <remarks/>
[System.Xml.Serialization.XmlTypeAttribute(Namespac e="http://test.com/TestService")]
public class TestResponse

/// <remarks/>
public string Name;

/// <remarks/>
public string Age;

/// <remarks/>
public string dob;

Thanks for any help,

Nov 12 '05 #1
0 1889

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: trexim | last post by:
Hi, I am trying to create a Web Reference for CSTA using the URL http://www.ecma-international.org/standards/ecma-348/csta-wsdl/csta-wsdl-all-operations.wsdl Visual .Net complains that: "...
by: ffhansix | last post by:
Hi, I am having problems with generating a c# proxy class from a IBM websphere WSDL file, when running the wsdl.exe to create the c# proxy file command i recieve an error: Warning: one or...
by: saish | last post by:
Hello I am new to vb.net webservice. My requirement is to design a VB.net web service which will send and receive xml documents. The xml document send and received would be a very complex .xsd...
by: drb | last post by:
Hi, Newbie question #2 - hope that's OK! I'm trying to create a WSDL file using one or more XSD schema files. While WSDL.exe doesn't seem to support the XSD "import" function, if I include a...
by: Zoe Hart | last post by:
I have a wsdl file that I received from a third party and I'm using wsdl.exe (.NET 2.0) to import it and generate a proxy class. I've actually got a proxy class that works, but I'm trying to...
by: WebDev2 | last post by:
I have a web service created via Visual Web Developer Express Edition on a IIS Server with .NET 2.0 installed. The test page displays just fine when the URL of the .asmx page is entered into a...
by: Arpan | last post by:
Web Services make use of proxy classes whose methods & properties are accessed in exactly the same way as how a normal class' methods & properties are accessed. So what for does ASP.NET generate...
by: Cesar | last post by:
Hello there, A java programmer sent me a wsdl file, which I have to use to consume his web methods. When I run the wsld.exe tool to generate the class' code, I get the following message: ...
by: Siva | last post by:
Hi all, I want to Convert a WSDL to a SOAP message. Is there any way to do this. I am using .NET 2.0 Thanks in Advance Siva
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.