PHP Soap server, gSoap client

View: New views
1 Messages — Rating Filter:   Alert me  

PHP Soap server, gSoap client

by Jurgen Schmidt :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I'm trying to use the PHP SoapServer with gSoap as a client.

The server is like this:

$server = new SoapServer("wsdl/s.wsdl");
$server->setClass('MyClass', $arg);
$server->handle();

The important parts of the wsdl are:
-----------------------------------------------------------------------------
    <complexType name='Status'>
      <xsd:sequence>
        <xsd:element name='Id' type='xsd:integer' />
        <xsd:element name='Health' type='xsd:integer' />
      </xsd:sequence>
    </complexType>
[...]
<message name='syslogRequest'>
  <part name='Status' element='tns:Status' />
  <part name='LogLevel' type='xsd:integer' />
  <part name='Component' type='xsd:string' />
  <part name='Message' type='xsd:string' />
</message>
-----------------------------------------------------------------------------

It works fine with a PHP SoapClient.

When sending a request to it from gSoap, it doesn't work.
My gSoap "syslog" message is like this on the wire:

-----------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:ns1="http://a.a.a/M"
  xmlns:ns2="urn:s-master">
<SOAP-ENV:Body
+SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<ns2:syslog>
  <ns1:Status>
    <Id></Id>
    <Health>0</Health>
  </ns1:Status>
  <LogLevel>2</LogLevel>
  <Component>MainComponent</Component>
  <Message>testMessage</Message>
</ns2:syslog>
</SOAP-ENV:Body></SOAP-ENV:Envelope>
-----------------------------------------------------------------------------

And the request recieved by the handler is empty.

The soap request seems to be correct. Is it a wsdl issue? Why can't php
parse
+it?

Thanks, regards

Jürgen