10-25-2013 10:37 AM
New to BB Webservices, but have done some WCF and other interfacing with Web services in general. Using VStudio 2010, C#, .Net 4.0 and trying both using the Proxy classes, and separately Service References within Visual Studio.
Both approaches get the same results, but I'll keep my question related to the Service References.
So I create the service ref for the utility service and it all just works (albiet not much in the utility classes) I copy the samples, nearly verbatum. I get the Active Directory authenticator, the encoded username, set the app config binding to authenticate Basic. Utility works fine.
BWSClient (created by the service reference) is parallel in concept to the BWSService object in the proxy classes, but always returns a "505 - HTTP Version Not Supported." from the server. All research points to "I'm asking for HTTP 1.1, and BES only supports 1.0 or less"
Is this really the case, and if so, does anyone know where to set HTTP version in either the proxy classes or service reference? (BTW, I have been granted "Security" rights in the test environment.)
Thanks in advance, all.
10-25-2013 11:07 AM
Which call exactly is returning the 505? It would seem odd that the getEncodedUsername would succeed but another call would fail due to requiring a different HTTP version.
What values are you setting in your METADATA?
What URL is the above call being made to (feel free to generacize)?
Does the BWS#echo() call complete successfully?
10-25-2013 12:35 PM
Thanks for the reply Garett. Unfortunately (or not depending on perspective) I can't give a lot of detail as you hint at companies not allowing public disclosure things. Let's see how I can get thru that.
I just found that the original call has an..."Accept-Encoding: gzip, deflate" while the second (with authentication) call is "Accept-Encoding: gzip, deflate,gzip, deflate" Which seems odd.
10-25-2013 01:12 PM
In your response you state that you are using BAA and BWS, these are in no way compatible and BAA is actually removed from any BES higher than version 5. The URLs in use should be:
How are you setting up your authenticator?
How did you create your proxy? Did you use the steps in the guide?
10-27-2013 10:37 AM
Again, thanks for the reply.
As you can see in the original post, I have been attempting both the sample code as in the guide, as well as a Service Reference which seems to be the more accepted method in Visual Studio to create and use any Web Service at this point.
In both cases, the WSDL is used to create proxy classes. So, I would have to assume that a web reference to BAA would be pulling a WSDL from the server given by that team and supported by that server. I'm not attempting version specific calls, so that can be tabled for now.
Regardless, the error "HTTP Version not supported" is an HTTP/1.1 in response to an HTTP/1.1 request (found with the help of Fiddler). It would seem that RIM is returning one of those "It's really not that error according to the RFC, but we have some other problem that we don't have an appropriate error message to return, so this should be good enough for our developers community." It happens, I know. But it is a frustrating path when the message is misleading.
10-28-2013 05:12 AM - edited 10-28-2013 05:19 AM
If you try using a BAA WSDL then the results will be unreliable. Please only use BWS. The samples as well as all of our documentation will keep BWS and BAA completely separate and not mix the two.
10-30-2013 03:44 PM
I'm not mixing the two, only using them as comparison for troubleshooting. If a service is exposed, then any process discovering should (given proper credentials) be able to use it. Otherwise, remove the service exposure.
Regardless of the service, returning an "HTTP version not supported" when the request and response are the same version is just bad form. It is like me telling you in English that I don't speak English.
Thanks for your time, but you're not offering any viable explanation or solution/workaround. I do appreciate your effort, but was hoping someone else had hit this hurdle before and recognized the problem.
Thanks again for your responses.
10-30-2013 04:56 PM
I can't say I've ever seen this, and have worked on just about every version of BAS.
With respect to my previous posts, I want to stay focused on BWS and the previous messages were unclear as to which interface was being targeted. I have never seen an HTTP 505 response which makes me think there may be an issue with the way the service is configured on your server... You would need to engage server support (the BES Board) for further support troubleshooting, or TSupport if you have an active contract.
11-07-2013 03:33 AM
I happened to stumble over this error, too, just a few days ago. What ended up being the reason was that I was using a wrong "encoded" user name from the BWSUtil web service - I had passed in wrong input data, and thus the resulting encoded user name (which is then used for subsequent BWS calls) was wrong, and I got this rather confusing error as a result.