Re: SOAP Call Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Looks like your namespaces are mismatching.

In the request SOAP message, the namespace is 'urn:soapRegistrationServer ' and in your code it is 'http://mycompany.com#soapRegistrationServer'

Samisa...

php050904 wrote:
I am attempting to use asp.net to call a php function .... i have created the
following SOAP envelope

<?xml version='1.0' encoding='utf-8'?>
<SOAP:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'> <SOAP:Body><m:my_function xmlns:m='urn:soapRegistrationServer'>
<param1>abcd</param1>
<param2>1234</param2>
</m:my_function>
</SOAP:Body>
</SOAP:Envelope>

I have included these in my request:
webRequest.Headers.Add("SOAPAction", "my_function");
webRequest.ContentType = "text/xml; charset=utf-8";
webRequest.Accept = "text/xml";
webRequest.Method = "POST";

my php file:
class soapRegistrationServer {

    function soapRegistrationServer() {
       $this->responseGenerator= new ResponseGenerator();
       $this->soapServer=new SOAP_Server();
       $this->soapServer->addObjectMap($this,
'http://mycompany.com#soapRegistrationServer');
       $this->__dispatch_map['my_function'] = array('in' => array('param1'
=> 'string', 'param2' => 'string'), 'out' => array('response' => 'string'));

}

function my_function($param1, $param2) { return $this->responseGenerator->generateResponse($param1,
$param2);
        }
}
$server = new soapRegistrationServer();
======================================
I am getting this returned:

SOAP-ENV:Server method '{}' not defined in service
/usr/share/pear/SOAP/Fault.php 49 pear_error pear_error :: method '{}' not
defined in service Server /usr/share/pear/SOAP/Base.php 199 soap_fault
soap_fault -> method '{}' not defined in service Server
/usr/share/pear/SOAP/Server.php 377 _raisesoapfault soap_server -> method
'{}' not defined in service Server /usr/share/pear/SOAP/Server.php 168
parserequest soap_server -> /data/www/mycompany/soapRegistrationServer.php
34 service soap_server -> /data/www/mycompany/soapRegistrationServer.php 110
soapregistrationserver soapregistrationserver ->

I am new to php, what am i doing wrong?

Thanks in advance.

--
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux