Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP: WSDL, Web Service Client, ComplexType
    primarykey
    data
    text
    <p>I'm able to consume a local WSDL into PHP, and pass/return basic data successfully, but when I attempt to pass in objects that correspond to a complextype in the WSDL, I get the following error:</p> <blockquote> <p>SoapFault exception: [soapenv:Server] javax.xml.ws.WebServiceException: com.ibm.websphere.sca.ServiceRuntimeException: An error occurred while parsing native data: The error message is: java.lang.IllegalArgumentException: Mismatched parameter count: expecting 1 items, but got more.. Caused By: java.lang.IllegalArgumentException: Mismatched parameter count: expecting 1 items, but got more.: caused by: An error occurred while parsing native data: The error message is: java.lang.IllegalArgumentException: Mismatched parameter count: expecting 1 items, but got more.. Caused By: java.lang.IllegalArgumentException: Mismatched parameter count: expecting 1 items, but got more. in C:\wamp\www\SugarCE\testSOAPShawn.php:65 Stack trace: #0 [internal function]: SoapClient->__call('establishIdenti...', Array) #1 C:\wamp\www\SugarCE\testSOAPShawn.php(65): SoapClient->establishIdentity(Object(stdClass), Object(stdClass)) #2 {main}</p> </blockquote> <p>Here is the snippets from the WSDL:</p> <pre><code>&lt;xsd:element name="establishIdentity"&gt; − &lt;xsd:complexType&gt; − &lt;xsd:sequence&gt; − &lt;xsd:element name="processId" nillable="true" type="xsd:string"&gt; − &lt;xsd:annotation&gt; − &lt;xsd:documentation&gt; Identifies a specific instance of the dialogue process. Returned from the start() operation. &lt;/xsd:documentation&gt; &lt;/xsd:annotation&gt; &lt;/xsd:element&gt; − &lt;xsd:element name="identityAttributes" nillable="true" type="bons1:IdentityAttributes"&gt; − &lt;xsd:annotation&gt; − &lt;xsd:documentation&gt; Key identifying attributes of a program participant. &lt;/xsd:documentation&gt; &lt;/xsd:annotation&gt; &lt;/xsd:element&gt; &lt;/xsd:sequence&gt; &lt;/xsd:complexType&gt; &lt;/xsd:element&gt; </code></pre> <p>Here is my code with comments where the error occurs:</p> <pre><code>&lt;?php set_time_limit(0); require_once('nusoap.php'); $client = new SoapClient('C:\wsdl\BenefitDeterminationProcess_BenefitDialogueServiceSOAP.wsdl', array('trace' =&gt; 1)); $start = $client-&gt;__soapCall('start', array(new SoapParam((string)'GenesisID', 'prefix')), array('soapaction' =&gt; 'C:\wsdl\BenefitDeterminationProcess_BenefitDialogueServiceSOAP\start')); $processID = $start; $exchange = $client-&gt;__soapCall('exchangeOptions', array(new SoapParam($processID, 'processId')), array('soapaction' =&gt; 'C:\wsdl\BenefitDeterminationProcess_BenefitDialogueServiceSOAP\exchangeOptions')); $identityAttributes = new StdClass(); $identityAttributes-&gt;IdentityAttributes = new StdClass(); $identityAttributes-&gt;IdentityAttributes-&gt;ssn = 41441414; $identityAttributes-&gt;IdentityAttributes-&gt;firstName = 'John2'; $identityAttributes-&gt;IdentityAttributes-&gt;lastName = 'Doe2'; $identityAttributes-&gt;IdentityAttributes-&gt;gender = 'MALE'; $identityAttributes-&gt;IdentityAttributes-&gt;birthDate = null; try{ $identity = $client-&gt;establishIdentity($processID, $identityAttributes); //ERROR } catch (SoapFault $f){ echo "ERROR!"; } $end = $client-&gt;__soapCall('stop', array(new SoapParam($processID, 'processId')), array('soapaction' =&gt; 'C:\wsdl\BenefitDeterminationProcess_BenefitDialogueServiceSOAP\stop')); ?&gt; </code></pre> <p>Any assistance is greatly appreciated! Thanks.</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.
    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