[FLEX,NuSoap,PHP] webservices probleem

Pagina: 1
Acties:

Onderwerpen


Acties:
  • 0 Henk 'm!

Verwijderd

Topicstarter
Hoi.

Ik ben beetje bezig met Flex, en met name webservices. Ik heb als test machine :

* WinXP
* Apache (localhost)
* Apache Tomcat (localhost:8080)

Ik heb op de normale webserver (localhost) een webservice-server gebouwd mbv van NuSoap (0.6.9). De script genereert een WSDL document. Hier onder de source

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?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);

?>


Op de Tomcat server heb ik Macromedia Flex 1.5 draaien en heb een MXML script :

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?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>Henk</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>



Als ik nu op de button "Hello" klik krijg ik de melding

code:
1
Request implements version http://schemas.xmlsoap.org/soap/envelope/Response implements version


uuuh ... wat doe ik fout?

[ Voor 22% gewijzigd door Verwijderd op 17-04-2005 18:57 ]