Create WSDL from C# Project - c#

Im am currenty working on some changes to a webservice (written in C# and VS).
Now that most changes are done I need to generate myself a WSDL from the webservice so I can Import the WSDL on my other application to make the changes there.
The problem is that I have no clue how to generate the WSDL.
Hope someone can help me out.

Run the webservice and open it in a browser. Append "?wsdl" to the url, eg.:
http://localhost:524123/MyWebServeice?wsdl
You now have the wsdl document in your webbrowser. Now you can copy / paste.

"C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\wsdl.exe" /language:CS /namespace:YourNameSpace /out:"G:\Work\YourFileName.cs" http://localhost/Service.asmx?wsdl
This should generate .cs (c#) file if you need to devlop "offline"

Related

Where to start exploring/evaluating a ASP.Net Project?

I received the below ASP.Net project. I need to understand the working of this webserver from its code. Where should I start exploring this project from I am a newbie in ASP.Net and C#. Which file among the below will contain the server listening command?
Project Structure
.cs files are the "C-Sharp" code behind files. The ones in the AppCode folder are likely relevant to the project. You should also investigate the "Default.aspx" and associated "Default.aspx.cs" file. This is the default webpage and code-behind file. This does appear to be webforms at first glance. Also, your "web.config" file will likely have server/application configuration information in it. The ".sln" file is your solution file.
That is essentially the File that you can use to open in visual studio, and it should pull in the necessary configs/files to build the project. Open the files up and start exploring.

Howto create code from wsdl and separated Xsd

i got a local wsdl file referencing two separate Xsd files.
how can I create the relate [c#] classes to that service ?
I tried to use wsdl.exe , but it ignores the Xsd files located in the same folder
solved by a hint of #rene
running " svcutil *.wsdl *.xsd /language:C#" from Developer Command Prompt

How to apply SOAP in FedEx sample code?

I downloaded both sample code and WSDL files on the website.
I checked that there are some text documents inside of WSDL folder.
It was based on SOAP, but I don't know how to apply.
How do I apply for SOAP file in the sample code?
It seems like the example queries.
Could you tell me how to do?
you actually do not want to think about the other files in that same folder where your WSDL is located. Just add a Web Reference to your project and direct it to your WSDL. This should add a reference to your project under which you will see all these other files. WSDL will automatically refer those files when needed.

cordova windows phone 8 how to add a plugin

Hello im trying to use the InAppBrowser in my cordova project.
But i dont get it working.
I have downloaded the files InAppBrowser.cs and InAppBrowser.js and put the .cs file inside the project root folder and the .js file inside the www folder.
I also add to the root folder config.xml file the plugin tag.
<widget>
<access origin="*"/>
<feature name="InAppBrowser" value="InAppBrowser" />
</widget>
Unfortunately it doenst work.
Someone knows what im missing?
Am i too late answering this ? Anyway.. i think you should make use of CLI.
First install node.js.
http://nodejs.org/download/
Then git installer.
http://git-scm.com/downloads
Then Hit Windows+R and type cmd to open command prompt.
After that follow these steps to create a new project, then add your platform(ie WP8)
http://docs.phonegap.com/en/3.0.0/guide_cli_index.md.html
Windows Phone 8 Plugin Resource.
http://plugreg.com/plugins#platform=wp8
Select any plugin
For eg, File plugin by apache.
just copy and paste the code to your command prompt.
Hit enter, the plugin will be installed automatically.
Then use it normally. or just read the plugin documentations.
:-)

How do I reference a WSDL file with a relative path?

I have a WSDL file on disk and loaded as a web reference. The problem is that the web reference itself is looking for the WSDL on my machine (using an absolute path), which obviously won't work on teammates' machines.
Is it possible to have the web reference look for the WSDL with a relative path, or from the Resources file? The WSDL is for a third-party service that we've modified to add some extra fields (per their recommendation).
When you add a service reference to the WSDL file on your machine, it gets copied into your "Service References" folder in your project. At that point, the API for your service is determined. There is a "Reference.svcmap" (XML) that is created that holds the location of the original location of the WSDL file. This is so that you can update the service reference in your project if the API changes. But, even without having that original WSDL file you can check in the code and your team can use it without issue. But, if you want them to be able to update the service if the API changes, then you need to actually host that WSDL file in a publicly accessible place. Usually, the web service itself provides the WSDL file and you wouldn't have it on your file system. If you plan to update and change the web service, you should connect to the WSDL hosted on a development web server. That's really where it belongs, and not a local file. But, there's no reason your local file reference wouldn't work just fine until someone tried to update it. If your web service never changes, you've got no problem. If it could change, then host it somewhere and reference a real URL.
My initial testing of tweaking the XML in Reference.svcmap file to try for relative path references did not work, but if you decide you really want to get this to work as your question describes, this is the place to make your attempt.
My suggestion would be to create a programmatic proxy using the cmd line tool wsdl.exe or svcutil.exe to create the .cs or .vb proxy that you could then add to the solution.
This allows for not needing the wsdl file at all. See more information on how here for .NET 2.0 http://msdn.microsoft.com/en-us/library/7h3ystb6(v=vs.80).aspx
for .NET 3.5 or later and svcutil look here: http://msdn.microsoft.com/en-us/library/aa751905.aspx

Categories

Resources