Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,156,455 members, 7,830,268 topics. Date: Thursday, 16 May 2024 at 06:59 PM

Megaplaza's Posts

Nairaland Forum / Megaplaza's Profile / Megaplaza's Posts

(1) (2) (3) (4) (of 4 pages)

Programming / Re: Please Can Someone Be Of Help In Webservices / Soap by megaplaza(m): 3:38pm On Jan 18, 2011
<?php
$ini = ini_set("soap.wsdl_cache_enabled",
"0"wink;

$wslink = "http://208.45.248.77:7983/gistme/ws/keyword.wsdl";

$options = array('features' =>
SOAP_USE_XSI_ARRAY_TYPE);

$value = "fan";

$param = array("GetKeywordByKeywordRequest" => array("keyword" => $value));

$client = new SoapClient($wslink, $options);

$response = $client->GetKeywordByKeyword($param);

var_dump($response);

?>

try this and post the output to me
Programming / Re: Please Can Someone Be Of Help In Webservices / Soap by megaplaza(m): 7:06am On Jan 15, 2011
<?php
public $keyword;

function __construct($keyword){
$this->keyword = $keyword;
}

?>
Save the code above as 'GetKeywordByKeywordRequest.php' then create another with the code below to test the web service.

<?php
require_once 'GetKeywordByKeywordRequest.php';

$value = "fan";

$param = new GetKeywordByKeyword($value);

$ini = ini_set("soap.wsdl_cache_enabled",
"0"wink;

$wslink = "http://208.45.248.77:7983/
gistme/ws/keyword.wsdl";

$options = array('features' =>
SOAP_USE_XSI_ARRAY_TYPE +
SOAP_SINGLE_ARRAYS);

$client = new SoapClient($wslink,$options);

$response = $client-
>GetKeywordByKeyword
($param);



var_dump($response);
?>

if it fails try these ones

<?php

$ini = ini_set("soap.wsdl_cache_enabled",
"0"wink;

$wslink = "http://208.45.248.77:7983/
gistme/ws/keyword.wsdl";

$options = array('features' =>
SOAP_USE_XSI_ARRAY_TYPE +
SOAP_SINGLE_ARRAYS);

$client = new SoapClient($wslink,$options);

$param = new stdClass;

$param->keyword
= "fan";

$response = $client-
>GetKeywordByKeyword
($param);

var_dump($response);
?>

Else try this
<?php

$ini = ini_set("soap.wsdl_cache_enabled",  "0"wink;

$wslink = "http://208.45.248.77:7983/
gistme/ws/keyword.wsdl";

$options = array('features' =>
SOAP_USE_XSI_ARRAY_TYPE +
SOAP_SINGLE_ARRAYS);

$client = new SoapClient($wslink, $options);

$param = array
('GetKeywordByKeywordRequest' =>array
('keyword' => "fan"wink);


$response = $client->GetKeywordByKeyword($param);

var_dump($response);
?>

Else
<?php
$ini = ini_set("soap.wsdl_cache_enabled",
"0"wink;

$wslink = "http://208.45.248.77:7983/
gistme/ws/keyword.wsdl";

$client = new SoapClient($wslink, array
("trace" =>1, "exceptions" => 0));

$param = array
('GetKeywordByKeywordRequest' =>array
('keyword' => "fan"wink);

$response = $client-
>GetKeywordByKeyword
($param);

var_dump($response);
?>

If it fails try this

<?php

$ini = ini_set("soap.wsdl_cache_enabled",
"0"wink;

$wslink = "http://208.45.248.77:7983/
gistme/ws/keyword.wsdl";

$options = array('features' =>
SOAP_USE_XSI_ARRAY_TYPE +
SOAP_SINGLE_ARRAYS);

$client = new SoapClient($wslink,$options);

$GetKeywordByKeywordRequest->keyword
= "fan";

$response = $client-
>GetKeywordByKeyword
($GetKeywordByKeywordRequest);

var_dump($response);
?>


If it fails try this


<?php
$ini = ini_set("soap.wsdl_cache_enabled",
"0"wink;

$wslink = "http://208.45.248.77:7983/
gistme/ws/keyword.wsdl";

$client = new SoapClient($wslink, array
("trace" =>1, "exceptions" => 0));

$param->keyword
= "fan";

$response = $client-
>GetKeywordByKeyword
($param);

var_dump($response);
?>
Else try this
<?php
$ini = ini_set("soap.wsdl_cache_enabled",
"0"wink;


class GetKeywordByKeywordRequest{
public $keyword = "fan";
}

$param = new GetKeywordByKeywordRequest();



$wslink = "http://208.45.248.77:7983/
gistme/ws/keyword.wsdl";

$options = array('features' =>
SOAP_USE_XSI_ARRAY_TYPE +
SOAP_SINGLE_ARRAYS);

$client = new SoapClient($wslink,$options);



$response = $client-
>GetKeywordByKeyword
($param);

var_dump($response);
?>

Else try this
<?php
class GetKeywordByKeywordRequest{
public $keyword = "fan";
}

$ini = ini_set("soap.wsdl_cache_enabled",
"0"wink;

$wslink = "http://208.45.248.77:7983/
gistme/ws/keyword.wsdl";

$client = new SoapClient($wslink, array
("trace" =>1, "exceptions" => 0));

$param = new GetKeywordByKeywordRequest();

$response = $client-
>GetKeywordByKeyword
($param);

var_dump($response);
?>
Try these codes and pls don't include nusoap.php in these codes cos nusoap contains soapclient class which might be interfering with PHP 5 soap client. Pls for each paste the output here and also send to my mail. Mega
Programming / Re: Please Can Someone Be Of Help In Webservices / Soap by megaplaza(m): 4:32pm On Jan 14, 2011
<?php

include("nusoap.php"wink;

$ini = ini_set("soap.wsdl_cache_enabled",
"0"wink;

$wslink = "http://208.45.248.77:7983/
gistme/ws/keyword.wsdl";

$options = array('features' =>
SOAP_USE_XSI_ARRAY_TYPE +
SOAP_SINGLE_ARRAYS);

$client = new SoapClient($wslink,$options);

$GetKeywordByKeywordRequest->keyword = "fan";

$response = $client-
>GetKeywordByKeyword($GetKeywordByKeywordRequest);

var_dump($response);
?>

If it fails try this
<?php

$ini = ini_set("soap.wsdl_cache_enabled",
"0"wink;

$wslink = "http://208.45.248.77:7983/
gistme/ws/keyword.wsdl";

$client = new SoapClient($wslink, array("trace" =>1, "exceptions" => 0));

$GetKeywordByKeywordRequest->keyword = "fan";

$response = $client-
>GetKeywordByKeyword($GetKeywordByKeywordRequest);

var_dump($response);

?>
Try this
Programming / Re: Please Can Someone Be Of Help In Webservices / Soap by megaplaza(m): 2:54pm On Jan 14, 2011
<?php
include("nusoap.php"wink;
$ini = ini_set("soap.wsdl_cache_enabled",
"0"wink;
$wslink = "http://208.45.248.77:7983/
gistme/ws/keyword.wsdl";
$options = array('features' =>
SOAP_USE_XSI_ARRAY_TYPE +
SOAP_SINGLE_ARRAYS);
$client = new SoapClient($wslink, $options);

$value = "fan";

$response = $client-
>GetKeywordByKeyword($value);

var_dump($response);
?>

try this one now, lets see
Programming / Re: Please Can Someone Be Of Help In Webservices / Soap by megaplaza(m): 1:27pm On Jan 14, 2011
<?php
include("nusoap.php"wink;

$ini = ini_set("soap.wsdl_cache_enabled",
"0"wink;

$wslink = "http://208.45.248.77:7983/
gistme/ws/keyword.wsdl";

$options = array('features' =>
SOAP_USE_XSI_ARRAY_TYPE +
SOAP_SINGLE_ARRAYS);

$client = new SoapClient($wslink, $options);

$value = "fan";
$param = array
("keyword" =>
$value);

$response = $client-
>GetKeywordByKeyword($param);

var_dump($response);
?>

Then try

<?php
include("nusoap.php"wink;

$ini = ini_set("soap.wsdl_cache_enabled",
"0"wink;

$wslink = "http://208.45.248.77:7983/
gistme/ws/keyword.wsdl";

$options = array('features' =>
SOAP_USE_XSI_ARRAY_TYPE +
SOAP_SINGLE_ARRAYS);

$client = new SoapClient($wslink, $options);

$value = "fan";
$param = array
("GetKeywordByKeywordRequest" =>
$value);

$response = $client-
>GetKeywordByKeyword($param);

var_dump($response);
?>

Then try this one two
<?php
include("nusoap.php"wink;

$ini = ini_set("soap.wsdl_cache_enabled",
"0"wink;

$wslink = "http://208.45.248.77:7983/
gistme/ws/keyword.wsdl";

$options = array('features' =>
SOAP_USE_XSI_ARRAY_TYPE +
SOAP_SINGLE_ARRAYS);

$client = new SoapClient($wslink, $options);

$value = "fan";
$param = array
("keyword" =>
$value);

$response = $client-
>GetKeywordByKeywordRequest($param);

var_dump($response);
?>


Thanks
Programming / Re: Please Can Someone Be Of Help In Webservices / Soap by megaplaza(m): 12:09pm On Jan 14, 2011
See i don't know why, it is not working, that __getFunctions(); is defined in PHP, i use the example i gave u with var_dump on my localhost, wampserver, and it displayed expected result.
Try the 'getFunction()' code on the web host, lets see the outcome
Programming / Re: Please Can Someone Be Of Help In Webservices / Soap by megaplaza(m): 10:34am On Jan 14, 2011
in the one uu called in ur localhost, replace var_dump($response); with 'echo $response;' then in the one you called on a web host, it seems getkeyordbykeyword is not defined, as the java guy the exact name of the function and the parameter it requires and then the type of the parameter. Thansk
Programming / Re: Help Me With Code To Disable The Maximize Button On My Jframe (java). by megaplaza(m): 9:30am On Jan 14, 2011
i think you should simply use frame.resizeable(false); to set the frame resizeable to false then to hide a frame, frame.setVisible(false); and frame.setVisible(true); to make it visible. Thanks, i noticed this was asked in 2007 but i answered cos it might be helpful to others.
Programming / Re: Please Can Someone Be Of Help In Webservices / Soap by megaplaza(m): 5:43pm On Jan 13, 2011
<?php
$ini = ini_set("soap.wsdl_cache_enabled", "0"wink;

$wslink = "http://208.45.248.77:7983/ gistme/ws/ keyword.wsdl";

$options = array('features' => SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ARRAYS);

$client = new SoapClient($wslink, $options);

$response = $ c l i e n t -
> _ _ g e t F unct i o n s ( );

var_dump($response);

?>

This should display a description of the functions define in the web service, now lets use this to track to know if the php is connecting at all to the java web service, then if YES, we can now focus on why the getkeywordbykeyword function is not working. Try and let me know the outcome. Also are you using an online web host or a localhost for testing the php code.
Programming / Re: Please Can Someone Be Of Help In Webservices / Soap by megaplaza(m): 4:24pm On Jan 13, 2011
i suggest you call this method

$response = $client->MMUserOperation();

Don't pass any parameter to it, this is also a function you can call but doesn't accept parameters, so lets use it as a means of debugging to determine if we are passing the wrong parameter or what?
Use the above code to replace

$response = $client->GetKeywordByKeyword($param);

Run try and lemme know the outcome.
Programming / Re: Please Can Someone Be Of Help In Webservices / Soap by megaplaza(m): 4:07pm On Jan 13, 2011
hmmmm, ok did you run the phpversion(); code to know the version you web host supports? Also, can i have the official web address of the Java web service host, cause maybe it require that you first call a web service function that authenticates you before calling other functions.
Thanks,
Megaplaza
Programming / Re: Please Can Someone Be Of Help In Webservices / Soap by megaplaza(m): 3:38pm On Jan 13, 2011
<?php
$ini = ini_set("soap.wsdl_cache_enabled", "0"wink;

$wslink = "http://208.45.248.77:7983/ gistme/ws/ keyword.wsdl";

$options = array('features' => SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ARRAYS);

$client = new SoapClient($wslink, $options);

$value = "fan";
$param = array("GetKeywordByKeywordRequest" => $value);

$response = $client->GetKeywordByKeyword($param);

var_dump($response);

?>

The 'getkeywordbykeyword' method parameter name is 'GetKeywordByKeywordRequest' you were using 'keyword', now try this, if it doesn't work then i suggest you check if the specification requires that each client (php program) should authenticate itself b4 calling the web service methods. Try it and let me know. Also check the version of php you host supports, using if the code doesn't work
<?php
phpversion();
?>
You can only use Nusoap if they support less than PHP 5.0, if it is PHP 5.0, the above code stands.
Also does the host of the java web service have official website for developers so that i can know their required procedures b4 using their services, cause some web service host requires that you register and authenticate yourself b4 using their service. Hopefull the above code will work.
Thanks
Megaplaza
Programming / Programmers' Joke Picked Off The Net by megaplaza(m): 1:56pm On Jan 13, 2011
Programming is like sex. One mistake and
you have to support it for the rest of your
life
Why do programmers always mix up
Halloween and Christmas?
Because Oct 31 equals Dec 25.
Deliver yesterday, code today, think
tomorrow.
Debugging is twice as hard as writing the
code in the first place. Therefore, if you
write the code as cleverly as possible, you
are –by definition–not smart enough to
debug it.
Any code of your own that you haven’t
looked at for six or more months might as
well have been written by someone else
Software is like sex: It’s better when it’s
free.
The trouble with programmers is that you
can never tell what a programmer is doing
until it ’s too late
Q: Whats the object-oriented way to
become wealthy?
A: Inheritance
Unix is user friendly. It’s just very particular
about who its friends are
Did you mean: recursion
http://www.google.com/search?
hl=en&q=recursion
Q: What is the difference between a
programmer and a non-programmer ?
A: The non-programmer thinks a kilobyte is
1000 bytes while a programmer is
convinced that a kilometer is 1024 meters
I’d like to make the world a better place, but
they won’t give me the source code.
Software developers like to solve problems.
If there are no problems handily available,
they will create their own problems.
There’s no place like 127.0.0.1
Q: Why did the programmer quit his job?
A: Because he didn ’t get arrays.
A good programmer is someone who looks
both ways before crossing a one-way
street
Q: What’s the difference between Software
Development and Sex?
A: In sex, you don ’t get a bonus for
releasing early.
Documentation is like sex. When it’s good,
it’s very good. When it’s bad, it’s better than
nothing.
The shortest programmer joke: I’m nearly
done
JIT Happens!
There are two types of people in this world
those who understand recursion and those
who don ’t understand that there are two
types of people in this world,
Administrator = Admin is traitor
Programmer’s son asks his father: Dad, why
do the sun rise on the east and set on the
west?
Father: It works? don ’t touch it.
Q: Why don’t programmers pray?
A: They don’t like throwing null pointer
exceptions!
In C++, your friends can see your privates
Funniest source code comments :
view plain copy to clipboard print ?
0 1 . / / D e a r m a i n t a i n e r :
0 2 . / / O n c e y o u a r e d o n e t r y i n g t o ' o p t i
0 3 . / / a n d h a v e r e a l i z e d w h a t a t e r r i b l e
0 4 . / / p l e a s e i n c r e m e n t t h e f o l l o w i n g c o
0 5 . / / t o t h e n e x t g u y :
0 6 . / / t o t a l _ h o u r s _ w a s t e d _ h e r e = 1 3
view plain copy to clipboard print ?
0 1 . / / W h e n I w r o t e t h i s , o n l y G o d a n d I
0 2 . / / N o w , G o d o n l y k n o w s
view plain copy to clipboard print ?
0 1 . / / I ' m s o r r y .
view plain copy to clipboard print ?
0 1 . / / A l w a y s r e t u r n s t r u e .
0 2 . p u b l i c b o o l e a n i s A v a i l a b l e ( ) {
0 3 . r e t u r n f a l s e ;
0 4 . }
view plain copy to clipboard print ?
0 1 . / / Y o u a r e n o t m e a n t t o u n d e r s t a n d t
view plain copy to clipboard print ?
0 1 . / / I a m n o t s u r e i f w e n e e d t h i s , b u
view plain copy to clipboard print ?
0 1 . / / D e a r f u t u r e m e . P l e a s e f o r g i v e m e
0 2 . / / I c a n ' t e v e n b e g i n t o e x p r e s s h o w
view plain copy to clipboard print ?
0 1 . d o u b l e p e n e t r a t i o n ; / / o u c h
view plain copy to clipboard print ?
0 1 . / / M r . C o m p i l e r , p l e a s e d o n o t r e a d
view plain copy to clipboard print ?
0 1 . / / H a r d t o e x p l a i n
view plain copy to clipboard print ?
0 1 . / / E m p t y c o n s t r u c t o r t o s a t i s f y t h e
view plain copy to clipboard print ?
0 1 . p u b l i c G e t R a n d o m N u m b e r ( )
0 2 . {
0 3 . / / C h o s e n b y a f a i r l y r o l e n d i c e
0 4 . / / g u a r a n t e e d t o b e r a n d o m
0 5 . r e t u r n 3 ;
0 6 . }
view plain copy to clipboard print ?
0 1 . / / D O N ' T S C R E W W I T H T H I S C O D E U N L E S S
Rating: 5.0
Programming / Re: Please Can Someone Be Of Help In Webservices / Soap by megaplaza(m): 12:59pm On Jan 13, 2011
ok, well i don't have a php webhost, am using offline web server, how do i test my php code. I need access to the php web host you are using. Open the wsdl in a web browser then copy the output to a notepad, ssave aand attache here or copy and paste here, let me read it and get what i want. I can't do aanything without access to the host so the only alternative now is to open thee java wsdl in a web browser then copy the output aand paste here, so i can pick the details i want. But first open http://208.45.248.77:7983/gistme/ws/
keyword.wsdl on a web browser then copy and paste the output here. That might help.
Programming / Re: Please Can Someone Be Of Help In Webservices / Soap by megaplaza(m): 6:32pm On Jan 12, 2011
Sorry for my delayed response, see am using my phone to browse so cant view your java wsdl file. But i think the problem lies in the fact that u r passing wrong parameter and not calling the right method.
Check the web service description, check the number of parameter the method you will call requires, their data type then the name of the function you want to call.
For instance, a java web service function that add is done as follows
Public int add(int a, int b){
Return a + b,
}
Then when preparing parameter to be passed in php u do the following
$param = array("a" => 3, "b" => 4);

Then call the java add method as follows in php:
$result = $client->add($param);

Then print result by
var_dump($result);

In your case , read the wsdl file to see the name of the function you intend to use, say getKeywordByKey(), then decription of data type of parameter passed to it, and how many parameter it requires. Then make the appropriate ammendments or just give me the details, let me build it up for you

Also ensure that SOAP is supported in the server u r using.
Use
<?php
Echo php_info();
?>

Save as conf.php then test to see all the features supported and the PHP version you are using. This code wont work for versions less than PHP 5.O, if you have version PHP 4.O, THEN download and use NUSOAP library. But i believe you problem is from what i stated above not version problem.
Programming / Re: Please Can Someone Be Of Help In Webservices / Soap by megaplaza(m): 11:52am On Jan 12, 2011
Try the code below then, i suggest you test the java web service to make sure it works. If you are using Netbeans IDE, test the web service by selecting the web service then right click and click test web service. Then make sure you have PHP 5.0 version or above else u will need to dwload n use nusoap library, then write the following PHP code and try out:
<?php
$ini = ini_set("soap.wsdl_cache_enabled", "0"wink;
//set java web service wsdl link
$wslink = "http://208.45.248.77:7983/gistme/ws/ keyword.wsdl";

//set connection options
$options = array('features' => SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ARRAYS);

//create soap client
$client = new SoapClient($wslink, $options);

//create array of parameter to be
//passed

$value = "lagos";
$param = array("keyword" => $value);

//keyword above is the parameter or //variable name of the java function u
//intend to call.
call the java web
//service fucntion
say getKeyword

$response = $client->getKeyword($param);

var_dump($response);
// or use echo or print. The response
//can be
in form of array then process
//and extract values u need.

?>
//end of code
Save as test.php and test it.
i had similar problem when doing my project work as an undergraduate. This worked for me. I built the java web service using netbeans then used the php code above to call it. Pls ask me questions if u have any. NB REMEMBER TO REMOVE ALL COMMENTS BTW <?PHP AND ?>

(1) (2) (3) (4) (of 4 pages)

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 70
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.