logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: Setting Namespaces??: msg#00029

Subject: Re: Setting Namespaces??
Colin,

I am sorry it took so long for me to reply.  I thought I had sent a reply to an 
earlier posting, but it appears I never did.

The statement

>>>>
This is apparently an RPC-literal convention that should be honored by
code generators working from the process WSDL. 
<<<<

is, I would say, difficult to confirm.  There are a number of reasons for this. 
 First, the WS-I profiles, which seek to clarify open issues in SOAP and WSDL 
specs, deprecate the use of RPC entirely.  Second, Microsoft, which sets de 
facto standards, does not support rpc/literal in .NET.  Third, xmethods, which 
I use for informal interop testing, uses encoded rather than literal in their 
RPC services.

This is not to say that confirmation is not out there somewhere.  I will have a 
peek at the WSDL 1.1 and JAX-RPC specs, etc.

For now, as you have observed, NuSOAP puts the element in a namespace.  Until I 
get some external confirmation of the "convention", I will not be changing the 
code.

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: "Colin Goldberg" <coling@xxxxxxxxxxxx>
To: <nusoap-general@xxxxxxxxxxxxxxxxxxxxx>
Sent: Monday, January 17, 2005 6:31 PM
Subject: [Nusoap-general] Setting Namespaces??


> Hi All,
> 
> (My last post did not seem to display properly - I have 'unset' the HTML 
> option here)
> 
> With my limited understanding of namespaces and how to set call parameters, I 
> need help to be able to send an 'RPC literal' request that uses WSDL. The 
> service, MyHelloWorld, was set up with Grand Central's Process Designer and 
> works when called within their environment. The SOAP request that works and 
> which I am trying to emulate looks like the XML below. The following point 
> was made to me:
> 
> Notice that whilst <MyHelloWorld> is namespace-qualified, the part
> element <helloRequest> is not. However, the children of <helloRequest>
> are namespace-qualified.
> 
> This is apparently an RPC-literal convention that should be honored by
> code generators working from the process WSDL. 
> 
> <?xml version="1.0" encoding="ISO-8859-1"?><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:si="http://soapinterop.org/xsd";
> xmlns:targetNS="bizconnector.grandcentral.com/MyHelloWorld">
> <SOAP-ENV:Body>
> <m:MyHelloWorld xmlns:m="bizconnector.grandcentral.com/MyHelloWorld">
> <helloRequest>
> <m:firstName>YourFirstName</m:firstName>
>             <m:lastName>YourLastName</m:lastName>
> </helloRequest>
> </m:MyHelloWorld>
> </SOAP-ENV:Body></SOAP-ENV:Envelope>
> The request that I am generating is:
> 
> <?xml version="1.0" encoding="ISO-8859-1"?><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:si="http://soapinterop.org/xsd"; 
> xmlns:targetNS="bizconnector.grandcentral.com/MyHelloWorld">
> <SOAP-ENV:Body>
> <MyHelloWorld xmlns="bizconnector.grandcentral.com/MyHelloWorld">
>   <helloRequest>
>      <firstName>Colin</firstName>
>      <lastName>Goldberg</lastName>
>   </helloRequest>
> </MyHelloWorld>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> 
> Here's my client:
> 
> <?php
> 
> $this_dir = dirname(__FILE__);
> require_once($this_dir . '/../../libs/web_services/nusoap/nusoap.php');
> 
> $wsdl_url1 = 
> "http://www.thebizconnector.com/web_services/wsdl/MyHelloWorld.wsdl";;
> $helloReqArray = array('firstName'=>'Colin', 'lastName' => 'Goldberg');
> $params = array('helloRequest' => $helloReqArray);
> 
> $soapclient = new soapclient($wsdl_url1, true);
> if($err = $soapclient->getError()){
>     echo "new soapclient error $err\n";
> } else {
>     $soapclient->setCredentials('<userid supplied>', '<password supplied>');
>     $ret_val = $soapclient->call('MyHelloWorld',$params, 'm');
>     
>     echo $soapclient->request, ENT_QUOTES;
>     echo $soapclient->response, ENT_QUOTES;
>     if($err = $soapclient->getError()){
>         echo "soapclient call error $err\n\n";
>         echo htmlspecialchars($soapclient->debug_str, ENT_QUOTES);
>     } else {
>         echo "returned $ret_val\n";
>     }
> }
> 
> 
> ?>
> 
> WSDL contents:
> <definitions targetNamespace="bizconnector.grandcentral.com/MyHelloWorld" 
> xmlns="http://schemas.xmlsoap.org/wsdl/"; 
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; 
> xmlns:targetNS="bizconnector.grandcentral.com/MyHelloWorld" 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
> xmlns:ns8="http://schemas.xmlsoap.org/wsdl/";>
>                         <types xmlns="http://schemas.xmlsoap.org/wsdl/";>
>                             <schema elementFormDefault="qualified" 
> targetNamespace="bizconnector.grandcentral.com/MyHelloWorld" 
> xmlns="http://www.w3.org/2001/XMLSchema";>
>                                 <complexType name="Request" 
> xmlns="http://www.w3.org/2001/XMLSchema";>
>                                     <sequence 
> xmlns="http://www.w3.org/2001/XMLSchema";>
>                                         <element name="firstName" 
> type="xsd:string" xmlns="http://www.w3.org/2001/XMLSchema"/>
>                                         <element name="lastName" 
> type="xsd:string" xmlns="http://www.w3.org/2001/XMLSchema"/>
>                                     </sequence>
>                                 </complexType>
>                                 <complexType name="Response" 
> xmlns="http://www.w3.org/2001/XMLSchema";>
>                                     <sequence 
> xmlns="http://www.w3.org/2001/XMLSchema";>
>                                         <element name="greeting" 
> type="xsd:string" xmlns="http://www.w3.org/2001/XMLSchema"/>
>                                     </sequence>
>                                 </complexType>
>                             </schema>
>                         </types>
>                         <message name="MyHelloWorldRequest" 
> xmlns="http://schemas.xmlsoap.org/wsdl/";>
>                             <part name="helloRequest" type="targetNS:Request" 
> xmlns="http://schemas.xmlsoap.org/wsdl/"/>
>                         </message>
>                         <message name="MyHelloWorldResponse" 
> xmlns="http://schemas.xmlsoap.org/wsdl/";>
>                             <part name="helloResponse" 
> type="targetNS:Response" xmlns="http://schemas.xmlsoap.org/wsdl/"/>
>                         </message>
>                         <portType name="MyHelloWorldPort" 
> xmlns="http://schemas.xmlsoap.org/wsdl/";>
>                             <operation name="MyHelloWorld" 
> xmlns="http://schemas.xmlsoap.org/wsdl/";>
>                                 <input message="targetNS:MyHelloWorldRequest" 
> xmlns="http://schemas.xmlsoap.org/wsdl/"/>
>                                 <output 
> message="targetNS:MyHelloWorldResponse" 
> xmlns="http://schemas.xmlsoap.org/wsdl/"/>
>                             </operation>
>                         </portType>
>                         <binding name="MyHelloWorldBinding" 
> type="targetNS:MyHelloWorldPort" xmlns="http://schemas.xmlsoap.org/wsdl/";>
>                             <soap:binding style="rpc" 
> transport="http://schemas.xmlsoap.org/soap/http"/>
>                             <operation name="MyHelloWorld" 
> xmlns="http://schemas.xmlsoap.org/wsdl/";>
>                                 <soap:operation soapAction="mysoapaction"/>
>                                 <input 
> xmlns="http://schemas.xmlsoap.org/wsdl/";>
>                                     <soap:body 
> namespace="bizconnector.grandcentral.com/MyHelloWorld" use="literal"/>
>                                 </input>
>                                 <output 
> xmlns="http://schemas.xmlsoap.org/wsdl/";>
>                                     <soap:body 
> namespace="bizconnector.grandcentral.com/MyHelloWorld" use="literal"/>
>                                 </output>
>                             </operation>
>                         </binding>
>                         <service name="MyHelloWorld" 
> xmlns="http://schemas.xmlsoap.org/wsdl/";>
>                             <port binding="targetNS:MyHelloWorldBinding" 
> name="MyHelloWorldPort" xmlns="http://schemas.xmlsoap.org/wsdl/";>
>                                 <soap:address 
> location="http://pop.grandcentral.com/sync/soap/bizconnector.grandcentral.com/MyHelloWorld"/>
>                             </port>
>                         </service>
>                     </definitions>
> 
> Can you help me generate the correct request as suggested above?
> 
> 
> Colin Goldberg
> theBizConnector (Newsletter Subscription)
> MacMicro
> 
> 
> ------------------------------------------------------- The SF.Net email is 
> sponsored by: Beat the post-holiday blues Get a FREE limited edition 
> SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, 
> almost....http://www.thinkgeek.com/sfshirt 
> _______________________________________________ Nusoap-general mailing list 
> Nusoap-general@xxxxxxxxxxxxxxxxxxxxx 
> https://lists.sourceforge.net/lists/listinfo/nusoap-general


-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt



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