NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Pass values to a complex type from a client utilizing SOAP?


Joined: 02 Nov 2004
Posts: 45
Location: Omaha, NE
Reply with quote
Question:

How do you pass in values to a complex type from a client utilizing SOAP?

Summary:

The following WSDL SOAP Request "ReceiverMenuDeleteRequest" requires the element named "Authentication" and "TID".

With "TID"; I believe I can pass in a string value like:

Code:
array('TID'=>'06000C18',


However, how do I pass values to the complexType "Authentication"?

Currently, I have it set-up as:

Code:
$Authentication = array('RqstAppl'=>'CMDLINK', 'RqstApplVers'=>'1.00', 'Client'=>'KBREQ', 'User'=>'OPSSUPPORT', 'Pswd'=>'ENCRYPTED');

$result = $client->call('ReceiverMenuDeleteRequest', array('TID'=>'06000C18', 'Authentication'=>$Authentication));



The errors I keep receiving are:

1. Response Envelope: Error: HTTP Error: socket read of headers timed out

2. My Request SOAP envelope is not filled in:

Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 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/" xmlns:si="http://soapinterop.org/xsd" xmlns:ns6="http://soap.dtn.com">
<SOAP-ENV:Body>
<ns6:ReceiverMenuDeleteRequest xmlns:ns6="http://soap.dtn.com">
<ReceiverMenuDeleteRequest xsi:nil="true"/>
</ns6:ReceiverMenuDeleteRequest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>



Below is a snippet of the WSDL and the full PHP code that I use to call the WSDL.

Thank you for reading this post.


WSDL:

Code:
<xsd:complexType name="Authentication">
   <xsd:sequence>
   <!-- Request Application -->
   <xsd:element maxOccurs="1" minOccurs="1" name="RqstAppl" type="xsd:string"/>
   <!-- Request Application Version -->
   <xsd:element maxOccurs="1" minOccurs="1" name="RqstApplVers" type="xsd:string"/>
   <!-- Client using Request Application -->
   <xsd:element maxOccurs="1" minOccurs="1" name="Client" type="xsd:string"/>
   <!-- Client's User using Request Application -->
   <xsd:element maxOccurs="1" minOccurs="1" name="User" type="xsd:string"/>
   <!-- Client's User Password (Encrypted) -->
   <xsd:element maxOccurs="1" minOccurs="1" name="Pswd" type="xsd:string"/>
   </xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ReceiverMenuDeleteRequest">
   <xsd:sequence>
      <xsd:element
         maxOccurs="1"
         minOccurs="1"
         name="AuthInfo"
         nillable="true"
         type="color1:Authentication"/>
      <xsd:element maxOccurs="1" minOccurs="1" name="TID" type="xsd:string"/>
   </xsd:sequence>
</xsd:complexType>


PHP:

Code:
<?
require_once('nusoap.php');

$wsdl = 'http://color-app-dev.eng.dtn.com/ColorSystemInterface.wsdl';
$client=new soapclient($wsdl, true);

$err = $client->getError();
if ($err) {
    echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
}
// Call the SOAP method
$Authentication = array('RqstAppl'=>'CMDLINK', 'RqstApplVers'=>'1.00', 'Client'=>'KBREQ', 'User'=>'OPSSUPPORT', 'Pswd'=>'ENCRYPTED');


$result = $client->call('ReceiverMenuDeleteRequest', array('TID'=>'06000C18', 'Authentication'=>$Authentication));
// Check for a fault
if ($client->fault) {
    echo '<h2>Fault</h2><pre>';
    print_r($result);
    echo '</pre>';
} else {
    // Check for errors
    $err = $client->getError();
    if ($err) {
        // Display the error
        echo '<h2>Error</h2><pre>' . $err . '</pre>';
    } else {
        // Display the result
        echo '<h2>Result</h2><pre>';
        print_r($result);
    echo '</pre>';
    }
}
echo 'Web Service: Color System Interface ReceiverMenuDeleteRequest<br>';
echo 'WSDL: '.$wsdl.'<br>';
echo 'Parameters: ';
print_r($param);
echo '<br><br>Response Envelope: ';
if(!$err = $client->getError()){
   print_r($response);
} else {
   print 'Error: '.$err;
}
// Display the request and response
echo '<h2>Request</h2>';
echo '<pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>';
echo '<h2>Response</h2>';
echo '<pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';
// Display the debug messages
echo '<h2>Debug</h2>';
echo '<pre>' . htmlspecialchars($client->debug_str, ENT_QUOTES) . '</pre>';
?>


Entire WSDL

Code:

<?xml version="1.0" encoding="UTF-8"?>
<WSDL:definitions
    name="ColorSystemInterface"
    targetNamespace="http://soap.dtn.com"
    xmlns="http://soap.dtn.com"
    xmlns:DIME="http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/"
    xmlns:MIME="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/"
    xmlns:color1="http://soap.dtn.com"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <WSDL:documentation xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/">Color System Web Service</WSDL:documentation>
    <WSDL:types>
        <xsd:schema
            attributeFormDefault="qualified"
            elementFormDefault="qualified"
            targetNamespace="http://soap.dtn.com"
            xmlns="http://soap.dtn.com"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema">
            <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
            <xsd:simpleType name="TextMimeTypeEnum">
                <xsd:restriction base="xsd:string">
                    <xsd:enumeration value="text"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:simpleType name="TextMimeSubTypeEnum">
                <xsd:restriction base="xsd:string">
                    <xsd:enumeration value="vnd-dtn-color"/>
                    <xsd:enumeration value="vnd-dtn-fd"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:simpleType name="ImageMimeTypeEnum">
                <xsd:restriction base="xsd:string">
                    <xsd:enumeration value="image"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:simpleType name="ImageMimeSubTypeEnum">
                <xsd:restriction base="xsd:string">
                    <xsd:enumeration value="vnd-dtn-gif"/>
                    <xsd:enumeration value="vnd-dtn-targa"/>
                    <xsd:enumeration value="vnd-fd-gif"/>
                    <xsd:enumeration value="vnd-fd-compressed-bmp"/>
                    <xsd:enumeration value="vnd-fd-quote-run-length-encoding"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:simpleType name="BinaryMimeTypeEnum">
                <xsd:restriction base="xsd:string">
                    <xsd:enumeration value="application"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:simpleType name="BinaryMimeSubTypeEnum">
                <xsd:restriction base="xsd:string">
                    <xsd:enumeration value="vnd-dtn-asis"/>
                    <xsd:enumeration value="vnd-dtn-dtndb"/>
                    <xsd:enumeration value="octet-stream"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:simpleType name="SystemFormatEnum">
                <xsd:restriction base="xsd:string">
                    <xsd:enumeration value="DTN"/>
                    <xsd:enumeration value="FD"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:simpleType name="GraphicEncoding">
                <xsd:restriction base="xsd:string">
                    <xsd:enumeration value="GIF"/>
                    <xsd:enumeration value="TARGA"/>
                    <xsd:enumeration value="COMP-BMP"/>
                    <xsd:enumeration value="QUOTE-RLE"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:complexType name="MenuItem">
                <xsd:sequence>
                    <xsd:element maxOccurs="1" minOccurs="1" name="Segment" type="xsd:string"/>
                    <xsd:element maxOccurs="1" minOccurs="1" name="PassThru" type="xsd:string"/>
                    <xsd:element maxOccurs="1" minOccurs="1" name="Description" type="xsd:string"/>
                    <xsd:element maxOccurs="1" minOccurs="1" name="MenuPos" type="xsd:int"/>
                    <xsd:element maxOccurs="1" minOccurs="1" name="SegOrder" type="xsd:int"/>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="TransformInfo">
                <xsd:sequence>
                    <xsd:element maxOccurs="1" minOccurs="1" name="Application" type="xsd:string"/>
                    <xsd:element maxOccurs="1" minOccurs="1" name="Parameters" type="xsd:string"/>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="ImageData">
                <xsd:sequence>
                    <xsd:element
                        maxOccurs="1"
                        minOccurs="1"
                        name="MimeType"
                        type="color1:ImageMimeTypeEnum"/>
                    <xsd:element
                        maxOccurs="1"
                        minOccurs="1"
                        name="MimeSubType"
                        type="color1:ImageMimeSubTypeEnum"/>
                    <xsd:element maxOccurs="1" minOccurs="1" name="X" type="xsd:int"/>
                    <xsd:element maxOccurs="1" minOccurs="1" name="Y" type="xsd:int"/>
                    <xsd:element maxOccurs="1" minOccurs="1" name="PalletSize" type="xsd:int"/>
                    <xsd:element maxOccurs="1" minOccurs="1" name="PalletOffset" type="xsd:int"/>
                    <xsd:element
                        maxOccurs="1"
                        minOccurs="1"
                        name="Image"
                        nillable="false"
                        type="xsd:hexBinary"/>
                </xsd:sequence>
            </xsd:complexType>
            <!-- operation request element -->
            <!-- operation response element -->
            <!-- operation request element -->
            <!-- operation response element -->
            <!-- operation request element -->
            <!-- operation response element -->
            <xsd:complexType name="ProviderInfo">
                <xsd:sequence>
                    <!-- Provider ID (e.g. DTNNEWS) -->
                    <xsd:element maxOccurs="1" minOccurs="1" name="ID" type="xsd:string"/>
                    <!-- Provider Name (e.g. InfoMail) -->
                    <xsd:element maxOccurs="1" minOccurs="1" name="Name" type="xsd:string"/>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="StylesheetInfo">
                <xsd:sequence>
                    <xsd:element maxOccurs="1" minOccurs="1" name="Top" type="xsd:int"/>
                    <xsd:element maxOccurs="1" minOccurs="1" name="Left" type="xsd:int"/>
                    <xsd:element maxOccurs="1" minOccurs="1" name="Width" type="xsd:int"/>
                    <xsd:element maxOccurs="1" minOccurs="1" name="Height" type="xsd:int"/>
                    <xsd:element maxOccurs="1" minOccurs="1" name="Font" type="xsd:int"/>
                    <xsd:element maxOccurs="1" minOccurs="1" name="FG" type="xsd:int"/>
                    <xsd:element maxOccurs="1" minOccurs="1" name="BG" type="xsd:int"/>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="BinaryData">
                <xsd:sequence>
                    <xsd:element
                        maxOccurs="1"
                        minOccurs="1"
                        name="MimeType"
                        type="color1:BinaryMimeTypeEnum"/>
                    <xsd:element
                        maxOccurs="1"
                        minOccurs="1"
                        name="MimeSubType"
                        type="color1:BinaryMimeSubTypeEnum"/>
                    <xsd:element
                        maxOccurs="1"
                        minOccurs="1"
                        name="Binary"
                        nillable="false"
                        type="xsd:hexBinary"/>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="ReceiverMenuDeleteResponse">
                <xsd:sequence>
                    <xsd:element maxOccurs="1" minOccurs="1" name="xactnum" type="xsd:string"/>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="ContentSubmitRequest">
                <xsd:sequence>
                    <xsd:element
                        maxOccurs="1"
                        minOccurs="0"
                        name="ContentRqst"
                        nillable="true"
                        type="color1:Content"/>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="ContentSubmitResponse">
                <xsd:sequence>
                    <!-- Client Transaction ID supplied on Request  -->
                    <xsd:element maxOccurs="1" minOccurs="1" name="ClientTransID" type="xsd:string"/>
                    <!-- Color System Assigned Transaction ID  -->
                    <xsd:element maxOccurs="1" minOccurs="1" name="TransID" type="xsd:string"/>
                    <!-- Error Number (0 indicates success) -->
                    <xsd:element maxOccurs="1" minOccurs="1" name="errno" type="xsd:int"/>
                    <!-- Error Message (Only when errno is non-zero) -->
                    <xsd:element maxOccurs="1" minOccurs="0" name="errmsg" type="xsd:string"/>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="TextData">
                <xsd:sequence>
                    <xsd:element
                        maxOccurs="1"
                        minOccurs="1"
                        name="MimeType"
                        type="color1:TextMimeTypeEnum"/>
                    <xsd:element
                        maxOccurs="1"
                        minOccurs="1"
                        name="MimeSubType"
                        type="color1:TextMimeSubTypeEnum"/>
                    <xsd:element
                        maxOccurs="1"
                        minOccurs="0"
                        name="Stylesheet"
                        nillable="true"
                        type="xsd:string"/>
                    <xsd:element
                        maxOccurs="1"
                        minOccurs="1"
                        name="TitleUseFirstLine"
                        type="xsd:boolean"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="Title" type="xsd:string"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="AbbrTitle" type="xsd:string"/>
                    <xsd:element maxOccurs="1" minOccurs="1" name="Body" type="xsd:string"/>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:simpleType name="AddressType">
                <xsd:restriction base="xsd:string">
                    <!-- Subscriber.Unit (e.g. 0071517.021) -->
                    <xsd:enumeration value="SubDotUnit"/>
                    <!-- DTN Color/FD Receiver TID -->
                    <xsd:enumeration value="TID"/>
                    <!-- ALL DTN Color/ACE Receivers -->
                    <xsd:enumeration value="ACE"/>
                    <!-- ALL DTN FarmDayta Receivers -->
                    <xsd:enumeration value="FARMDAYTA"/>
                    <!-- DTN Service Code (e.g. 03xxxxxx) -->
                    <xsd:enumeration value="SvcCode"/>
                    <!-- DTN Color Receiver Secondary ID (e.g. 05xxxxxx) -->
                    <xsd:enumeration value="SecID"/>
                    <!-- DTN Color Receiver Database ID (e.g. 09xxxxxx) -->
                    <xsd:enumeration value="DBID"/>
                    <!-- DTN Color Receiver Segment ID (e.g. 06xxxxxx) -->
                    <xsd:enumeration value="Segment"/>
                    <!-- DTN FAX Phone number with dialing characteristics (4023998297) -->
                    <xsd:enumeration value="FAX"/>
                    <!-- DTN FTP address in the form of ftp://user:pass@ftp.dtn.com/path -->
                    <xsd:enumeration value="FTP"/>
                    <!-- DTN Email address -->
                    <xsd:enumeration value="Email"/>
                    <!-- DTN Mailbox address -->
                    <xsd:enumeration value="Mailbox"/>
                    <!-- URL address -->
                    <xsd:enumeration value="URL"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:simpleType name="DestinationType">
                <xsd:restriction base="xsd:string">
                    <!-- DTN Color Satellite Receiver Page Member (e.g. 0804B41B) -->
                    <xsd:enumeration value="PageMgr"/>
                    <!-- DTN Color Satellite Receiver Segment (e.g. 06xxxxxx) -->
                    <xsd:enumeration value="Segment"/>
                    <!-- DTN Farmdayta Satellite Receiver SrcPage  -->
                    <xsd:enumeration value="SrcDotPage"/>
                    <!-- File location of file for transmission  -->
                    <xsd:enumeration value="FilePath"/>
                    <!-- FAX phone number  -->
                    <xsd:enumeration value="Phone"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:complexType name="RoutingInfo">
                <xsd:sequence>
                    <xsd:element
                        maxOccurs="1"
                        minOccurs="1"
                        name="AddrType"
                        type="color1:AddressType"/>
                    <xsd:element maxOccurs="unbounded" minOccurs="0" name="Addr" type="xsd:string"/>
                    <xsd:element
                        maxOccurs="1"
                        minOccurs="1"
                        name="DestType"
                        type="color1:DestinationType"/>
                    <xsd:element maxOccurs="unbounded" minOccurs="0" name="Dest" type="xsd:string"/>
                    <xsd:element
                        maxOccurs="unbounded"
                        minOccurs="0"
                        name="Region"
                        type="xsd:string"/>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="Authentication">
                <xsd:sequence>
                    <!-- Request Application -->
                    <xsd:element maxOccurs="1" minOccurs="1" name="RqstAppl" type="xsd:string"/>
                    <!-- Request Application Version -->
                    <xsd:element maxOccurs="1" minOccurs="1" name="RqstApplVers" type="xsd:string"/>
                    <!-- Client using Request Application -->
                    <xsd:element maxOccurs="1" minOccurs="1" name="Client" type="xsd:string"/>
                    <!-- Client's User using Request Application -->
                    <xsd:element maxOccurs="1" minOccurs="1" name="User" type="xsd:string"/>
                    <!-- Client's User Password (Encrypted) -->
                    <xsd:element maxOccurs="1" minOccurs="1" name="Pswd" type="xsd:string"/>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="ReceiverMenuDeleteRequest">
                <xsd:sequence>
                    <xsd:element
                        maxOccurs="1"
                        minOccurs="1"
                        name="AuthInfo"
                        nillable="true"
                        type="color1:Authentication"/>
                    <xsd:element maxOccurs="1" minOccurs="1" name="TID" type="xsd:string"/>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="ReceiverMenuRequest">
                <xsd:sequence>
                    <xsd:element
                        maxOccurs="1"
                        minOccurs="1"
                        name="AuthInfo"
                        nillable="true"
                        type="color1:Authentication"/>
                    <xsd:element maxOccurs="1" minOccurs="1" name="SubNum" type="xsd:string"/>
                    <xsd:element maxOccurs="1" minOccurs="1" name="UnitNum" type="xsd:string"/>
                    <xsd:element maxOccurs="1" minOccurs="1" name="MenuType" type="xsd:string"/>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="MenuItemArray">
                <xsd:sequence>
                    <xsd:element
                        maxOccurs="unbounded"
                        minOccurs="1"
                        name="MenuItems"
                        type="MenuItem"/>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="Content">
                <xsd:sequence>
                    <!-- Content ID  -->
                    <xsd:element maxOccurs="1" minOccurs="1" name="ID" type="xsd:string"/>
                    <!-- Content Categories  -->
                    <xsd:element
                        maxOccurs="unbounded"
                        minOccurs="0"
                        name="Category"
                        type="xsd:string"/>
                    <!-- Client Transaction ID  -->
                    <xsd:element maxOccurs="1" minOccurs="1" name="ClientTransID" type="xsd:string"/>
                    <xsd:element
                        maxOccurs="1"
                        minOccurs="0"
                        name="DelayDateTime"
                        type="xsd:dateTime"/>
                    <!-- Content Submitter Authenication Information  -->
                    <xsd:element
                        maxOccurs="1"
                        minOccurs="0"
                        name="AuthInfo"
                        nillable="true"
                        type="color1:Authentication"/>
                    <!-- Content Routing Information  -->
                    <xsd:element
                        maxOccurs="1"
                        minOccurs="0"
                        name="Routing"
                        nillable="true"
                        type="color1:RoutingInfo"/>
                    <!-- Content Provider Information (e.g. DowJones, Ag)  -->
                    <xsd:element
                        maxOccurs="1"
                        minOccurs="0"
                        name="Provider"
                        nillable="true"
                        type="color1:ProviderInfo"/>
                    <!-- Content Transformation Information  -->
                    <xsd:element
                        maxOccurs="1"
                        minOccurs="0"
                        name="Transform"
                        nillable="true"
                        type="color1:TransformInfo"/>
                    <!-- Content Text  -->
                    <xsd:element
                        maxOccurs="1"
                        minOccurs="0"
                        name="Text"
                        nillable="true"
                        type="color1:TextData"/>
                    <!-- Content Image/Graphics  -->
                    <xsd:element
                        maxOccurs="1"
                        minOccurs="0"
                        name="Image"
                        nillable="true"
                        type="color1:ImageData"/>
                    <!-- Content Binary Data  -->
                    <xsd:element
                        maxOccurs="1"
                        minOccurs="0"
                        name="Binary"
                        nillable="true"
                        type="color1:BinaryData"/>
                </xsd:sequence>
            </xsd:complexType>
        </xsd:schema>
    </WSDL:types>
    <WSDL:message name="ReceiverMenuDeleteResponse">
        <WSDL:part name="return" type="xsd:string"/>
    </WSDL:message>
    <WSDL:message name="ReceiverMenuDeleteRequest">
        <WSDL:part
            name="ReceiverMenuDeleteRequest"
            type="color1:ReceiverMenuDeleteRequest"/>
    </WSDL:message>
    <WSDL:message name="ContentSubmitRequest">
        <WSDL:part name="ContentSubmitRequest" type="color1:Content"/>
    </WSDL:message>
    <WSDL:message name="ReceiverMenuRequest">
        <WSDL:part name="ReceiverMenuRequest" type="color1:ReceiverMenuRequest"/>
    </WSDL:message>
    <WSDL:message name="ContentSubmitResponse">
        <WSDL:part name="return" type="color1:ContentSubmitResponse"/>
    </WSDL:message>
    <WSDL:message name="ReceiverMenuResponse">
        <WSDL:part name="return" type="color1:MenuItemArray"/>
    </WSDL:message>
    <WSDL:portType name="ColorSystemInterfacePort">
        <WSDL:operation name="ReceiverMenuRequest">
            <WSDL:documentation xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/">Retrieve the Color Receiver Menu</WSDL:documentation>
            <WSDL:input message="color1:ReceiverMenuRequest"/>
            <WSDL:output message="color1:ReceiverMenuResponse"/>
        </WSDL:operation>
        <WSDL:operation name="ReceiverMenuDeleteRequest">
            <WSDL:documentation xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/">Delete the Receiver Main Menu</WSDL:documentation>
            <WSDL:input message="color1:ReceiverMenuDeleteRequest"/>
            <WSDL:output message="color1:ReceiverMenuDeleteResponse"/>
        </WSDL:operation>
        <WSDL:operation name="ContentSubmitRequest">
            <WSDL:documentation xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/">Submit Content to Color System</WSDL:documentation>
            <WSDL:input message="color1:ContentSubmitRequest"/>
            <WSDL:output message="color1:ContentSubmitResponse"/>
        </WSDL:operation>
    </WSDL:portType>
    <WSDL:binding name="ColorSystemInterface" type="color1:ColorSystemInterfacePort">
        <SOAP:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
        <WSDL:operation name="ReceiverMenuRequest">
            <SOAP:operation soapAction="http://soap.dtn.com"/>
            <WSDL:input>
                <SOAP:body
                    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                    namespace="http://soap.dtn.com"
                    use="literal"/>
            </WSDL:input>
            <WSDL:output>
                <SOAP:body
                    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                    namespace="http://soap.dtn.com"
                    use="literal"/>
            </WSDL:output>
        </WSDL:operation>
        <WSDL:operation name="ReceiverMenuDeleteRequest">
            <SOAP:operation soapAction="http://soap.dtn.com"/>
            <WSDL:input>
                <SOAP:body
                    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                    namespace="http://soap.dtn.com"
                    use="literal"/>
            </WSDL:input>
            <WSDL:output>
                <SOAP:body
                    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                    namespace="http://soap.dtn.com"
                    use="literal"/>
            </WSDL:output>
        </WSDL:operation>
        <WSDL:operation name="ContentSubmitRequest">
            <SOAP:operation soapAction="http://soap.dtn.com"/>
            <WSDL:input>
                <SOAP:body
                    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                    namespace="http://soap.dtn.com"
                    use="literal"/>
            </WSDL:input>
            <WSDL:output>
                <SOAP:body
                    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                    namespace="http://soap.dtn.com"
                    use="literal"/>
            </WSDL:output>
        </WSDL:operation>
    </WSDL:binding>
    <WSDL:service name="ColorSystemInterface">
        <WSDL:documentation xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/">Color System Web Service</WSDL:documentation>
        <WSDL:port binding="color1:ColorSystemInterface" name="ColorSystemInterface">
            <SOAP:address location="http://color-app-dev.eng.dtn.com:8018/"/>
        </WSDL:port>
    </WSDL:service>
</WSDL:definitions>

_________________
Tp
View user's profileFind all posts by jtp51Send private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
please inspect $debug_str property of the soapclient object after the call is done.
Alternatively you can set breakpoing on
Code:
      // make connnection
      if(!$this->connect($timeout, $response_timeout)){

and inspect what is in $data (supposed to be sent...)
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Able to solve the issue with XML string value


Joined: 02 Nov 2004
Posts: 45
Location: Omaha, NE
Reply with quote
I was able to solve the issue by passing the $params arg to the call method as an XML string value.

$params = "<ReceiverMenuDeleteRequest><AuthInfo><RqstAppl>CMDLINK</RqstAppl>";
$params .= "<RqstApplVers>1.00</RqstApplVers><Client>KBREQ</Client>";
$params .= "<User>OPSSUPPORT</User><Pswd>ENCRYPTED</Pswd></AuthInfo>";
$params .= "<TID>FF011D9C</TID></ReceiverMenuDeleteRequest>";



Would anyone know how I could accomplish the same results by using an array?

Thank you for reading this post.


Entire Code:

Code:
<?
require_once('nusoap.php');

$wsdl = 'http://color-app-dev.eng.dtn.com/ColorWebService.wsdl';
$client = new soapclient($wsdl, true);

$err = $client->getError();
if ($err) {
   echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
}

$params = "<ReceiverMenuDeleteRequest><AuthInfo><RqstAppl>CMDLINK</RqstAppl>";
$params .= "<RqstApplVers>1.00</RqstApplVers><Client>KBREQ</Client>";
$params .= "<User>OPSSUPPORT</User><Pswd>ENCRYPTED</Pswd></AuthInfo>";
$params .= "<TID>FF011D9C</TID></ReceiverMenuDeleteRequest>";

$result = $client->call('ReceiverMenuDeleteRequest', $params, 'http://soap.dtn.com', 'http://soap.dtn.com',false,null,'rpc','encoded');
// Check for a fault
if ($client->fault) {
   echo '<h2>Fault</h2><pre>';
   print_r($result);
   echo '</pre>';
} else {
   // Check for errors
   $err = $client->getError();
   if ($err) {
      // Display the error
      echo '<h2>Error</h2><pre>' . $err . '</pre>';
   } else {
      // Display the result
      echo '<h2>Result</h2><pre>';
      print_r($result);
      echo '</pre>';
   }
}
echo 'Web Service: ReceiverMenuDeleteRequest<br>';
echo 'WSDL: '.$wsdl.'<br>';
echo 'Parameters: ';
print_r($params);
echo '<br><br>Response Envelope: ';
if(!$err = $client->getError()){
   print_r($response);
} else {
   print 'Error: '.$err;
}
// Display the request and response
echo '<h2>Request</h2>';
echo '<pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>';
echo '<h2>Response</h2>';
echo '<pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';
// Display the debug messages
echo '<h2>Debug</h2>';
echo '<pre>' . htmlspecialchars($client->debug_str, ENT_QUOTES) . '</pre>';
?>

_________________
Tp
View user's profileFind all posts by jtp51Send private messageVisit poster's website
Pass values to a complex type from a client utilizing SOAP?
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic