Importing WSDL file gives Error - c#

I have a list of .wsdl files provided by the client. I have tried to import them as described here.
But when I do that, it gives an error. This error is shown as below.
The document was understood, but it could not be processed.
- The WSDL document contains links that could not be resolved.
- There was an error downloading 'file:///[path]/WebServices_8_0_2_0/WebServices/wsdl/common.xsd'.
- Could not find file '[path]\WebServices_8_0_2_0\WebServices\wsdl\common.xsd'.
- Could not find file '[path]\WebServices_8_0_2_0\WebServices\wsdl\common.xsd'.
- Could not find file '[path]\WebServices_8_0_2_0\WebServices\wsdl\common.xsd'.
If the service is defined in the current solution, try building the solution and adding the service reference again.
I have no idea of what this common.xsd file is . Can some one atleast tell me the reason of this happening and a possible solution.

The common.xsd file probably contains type definitions used in the WSDL. Try to download the file manually (the URL should be in the WSDL) and save the file next to the WSDL file.

Related

How can I get a proto file to reference a message defined in another proto?

I am working with a gRPC service project that was generated by Visual Studio. I have two proto files located in the same "Protos" directory. I have one proto the has an import for the other proto file. It appears to find the file but I am not able to reference any of the messages from the other. When I do I get a "blahblah" is not defined error. I have taken some screenshots of the situation. Any help would be very much appreciated!
They are in different package spaces; try thing.ThingRequest, or .thing.ThingRequest (the leading . means "absolute", like a uri starting with /)

Working with a .dl_ file in visual studio

I've sent over a .dl_ file which I need to reference within my visual studio project, from what I have been told the .dl_ file contains 1 interface, 1 model and 1 XML file.
I've never worked with .dl_ before so I'm slightly confused on how I go about getting such information as mentioned above in to my solution, I have googled this but all I get back is information about what is it not how to reference / use it.
I have tried right clicking on references > add reference > browse to .dl_ location and tried adding it but I get the error "Could not be added. Please mark sure that the file is accessible, and that it is a valid assembly or COM component"
A dl_ file sounds like a file that was compressed. Microsoft compresses a lot of their system files on their installation media. To decompress it, you use Expand, a Microsoft command line utility. To expand your file, open a command window and type this:
C:\> CD\
C:\> CD MyDirectory
C:\MyDirectory> Expand MyFile.dl_ MyFile.dll
Replace MyDirectory with whatever directory your dl_ file is in. This will create the DLL file, then you use it like you would a normal dll.
Another possibility is that your friend simply renamed the file from .dll to .dl_. A lot of email clients will not allow you to send an email with a .dll or .exe attachment. This is for security reasons. So a common way to get around this is to rename the extension. Ask your friend if he did this.
Most installers store dll files as dl_ inside them.
But if the extension is dll that doesn't mean the file is an assembly, it could be a native windows library.
Ask the sender about the file.

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.

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

Webservice call from .net class called from VB6

Im using VB6 in a project and I've some .Net dlls to handle document transfers.
In one of these dlls im calling a webservice to retrieve my documents. This code works if only run as .net project, however running from vb6 it gives me the following error:
"Could not find endpoint element with name "DocServiceSoap' and contract 'documentWebService.DocServiceSoap' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this name could be found in the client element"
I've googled around and tried everything, e.g. copying from app.config to web.config, specifying endpoint name when calling for service, still no luck :/
Any ideas?
I guess your app.config is called myDotNetDll.dll.config? That's wrong. The config file always need to be attached to the executable file.
So, to solve your issue, you need to copy it to your VB6 application, i.e., it should be called myVb6Application.exe.config and located in the same directory as your myVb6Application.exe.

Categories

Resources