I’m not at all familiar with NuSoap.
Can you post the whole WSDL?
Matt
Hi,
I'm trying to do a Soap call. My specs :
- WinXP
- Apache/php (http://localhost)
- Tomcat (http://localhost:8080)
- NoSoap 0.6.9 installed on http://localhost
- Flex 1.5 running on the Tomcat server
Now I have an soap-script that also generates a
WDSL document
(hellowsdl.php) that runs on http://localhost.
I have a MXML document on the Tomcat server :
soap.mxml.
In the MXML document I have a button labeled
"Hello". When I click
the button I get the message
Request implements version
http://schemas.xmlsoap.org/soap/envelope/Response
implements version
What am I doing wrong?
My sources
[code]
<?php
/*
file :
hellowsdl.php
*/
// Pull in the NuSOAP code
require_once('lib/nusoap.php');
// Create the server instance
$server = new soap_server();
// Initialize WSDL support
$server->configureWSDL('hellowsdl',
'urn:hellowsdl');
// Register the method to expose
$server->register('hello',
// method
name
array('name' =>
'xsd:string'), //
input parameters
array('return'
=> 'xsd:void'), // output parameters
'urn:hellowsdl',
//
namespace
'urn:hellowsdl#hello',
// soapaction
'rpc',
// style
'encoded',
// use
'Says hello to the
caller'
//
documentation
);
// Define the method as a PHP function
function hello($name) {
return
'Hello, ' . $name;
}
// Use the request to (try to) invoke the service
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ?
$HTTP_RAW_POST_DATA : '';
$server->service($HTTP_RAW_POST_DATA);
?>
[/code]
soap.mxml :
[code]
<?xml version="1.0"
encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml">
<mx:WebService
id="service" wsdl="http://localhost/hellowsdl.php?
wsdl" >
<mx:operation name="hello">
<mx:request>
<name>My
name</name>
</mx:request>
</mx:operation>
</mx:WebService>
<mx:Form
label="test">
<mx:FormHeading label="holla"/>
<mx:Button label="Hello"
click="service.hello.send()"/>
<mx:FormItem label="Response from server">
<mx:TextArea id="response"/>
</mx:FormItem>
</mx:Form>
</mx:Application>
[/code]
Yahoo! Groups Links
|