reference a compiled web service from another web service

I created a compiled web service (eg, a dll file). now i create another web service in which i want to refer to the compiled service. how is this done in vs .net?? i am following an example which is not vs .net specific so i am not sure of the syntax. the example says to create the second web service (ie, .asmx.vb file) and include the following single line of code in it to refer to the compiled code:

<%@ WebService Class="compiled_code_service_name" %>
this does not work within vs .net. can anybody tell me what is the correct syntax??
thanks
-1
drenner
1/27/2004 11:48:07 PM
asp.net.xml-web-services 7071 articles. 0 followers. Follow

7 Replies
845 Views

Similar Articles

[PageSpeed] 50

I'm not quite sure I understand what you mean you want to reference the second service from within the first.... If all you want to do is invoke the inner service from the outer one, then use webreferences, as usual, that's what they are for.
Tomas Restrepo [MVP]
tomasr@mvps.org
0
tomasr
1/28/2004 1:24:38 AM

If its on the same server, you can create a normal reference to that DLL (add reference in vs.net).
If you plan on deploying these two on difference servers, and want to leverage the SOAP interface, than in VS.NET do an Add Web Reference and give it the URL endpoint of the Web Service you have created....
http://localhost/CompiledCodeServiceName.asmx?wsdl

Rob Chartier
ASP/ASP.NET MVP
AspInsiders Member
http://weblogs.asp.net/rchartier
0
Rob
1/28/2004 1:42:11 AM
tomas:

thanks for your reply. let me restate in hopes i will communicate a little better.
I have created a .asmx file, call it file1.asmx. the file contains a public class declaration which contains two webmethods. i compiled this into file1.dll. now i create another .asmx file, say file2.asmx, and in that file i only want to reference file1.dll (ie, the compiled class). the example i am following says that file2.asmx needs only one line of code in it to access the compiled class. that line is given as:
<%@ WebService Class="file1" %>
Then when i run file2.asmx I am supposed to access the compiled class which is contained in the dll since file2.asmx is simply referring to the dll. The problem is that in vs.net the syntax of the above line of code is not correct. The whole example is supposed to illustrate accessing a precompiled web service from another web service. In particular i am looking for the correct syntax for this line of code to refer to the compiled class.
thanks
1
drenner
1/28/2004 5:46:05 PM
rob:

yesterday i tried adding a web reference as you indicated but I could not find it listed on the localhost. this morning I find it listed but when i try to add it i get an http 403 access forbidden error saying that there was an error downloading the service. how can this access error be overcome?
thank you
0
drenner
1/28/2004 5:52:07 PM
tomas:

i think i just figured out that i need to do the following:
project -> add web reference and designate the dll. however when i choose the dll as listed in the url window (ie, http://localhost/webapplication/bin/file1.dll) i get an http 403 access forbidden error. it says there was an error downloading http://localhost/webapplication/bin/file1.dll. how can i remedy this?

thanks
0
drenner
1/28/2004 6:08:35 PM
this problem is solved. i have traded it for another one !!!
1
drenner
1/28/2004 8:54:43 PM
got this problem fixed by setting permissions in iis
-1
drenner
1/28/2004 9:12:29 PM
Reply:

Similar Artilces:

How to call a .net web service from another .net web service?
Hi all,I have developed two asp .net web services using visual studio .net 2003.I wish to call one web service from another web service.I tried adding a web reference of the web service in another web service and was able to do so.but i m not able to access the web methods provided by the web servicecould you please suggest a way to go about itExpecting quick replyThanxCharmy try to make sure that you reference it in the web reference and call it properly this is sample  [WebMethod()] public double CalcDistance(int x1, int y1, int x2, int y2) { Calculator.Service1 calc = new...

What action by a web service requires an app to update their web reference to a Web Service
I create a web reference to a web service in my aspx web application which returns an XML object. If the owner of the web service makes a change to their object am I required to do an update web reference? What if I dont use the information from the new object? thanks Larry You should make the change only if the contract b/w the two has changed (e.g. parameters, return values), etc.-Mathew Nolton Website=www.cybral.com Email=mnolton@cybral.com Blog=weblogs.asp.net/mnolton If the web service now returns a new element and my class reference doesn't match their new class ref...

Web Service invoking another Web Service
hello, I have a web service and I have to consume another web method of some other web service. I have to do everything through code. [I cannot use "Add Web Reference" utility in the VS.NET]. I am using C# for coding the web service. Thanks in advance. Phanikum Yep, You could do that! Basically you have to use WSDL.exe http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/html/cpgrfWebServicesDescriptionLanguageToolWsdlexe.asp Once you have proxyclass in a file from WSDL.EXE, make an assembly and use that in your app! Sreedharhtt...

Web service in .NET from Java Web Service
Hi there,I'm pretty new to .net (although i have years of experience with the old vb 6, access 2k, as well as java)... and need some with perhaps either some syntax or something.Here is the wsdl.<wsdl:definitions targetNamespace="http://www.dynix.com/schema/book">−<wsdl:types>−<schema targetNamespace="GetBookInfoByISBN">−<complexType name="BookInfoType">−<sequence><element maxOccurs="1" minOccurs="0" name="Title" nillable="true" type="xsd:string"/><element maxOccurs=&quo...

xml web service --uploading the file to the xml web service
how can we upload the file in the xml web service 1.i mean what will be the return value in the proxy class 2.and how am i going to send the file to the xml web service----regards Bipul Kumar Here are some links to articles that helped us get this done: http://msdn.microsoft.com/webservices http://www.microsoft.com/downloads/details.aspx?familyid=06255a94-2635-4d29-a90c-28b282993a41&displaylang=en https://www.sys-con.com/dotnet/article.cfm?id=458 Hope this helps....

.NET web services Vs Java Web Services
Hello, does anyone know of a book or good source of information that compares .NET and Java Web Services? (I would like soemthing neutral if possible). I am thinking of approaching this subject for my dissertation? Many Thanks Rob Hi Rob, Last year I had to give a powepoint presentation on Web Services. I noticed some good books at barnes and noble that discussed the subject. These books were specific to Java and discussed Web Services in a very clear fashion. They gave some elementary examples that were easy to understand. I have not yet had the pleasure of creatin .NET Web Servi...

Calling a Web Service from a Web Service
Hello,I was looking for some feedback on calling a web service from within a web service. I've heard that it's not good practice (or not possible). I have a scenario where I think it might make some sense.Within our infrastructure, we've created a web service that handles incoming updates on the statuses of all processes. This has proven to be a good thing since it allows applications to communicate across server to make status updates. It's also used by third party developers and applications to communicate with our infrastructure.Along these lines ... we are planning to create a new compon...

Is web services a part of web Service?
  I have a question: Is web services a part of web server?? And when the client calls web service, it means that client calls web server?? Or is it a different entity in itself which communicates separately both with client and server and acts as middleware application.. I am very confused.. Can someone explain me the architecture...??? Thanks..Dont forget to click "Mark as Answer" on the post that helped you.This credits the member,earns you a point & marks your thread as Resolved so that new users will know where to search for their queries. When you build and dep...

what are web services and what are the advantages of web services?
 Hello  i am new to this .net stuff and i was ask on the job interview what a web services is?and if i did not know given that i had a project ( as a project manager,  or a web developer)   what  is it? how do i start a >NET project on it? what are the main advantages is?  HOW DO I START THIS IN THE INTERVIEW>  and what basic books do i buy?   Hi There, There plenty of source on the net about webservice Definiton: http://en.wikipedia.org/wiki/Web_service http://www.codeproject.com/Purgatory/Defining_Web_Services.asp...

how to make refer to a remote Web Service? : ServiceReference can only refer to local web service.
Hi Folks, Since  ServiceReference can only refer to local web service, how can I refer to web service in the remote machine?  Thanks for your suggestion.   Sun You can make a local web service that collect data from the remote web service.Hope this can helo ;)Stefano ...

asynchronous call of web service method from another web service
I am calling a web service method from within another web service.  Both are called asyncrhonously. Webservice 1 is invokde from a consumer app and its completed event is assigned an event handler, this works ok  The webservice being called is itself invoking another webservice and asynchronously calling another web method, again Ive assigned an event handler to its completed event, which works.  My problem is how do i expose the ouput (a dataset) of the second web method to the first web method ? Hi, Please have a look at this article: http://msdn2.microsoft.com/en-us/li...

Web Site Project: How to configure web service URL in web.config (web service defined in a referenced DLL)
I have a web site that references a business logic DLL project. In the business logic project, there is a web service defined in its app.config file something like this: <applicationSettings>  <MyNamespace.BLL.Properties.Settings>    <setting name="MyNamespace_BLL_MyServer_ServiceName" serializeAs="String">    <value>http://blah.blah.blah.asmx</value>  </setting>  </MyNamespace.BLL.Properties.Settings></applicationSettings> When the web site is published, the web ...

New to web services, why does PB10 web service proxy wizard say there are no services?
here... http://webservices.amazon.com/AWSECommerceService/205-10-05/AWSECommerceService.wsdl oops typo... still doesn't show any services though... http://webservices.amazon.com/AWSECommerceService/2005-10-05/AWSECommerceService.wsdl "Chance" <chance@booklog.com> wrote in message news:43b44cb3$1@forums-1-dub... > here... > > http://webservices.amazon.com/AWSECommerceService/205-10-05/AWSECommerceService.wsdl > Upgraded to 10.2x and now seems to be working...at least it created the proxy. "Chance" <chance@booklog.co...

Changing URL in web.config for web service
I added a web reference to asmx file. In web.config - it adds - undefinedadd key="CoreService.CoreServices" value="http://test/CoreServices.asmx I then change it to <add key="CoreService.CoreServices" value="http://test2/CoreServices.asmx"/> But CoreService.CoreServices still looks for http://test/CoreServices.asmx.  What else do i have to change? I think CoreService.CoreServices are hard coded into the source code.  Girijeshhttp://www.girijesh.in/ I think CoreService.CoreServices are hard coded into the source code.  Girijeshhttp://www.girijesh.in/ So no ...

Web resources about - reference a compiled web service from another web service - asp.net.xml-web-services

European Terrestrial Reference System 1989 - Wikipedia, the free encyclopedia
The European Terrestrial Reference System 1989 ( ETRS89 ) is a ECEF (Earth-Centered, Earth-Fixed) geodetic Cartesian reference frame , in which ...

Child sex abuse royal commission: Senior politician to be grilled over reference
A former deputy Premier will again take the stand on Tuesday to explain why he gave a positive job reference to a man he knew to have sexually ...

VA, reference pricing and the value of options
@hyperplanes eg, you can get free care at VA, or get a reimbursed at the reference price for care anywhere else. — Matthew Martin (@hyperplanes) ...

10 of the best movie references you’ll ever see in popular TV shows
I'm torn when it comes to breaking the fourth wall in TV shows . It can be a fun, clever way to connect with the audience, but it can also break ...

"As much as Poppy Bush scoffs at 'the D-word,' as he calls any reference to dynasty, the Bushes do consider ...
... re-defended myself: "Servants" seems like the right word for people who occupy the servants' quarters within a house, especially when the reference ...

'Enough with the Viagra references,' says the CEO behind the first FDA approved drug to boost women's ...
... the Fortune Most Powerful Women Next Gen conference. But the reaction to the pill still confounded her. "Enough already with the Viagra references," ...

Donald Trump prompts Nazi references
Some conservatives and political commentators say the GOP frontrunner's rhetoric has crossed the line

The Flash: Easter Eggs and DC Comics References In "Gorilla Warfare"
Tonight's episode of The Flash was epic in scope...which often means fewer Easter eggs.Not [...]

Now you can bookmark Google image searches for later reference
Normally, image searches on Google are ephemeral things and gone the moment you close the browser tab. However, a new feature on the search giant's ...

The 5 Best Britney Spears References From Her 'Jane the Virgin' Visit
The 5 Best Britney Spears References From Her 'Jane the Virgin' Visit

Resources last updated: 12/9/2015 11:28:53 AM