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

Native Development

Reply
Regular Contributor
asifmunir
Posts: 51
Registered: ‎08-07-2013
My Device: blackberry z10
My Carrier: asif

webservice

hello every one

i m developing a blackberry app using php web service

but we can not access web service in local

i m pasing a url

http://localhost/webservice/file.php

 please correct my mistake

Please use plain text.
BlackBerry Development Advisor (Retired)
mwoolley
Posts: 571
Registered: ‎06-25-2010
My Device: Z10
My Carrier: Vodafone

Re: webservice

localhost refers to your BlackBerry device and there is no php web server running there. If you mean to access a web server on (say) your PC then you should specify its IP address instead.

--------------------------------------------------------------------------------------------
Feel free to press the like button on the right side if you liked my attempts to help :-)
And please mark posts as solved if you think I found the solution or set you on its path. Thanks!
Follow me on Twitter: @mdwrim
Please use plain text.
Regular Contributor
asifmunir
Posts: 51
Registered: ‎08-07-2013
My Device: blackberry z10
My Carrier: asif

Re: webservice

thank for reply

but ip address?

network ip address sir

Please use plain text.
BlackBerry Development Advisor (Retired)
mwoolley
Posts: 571
Registered: ‎06-25-2010
My Device: Z10
My Carrier: Vodafone

Re: webservice

The IP address of the machine upon which your file.php file is located.

 

Or have you packaged the file inside your application bar file?

--------------------------------------------------------------------------------------------
Feel free to press the like button on the right side if you liked my attempts to help :-)
And please mark posts as solved if you think I found the solution or set you on its path. Thanks!
Follow me on Twitter: @mdwrim
Please use plain text.
Regular Contributor
asifmunir
Posts: 51
Registered: ‎08-07-2013
My Device: blackberry z10
My Carrier: asif

Re: webservice

sir i don't know about mechine ip addrees

meachine mac adress??

what i can write in bar file in a project?

i m new in blackberry development

 

Please use plain text.
Developer
mzex
Posts: 368
Registered: ‎06-30-2012
My Device: Playbook, Z10LE, DevAlpha C
My Carrier: Telenor, Mobitel

Re: webservice

Uh man, If you dont know what is IP address you need to learn lot of stuff, before you start programming. I suggest you first read some networking tutorial, then start to develop applications which consumes web services.

Please use plain text.
Regular Contributor
asifmunir
Posts: 51
Registered: ‎08-07-2013
My Device: blackberry z10
My Carrier: asif

Re: webservice

sir i know about networking but my question is mechine ip address?

Please use plain text.
Developer
mzex
Posts: 368
Registered: ‎06-30-2012
My Device: Playbook, Z10LE, DevAlpha C
My Carrier: Telenor, Mobitel

Re: webservice

Yes, IP address of machine where is web service. You need to have connectivity from your bb10 device to that machine. If that is windows machine, open command prompt and type ipconfig /all, there you will find out what is IP address of that machine. If that is Linux machine, open up terminal and type ifconfig.

Please use plain text.
BlackBerry Development Advisor (Retired)
mwoolley
Posts: 571
Registered: ‎06-25-2010
My Device: Z10
My Carrier: Vodafone

Re: webservice

Hi Asifmunir

 

1. are you trying to access a web service / web page, written in php on a web server that is running on a PC such as your own desktop machine for example?

 

2. Are you testing with the simulator or a real BlackBerry device?

 

Whatever your answer to (2), you cannot use "localhost" as the name of the computer (the "host name") in your URL because localhost, when evaluated by a BlackBerry device, simulator or real, means "the Blackberry device" and your web page is not located there. So you need the IP address of the PC that your web page is located on. As the other forum poster says, you can determine this by running either ipconfig (Windows) or ifconfig (Linux).

 

I hope this clarifies the issue for you.

 

Regards

 

Martin

--------------------------------------------------------------------------------------------
Feel free to press the like button on the right side if you liked my attempts to help :-)
And please mark posts as solved if you think I found the solution or set you on its path. Thanks!
Follow me on Twitter: @mdwrim
Please use plain text.
Contributor
danywarner
Posts: 38
Registered: ‎09-06-2013
My Device: BlackBerry Z10
My Carrier: Claro

Re: webservice

if you want to know you IP on windows you open programs/accesories/command prompt on linux/mac osx you open Terminal on windows: type this command on the console: ipconfig on linux/mac osx type ifconfig it will specify you the machine IP where I suppose your web service is running.



_______________________________________________________
If you've been helped click on Like Button, if you've been saved download the app.

Developer of Easy Memes
Please use plain text.