I have to use a ColdFusion webservice in my project. I have
added the service reference in my project and it was successfully loaded, but
service is not accessible in my web application.
What I have done is let's say I have a url http://www.server/service.cfc?wsdl - I have added the above service reference and given the service reference name as MyServiceReference.
When I am accessing MyServiceReference in my class file it is not accessible.
I had a similar issue this week when consuming a Coldfusion webservice. To solve it I suggest you can:
1. Consume the WS using old 'Add Web Reference' (like .NET 2.0) instead of using 'Add Service Reference'
In my case, the problem was the webservice's methods were generated with return void and they hadn't had parameters, but when I added the service using this technique the proxies were correctly generated. This post has helped me.
2. Try using WSDL.exe from Visual Studio Developer Command Tools to see if there is an error with service description
If there is maybe you will not be able to generate proxies correctly and you should ask developers to correct the service.
The tool I mentioned can be found at 'Start Menu\Programs\Microsoft Visual Studio 2012\Visual Studio Tools\Developer Command Prompt for VS2012' (also for VS2010).
In my case I've seen the following error:
"This web reference does not conform to WS-I Basic Profile v1.1.R2706:
A wsdl:binding in a DESCRIPTION MUST use the value of "literal" for the use attribute in all soapbind:body, soapbind:fault, soapbind:header and soapbind:headerfault elements."
Related
I created an asmx webservice. I wanted to use it in a client application, therefore I tried adding the service reference in my client project via OpenAPI. But, even after adding it successfully, when I try to build the project, I get build errors and no proxy class is generated and hence, I am unable to use the service.
WebService1 is the service that I am trying to use.
ClassLibrary1 communicates with the WinsFormApp1 using the WebService1 enter image description here.
enter image description here
I tries to add asmx service reference but I am getting build errors
I have a WF [Workflow Foundation] project and when I try adding a service reference [Visual Studio 2013-Target Framework is 4.5.1] to it the generated reference code doesn't contain the client proxy code. I tried adding a service reference to other non WF projects [Library projects] and it works fine and the reference.cs contains the Client proxy code. Why Visual Studio doesn't generate client proxy for WF projects? If the facility is not there then obviously I am taking the wrong approach. How can I use a WCF method inside my CodeActivity?
Just to remind you that this is not the duplicate of the following thread :
Service reference not generating client types
Instead of a simple Reference.cs file Visual Studio kindly adds 7 more files to the service reference folder. When I recompile the project and build it all the methods of my WCF service appeared on the toolbox [and became available] and now I can use them in my Work Flows.
I need to add a service reference using a WSDL supplied by a customer. The WSDL contains references to their WCF web service which I cannot see from my development machine. The reference is resolvable on our acceptance environment but I cannot install Visual Studio there.
I thought the point of the WSDL was that it contained all the information for VS to generate the classes necessary to talk to the WS (even without direct access to the WS).
Have have 2 questions:
Is it possible to add this WSDL to my C# project without visibility to their WS
otherwise
Is it possible to generate the classes from the environment that does have direct access to the WS, without installing VS? Maybe by just installing the svcutil.exe (but I imagine this to0l will also require VS)
i got a folder with a WSDL file (and all the xsd files related to it) but i can't seem to generate a web service from it using the "Add service reference" option in VS2013 (also tried in 2008 just to test). I'm using .net 4.0.
i get multiple error such as:
Custom tool error: The global type ('WarningType') has been defined in both
'file:///D:/WSDL/AMA/2011Y/chameleon/AMA_CommonTypes.xsd' and
'file:///D:/WSDL/IATA/2010.1/chameleon/IATA_CommonTypes.xsd'.
They are different at './simpleContent/extension/#base'.
so, i was advised to use "Add Web reference" tool.
this works for some reason. i get no errors now.
But, the problem is that i found out that a web reference do not support WS-Security /WS-Adressing
(someone wrote this as a comment in how to add SOAP Security header) and i MUST specify in the header those elements.
Also, i keep reading not to use a web reference since this is an old technology.
So, does anyone know how to solve the errors I'm getting ?
There are multiple tools that generate service proxy objects. Apart from using Add Service Reference you can use command line tool svcutil.exe which is included as part of the visual studios installation for generating service objects.
Here is how to do this
http://msdn.microsoft.com/en-us/library/ff623148.aspx
This alternative command line approach will help you resolve issue related to WS-Security / WS-Adressing.
I'm attempting to consume a web service created by Oracle Web Logic in Visual Studio 2013. I've added the service reference OK but when I call the service constructor I get the error:
In operation (operationName), more than one fault is declared with element name (elementName) in namespace (namespace URL)
The snippets for this operation from the WSDL is shown in the image below:
This exception is thrown each time I attempt to use the service, and I can't proceed any further.
Is this an issue with the WSDL or is there something I can do as a consumer?
I am not sure what is the exact cause of the problem you are facing.
Can you try to generate the proxy using svcutil and give it the flag to generate using the xml serializer.
svcutil.exe /target:code /dataContractOnly /serializer:XmlSerializer
/importXmlTypes [your xsd file's path]
Here is a thread that talks about a similar problem with proxy generation: http://social.msdn.microsoft.com/Forums/vstudio/en-US/66f8c5c0-0c3e-47de-abd3-ba6e1a228f2d/wcf-proxy-data-class-duplication-bug-generating-client-proxy-for-nonwcf-service?forum=wcf
I have some WSDLs that cause me grief in VS newer then 2008. I get around it by using VS2008 and adding the service references there. Then I can save and migrate the generated code over to my VS2010-13 projects. Unfortunately I have not yet found another solution.