-----Original Message----- From: Simon Laws [mailto:simonsl...@googlemail.com] Sent: 26 May 2010 14:55 To: user@tuscany.apache.org Subject: Re: Exception with security (again)
I've taken a slightly different tack. While I'm not getting the IOB you originally posted I can now appreciate how it might come about. I stepped back to the point in the process where I fixed the WSDL to correct the operation name to a lower case "l". So we start with a WSDL which on the face of it seems to be describing a doc/lit/wrapped interface which, looking at the original WSDL, I think should be of the form: LoginResponse Login(username, password, existingTokeIDs) In the soap message the three parameters are "wrapped" up into a Login xml element which follows the operation name. However what wsdl2java actually generated was: LoginResponse login(Login login) Which is a little odd as this looks like a bare interface. Debugging through the code Tuscany does think there is a bare interface involved and I can imagine it's getting confused between the wrapped interface and the bare message. I looked back at wsdl2java and there is a flag that I've not noticed before that allows you to unwrap the parameters -uw. wsdl2java -or -o . -ss -ssi -uw -uri MyModuleService.wsdl I ran this and this does produce an interface of the form LoginResponse Login(username, password, existingTokeIDs) When I run this with a wsdl element on the binding: <binding.ws wsdlElement="http://soa.mycompany.com/webservices/#wsdl.port(MyModuleSer vice/MyModuleServiceSoap)" requires="authentication"/> I see the following SOAP message. POST /MyModuleFacility/MyModuleService.asmx HTTP/1.1 Content-Type: text/xml; charset=UTF-8 SOAPAction: "http://soa.mycompany.com/webservices/Login" User-Agent: Axis2 Authorization: Basic dHVzY2FueXVzZXI6dHVzY2FueXB3ZA== Host: localhost:8080 Content-Length: 1018 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soape nv:Body> <_ns_:Login xmlns:_ns_="http://soa.mycompany.com/webservices/"> <ns3:userName xmlns:ns3="http://soa.mycompany.com/webservices/" xmlns:ns2="http://webservices.soa.mycompany.com/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">SomeUser </ns3:userName> <ns3:password xmlns:ns3="http://soa.mycompany.com/webservices/" xmlns:ns2="http://webservices.soa.mycompany.com/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">SomePassword </ns3:password> <ns3:existing TokenIds xmlns:ns3="http://soa.mycompany.com/webservices/" xmlns:ns2="http://webservices.soa.mycompany.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="arrayOfString"> <string>XYZ</string> <string>ABC</string> </ns3:existingTokenIds> </_ns_:Login> </soapenv:Body> </soapenv:Envelope> Which looks like a wrapped message and it has the SOAPAction pulled from the WSDL and the basic auth info. I can't say that's what your external service is expecting but it looks to me like the interface that the WSDL is trying to describe. Regards Simon -- Apache Tuscany committer: tuscany.apache.org Co-author of a book about Tuscany and SCA: tuscanyinaction.com Just tried this out as well. It generated something closer to what was expected, but seemed to strip out the top level response as well. It's not close enough to what Axis (1) was creating. Ah well, this'll do for now! Gk.