BlackBerryForums.com : Your Number One BlackBerry Community
     

»Sponsored Links


BlackBerryApps.com Best Sellers



Closed Thread
 
LinkBack Thread Tools
  (#1 (permalink)) Old
baran_khan Offline
Thumbs Must Hurt
 
baran_khan's Avatar
 
Posts: 107
Join Date: Apr 2008
Model: 8800
PIN: N/A
Carrier: Airtel
Default expected START_TAG Exception - 02-14-2009, 02:30 AM

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.
   
Sponsored Links
Please Login or Register to Remove these Advertisements!

  (#2 (permalink)) Old
baran_khan Offline
Thumbs Must Hurt
 
baran_khan's Avatar
 
Posts: 107
Join Date: Apr 2008
Model: 8800
PIN: N/A
Carrier: Airtel
Default 02-14-2009, 08:18 AM

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,$params["in"],$params["out"],
    
'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!!!
   
  (#3 (permalink)) Old
baran_khan Offline
Thumbs Must Hurt
 
baran_khan's Avatar
 
Posts: 107
Join Date: Apr 2008
Model: 8800
PIN: N/A
Carrier: Airtel
Default 02-14-2009, 09:41 AM

Hello all,

well I finally got the solution.

Thanks anyway


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

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

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

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?
   
  (#6 (permalink)) Old
subashbala Offline
New Member
 
Posts: 5
Join Date: Mar 2009
Model: Bold
PIN: N/A
Carrier: Rogers
Default 03-26-2009, 08:58 AM

@baran_khan

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

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

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

Thanks a lot
   
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright © 2004-2009 BlackBerryFAQ.com, BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of Research In Motion Limited.