Unable to access WCF Service using InfoPath - wcf

I am consuming wcf service using infopath, I can easily access it through IE, but unable to access using InfoPath,
my wcf service is hosted on another server. I am getting this error :
WSDLReader:Could not find '/definitions/service' inside the '' namespace of the wsdl file. The parameter is incorrect.
- WSDLReader:Analyzing the WSDL file failed. The parameter is incorrect.
It was all working fine, but when server was restarted or shutdown, it has stopped working and am getting this error now. When I deployed the same webservice on the same server where my InfoPath form is, it was working fine.

Try to empty Infopah cache on client
How to do it more specifically depends on Windows and Infopath version/edition which were not given

Related

Consume WCF Service as external Content Type through Sharepoint 2013

I am trying to consume a WCF Service with SharePoint 2013. But when I try to add the Content Type with the SharePoint Developer to the BDC I get the following error.
This message means something like "unexpected internal error in Business Data Connectivity Service: There are no Adresses available for this Application"
In the Headline the message means: "Error while Access the WCF-Service. URL: ...."
But I have tested the Service local with the WCF Test Client. (Everything is working) Also i have checked if the SharePoint Server can reach the URL I have defined.
Another interesting fakt is that the Designer was able to create the Content Type but couldn´t parse it ...
When I try to refresh the created Content Type I got a slightly different error message. The Details are equal but there is also a line saying that "A proxyassemblie couldn´t be created"
I am at the end of my knowledge can anybody imagine the fault?
If you Need more ressources (like the WCF Definition) just ask!
bg
Got it!
The Service "Microsoft Sharepoint Foundation Subscription Settings Service" wasn´t started ...
No everything is working
bg

HTTP Error 404.0 - Not Found when accesing SVC service

I have REST service application which is hosted in an IIS 8 in a Windows 8 PC. When I request the service I am getting an error as follows ... HTTP Error 404.0 - Not Found.
Here is the detailed error message.
HTTP Error 404.0 - Not Found
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
Most likely causes:
•The directory or file specified does not exist on the Web server.
•The URL contains a typographical error.
•A custom filter or module, such as URLScan, restricts access to the file.
Things you can try:
•Create the content on the Web server.
•Review the browser URL.
•Create a tracing rule to track failed requests for this HTTP status code and see which module is calling SetStatus. For more information about creating a tracing rule for failed requests, click here.
Detailed Error Information:
Module IIS Web Core
Notification MapRequestHandler
Handler StaticFile
Error Code 0x80070002
Requested URL http://IP.com/Wining/RService.svc/general
Physical Path C:\inetpub\wwwroot\Wining\RService.svc\general
Logon Method Anonymous
Logon User Anonymous
Any help on this would be greatly appreciated.
There are myriads of possible causes. In general, the target resource at given URL is not found, so it may be simply missing, misconfigured, not started, etc. First - check the server logs, they usually contain more detailed information about the issue.
Also, please doublecheck that the service really is up and running. Connect to the www server and check it via localhost not ip.com.
I'm not an expert, but judging from the snippet you provided, it seems to be WCF service, the Handler: StaticFile seems very odd. It seems like the IIS misinterpretes your request as a StaticFile (a resource read from the disks and just passed-through without any further processing) which for me seems perfectly wrong.
You may have not installed the service properly, or have url mappings and/or handlers messed up, or you may even have NET/ASP framework not properly installed.. What have you installed first? .Net or IIS?
check similar questios, there are many.. for example:
WCF on IIS8; *.svc handler mapping doesn't work
HTTP 404 when accessing .svc file in IIS
I had to enable HTTP Activation in .NET Framework 4.5 Advanced Services > WCF Services (running on WIndows 2012) and after an IISReset it worked fine.

WCF message: protocol in To element changes

I have a WCF service to consume in .NET. As per requirement the Action element in the header has to be "http://abc" and the To element has to be "ws://xyz" in order for the service to recognize and respond to the request. The soapAction of the operation is however blank in WSDL and it can't be changed.
My service configuration built programmatically is this:
text message encoding binding with Soap11 envelope version and WSAddressing10 addressing version
no security biding
http transport binding
The setup I found achieving this requirement is "ws://xyz" as the endpoint URL and Request.Headers.Action set to "http://abc" in BeforeSendRequest using a message inspector added using an endpoint behaviour attached to the endpoint. Then I also attach a ClientViaBehavior with the URL of "http://abc".
On my development machine this causes as required
<a:Action>http://abc</a:Action>
<a:To>ws://xyz</a:To>
However on the test server it generates
<a:Action>http://abc</a:Action>
<a:To>http://xyz</a:To>
I don't know exact configuration of the server but I believe it is Windows server as is my development box. Does the same code generates different messages on two different machines or how else would I achieve this? I should also say it worked fine for several weeks and stopped last Monday.
I have found the following later:
The test server has .NET 4.5 on it as well as another machine I tried it on (also failed). The dev machine where it works fine has just .NET 4.0 on it which would suggest it could have something to do with it. However I have no evidence it is caused by .NET 4.5 as it was installed several weeks before the problem appeared. Moreover there have been no Windows updates since it stopped to work!
I've also tried to set the To element in my ClientMessageInspector implementation but the protocol still gets flipped to http.
I think the BeforeSendRequest is not called due miss configration of your service bindings. Check if you have added the the extention configuration to you service endpoints you want to have the behavior.

WebReference vs ServiceReference

I have to following problem. In my application I used a service reference to a non-WCF service from some external company. I created a proxy class using svcutil.exe tool. Everything worked fine for about a year.
Yesterday however, clients reported that it's not possible to get any response from the service. I figured out that the error returned from the service was:
The formatter threw an exception while
trying to deserialize the message:
There was an error while trying to
deserialize parameter
http://serviceurl:someResponse. The
InnerException message was 'There was
an error deserializing the object of
type specificType
So, what I did I firstly updated the service reference and also generated the new proxy using svcutil.exe. The problem still occurs.
I resolve the problem by using either 1) wsdl.exe tool to generate proxy class 2) add web reference (which behind the scenes using wsdl.exe tool internally to create proxy).
My question is : Why everything worked fine for a quite long time even if I used a service reference? How can I checked whether has something changed in the web service? Any help would be appreciated.
Contact the company that provides the web service and find out what changed.

Deploying wcf with silverlight application?

I am trying to deploy a Silverlight application on a remote server. I've copied over the files within App.Web which includes the .svc file. I created a virtual directory within IIS 6.0 and am able to successfully host the silverlight portion.
BUT... now I am getting an error:
The type 'ServiceGateway', provided as the Service attribute value in the ServiceHost directive could not be found.
I've tried restarting IIS, verified that the ISAPI mapping for .svc extension is showing in IIS.
It seems to me that the service is not getting started.
Thoughts?
Missing a type sounds like it either wasn't compiled properly or the reference doesn't exist on the server. What version of .NET is installed on the server? It should be at least 3.0.
It looks like the service isn't getting started because you're missing the ServiceGateway type. You may be missing the entire assembly it's meant to be in.