Return-Path: Delivered-To: apmail-ws-axis-c-user-archive@www.apache.org Received: (qmail 44842 invoked from network); 29 Apr 2009 21:32:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 29 Apr 2009 21:32:05 -0000 Received: (qmail 14297 invoked by uid 500); 29 Apr 2009 21:32:04 -0000 Delivered-To: apmail-ws-axis-c-user-archive@ws.apache.org Received: (qmail 14269 invoked by uid 500); 29 Apr 2009 21:32:04 -0000 Mailing-List: contact axis-c-user-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: "Apache AXIS C User List" Reply-To: "Apache AXIS C User List" Delivered-To: mailing list axis-c-user@ws.apache.org Received: (qmail 14260 invoked by uid 99); 29 Apr 2009 21:32:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Apr 2009 21:32:04 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of robertl@jlab.org designates 129.57.35.69 as permitted sender) Received: from [129.57.35.69] (HELO ccs15.jlab.org) (129.57.35.69) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Apr 2009 21:31:54 +0000 Received: from [127.0.0.1] (ccs14.jlab.org [129.57.35.16]) by ccs15.jlab.org (8.13.6/8.12.11) with ESMTP id n3TLVXqu012060 for ; Wed, 29 Apr 2009 17:31:33 -0400 (EDT) Message-ID: <49F8C735.2020201@jlab.org> Date: Wed, 29 Apr 2009 17:31:33 -0400 From: Bobby Lawrence Organization: Jefferson Lab (jlab.org) User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: axis-c-user@ws.apache.org Subject: document literal stub problems Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Ok - I see a lot of people complaining about getting the C++ client talking to an Axis Java service and running into serialization issues (the server side complaining about unknown elements). I am running into the same issue, but I think I know what the real problem is. First off, Axis requires that you call Stub.setOperation() or nothing will exist in the Body of your SOAP envelope. Ok - that all fine an dandy because you end up with an XML element with the name of the service in your SOAP body. Except that you still have to add your parameter. Well - parameters in document literal services don't get wrapped within another element. If you have a doc/lit service that has an operation called "echoString" and the parameter type is an xsd:string, the "echoString" element in the SOAP body is understood to contain the string parameter....not a separate element that contains the string parameter. When you add a parameter in the Stub (usually generated for you), Axis C++ adds another element to the 'operation/method' element of the SOAP body, so you end up with something like this (not exactly because of other Stub generation issues discussed later): some string For a document/literal service, the SOAP body should look like this: some string At first I thought it had something to do with my generated Stub. When I first used WSDLWs to generate my Stub, it ignored my parameters completely. This is because of a un-documented option to the tool -w (for whether or not to generate "wrapped" types). Well - this option is referenced in the Axis C++ webpage for the tool, but you can't use the option because of the code in the org.apache.axis.wsdl.wsdl2ws.WSDL2Ws Java tool. if(clargparser.isSet("w") && !"wrapped".equalsIgnoreCase(clargparser.getOptionBykey("w"))) { usage(); return false; } Essentially, if you pass the -w option, anything except "wrapped" will abort processing of the tool, even though "nonwrapped" is an option. I had to create my own WSDL2Ws tool to get around this issue, but it doesn't solve the problem. Even with the "nonwrapped" option, the method calls to the Stub have the correct signature now, but the Stub still generates a wrapped element with the "addParameter" method invocation on the Call. I can't find a way around this. Maybe if I checked out the Axis C++ source code and modified it and built it myself. Every other client I've created for this type of service works except the Axis C++ client... Also - the generated Stubs have a slight bug in them in that the method "checkFault" on the Call object should take in the service's namespace as the second parameter, but the generated code puts the endpointURI in for this param. I haven't gotten far enough to find out if this is an issue, but it probably is... Anyway - I just wanted to let folks know that this is probably a bug in the Axis C++ "Call" object design. There needs to be a way to add un-wrapped parameters to an operation to support document/literal services. -- ---------------------------- Bobby Lawrence MIS Application Developer Jefferson Lab (www.jlab.org) Email: robertl@jlab.org Office: (757) 269-5818 Pager: (757) 584-5818 ----------------------------