Re: [Soap-wsdl-devel] SOAP::WSDL and WS-Security?
Status: Beta
Brought to you by:
kutterma
From: James C. <jc...@co...> - 2010-04-28 15:49:03
|
Hi, Using 2.00.99_3, it looks like it's trying to use the start_handler_typemap() but my understanding is the typemaps are no longer used (as suggestde by the use_typemap => 0 in wsdl2perl.pl). Am I on the right track here? How would I get this to use start_handler()/end_handler() instead? Thanks, - James James Croall Coverity, Inc. jc...@co... (202) 246-6613 From: James Croall [mailto:jc...@co...] Sent: Tuesday, April 27, 2010 7:57 PM To: soa...@li...; kut...@us... Subject: Re: [Soap-wsdl-devel] SOAP::WSDL and WS-Security? Hi again SOAP::WSDL Developers, I seem to be hitting a wall with SOAP::WSDL. To handle our WSDL file with recursive types, I've tried various versions of the Typemap branch - with zero luck. I get: Can't call method "get_class" on an undefined value at /usr/lib/perl5/site_perl/5.10/SOAP/WSDL/Expat/MessageParser.pm line 318. at line 1 at /usr/lib/perl5/site_perl/5.10/SOAP/WSDL/Expat/Base.pm line 82 After chasing code paths through Deserializer::XSD and Expat::MessageParser I'm at a loss - should this actually work? I'd like to move away from using my own hand-generated stubs with SOAP::Lite. I've even taken the time to create my own typemaps, which ensure that correct types are always passed to each method - it works great except it's a LOT to maintain, and I would rather use the WSDL. Thanks, - James James Croall Coverity, Inc. jc...@co... (202) 246-6613 From: James Croall Sent: Sunday, April 25, 2010 6:25 PM To: soa...@li...; kut...@us... Subject: RE: [Soap-wsdl-devel] SOAP::WSDL and WS-Security? Hi SOAP::WSDL Developers, I am supporting a product with a Web Services API, and I would like to refer our users to SOAP::WSDL - however we require authentication via the WS-Security extension. I've hacked in support for PasswordText authentication, and plan to make the patch available to our users. It would be nice if this functionality could make it into the official release. Thanks for all the work on SOAP::WSDL - this is a nice piece of code! - James James Croall Coverity, Inc. jc...@co... (202) 246-6613 From: James Croall [mailto:jc...@co...] Sent: Saturday, April 24, 2010 9:58 AM To: soa...@li... Subject: Re: [Soap-wsdl-devel] SOAP::WSDL and WS-Security? Hi SOAP::WSDL Developers, I have been unable to find an easy way to add raw XML headers like I could with SOAP::Lite, so I've tried adding the WSSE types to my WSL directly: <xsd:schema elementFormDefault="qualified" targetNamespace="http://schemas.xmlsoap.org/ws/2002/07/secext"> <xsd:element name="Security" type="wsse:Security" /> <xsd:complexType name="UsernameToken"> <xsd:sequence> <xsd:element minOccurs="0" maxOccurs="1" name="Username" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Password" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Nonce" type="xsd:string" /> </xsd:sequence> </xsd:complexType> <xsd:complexType name="Security"> <xsd:sequence> <xsd:element minOccurs="0" maxOccurs="1" name="UsernameToken" type="wsse:UsernameToken" /> </xsd:sequence> </xsd:complexType> </xsd:schema> Now that wsdl2perl is generating stubs for these types and elements, I suspect I can use them somehow, passing them in the header field to the generated stub methods. If I instantiate MyElements::Security and pass it in the header I start to make progress: <SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" ><SOAP-ENV:Header><Security xmlns="http://schemas.xmlsoap.org/ws/2002/07/secext"/></SOAP-ENV:Header> <SOAP-ENV:Body><getAllProjects xmlns="http://ws.coverity.com"/></SOAP-ENV:Body></SOAP-ENV:Envelope> Now I just need to add the UsernameToken part - but I'm at a loss how to do this. Can anybody help? Surely using WS-Security is pretty common? Or does everyone use HTTP-based authentication? Many thanks, - James James Croall jc...@co... From: James Croall Sent: Friday, April 23, 2010 7:51 PM To: soa...@li... Subject: SOAP::WSDL and WS-Security? Hi All, I have been using SOAP::Lite successfully with hand-written WS-Security headers, and I'm trying to migrate my code to SOAP::WSDL. Has anybody already added WS-Security support, or can somebody point me in the right direction for creating the headers by hand? May Thanks, - James James Croall jc...@co... |