Basically, I have a regenerated wrapper code for a web service that I need to use; when I run this, it works perfectly and receives the data from web service.
How can I add an already regenerated code from a .wsdl file to another Visual Studio solution as a web service?
First of all, you should be doing all new web service development (both client and server) using WCF. You should use "Add Service Reference" instead of "Add Web Reference".
In either case, simply give the file system path to the .WSDL file.
Related
I am using Axis2 (1.5.3 currently) and Tomcat (6.0.26 currently) and am running a web service. I would like to also host HTML pages for configuring the web service.
What is the best way to go about this? I assume keeping the same context is key, but perhaps it is not.
My current distribution is located under a folder structure similar to this:
Tomcat/webapps/mycompany
With the actual service code here:
Tomcat/webapps/mycompany/WEB-INF/services/myService
In a browser, I can hit my web service by going to here:
/mycompany/services/myService
I note that I can drop actual HTML files in this path and Tomcat will, indeed serve them up.
For instance, if I put "index.html" under Tomcat/webapps/mycompany, I can navigate to /mycompany/index.html and see my html.
What I want to do is have this HTML be attached to JAR/class files that can interact with the already-existing service class files in the same context as the service. Therefore, I can have the browser configure the web service directly.
Is this possible, and is there a tutorial or something out there that will help me with this? Note that I have been working with Tomcat and Axis2 for a while now for this particular web service, but I have never actually deployed a web application/html using Tomcat before.
Thanks.
First of all what do you mean by a configuring a service. Normally in SOA world services are analogous to interfaces. IMHO you can just change a service, since their are other users that rely on the services you are exposing.
If i want to change a service i would rather introduce a new version of the service after deprecating the existing one.
Are you talking about applying QoS to existing serviecs. Then that makes sense.
Anyway, If you want to have a web-app alongside with axis2 service engine, it is possible. If you look inside the axis2 war file you'll find the web.xml entry to Axis2Servlet. It is this servlet that serves the web services requests.
So, what you need is the Axis2Servlet mapping in your web-app along with your usual servlet-mappings. Number of possible ways to configure your services using web-app files. One options is to use web-services call itself to (with authentication) to configure it.
By "configure a service", take this example:
The service has a set of datasets.
Each dataset exists in a separate database.
The service can manage 0..n datasets.
The service must be configured to know about each dataset.
This is what I'm configuring. I'm not trying to configure Axis itself or redefine the service.
I would like to host the HTML using the same instance of Tomcat that I'm hosting the web service with. It needs to manage sessions, have login capability, an whatnot, and has to be able to configure the web service live.
From what I'm reading, it's probably best to make an interface to the web service that the web application module can call into from a different context.
Is there a better way?
I need to use the web services available by adding /_vti_bin/webs.asmx to your site URL. In particular GetAllSubWebCollection.
Sorry if this is a noobish question, I work in a split 2007-front 2010-back environment and do not have access to the server so I have little experience with advanced features.
What do I have to enter into the URL to get this method to work? Am I supposed to create a page to handle the info?
Thanks!
Add a Web Reference (not a Service Reference) in Visual Studio. This service is a SOAP service, so you won't be able to just type a url into your browser to call this method. You'll need to send a SOAP message to the service. .NET handles this for you when you add a web reference. If you're using SP 2010, use the Client Object Model instead.
hi all
i coded a custom web service for sharepoint in a remote machine and will deploy it later to the host machine
but how programs do i need to install to my computer to test that web service
Use a tool such as
Storm
SoapUI
Web Service Studio
(All open source)
You'll probably need a test application to sit on the same system as the web service.
It will locally fire the webservice and some of the test fixtures will only monitor what it returns.
The rest of the fixtures should examine what the webservice actually interacts with on the server side.
ie: If you have a webservice that accepts a command then starts a Workflow, you would:
a) Ensure that the correct response is given by the webservice when invalid input is given
b) Ensure on the server side that the correct workflow is instigated and started with the correct initialisation data.
You would probably need many, many test cases depending on what your webservice actually does.
I've got a C# web application which I can't easily update the code of. However, I can make configuration changes to the application.
The application calls out to a third-party ASMX web service, and I really need (if at all possible) to log the full XML requests and responses. I have no control over the web service so I have to do it from the client.
I'm not using WCF - this is standard ASMX web service calls.
Is there any way I can log the XML requests and responses from the client web app without having to redeploy the code?
Thanks in advance
John
I don't know of any way to do this without changing the application. You might get away with creating a SoapExtension as a separate binary, then storing it in the \bin folder and changing the web.config to point to it. Still, adding a new binary may very well be considered "changing the application".
Certainly, ASMX has no configurable logging that does not require coding.
I need to consume a Webservice written in pearl in my .net Windows Application. I have been given a .wsdl file.
Please let me know how can i use that Web service in my Application using that .wsdl file.
Use "Add Service Reference" in Visual Studio. Point it to the WSDL file on disk. That works as well as using a URL.
See "How to Consume a Web Service".