Note that there are some explanatory texts on larger screens.

plurals
  1. POFetching a PDF file using SOAP and PHP
    primarykey
    data
    text
    <p><strong>EDIT: THIS QUESTION IS INVALID SINCE THE SERVER I'M USING HAS SUDDENLY EXPIRED. PLEASE IGNORE</strong></p> <p>I'm new to SoapClient in PHP, and I'm trying to fetch a PDF by passing three parameters and grabbing the result. Here's the WSDL file I'm working with (I don't really have much/any control over this part):</p> <pre><code>&lt;!-- this WSDL file was automatically generated by 4D --&gt; &lt;definitions name="A_WebService" targetNamespace="http://www.4d.com/namespace/default" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.4d.com/namespace/default" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt; &lt;message name="WS_ME_StatementRequest"&gt; &lt;part name="FuneralHomeID" type="xsd:string"/&gt; &lt;part name="Month" type="xsd:int"/&gt; &lt;part name="Year" type="xsd:string"/&gt; &lt;/message&gt; &lt;message name="WS_ME_StatementResponse"&gt; &lt;part name="StatementPDF" type="xsd:base64Binary"/&gt; &lt;/message&gt; &lt;portType name="A_WebServiceRPC"&gt; &lt;operation name="WS_ME_Statement"&gt; &lt;input message="tns:WS_ME_StatementRequest"/&gt; &lt;output message="tns:WS_ME_StatementResponse"/&gt; &lt;/operation&gt; &lt;/portType&gt; &lt;binding name="A_WebServiceBinding" type="tns:A_WebServiceRPC"&gt; &lt;soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc" /&gt; &lt;operation name="WS_ME_Statement"&gt; &lt;documentation&gt;Inputs: None Outputs: text variable&lt;/documentation&gt; &lt;soap:operation soapAction="A_WebService#WS_ME_Statement"/&gt; &lt;input&gt; &lt;soap:body use="encoded" namespace="http://www.4d.com/namespace/default" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/&gt; &lt;/input&gt; &lt;output&gt; &lt;soap:body use="encoded" namespace="http://www.4d.com/namespace/default" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/&gt; &lt;/output&gt; &lt;/operation&gt; &lt;/binding&gt; &lt;service name="A_WebService"&gt; &lt;documentation&gt;&lt;/documentation&gt; &lt;port name="A_WebServicePort" binding="tns:A_WebServiceBinding"&gt; &lt;soap:address location="http://69.128.94.30:8080/4DSOAP/"/&gt; &lt;/port&gt; &lt;/service&gt; &lt;/definitions&gt; </code></pre> <p>And here's what I have so far which is just returning 404's:</p> <pre><code>&lt;?php header("content-type: application/pdf"); $client = new SoapClient('http://69.128.94.30:8080/4DSOAP/'); $result = $client-&gt;WS_ME_StatementRequest(array('FuneralHomeID' =&gt; '0008-00', 'Month' =&gt; 11, 'Year' =&gt; "2008")); $pdfdoc = $result-&gt;WS_ME_StatementResponse-&gt;StatementPDF; print($pdfdoc); </code></pre> <p>Any ideas on what I'm doing wrong?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload