WCF Difference in two URLs that point to the WSDL - wcf

URL in browser: http://localhost:12345/FRB.EC.BMI.WebSvc/Datafaction.svc
shows this:
You have created a service.
To test this service, you will need to create a client and use it to call the service. You can do this using the svcutil.exe tool from the command line with the following syntax:
svcutil.exe http://sfbztkdev01v.biztalkdev.corp.firstrepublic.com:12345/FRB.EC.BMI.WebSvc/Datafaction.svc?wsdl
Why does the URL in the "svcutil" line often differ from what is in the URL, and how do I change it? I think there is an attribute to add to my code? Or is there any reason to even be concerned that they are different.
In my specific case, I'm on a VMWare image that has no internet access, and I'm using the port number to avoid conflicts with SharePoint. When I click on the URL on the svcutil line it loads okay in the browser. But in SOAP-UI, I'm not getting any response to either that URL or the URL I first mentioned above with "?wsdl" added to the end.
Thanks,
Neal Walters
Update:
Soap-UI is getting hung on this URL - which it finds inside the above WSDL.
<wsdl:import namespace="http://FRB.EC.BMI.WebSvc/" location="http://sfbztkdev01v.biztalkdev.corp.firstrepublic.com:12345/FRB.EC.BMI.WebSvc/Datafaction.svc?wsdl=wsdl0" />
Even when I save WSDL to file and use that file with SOAP-UI, SOAP-UI is still trying to load the second =wsdl0 from IIS. It is not getting error nor response. It just keeps looking for several minutes until I hit cancel. When I paste same URL with =wsdl0 in URL of browser it opens fine (and then has three more xsd's internal that will have to be opened).
Also please note that I am also trying WCFTestClient.exe and it accepts the URL but when I click the Invoke button gives this:
Could not connect to
http://sfbztkdev01v.biztalkdev.corp.firstrepublic.com:12345/FRB.EC.BMI.WebSvc/Datafaction.svc. TCP error code 10065: A socket operation was attempted to an unreachable host 192.168.159.129:12345.
(I'm not yet sure where the above IP address is coming from.)

?wsdl at the end is fine, it is always added. If you can open it in browser just save the wsdl file then open it in SOAP UI

Related

PUT Stream 0 Bytes

I am using Windows Explorer to test the WebDAV implementation I am adapting to our system. The implementation is using IIS Express and is launched by Visual Studio 2013. I turned off Windows Explorer's requirement for SSL with WebDAV so I can test basic authentication (which works).
The problem I am having is with the Write method of the DavFile implementation. I connect to the web folder, navigate to a sub folder, then attempt to copy a JPG file from a folder on my computer's hard drive, into the WebDAV sub folder (using Windows Explorer).
The attempt to copy up a file (854kb) fails. When I set a break point, I notice that the "segment" stream (one of the input parameters on the "write" method, shows 0 (zero) bytes length.
Any tips on how to debug this problem? What is the most likely cause of 0 byte in the stream?
Here are some ideas about how to understand what is going wrong:
Examine the server log for exceptions. By default it is called WebDAVLog.txt and located in \App_Data\WebDAV\Logs\ folder. Are there any exceptions in it? Check your server log and make sure all requests were successful.
Examine WebDAV requests with a Fiddler tool or any other debugging proxy. While all requests that reached the WebDAV server Engine are logged, if the request failed before hitting the Engine you will not see it in a log. Usually this happens if the request failed during authentication stage.
Note that to capture requests using Fiddler on 'localhost' you must use 'localhost.fiddler' instead of 'localhost' when connecting to server, for example: http://localhost.fiddler:1234.
Exclude any client side issues. Finally there could be issues with client software that you are using, including with Microsoft miniredirector. Try to access server from any other machine. To get the idea if the problem is on the client or server side try also to reproduce the issue on ajaxbrowser.com.
You can post a part of the WebDAVLog.txt or fiddler log here or send it to IT Hit, it may give the idea of what is wrong.

Silverlight Security Issue Help - Debugging resource strings are unavailable.

I hosted silverlight application iis and that can be accessed in multiple ways..
When I access using Qualified name of server IP address IT WORKS fine:
http://[QUALIFIEDNAME]/WebUAT/App.aspx
When I access using IP address like below:
http://[IPADDRESS]/WebUAT/App.aspx
It gives error below:
[Async_ExceptionOccurred]
Arguments:
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=5.1.20913.00&File=System.dll&Key=Async_ExceptionOccurred StackTrace : at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
Follow these,
(i) Try to use fiddler and find the request which is making crossdomainpolicy xml request.
(ii)Check whether it is failing, if so add the crossdomain and clientaccesspolicy to the root folder of your Application
(iii)Check whether the service which is invoked by your application is blocked by firewall.

Error while enter URL in WSDL location in SoapUI

I have got below error message when I have enter the URL in WSDL location
Error loading [http://www.mobilefish.com/services/web_service/countries.php?wsdl]: org.apache.xmlbeans.XmlException: org.apache.xmlbeans.XmlException: error: Reference to undefined entity: nbs
I've got the same problem.
I did try to download the wsdl and import the downloaded wsdl... it didn't solve. I also try to found the "entity nbsp" on the file with no results.
This problem is not related with your wsdl but it's a soapUI problem. I had this problem with 5.0.0 version and i installed the 4.5.1 version and it worked =)
Just a note: look out with the proxy setting problem. This version is affected by this problem.. the solution is easy and it's here
So, if you are trying to access a WSDL the first thing i would recommend is try to open it in a web browser(any will do...yes even IE). Do this from the same machine from where you are going to run the test.
This will tell you if you have access to the WSDL from your test machine and if the WSDL is valid.
Once the WSDL opens, copy the URL into the soapUI's new project dialog box. This will create nodes for all service operations in the service and if you have the option selected, it will also create a sample request for each service option.
This is what a wsdl open in a browser(chrome in this case looks like)
This is what the soapUI new project dialog box looks like. Do remember to check "Create sample requests for all operations?" option to create sample requests. You can give it any name..i called it stackoverflow
This is what a wsdl loaded into soapUI looks like, notice the different sub nodes?
If you are looking for WSDL to play with..check out the ones listed on xmethods or webservcex.
Hope this answers both this questions and the other one

WCF with SSL- not finding localhost

I'm trying to get WCF to use SSL with ANYTHING for FIVE DAYS now. I've gone through countless walkthroughs, generated more certificates than a mail order diploma company, even tried hot fixes. After working with MS dev tools since VB1, I am now considering flipping burgers as a career option. WCF, as far as I can see, is a complete lemon.
Anyway, to get to my actual question: If I run through this walkthrough:
http://msdn.microsoft.com/en-us/library/ff648840.aspx
I get to step 11 (adding the service reference) and get "There was an error downloading metadata from the address. Please verify that you have entered a valid address".
Details of the error gives: There was an error downloading 'https://localhost/SSL6/Service.svc'.
Unable to connect to the remote server
No connection could be made because the target machine actively refused it 127.0.0.1:443
I'm using VS2008 on Windows 7 with IIS7. I followed the walkthrough exactly (apart from step 5 which was different on IIS7- I went into "SSL Settings" for the VD), so it shows my config (yes I've used httpsGetEnabled and mexHttpsBinding).
Anyone care to save my sanity and job?
EDIT: If I go into IIS, select the VD in content view, right-click on the svc file and browse, I get "Internet Explorer cannot display the webpage". Chrome gives "Google Chrome could not connect to localhost".
IE troubleshooting gives "the remote device or resource won't accept the connection".
If I browse using the IP address rather than using localhost via http, it says that it's secured with https ok. If I browse using the IP and https, I get HTTP error 503. The service is unavailable.
So it looks to me like a DNS issue combined with... something.
When I try to just run the service site project, I get "Unable to start debugging on the web server. Unable to connect to the web server. Verify that the web server is running and that incoming HTTP requests are not blocked by a firewall". I've checked the firewall and it's ok.
Finally cracked it. There were at least three issues at play.
1) A DNS issue of some kind with localhost. It's still unresolved on my machine, but I can work around it by using the IP addy.
2) Another issue may have been that apparently, WCF doesn't work with IIS 7 OOTB. So you need to run command prompt as administrator, and run the following command -
"%windir%\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe" -r -y
3) After I got through the certificate stuff I was still getting HTTP error 503, "Service unavailable". That ended up being leftovers from my previous attempts, still listening to ports:
http://blogs.msdn.com/webtopics/archive/2010/02/17/a-not-so-common-root-cause-for-503-service-unavailable.aspx
So to get a hello world level service happening with WCF and SSL took me a whole week, and in my travels I discovered many pilgrims who had taken about the same amount of time. Microsoft: You have failed.
Are you using IIS or self hosting? If you're using IIS, it sounds like it's incorrectly configured, because it seems it's not accepting connections on port 443; I guess you're probably missing a protocol binding (https to port 443). There's a detailed discussion of setting up SSL on IIS7 here that might be useful.
Of course, you could easily verify this using the browser, you should be able to connect to the site using SSL from it.
When I have had this error occur, I have found it very useful to run the service from Visual Studio to get additional information. Right-click on the service, and then select Debug -> Start New Instance from the pop-up menu. VS will launch the service using the WcfTestClient.exe.
WcfTestClient will display all the services and endpoints in your service project. A healthy launch will list your services in the a panel on the left, and provide a Start Page tab in a panel on the right. What will happen in your case, however, is that you'll get a list of services in a panel on the top and an "Additional Information" box along the bottom. Your problem service(s) will have a Status of Error.
Click on a problem service in the upper panel, and the Additional Information box will fill with an error message and stack trace. The message will tell you exactly what that problem mex (metadata exchange) address is. That may be enough of a hint for you to solve the problem. If not, post the Additional Information here and I'll be happy to take a look at it.

WcfTestClient, "The client was unable to retrieve service metadata ..."

I get this error when I attempt to run the wcftestclient application: "The client was unable to retrieve service metadata..."
What is odd that this happens when I load the program; before the UI to choose which service to connect to is loaded. I presume it's "helpfully" remembering the last service to which I connected, unfortunately this is no longer running and I have no idea what it could be (since the wcftestclient exits when this error pops up).
Does any one know where it may be storing this information and how I would go about deleting it?
If you launch the application from the command line, passing in the URI of the service you want to test it works fine.
Check this folder on your machine:
C:\Documents and Settings*User*\Local Settings\Application Data\Temp\Test Client Projects
All your clients are saved there.