cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tog <guillaume.all...@gmail.com>
Subject Re: perl (SOAPLite) interoperability with CXF
Date Sat, 01 Dec 2007 02:46:02 GMT
Benson,

A naive question: what is doing the javascript generator ? Would that
make sense for groovy ?

Cheers
Guillaume

On Dec 1, 2007 8:40 AM, Benson Margulies <bim2007@basistech.com> wrote:
> Kuro,
>
> You could build a perl generator for CXF like the Javascript generator
> I've nearly finished.
>
> --benson
>
>
> > -----Original Message-----
> > From: Teruhiko Kurosaka [mailto:Kuro@basistech.com]
> > Sent: Friday, November 30, 2007 7:10 PM
> > To: cxf-user@incubator.apache.org
>
> > Subject: RE: perl (SOAPLite) interoperability with CXF
> >
> > With help from Benson, I now have a working perl client that
> > talks to the hello_world_RPCLit server:
> > ####################################
> > use SOAP::Lite;
> > $nmsp = 'http://apache.org/hello_world_rpclit';
> > $srvc = SOAP::Lite-> uri($nmsp)
> >     ->proxy("http://xpen-kuro:9000/SoapContext/SoapPort")
> >     ->on_action (sub { return '' } );
> > my $method = SOAP::Data->name('ns1:greetMe')
> >   ->attr({'xmlns:ns1' => $nmsp});
> > my @params = (SOAP::Data->name(in=>"Mr. Perl")); print
> > $srvc->call($method=>@params)->result;
> > ####################################
> >
> > This code also works with hello_world_code_first server with
> > mionor modifications.
> >
> >
> > This looks too complicated to accomplish a simple task, and I
> > tried to write a simpler perl client that reads WSDL.
> > This is what I came up with:
> > ####################################
> > use SOAP::Lite;
> > $nmsp = 'http://apache.org/hello_world_rpclit';
> > $srvc = SOAP::Lite #-> uri($nmsp)
> >     ->service("http://xpen-kuro:9000/SoapContext/SoapPort?wsdl")
> >     ->on_action (sub { return '' } );
> > print $srvc->greetMe("Ms. Perl"), "\n";
> > ####################################
> >
> > This one ends up with a fault message from the hello_world_RPCLit
> > server:
> > <soap:Envelope
> >       xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> >  <soap:Body>
> >   <soap:Fault>
> >    <faultcode>soap:VersionMismatch</faultcode>
> >    <faultstring>
> >     "http://schemas.xmlsoap.org/wsdl/soap/" is not a valid
> > SOAP version.
> >    </faultstring>
> >   </soap:Fault>
> >  </soap:Body>
> > </soap:Envelope>
> >
> > The quoted URI is used in the request message's soap:Envelope
> > element as in:
> > <soap:Envelope
> >        xmlns:ns3="http://schemas.xmlsoap.org/soap/http"
> >        xmlns:ns1="http://apache.org/hello_world_rpclit"
> >        xmlns:ns2="http://apache.org/hello_world_rpclit/types"
> >        soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> >        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> >        ...>
> >
> > Surely, the namespace prefix definition should have been:
> >       xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> > since it is used to qualify the Envelope and Body elements.
> >
> >
> > I am guessing that SOAP::Lite took the wrong definition from
> > the WSDL file (samples/hello_world_RCPLit/wsdl/helloWorld.wsdl).
> > It looks SOAP::Lite is mixing up the soap prefex used to
> > interpret the WSDL file with the prefix it should use to
> > generate the request message.
> > Can I conclude SOAP::Lite is the guilty party, not CXF?
> >
> > -kuro
> >
> >
> > > -----Original Message-----
> > > From: James Mao [mailto:james.mao@iona.com]
> > > Sent: Thursday, November 29, 2007 8:42 PM
> > > To: cxf-user@incubator.apache.org
> > > Subject: Re: perl (SOAPLite) interoperability with CXF
> > >
> > > Log the outgoing message, and the incoming message, and see
> > if there's
> > > anything different with the cxf client/server
> > >
> > > Regards,
> > > James
> > > > Hi,
> > > > I'm trying to write a perl client that can talk to the
> > server found
> > > > in samples/hello_world_RPCLit of CXF 2.0.1.
> > > >
> > > > The perl code I tried is as simple as this:
> > > >
> > > > use SOAP::Lite;
> > > > print "Connecting to Hello Service...\n"; $srvc = SOAP::Lite
> > > >     -> proxy('http://localhost:9000/SoapContext/SoapPort')
> > > >     -> uri('http://apache.org/hello_world_rpclit');
> > > > print $srvc -> sayHi() -> result, "\n"; print $srvc ->
> > greetMe("Mr.
> > > > Perl") -> result, "\n";
> > > >
> > > >
> > > > sayHi() is executed as expected and returns "Bonjour".
> > > > On the console where the CXF server code is run,
> > > >      [java] Executing operation sayHi is printed.
> > > >
> > > > But greetMe() behaves like a no-op.  Nothing happens.
> > > > Even no error messages.  Nothing is printed on the CXF server
> > > > console, so Java's String greetMe(String) must have not been
> > > > executed.
> > > >
> > > > Anybody has any idea?
> > > >
> > > > T. "Kuro" Kurosaka
> > > >
> > > >
> > >
> >
>



-- 

Best Regards
Guillaume
http://cheztog.blogspot.com

Mime
View raw message