Bad Request. The api-version in the query string is not supported using Service Bus Explorer 2.6.1.0 - servicebus

I get the following error using Service Bus Explorer 2.6.1 while I try to connect against Service Bus 1.1 installed in another server:
<14:38:36> Exception: The remote server returned an error: (400) Bad Request. The api-version in the query string is not supported. Either remove it from the Uri or use one of '2012-03,2012-08,2013-04,2013-07'..TrackingId:ec6d38ba-866b-4e44-9fbd-1a21a03dc3e8_GWIN-VM77MKIHMEG,TimeStamp:11/04/2015 10:37:54
The string used is:
Endpoint=sb://SERVER/HelloWorld;StsEndpoint=https://SERVER:9355/HelloWorld;RuntimePort=9354;ManagementPort=9355;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=ekDH5AYdCqXlzetx+5PoLqrcEUeRaqqunRpmUN5Ao4I=
Any one know how to fix this error?
Regards,

Related

How to get proper https server response in apache camel DSL?

I am trying to hit https server using https4 component I want to get whatever response the server throwing it maybe success or failed here is my route.
from("direct:start")
.setHeader(Exchange.HTTP_QUERY,constant("USERNAME=__&PASSWORD=__"))
.to("https4://someAddress.com/api/controls/uploadAndImportFileFromCSV")
.to("stream:out");
Output I'm getting:
org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[ID-rajat-Lenovo-G50-70-1513247400372-0-1]
org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1847)
.........
Caused by: org.apache.camel.http.common.HttpOperationFailedException: HTTP operation failed invoking https4://someAddress.com/api/controls/uploadAndImportFileFromCSV?USERNAME=__&PASSWORD=__ with statusCode: 599
But whenever I hit this URL on web browser I am getting the accurate response what server throws
like {"sessionId":"2985416A1F1122694031261B55F0277F.jvm1","_ERROR_MESSAGE_LIST_":[" The following required parameter is missing: [IN]uploadAndImportFile.configId]","The following required parameter is missing: [IN][uploadAndImportFile.fileTypeEnumId]"],"removePathAlias":false,"loggedIn":true,"USERNAME":"admin","_LOGIN_PASSED_":"TRUE","webSiteId":"API"}
This is what I want to get from camel
After a brief browsing about camel exception randomly I got my solution is already clearly mention on org.apache.camel.http4.
If throwExceptionOnFailure=false the HttpOperationFailedException will not be thrown for failed response codes. This allows you to get any response from the remote server.
from("direct:start")....to("https4://.......?throwExceptionOnFailure=false")

Hitting Unexpected token < in JSON when registering app to MobileFirst server 8.0

I'm trying to register my app in SITServer using MobileFirst 8.0 by following this tutorial
1) Hitting this error:
mfpdev app register SITServer
Verifying server configuration... Error: Cannot connect to server
'SITServer' at 'http://xxx.xxx.xxx.xxx:9080'. Reason: Failed to set
runtime details.: Unexpected token < in JSON at position 0: HTTP 404 -
Not Found
$ mfpdev server info
2) Is it caused by the difference in server version? My Local server version is 8.0.0-2016101416 and SITServer version is 8.0.0.00-20160822-2140
I suspect this happened due to some of the changes you've made to the server.xml; you did not mention which changes you've done so I would advise to double check those (any real reason to change these?).
Either way, both HTTP and HTTPS are supported, yes.

Routing error - No subscribers were found. WCF-SQL Adapter

I'm attempting to call a Stored proc, get some data back, map that to the desired schema, output the result.
However, I'm getting the following error:
The Messaging engine failed to process a message submitted by
adapter:WCF-SQL Source
URL:mssql://master-biztalk//ReportServer?InboundId=batman. Details:The
published message could not be routed because no subscribers were
found. This error occurs if the subscribing orchestration or send port
has not been enlisted, or if some of the message properties necessary
for subscription evaluation have not been promoted. Please use the
Biztalk Administration console to troubleshoot this failure.
I'm not quite certain why I'm getting this error. Searching the web hasn't enlightened me any further. Following are some of the steps I've undertaken
Consume adapter = generated schema.
Map this schema to desired output.
Receive port in the Orchestration which connects to a receive message which has the Schema generated by the consume adapter as the type.
Added a receive port in Biztalk, configured WCF-SQL and setup bindings. (Typed polling)
Linked this receive port to the logical receive port in orchestration.
I haven't promoted any elements in messages.
Thanks for the help
EDIT: I updated the pipeline to XML, and now I'm getting the following error:
There was a failure executing the receive pipeline:
"Microsoft.BizTalk.DefaultPipelines.XMLReceive,
Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35" Source: "XML disassembler" Receive
Port: "DatabaseReceiveport" URI:
"mssql://master-biztalk//ReportServer?InboundId=batman" Reason:
Finding the document specification by message type
"http://schemas.microsoft.com/Sql/2008/05/TypedPolling/batman#TypedPolling"
failed. Verify the schema deployed properly.
I'm not quite sure what it's trying to do above.
This means that either:
The Project/Assembly with the specified Schema has not been deployed.
The WCF SQL configuration is off somehow, frequently the InBoundId parameter. That's where "batman" would come from.
In the All Artifacts Application, check the Schemas folder for that Schema by Root Node and Namespace.

WCF service called from compact framework

I have been trying to follow this article on communicating with a WCF service from a mobile device (using compact framework 3.5). I have the service running on the desktop, and it tells me that it's running as:
http://localhost:1414/MyService.svc
I can see this in my client, but when I try to access it, I get this error:
There was no endpoint listening at http://localhost:1414/MyService.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
So I did:
InnerException: {"No connection could be made because the target machine actively refused it"}
I am running from the emulator, which the article states did not work - I therefore suspect that I have encountered the same issue. So my question is, does anyone know why this issue may occur?
EDIT:
Just to clarify, this works fine when deployed to the device. It's just the emulator that has the problem.
EDIT:
Thanks to #Shiraz Bhaiji I have made some progress with this now, but am now getting the error returned:
CFFaultException
This seems to be the only error information I can get, and it's caused by the call:
MyServiceServiceClient client = new MyServiceServiceClient(binding, endpoint);
returnString = client.MyFunc1();
I have changed the endpoint to reference my I.P. address directly as follows (the WCF service is running on my PC at the minute):
Binding binding = MyServiceServiceClient.CreateDefaultBinding();
string remoteAddress = MyServiceServiceClient.EndpointAddress.Uri.ToString();
EndpointAddress endpoint = new EndpointAddress("http://1.1.1.1/MyService/MyService.svc");
Check Eric Schneider's answer on this link: http://social.msdn.microsoft.com/Forums/en/netfxcompact/thread/b5be4c83-40ca-423b-9068-8614779fed5f
Connect to the server using the IP address.
Try changing localhost to the actual name of your computer.

Service reference error when moving dev. environment from XP to W7

I am building an application and I am using web services for getting data from a server. It was working fine when I was developing on my XP machine but had to switch to Windows 7. On the new machine I grabbed the latest version of the code using sourcesafe.
However, when I try to add a service reference in the solution or update an existing one I get the following error:
There was an error downloading 'http://localhost:52490/Service/CustomerService.asmx'.
The request failed with the error message:
Server Error in '/' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not create type 'Digital_Server.CustomerService'.
Source Error
Source File: /Service/CustomerService.asmxLine: 1
Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927
--.
Metadata contains a reference that cannot be resolved: 'http://localhost:52490/Service/CustomerService.asmx'.
An error occurred while receiving the HTTP response to http://localhost:52490/Service/CustomerService.asmx. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.
The underlying connection was closed: An unexpected error occurred on a receive.
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
An existing connection was forcibly closed by the remote host
If the service is defined in the current solution, try building the solution and adding the service reference again.
Does it has anything to do with the IIS or is it any configuration file I have to change in the solution?
Any help is appreciated.
How do you deploy your app to the server? Via a zip file?
Perhaps it extracts the files without the path.