logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: RE: passing complex type parameters - almost there: msg#00009

Subject: Re: RE: passing complex type parameters - almost there
You want to call the authenticate method.  The WSDL specifies it as 
document/literal.  The port specifies the message for input as 
LDAPAuthGenSEI_authenticate.  That message has a single part named "parameters" 
that is the element "authenticate", which is of type "authenticate".  The code 
you show seems to correspond to that scenario.  Could you post the value of 
$client->getDebug()?

Scott Nichol

Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message ----- 
From: "Todd Jackson" <Todd.Jackson@xxxxxxxxxxxxx>
To: <nusoap-general@xxxxxxxxxxxxxxxxxxxxx>
Sent: Wednesday, April 05, 2006 7:34 PM
Subject: [Nusoap-general] RE: passing complex type parameters - almost there


> Thanks Jason, but this didn't work for me. The web service is a java j2ee
> setup, and .net & php5 native soap clients connect to this fine.
> 
>  
> 
> However I want to use NuSOAP because our web server uses php4.
> 
>  
> 
> I do appear to be getting closer, as my request now contains the passing of
> parameters.
> 
>  
> 
> Hopefully someone can advise how I go about customizing the parameters tags
> further to match the copy of the working php5 native SOAP request. i.e.
> 
>  
> 
> NuSOAP client php4 script
> 
>  
> 
> require_once('nusoap.php');
> 
>  
> 
> // Create the client instance
> 
> $client = new
> soapclient('https://japps.manukau.ac.nz:8181/LDAPAuthGen/LDAPAuthGen?WSDL',
> true);
> 
>  
> 
> $client->soap_defencoding = "UTF-8";
> 
>  
> 
> $params= array('String_1' => 'authrobot', 'String_2' => 'apple', 'String_3'
> => 'tjackson', 'String_4' => 'synfield69');
> 
>  
> 
> //$result = $proxy->$ServiceMethod($request);
> 
>  
> 
> $result = $client->call('authenticate', array('parameters' => $params));
> 
>  
> 
> // 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>';
> 
>  
> 
> 
> This is nusoap php4 soap client soap request / response
> 
> 
> Fault
> 
> Array
> (
>     [faultcode] => env:Client
>     [faultstring] => JAXRPCTIE01: caught exception while handling request:
> unrecognized operation: parameters
> )
> 
> Request
> 
> POST /LDAPAuthGen/LDAPAuthGen HTTP/1.0
> Host: solldap2:8080
> User-Agent: NuSOAP/0.7.2 (1.95)
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: ""
> Content-Length: 536
>  
> <?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/";
> xmlns:ns3725="http://tempuri.org";><SOAP-ENV:Body><parameters><String_1
> xmlns="">authrobot</String_1><String_2 xmlns="">apple</String_2><String_3
> xmlns="">tjackson</String_3><String_4
> xmlns="">synfield69</String_4></parameters></SOAP-ENV:Body></SOAP-ENV:Envelo
> pe>
> 
> Response
> 
> HTTP/1.1 500 Server Error
> Server: Sun-Java-System/Application-Server
> Date: Wed, 05 Apr 2006 21:46:37 GMT
> Content-type: text/xml;charset=utf-8
> X-powered-by: Servlet/2.4
> Soapaction: ""
> Connection: close
>  
> <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/";
> xmlns:ns0="urn:LDAPAuthGen/types" xmlns:xsd=http://www.w3.org/2001/XMLSchema
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><env:Body><env:Fault><
> faultcode>env:Client</faultcode><faultstring>JAXRPCTIE01: caught exception
> while handling request: unrecognized operation:
> parameters</faultstring></env:Fault></env:Body></env:Envelope>
> 
>  
> 
>  
> 
> PHP5.1 Native SOAP Client Request - Returns correct response!
> 
>  
> 
> Response:
> 
>  
> 
> the result is: STATUS:100 
> 
>  
> 
> Request :
>  
> <?xml version="1.0" encoding="UTF-8"?>
> <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:ns1="urn:LDAPAuthGen/types"><SOAP-ENV:Body><ns1:authenticate><String_1
> >authrobot</String_1><String_2>apple</String_2><String_3>tjackson</String_3>
> <String_4>synfield69</String_4></ns1:authenticate></SOAP-ENV:Body></SOAP-ENV
> :Envelope>
>  
> Response:
>  
> <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/";
> xmlns:ns0="urn:LDAPAuthGen/types"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><env:Body><ns0:authent
> icateResponse><result>STATUS:100</result></ns0:authenticateResponse></env:Bo
> dy></env:Envelope>
> 
>  
> 
>  
> 
> WSDL
> 
>  
> 
> <?xml version="1.0" encoding="UTF-8"?><definitions
> xmlns="http://schemas.xmlsoap.org/wsdl/"; xmlns:tns="urn:LDAPAuthGen/wsdl"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
> xmlns:ns2="urn:LDAPAuthGen/types" name="LDAPAuthGen"
> targetNamespace="urn:LDAPAuthGen/wsdl">
> 
>   <types>
> 
>     <schema xmlns="http://www.w3.org/2001/XMLSchema";
> xmlns:tns="urn:LDAPAuthGen/types"
> xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> targetNamespace="urn:LDAPAuthGen/types">
> 
>       <complexType name="authenticate">
> 
>         <sequence>
> 
>           <element name="String_1" type="string" nillable="true"/>
> 
>           <element name="String_2" type="string" nillable="true"/>
> 
>           <element name="String_3" type="string" nillable="true"/>
> 
>           <element name="String_4" type="string"
> nillable="true"/></sequence></complexType>
> 
>       <complexType name="authenticateResponse">
> 
>         <sequence>
> 
>           <element name="result" type="string"
> nillable="true"/></sequence></complexType>
> 
>       <element name="authenticate" type="tns:authenticate"/>
> 
>       <element name="authenticateResponse"
> type="tns:authenticateResponse"/></schema></types>
> 
>   <message name="LDAPAuthGenSEI_authenticate">
> 
>     <part name="parameters" element="ns2:authenticate"/></message>
> 
>   <message name="LDAPAuthGenSEI_authenticateResponse">
> 
>     <part name="result" element="ns2:authenticateResponse"/></message>
> 
>   <portType name="LDAPAuthGenSEI">
> 
>     <operation name="authenticate">
> 
>       <input message="tns:LDAPAuthGenSEI_authenticate"/>
> 
>       <output
> message="tns:LDAPAuthGenSEI_authenticateResponse"/></operation></portType>
> 
>   <binding name="LDAPAuthGenSEIBinding" type="tns:LDAPAuthGenSEI">
> 
>     <soap:binding transport="http://schemas.xmlsoap.org/soap/http";
> style="document"/>
> 
>     <operation name="authenticate">
> 
>       <soap:operation soapAction=""/>
> 
>       <input>
> 
>         <soap:body use="literal"/></input>
> 
>       <output>
> 
>         <soap:body use="literal"/></output></operation></binding>
> 
>   <service name="LDAPAuthGen">
> 
>     <port name="LDAPAuthGenSEIPort" binding="tns:LDAPAuthGenSEIBinding">
> 
>       <soap:address location="http://solldap2:8080/LDAPAuthGen/LDAPAuthGen";
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/></port></service></definition
> s
> 
>  
> 
>


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642



Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>