what does this mean (little more)?

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

 



<< i posted this in the earlier thread "what does this mean?" - but i think
nobody is checking that thread anymore,
so i'm reposting again.  >>


alright.. couple things.

 1. The active-x object follows SOAP 1.2 and uses content-type:
 application/soap-xml, which is different from what PEAR libraries use.
 2. after changing the header from activex app, i get result (see later in
 this message)

 I included the auto generated WSDL file at the end of this message. It
 appears that maybe my port isn't being named properly!? like something's
not
 matching up right with my namespaces!? if so, how do you correct?

 Given the request i have from before (see original message), what is wrong
 with the following php code to call PEAR SOAP server...
 Please help!!!


 $replication=new ReplicationSoapServer();
 require_once 'SOAP/Server.php';
 $server = new SOAP_Server;
 $server->_auto_translation = true;
 $server->addObjectMap($replication,'urn:replicate');

 if (isset($_SERVER['REQUEST_METHOD']) &&
$_SERVER['REQUEST_METHOD']=='POST')
 {
  @file_put_contents('debug.txt',$HTTP_RAW_POST_DATA);
     $server->service($HTTP_RAW_POST_DATA);
  } else {
     require_once 'SOAP/Disco.php';
     $disco = new SOAP_DISCO_Server($server,'ReplicationSoapServer');
     header("Content-type: text/xml");
     if (isset($_SERVER['QUERY_STRING']) &&
        strcasecmp($_SERVER['QUERY_STRING'],'wsdl')==0) {
         echo $disco->getWSDL();
     } else {
         echo $disco->getDISCO();
     }
     exit;
 }




 ... with this dispatch.....



     function ReplicationSoapServer() {
   $this->__dispatch_map['replicate'] =
    array('in' => array('lang' => 'string', 'transaction_id' => 'string',
 'packet_number' => 'string', 'packet_count' => 'string', 'object_id' =>
 'string','packet_number' => 'string','payload_type' => 'string','payload'
=>
 'string','message' => 'string'),
     'out' => array('message' => 'string')
     );
  }


 .. i get repsonse below...

 <?xml version="1.0" encoding="UTF-8"?>
 <SOAP-ENV:Envelope
 xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
 xmlns:xsd="http://www.w3.org/2001/XMLSchema";
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
 xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
 SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
 <SOAP-ENV:Body>
 <SOAP-ENV:Fault>
 <faultcode xsi:type="xsd:QName">SOAP-ENV:Server</faultcode>
 <faultstring xsi:type="xsd:string">method
 '{http://xstandard.com/1999/replication}replicate' not defined in
 service</faultstring>
 <faultactor xsi:type="xsd:anyURI"></faultactor>
 <detail xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="Struct[5]"
 SOAP-ENC:offset="[0]">
 <item>
 <file xsi:type="xsd:string">/usr/local/lib/php/SOAP/Fault.php</file>
 <line xsi:type="xsd:int">49</line>
 <function xsi:type="xsd:string">pear_error</function>
 <class xsi:type="xsd:string">pear_error</class>
 <type xsi:type="xsd:string">::</type>
 <args xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:anyType[5]"
 SOAP-ENC:offset="[0]">
 <item xsi:type="xsd:string">method
 '{http://xstandard.com/1999/replication}replicate' not defined in
 service</item>
 <item xsi:type="xsd:string">Server</item>
 <item/>
 <item/>
 <item xsi:type="xsd:string"></item></args></item>
 <item>
 <file xsi:type="xsd:string">/usr/local/lib/php/SOAP/Base.php</file>
 <line xsi:type="xsd:int">199</line>
 <function xsi:type="xsd:string">soap_fault</function>
 <class xsi:type="xsd:string">soap_fault</class>
 <type xsi:type="xsd:string">-&gt;</type>
 <args xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:anyType[6]"
 SOAP-ENC:offset="[0]">
 <item xsi:type="xsd:string">method
 '{http://xstandard.com/1999/replication}replicate' not defined in
 service</item>
 <item xsi:type="xsd:string">Server</item>
 <item xsi:type="xsd:string"></item>
 <item xsi:type="xsd:string"></item>
 <item/>
 <item/></args></item>


 .... this is the generated WSDL info....


   <?xml version="1.0" ?>
 - <definitions name="ReplicationSoapServer"
 targetNamespace="urn:ReplicationSoapServer"
 xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
 xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
 xmlns:tns="urn:ReplicationSoapServer"
 xmlns:xsd="http://www.w3.org/2001/XMLSchema";
 xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
 xmlns="http://schemas.xmlsoap.org/wsdl/";>
   <types xmlns="http://schemas.xmlsoap.org/wsdl/"; />
 - <portType name="ReplicationSoapServerPort">
 - <operation name="replicate">
   <input message="tns:replicateRequest" />
   <output message="tns:replicateResponse" />
   </operation>
   </portType>
 - <binding name="ReplicationSoapServerBinding"
 type="tns:ReplicationSoapServerPort">
   <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http";
 />
 - <operation name="replicate">
   <soap:operation
soapAction="urn:replicate#replicationsoapserver#replicate"
 />
 - <input>
   <soap:body use="encoded" namespace="urn:replicate"
 encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; />
   </input>
 - <output>
   <soap:body use="encoded" namespace="urn:replicate"
 encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; />
   </output>
   </operation>
   </binding>
 - <service name="ReplicationSoapServerService">
   <documentation />
 - <port name="ReplicationSoapServerPort"
 binding="tns:ReplicationSoapServerBinding">
   <soap:address
location="http://192.168.1.7/ftbwebservices/replication.php";
 />
   </port>
   </service>
 - <message name="replicateRequest">
   <part name="lang" type="xsd:string" />
   <part name="transaction_id" type="xsd:string" />
   <part name="packet_number" type="xsd:string" />
   <part name="packet_count" type="xsd:string" />
   <part name="object_id" type="xsd:string" />
   <part name="payload_type" type="xsd:string" />
   <part name="payload" type="xsd:string" />
   <part name="message" type="xsd:string" />
   </message>
 - <message name="replicateResponse">
   <part name="message" type="xsd:string" />
   </message>
   </definitions>

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