Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,152,754 members, 7,817,085 topics. Date: Saturday, 04 May 2024 at 04:07 AM

Please Can Someone Be Of Help In Webservices / Soap - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Please Can Someone Be Of Help In Webservices / Soap (4061 Views)

I Am In Need Of Help / In Need Of Help Working With Niit Degree...please Help / How Programming Section Can Really Be Of Help. (2) (3) (4)

(1) (2) (Reply) (Go Down)

Please Can Someone Be Of Help In Webservices / Soap by emmawab(m): 11:23am On Jan 11, 2011
Hi Naira Landers,
Please i am new to Webservices and want to Implement it to a system i am to build. The Webservices uses XML and Java as the back end and I am to Interface the client with php front end which i do work with. Now my problem is to interpret the wsdl files and pass the php client script to it so that the users can access the the infos in the server. Please can someone be of help to me in this. I will really appreciate it alot. I tried using the examples i got in the net and couldnt get anything meaningful out of it. Hope to hear from you guys soonest.
Thank you in advance. I am currently in Abuja. Incase you are in Abuja and you want me to get in touch with you on this, I wouldnt mind meeting you. Thanks
Emmanuel (08068951469)
Re: Please Can Someone Be Of Help In Webservices / Soap by kanirip: 5:11pm On Jan 11, 2011
Hello,

I am feeling really bad because I am about to send you back to the Internet where you found 'nothing meaningful'.

Seriously what could you not resolve? The idea of Web Services is that you can pass certain parameters to the Web Service machine using ANY programming language whatsoever.

To create a Web Service client ( an application that communicates with the Web Service Server) using php you should try this for starters http://php.net/manual/en/book.soap.php. It contains useful instructions for communicating with a web service using Php.

If you need any more assistance, let us know.

Best of Luck.
Re: Please Can Someone Be Of Help In Webservices / Soap by Nobody: 10:03pm On Jan 11, 2011
i think you should read more XML RPC as it is far easier than Soap Server,it just a web page using HTTP method to make calls and the server sending the calls(methods) in XML Response,XML Response is popular and easier especially with Zend or PHP5 Lib
Re: Please Can Someone Be Of Help In Webservices / Soap by Kobojunkie: 11:03pm On Jan 11, 2011
Webservices, even those built in Java emiting XML, are built in order that you, rather than focus on the technology they were built on(in this case Java), you focus more on procesing the message calls to the service emit back to you(in this case XML). So, right off the bat, I want to suggest that you completely ignore the fact that the webservice was built using Java technology and anyother technologi-bob and focus instead on what you want to do with the XML soap message that the webservice will send back to you when you call it.


Here is an example of how to consume a soap message in PHP

http://leifmadsen./2009/08/04/consuming-soap-complextype-webservice-with-php/

Also, I think you may do well to acquaint yourself with some of these http://php.net/manual/en/book.soap.php
Re: Please Can Someone Be Of Help In Webservices / Soap by emmawab(m): 10:54am On Jan 12, 2011
kanirip:

Hello,

I am feeling really bad because I am about to send you back to the Internet where you found 'nothing meaningful'.

Seriously what could you not resolve? The idea of Web Services is that you can pass certain parameters to the Web Service machine using ANY programming language whatsoever.

To create a Web Service client ( an application that communicates with the Web Service Server) using php you should try this for starters http://php.net/manual/en/book.soap.php. It contains useful instructions for communicating with a web service using Php.

If you need any more assistance, let us know.

Best of Luck.

Hi Mr Kanirp
Thanks alot for your instructions. As i said that i did not get any meaning full stuff, it isnt that it wasnt meaningful, but it just that some of them have code errors or syntax errors in them which i couldn't debug and then that makes the example not to work as indicated by the writer. Please i have seen that you might be good in this. Would please like you to help me out in this and i wouldnt mind appreciating it with cash if possible as is really what i have to do personally. Please these are the instruction on them.
The project uses web services (wsdl) and Java back end framework. Now i have to incorporate it with Php front View for the client and i am really having problem with it. The Link to the server for the webservices is http://208.45.248.77:7983/gistme/ws/keyword.wsdl . And the View i want to establish using php is http://208.45.248.77:7983/gistmepublic/keyword.html. I was given the key word as GetKeywordBykeyword to establish the connection of the search for the client interface. I need to do a lot of things but this search is to get the knowledge on it to do the rest. Please someone should help me out on this issue. The solution could be sent to my mail at emmawab@yahoo.co.uk or wabeke_emml@yahoo.com or be posted here for others to also learn from. I do trust you guys because i have learn t a lot from this forum. Thank you all for your support and help. Emmanuel
Re: Please Can Someone Be Of Help In Webservices / Soap by emmawab(m): 11:00am On Jan 12, 2011
Hi Kobojunkie, pc guru
Thanks for your contribution. I have gone through those stuff. Still having minor problems. Dont know if you could please solve on of this for me, then i can use it to do the rest of the application. I wouldnt mind given my appreciation in kind to the person that helped me out of this. The instructions is stated below.
The project uses web services (wsdl) and Java back end framework. Now i have to incorporate it with Php front View for the client and i am really having problem with it. The Link to the server for the webservices is http://208.45.248.77:7983/gistme/ws/keyword.wsdl . And the View i want to establish using php is http://208.45.248.77:7983/gistmepublic/keyword.html. I was given the key word as GetKeywordBykeyword to establish the connection of the search for the client interface. I need to do a lot of things but this search is to get the knowledge on it to do the rest. Please someone should help me out on this issue. The solution could be sent to my mail at emmawab@yahoo.co.uk or wabeke_emml@yahoo.com or be posted here for others to also learn from. I do trust you guys because i have learn t a lot from this forum. Thank you all for your support and help. Emmanuel
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 ?>
Re: Please Can Someone Be Of Help In Webservices / Soap by emmawab(m): 12:06pm On Jan 12, 2011
megaplaza:

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 ?>

Hi Megaplaza.
Thanks a lot. But I got some errors. After doing some small syntax error formating from you code which is

<?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.

?>

Then i got this error i run it

Fatal error: Uncaught SoapFault exception: [SOAP-ENV:Client] Validation error in C:\xampp\htdocs\soap\test.php:24 Stack trace: #0 [internal function]: SoapClient->__call('getKeyword', Array) #1 C:\xampp\htdocs\soap\test.php(24): SoapClient->getKeyword(Array) #2 {main} thrown in C:\xampp\htdocs\soap\test.php on line 24.

Please can you be of help to me by trying it out on your pics and see. I would realy like you to be of help man. Thanks a lot.
Emmanuel
Re: Please Can Someone Be Of Help In Webservices / Soap by emmawab(m): 4:08pm On Jan 12, 2011
emmawab:

Hi Megaplaza.
Thanks a lot. But I got some errors. After doing some small syntax error formating from you code which is

<?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.

?>

Then i got this error i run it

Fatal error: Uncaught SoapFault exception: [SOAP-ENV:Client] Validation error in C:\xampp\htdocs\soap\test.php:24 Stack trace: #0 [internal function]: SoapClient->__call('getKeyword', Array) #1 C:\xampp\htdocs\soap\test.php(24): SoapClient->getKeyword(Array) #2 {main} thrown in C:\xampp\htdocs\soap\test.php on line 24.

Please can you be of help to me by trying it out on your pics and see. I would realy like you to be of help man. Thanks a lot.
Emmanuel

Hi Megaplaza.
I formated this code again by adding try and catch to it to get the actual error and i received these error which i cant really figure out.

The Code is

<?php
//require_once('nusoap.php');
$ini = ini_set("soap.wsdl_cache_enabled", "0"wink;
$error = 0;
try
{
//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 = "fan";
$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->GetKeywordByKeyword($param);
}
catch (SoapFault $fault) {
$error = 1;
echo 'Returned the following ERROR: ' .$fault->faultcode . '-' . $fault->faultstring ;
}

//$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.

?>

and the Error is

Returned the following ERROR: SOAP-ENV:Client-Validation errorNULL.

Please waiting for your assistance. Thanks a lot.
Emmanuel
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.
Re: Please Can Someone Be Of Help In Webservices / Soap by emmawab(m): 9:32am On Jan 13, 2011
megaplaza:

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.

Hi Megaplaza,
Goodday. Hope you are good. Indeed I was very happy to hear from you. You really asked what i have been hammering on for someone to help me out and solve this issue. If you could read my mails, you would have seen that i specifically stated it that i wouldnt mind appreciating the work the person will do for me with kind gesture in form of CASH, so I would please that you shouldnt use your phone to read it , so that you use normal system with internet to enable you see the wsdl infos and solve the stuff for me. As i said there are lot of things i would engage you in for this web services stuff if you could solve this one first, then i wouldnt mind contacting you personally to now solve the whole problem for me. Please this is my number and my email address once again. 08068951469 and emmawab@yahoo.co.uk . I would really be happy you solve this stuff for me is really getting late. Please.
Will give you the explanation again.
The project uses web services (wsdl) and Java back end framework. Now i have to incorporate it with Php front View for the client and i am really having problem with it. The Link to the server for the webservices is http://208.45.248.77:7983/gistme/ws/keyword.wsdl . And the View i want to establish using php is http://208.45.248.77:7983/gistmepublic/keyword.html. I was given the key word as GetKeywordBykeyword to establish the connection of the search for the client interface as the parameter for the search. I need to do a lot of things but this search is to get the knowledge on it to do the rest.
If you type the address that ends with keyword.html and type "fan", and click on search, you will get the infos displayed for the search.
PLEASE I WOULD REALY LIKE YOU TO DO THIS FOR ME AS YOU HAVE REQUESTED. And you wouldn't be disappointed for doing this. Your knowledge, your time, your energy, and the money you will spend by using the Internet will not be in vain. I promise you for that.
Thanks So much.
Emmanuel
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.
Re: Please Can Someone Be Of Help In Webservices / Soap by emmawab(m): 2:11pm On Jan 13, 2011
megaplaza:

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.

Hi Megaplaza. Thanks for your response. Please this is the wsdl infos below.

This document had no style information.
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:sch0="http://www.gistme.com/ws/model/mmuser" xmlns:sch1="http://www.gistme.com/ws/model/kword" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.gistme.com/ws/model/kword" targetNamespace="http://www.gistme.com/ws/model/kword">
<wsdl:types>
<xs:schema xmlns:mmuser="http://www.gistme.com/ws/model/mmuser" xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://www.gistme.com/ws/model/mmuser">
<xs:element name="MMUserXML">
<xs:complexType>
<xs:sequence>
<xs:element name="FirstName" type="xs:string"/>
<xs:element name="LastName" type="xs:string"/>
<xs:element name="Phone" type="xs:string"/>
<xs:element name="Phone1" type="xs:string"/>
<xs:element name="Phone2" type="xs:string"/>
<xs:element name="Uscard" type="xs:string"/>
<xs:element name="Month" type="xs:string"/>
<xs:element name="Day" type="xs:string"/>
<xs:element name="Year" type="xs:string"/>
<xs:element name="Email" type="xs:string"/>
<xs:element name="Sex" type="xs:string"/>
<xs:element name="State" type="xs:string"/>
<xs:element name="City" type="xs:string"/>
</xs:sequence>
<xs:attribute ref="mmuser:Id" use="required"/>
</xs:complexType>
</xs:element>
<xs:attribute name="Id" type="xs:int"/>
<xs:attribute name="Phone" type="xs:string"/>
<xs:attribute name="Pin" type="xs:string"/>
<xs:element name="AddMMUserRequest">
<xs:complexType>
<xs:sequence>
<xs:element ref="mmuser:MMUserXML"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AddMMUserResponse">
<xs:complexType>
<xs:sequence>
<xs:element ref="mmuser:MMUserXML"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="MMUserOperationResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="ResponseCode" type="xs:string"/>
<xs:element name="Response" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="GetMMUserRequest">
<xs:complexType>
<xs:attribute ref="mmuser:Phone" use="required"/>
<xs:attribute ref="mmuser:Pin" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="GetMMUserResponse">
<xs:complexType>
<xs:sequence>
<xs:element ref="mmuser:MMUserXML"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="UpdateMMUserRequest">
<xs:complexType>
<xs:sequence>
<xs:element ref="mmuser:MMUserXML"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
<xs:schema xmlns:kword="http://www.gistme.com/ws/model/kword" xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://www.gistme.com/ws/model/kword">
<xs:element name="KeywordXML">
<xs:complexType>
<xs:sequence>
<xs:element name="Datetime" type="xs:string"/>
<xs:element name="Phone" type="xs:string"/>
<xs:element name="Message" type="xs:string"/>
</xs:sequence>
<xs:attribute ref="kword:Id" use="required"/>
</xs:complexType>
</xs:element>
<xs:attribute name="Id" type="xs:int"/>
<xs:attribute name="keyword" type="xs:string"/>
<xs:attribute name="shortCode" type="xs:string"/>
<xs:attribute name="startDate" type="xs:string"/>
<xs:attribute name="endDate" type="xs:string"/>
<xs:element name="GetKeywordRequest">
<xs:complexType>
<xs:attribute ref="kword:keyword" use="required"/>
<xs:attribute ref="kword:shortCode" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="GetKeywordResponse">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="kword:KeywordXML"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="GetKeywordByKeywordRequest">
<xs:complexType>
<xs:attribute ref="kword:keyword" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="GetKeywordByKeywordResponse">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="kword:KeywordXML"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="GetKeywordByRangeRequest">
<xs:complexType>
<xs:attribute ref="kword:keyword" use="required"/>
<xs:attribute ref="kword:startDate" use="required"/>
<xs:attribute ref="kword:endDate" use="required"/>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
<wsdl:message name="GetKeywordByKeywordRequest">
<wsdl:part element="tns:GetKeywordByKeywordRequest" name="GetKeywordByKeywordRequest">
</wsdl:part>
</wsdl:message>
<wsdl:message name="GetKeywordByKeywordResponse">
<wsdl:part element="tns:GetKeywordByKeywordResponse" name="GetKeywordByKeywordResponse">
</wsdl:part>
</wsdl:message>
<wsdl:message name="MMUserOperationResponse">
<wsdl:part element="sch0:MMUserOperationResponse" name="MMUserOperationResponse">
</wsdl:part>
</wsdl:message>
<wsdl:message name="GetKeywordResponse">
<wsdl:part element="tns:GetKeywordResponse" name="GetKeywordResponse">
</wsdl:part>
</wsdl:message>
<wsdl:message name="AddMMUserResponse">
<wsdl:part element="sch0:AddMMUserResponse" name="AddMMUserResponse">
</wsdl:part>
</wsdl:message>
<wsdl:message name="GetMMUserRequest">
<wsdl:part element="sch0:GetMMUserRequest" name="GetMMUserRequest">
</wsdl:part>
</wsdl:message>
<wsdl:message name="GetKeywordByRangeRequest">
<wsdl:part element="tns:GetKeywordByRangeRequest" name="GetKeywordByRangeRequest">
</wsdl:part>
</wsdl:message>
<wsdl:message name="GetMMUserResponse">
<wsdl:part element="sch0:GetMMUserResponse" name="GetMMUserResponse">
</wsdl:part>
</wsdl:message>
<wsdl:message name="AddMMUserRequest">
<wsdl:part element="sch0:AddMMUserRequest" name="AddMMUserRequest">
</wsdl:part>
</wsdl:message>
<wsdl:message name="UpdateMMUserRequest">
<wsdl:part element="sch0:UpdateMMUserRequest" name="UpdateMMUserRequest">
</wsdl:part>
</wsdl:message>
<wsdl:message name="GetKeywordRequest">
<wsdl:part element="tns:GetKeywordRequest" name="GetKeywordRequest">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="Keyword">
<wsdl:operation name="UpdateMMUser">
<wsdl:input message="tns:UpdateMMUserRequest" name="UpdateMMUserRequest">
</wsdl:input>
</wsdl:operation>
<wsdl:operation name="MMUserOperation">
<wsdl:output message="tns:MMUserOperationResponse" name="MMUserOperationResponse">
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="GetKeyword">
<wsdl:input message="tns:GetKeywordRequest" name="GetKeywordRequest">
</wsdl:input>
<wsdl:output message="tns:GetKeywordResponse" name="GetKeywordResponse">
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="GetKeywordByRange">
<wsdl:input message="tns:GetKeywordByRangeRequest" name="GetKeywordByRangeRequest">
</wsdl:input>
</wsdl:operation>
<wsdl:operation name="AddMMUser">
<wsdl:input message="tns:AddMMUserRequest" name="AddMMUserRequest">
</wsdl:input>
<wsdl:output message="tns:AddMMUserResponse" name="AddMMUserResponse">
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="GetKeywordByKeyword">
<wsdl:input message="tns:GetKeywordByKeywordRequest" name="GetKeywordByKeywordRequest">
</wsdl:input>
<wsdl:output message="tns:GetKeywordByKeywordResponse" name="GetKeywordByKeywordResponse">
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="GetMMUser">
<wsdl:input message="tns:GetMMUserRequest" name="GetMMUserRequest">
</wsdl:input>
<wsdl:output message="tns:GetMMUserResponse" name="GetMMUserResponse">
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="KeywordSoap11" type="tns:Keyword">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="UpdateMMUser">
<soap:operation soapAction=""/>
<wsdl:input name="UpdateMMUserRequest">
<soap:body use="literal"/>
</wsdl:input>
</wsdl:operation>
<wsdl:operation name="MMUserOperation">
<soap:operation soapAction=""/>
<wsdl:output name="MMUserOperationResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="GetKeyword">
<soap:operation soapAction=""/>
<wsdl:input name="GetKeywordRequest">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="GetKeywordResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="GetKeywordByRange">
<soap:operation soapAction=""/>
<wsdl:input name="GetKeywordByRangeRequest">
<soap:body use="literal"/>
</wsdl:input>
</wsdl:operation>
<wsdl:operation name="AddMMUser">
<soap:operation soapAction=""/>
<wsdl:input name="AddMMUserRequest">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="AddMMUserResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="GetKeywordByKeyword">
<soap:operation soapAction=""/>
<wsdl:input name="GetKeywordByKeywordRequest">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="GetKeywordByKeywordResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="GetMMUser">
<soap:operation soapAction=""/>
<wsdl:input name="GetMMUserRequest">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="GetMMUserResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="KeywordService">
<wsdl:port binding="tns:KeywordSoap11" name="KeywordSoap11">
<soap:address location="http://208.45.248.77:7983/gistme/ws/keywordServices"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

Thanks once again. Waiting.
Emma
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
Re: Please Can Someone Be Of Help In Webservices / Soap by emmawab(m): 3:57pm On Jan 13, 2011
megaplaza:

<?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
Hi Megaplaza,
Please i tried running 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);

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

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

var_dump($response);

?>

The error was

Fatal error: Uncaught SoapFault exception: [SOAP-ENV:Client] Validation error in C:\xampp\htdocs\soap\test.php:14 Stack trace: #0 [internal function]: SoapClient->__call('GetKeywordByKey, ', Array) #1 C:\xampp\htdocs\soap\test.php(14): SoapClient->GetKeywordByKeyword(Array) #2 {main} thrown in C:\xampp\htdocs\soap\test.php on line 14

Thanks Waiting for your reply.
Emma
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
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.
Re: Please Can Someone Be Of Help In Webservices / Soap by emmawab(m): 4:54pm On Jan 13, 2011
megaplaza:

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

Hi Please
The php version is [PHP: 5.2.6]. Also  I asked the Java guy in our office to know if there is any authentication for the server, he said there is non for now for the programme he wrote. He just want me to see if i can make it view information. The Java spec doesnt have any security now because is just to view that i am doing now. If i cando this, then the main server will now be set up that will require security. Hope you understand. Also there is no website address is just the  ip. That was why i said you should please try to use a normal system to view it and see the result or output. Once again the address to search is http://208.45.248.77:7983/gistmepublic/keyword.html. and the wsdl address once again is this http://208.45.248.77:7983/gistme/ws/keyword.wsdl.

After using the new function you gave me, i got this error

Fatal error: Uncaught SoapFault exception: [HTTP] Not Found in C:\xampp\htdocs\soap\test.php:14 Stack trace: #0 [internal function]: SoapClient->__doRequest('<?xml version=", ', 'http://208.45.2, ', '', 1, 0) #1 [internal function]: SoapClient->__call('MMUserOperation', Array) #2 C:\xampp\htdocs\soap\test.php(14): SoapClient->MMUserOperation() #3 {main} thrown in C:\xampp\htdocs\soap\test.php on line 14


Please if is possible, can you send me your phone through my email box so that i can call you. emmawab@yahoo.co.uk or wabeke_emml@yahoo.com.
Thank you so much.
Emmanuel
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.
Re: Please Can Someone Be Of Help In Webservices / Soap by emmawab(m): 10:02am On Jan 14, 2011
megaplaza:

<?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.


Hi
Please i formated 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);

$response = $client -> __get Functions( );

var_dump($response);

?>
and i got this as an error using my local host

Parse error: syntax error, unexpected T_STRING in C:\xampp\htdocs\soap\test2.php on line 10

IT seems the code has an error in it. pls check. thanks.
Emma
Re: Please Can Someone Be Of Help In Webservices / Soap by emmawab(m): 10:17am On Jan 14, 2011
Hi Megaplaza.
Please i also uploaded this to the server

<?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->MMUserOperation();
$response = $client->GetKeywordByKeyword($param);

var_dump($response);

?>

and i got this as an error

Fatal error: Call to undefined method soapclient::GetKeywordByKeyword() in /home/smsgist/public_html/soap/test.php on line 16.

Thanks
Emmanuel
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
Re: Please Can Someone Be Of Help In Webservices / Soap by emmawab(m): 11:43am On Jan 14, 2011
Hi. Megaplaza
Please correct this code for me so that i test it locally and online.

<?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 = $client -> __get Functions( );

//var_dump($response);

echo $response;

?>
The error is
Parse error: syntax error, unexpected T_STRING in C:\xampp\htdocs\soap\test2.php on line 10

IT seems the __get Function(); is not written well. Please check that code and correct it for me so that i test it again. Thanks

Emma
Re: Please Can Someone Be Of Help In Webservices / Soap by emmawab(m): 11:53am On Jan 14, 2011
Hi Megaplaza.
Please i asked the java guy he said that in the wsdl,
<xs:element name="GetKeywordByKeywordRequest">
<xs:complexType>
<xs:attribute ref="kword:keyword" use="required"/>
</xs:complexType>
</xs:element>

That it required a keyword which i must pass to it. That i should also take note of the name space. That is why is saying that is not defined. That i must define it before requesting, that there might be different type of getkeywordbykeyword that if is not defined before requesting, that it will be error. That what i have to add to the code is keyword because is only search that we are doing to display.

Thanks man
Emmanuel
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
Re: Please Can Someone Be Of Help In Webservices / Soap by emmawab(m): 12:37pm On Jan 14, 2011
Hi Megaplaza,
Please i asked the java guy about the parameters and stuff, He said that i got this error ( Fatal error: Call to undefined method soapclient::GetKeywordByKeyword() ) Because i did not define the keyword which is in wdsl file eg

<xs:element name="GetKeywordByKeywordRequest">
<xs:complexType>
<xs:attribute ref="kword:keyword" use="required"/>
</xs:complexType>
</xs:element>

That is required in the attribute defined in the wsdl. That also i should take note of name space. For example GetKeywordByKeywordRequest might be plenty in the wsdl file that if i did not specify the attributes or define it before passing it, it wil give error. So please define it and send back to me lets see.

These is the code

<?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->MMUserOperation();
$response = $client->GetKeywordByKeyword($param);

var_dump($response);

?>

Thanks waiting
Emma
Re: Please Can Someone Be Of Help In Webservices / Soap by emmawab(m): 12:50pm On Jan 14, 2011
Hi Megaplaza,
Please after doing this,

<?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);

$response = $client ->__getFunctions();

var_dump($response);

//echo $response;

?>

Then i got this informations in my browser

array(cool { [0]=> string(59) "void UpdateMMUser(UpdateMMUserRequest $UpdateMMUserRequest)" [1]=> string(41) "MMUserOperationResponse MMUserOperation()" [2]=> string(67) "GetKeywordResponse GetKeyword(GetKeywordRequest $GetKeywordRequest)" [3]=> string(74) "void GetKeywordByRange(GetKeywordByRangeRequest $GetKeywordByRangeRequest)" [4]=> string(63) "AddMMUserResponse AddMMUser(AddMMUserRequest $AddMMUserRequest)" [5]=> string(103) "GetKeywordByKeywordResponse GetKeywordByKeyword(GetKeywordByKeywordRequest $GetKeywordByKeywordRequest)" [6]=> string(63) "GetMMUserResponse GetMMUser(GetMMUserRequest $GetMMUserRequest)" [7]=> string(35) "receiveMTSMSResponse receiveMTSMS()" }

Please check. It seems we are making progress.
Thanks Emma. Also dont forget the define the keyword for the name space of the getkeywordbykeywordrequest.
Thanks Man
Emma
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
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
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
Re: Please Can Someone Be Of Help In Webservices / Soap by emmawab(m): 5:17pm On Jan 14, 2011
megaplaza:

<?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

Hi Megaplaza
The first sample Error is

Fatal error: Uncaught SoapFault exception: [SOAP-ENV:Client] Validation error in C:\xampp\htdocs\soap\test44.php:15 Stack trace: #0 [internal function]: SoapClient->__call('GetKeywordByKey, ', Array) #1 C:\xampp\htdocs\soap\test44.php(15): SoapClient->GetKeywordByKeyword(Object(stdClass)) #2 {main} thrown in C:\xampp\htdocs\soap\test44.php on line 15

The Second sample error is this

object(SoapFault)#4 (10) { ["message":protected]=> string(16) "Validation error" ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(31) "C:\xampp\htdocs\soap\test55.php" ["line":protected]=> int(11) ["trace":"Exception":private]=> array(2) { [0]=> array(4) { ["function"]=> string(6) "__call" ["class"]=> string(10) "SoapClient" ["type"]=> string(2) "->" ["args"]=> array(2) { [0]=> string(19) "GetKeywordByKeyword" [1]=> array(1) { [0]=> object(stdClass)#2 (1) { ["keyword"]=> string(3) "fan" } } } } [1]=> array(6) { ["file"]=> string(31) "C:\xampp\htdocs\soap\test55.php" ["line"]=> int(11) ["function"]=> string(19) "GetKeywordByKeyword" ["class"]=> string(10) "SoapClient" ["type"]=> string(2) "->" ["args"]=> array(1) { [0]=> object(stdClass)#2 (1) { ["keyword"]=> string(3) "fan" } } } } ["previous":"Exception":private]=> NULL ["faultstring"]=> string(16) "Validation error" ["faultcode"]=> string(15) "SOAP-ENV:Client" ["detail"]=> object(stdClass)#3 (1) { ["ValidationError"]=> array(2) { [0]=> string(113) "cvc-complex-type.3.2.2: Attribute 'keyword' is not allowed to appear in element 'ns1:GetKeywordByKeywordRequest'." [1]=> string(96) "cvc-complex-type.4: Attribute 'keyword' must appear on element 'ns1:GetKeywordByKeywordRequest'." } } }

Thanks Man
Emma
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

(1) (2) (Reply)

Payment Gateway Integration In Nigeria / Leading It Firms In Nigeria? / How Do Go About Building A Database Management System For My Church?

(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. 169
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.