BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 02-14-2009, 02:30 AM   #1 (permalink)
Thumbs Must Hurt
 
baran_khan's Avatar
 
Join Date: Apr 2008
Model: 9500
PIN: N/A
Carrier: Airtel
Posts: 110
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default expected START_TAG Exception

Please Login to Remove!

Hello All,

I am trying to call a PHP web service via blackberry application and receiving following exception:

expected START_TAG {http://schemas.xml soap.org/soap/envelope/} Envelope(position: START_TAG)<HTML>@2:7 IN java.io.InputStreamReader@8dskf3w3

And yes, i am using ksoap2 for the purpose and that is preverified as well.

to be more specific it is a xmlpullparser exception.

I went through the forum without any success.

Any suggestions would be of great help!

Thanks!
__________________
Smart People ask for Help!!!

Last edited by baran_khan : 02-14-2009 at 02:59 AM.
Offline  
Old 02-14-2009, 08:18 AM   #2 (permalink)
Thumbs Must Hurt
 
baran_khan's Avatar
 
Join Date: Apr 2008
Model: 9500
PIN: N/A
Carrier: Airtel
Posts: 110
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

C'mmon guys..u reps!!!

here I am giving further details...lets say I got this webservice:

PHP Code:
<?php
require_once("lib/nusoap.php");

$server = new soap_server;
$server->configureWSDL('servicename''urn:servicename','','document'); 

myRegister($server,'DoSomething',
        array(
'in' => array('Name' => 'xsd:string',
                    
'Age' => 'xsd:int'),
        
'out' => array('Pass' => 'xsd:boolean')
        ));

//if in safe mode, raw post data not set:
if (!isset($HTTP_RAW_POST_DATA)) $HTTP_RAW_POST_DATA implode("\r\n"file('php://input'));
$server->service($HTTP_RAW_POST_DATA);

function 
myRegister(&$server,$methodname,$params
{
    
$server->register($methodname,$paramsxxx91;"in"xxx93;,$paramsxxx91;"out"xxx93;,
    
'urn:servicename'// namespace
    
$server->wsdl->endpoint.'#'.$methodname// soapaction
    
'document'// style
    
'literal'// use
    
'N/A' // documentation
    
);
}

function 
DoSomething($Name,$Age)
{
    
$result=false;
    if (
$Name=="mleiv" && $Age==35$result=true;
    return array(
'Pass'=>$result); 
}

?>
I have tried ksoap2 and stub. I am getting either xmlpullparser exception or SaxParserException. I got no issue in using any mechanism. The thing is I am using php web service for the first time and its relaly confusing why I am getting xml related errors everytime.

If any one can create a client for above code, that would be really helpful.

Thanks
Baran Khan
__________________
Smart People ask for Help!!!
Offline  
Old 02-14-2009, 09:41 AM   #3 (permalink)
Thumbs Must Hurt
 
baran_khan's Avatar
 
Join Date: Apr 2008
Model: 9500
PIN: N/A
Carrier: Airtel
Posts: 110
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello all,

well I finally got the solution.

Thanks anyway
__________________
Smart People ask for Help!!!
Offline  
Old 03-03-2009, 01:40 PM   #4 (permalink)
New Member
 
Join Date: Mar 2009
Model: 8310
PIN: N/A
Carrier: ?
Posts: 3
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Can you explain your solution...

I have the same error, how did you solve the problem?

Thank you!
Offline  
Old 03-04-2009, 04:43 PM   #5 (permalink)
New Member
 
Join Date: Mar 2009
Model: 7100T
PIN: N/A
Carrier: T-Mobile
Posts: 1
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by baran_khan View Post
Hello all,

well I finally got the solution.

Thanks anyway
Thank you. That was very helpful!

I have the same problem in the real phone, but it works fine Eclipse.
So, what is the difference?
Offline  
Old 03-26-2009, 07:58 AM   #6 (permalink)
New Member
 
Join Date: Mar 2009
Model: Bold
PIN: N/A
Carrier: Rogers
Posts: 5
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

@baran_khan

Can you share the solution that you found for the xmlpullparser exception ?

Thanks,
Offline  
Old 04-22-2009, 10:47 AM   #7 (permalink)
New Member
 
Join Date: Apr 2009
Model: 8300
PIN: N/A
Carrier: 8300
Posts: 2
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default How did you solve it??

Hello, could you tell us how did you solve the exception.

Thanks a lot
Offline  




Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.