Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
New Developer
Posts: 60
Registered: ‎12-20-2010
My Device: Black Berry Bold 9900
My Carrier: KPN

Calling web services over HTTP/HTTPS?

After many days of frustration, I finally got the courage to ask for some help here on the BlackBerry Forums :smileyhappy:

 

I'm having problems calling webservices over HTTPS, I always get the following error message:

 

There was an error during service introspection.
WSDLException: faultCode=PARSER_ERROR: Problem parsing 'https://****.******/******.asmx?WSDL'.: org.xml.sax.SAXParseException: The element type "META" must be terminated by the matching end-tag "</META>".

 

(Note: I'm calling this webservice by it's WSDL data connection function of Flash Builder, but it's having problem reading the WSDL correctly I guess). It works fine when I call it from the browser.

 

Does the SDK of BlackBerry have any nice features calling webservices or is it really needed to do it with the functionalities of Flash Builder? I spitted through the SDK, but didn't find anything. Maybe I'm overseeing something :smileysad: 

 

Does someone have any good example on calling web services over HTTPS?

 

Hopefully someone can push me into the right direction, I'm losing faith here :smileyhappy:

 

Thanks in advanced!

BlackBerry World submissions

YahtC - http://appworld.blackberry.com/webstore/content/24150872 - Check it out!

Free Yahtzee game for you and your friends! Step up to the challenge and see who is the Yahtzee-champion!

Leave a review, thanks!


Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Calling web services over HTTP/HTTPS?

 


jadouber wrote: ...

There was an error during service introspection.
WSDLException: faultCode=PARSER_ERROR: Problem parsing 'https://****.******/******.asmx?WSDL'.: org.xml.sax.SAXParseException: The element type "META" must be terminated by the matching end-tag "</META>".


Are you sure that the content of the response is actually valid?  From the looks of things, it may be malformed data.  In fact, I wonder if it's actually just an HTML page with an unterminated META tag.

 

WSDL is supposed to be XML.  In XML, all begin tags must either be matched with end tags, or the tag must have a trailing slash to properly close it (if it has no content).  That means if your response data has <META attr1="foo"> followed by some other tags, instead of either <META attr1="foo"></META> or <META attr1="foo"/> (note the forward slash just before the closing angle bracket), then it's likely the cause of the above error message.

 

In any case, your above results do not appear to have anything to do with HTTPS per se, but rather with the content of the response you are getting.

 


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
New Developer
Posts: 60
Registered: ‎12-20-2010
My Device: Black Berry Bold 9900
My Carrier: KPN

Re: Calling web services over HTTP/HTTPS?

That was one of the things I was afraid of, that the data isn't correct when calling the WSDL.

 

I have one solution for that, and that is creating a web service in between, that can give a correct WSDL and still can communicate with the HTTPS web service that is giving me all 'my headaches' :smileyhappy:

 

But is that supported, when you send in a Playbook application to the App World, to create a web service between an existing product and your Playbook application? Will it still be approved? If so, I can take that as a solution; if not I must find something else (maybe someone can give me a hint then)?

 

Thanks anyway for the reply, too bad it was something I allready knew. I thought it maybe could be the way I called it with Flash Builder or if it was HTTPS, but it's not. Darn it :smileywink:

 

BlackBerry World submissions

YahtC - http://appworld.blackberry.com/webstore/content/24150872 - Check it out!

Free Yahtzee game for you and your friends! Step up to the challenge and see who is the Yahtzee-champion!

Leave a review, thanks!


New Developer
Posts: 27
Registered: ‎12-11-2010
My Device: Not Specified

Re: Calling web services over HTTP/HTTPS?

I *think* it is but I can think of two caveats. Firstly apps must run without substanital extra work from the user I don't know if that will apply to your app and I imagine creating an account for an online service is ok.

 

The second thing that I remember being mentioned in the Q&A of one of the webcasts was that RIM require all user generated content to be kiddy safe and have protection mechanisms in place. They said that in the case of some web content that might not be possible. I don't know how far RIM will go with this clause because I'm sure they will allow things like Twitter and Facebook apps so I can only imagine that this just one of those clauses they want in there so they can say ban a 4chan app if someone proposed that.

New Developer
Posts: 60
Registered: ‎12-20-2010
My Device: Black Berry Bold 9900
My Carrier: KPN

Re: Calling web services over HTTP/HTTPS?

Sounds reasonable, but my created web service in the middle will only work as a passthrough, and the server address/credentials for the application will be provided by the end-user, so it's safe. It will work on a specific application only, so it can't be anything like 4chan :smileyhappy: More something like Twitter and Facebook.

 

Maybe I just should give it a shot. If it's not accepted, I will get it in a mail from BlackBerry when I'm sending in the application and I can modify it then.

 

One other question: does someone have any good example code for using the web services with any of the SDK calls of QNX?

BlackBerry World submissions

YahtC - http://appworld.blackberry.com/webstore/content/24150872 - Check it out!

Free Yahtzee game for you and your friends! Step up to the challenge and see who is the Yahtzee-champion!

Leave a review, thanks!