Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 13469 invoked from network); 3 Aug 2006 13:57:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Aug 2006 13:57:53 -0000 Received: (qmail 97330 invoked by uid 500); 3 Aug 2006 13:57:49 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 97290 invoked by uid 500); 3 Aug 2006 13:57:49 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 97279 invoked by uid 99); 3 Aug 2006 13:57:49 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Aug 2006 06:57:49 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Aug 2006 06:57:48 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 46D3041000D for ; Thu, 3 Aug 2006 13:55:14 +0000 (GMT) Message-ID: <3247585.1154613314266.JavaMail.jira@brutus> Date: Thu, 3 Aug 2006 06:55:14 -0700 (PDT) From: "Nitesh kant (JIRA)" To: axis-dev@ws.apache.org Subject: [jira] Commented: (AXIS2-953) Wsdl2Java throws a code generation exception if the input message has 2 parts. (Document-Literal Wrapped Dispatching) In-Reply-To: <16014237.1154442015421.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/AXIS2-953?page=comments#action_12425520 ] Nitesh kant commented on AXIS2-953: ----------------------------------- Okie, i found that if in the input/output messages, i use "type" instead of "element" i.e. if the input message in the specified WSDL is : (and obviusly types:putBundle and types:attachment are complex types) then the code generation works, but still when i pass the putBundleRequest message to the generated client stub, it does not send the same as a soap attachment but it goes as a simple element in the soap body. I cant find a way to specify a attachment in WSDL without a MIME binding. Does that mean, i can not send an attachment using WSDL2Java generated client stubs for a document style? Can you please tell me a way or point me to a relevant source. regards, nitesh > Wsdl2Java throws a code generation exception if the input message has 2 parts. (Document-Literal Wrapped Dispatching) > ---------------------------------------------------------------------------------------------------------------------- > > Key: AXIS2-953 > URL: http://issues.apache.org/jira/browse/AXIS2-953 > Project: Apache Axis 2.0 (Axis2) > Issue Type: Bug > Components: wsdl > Affects Versions: 1.0 > Environment: Linux > Reporter: Nitesh kant > > I am trying to generate Java client side stubs from WSDL using Wsdl2Java. > Following is the wsdl: > ------------------------------------------------------------------ > > xmlns:tns="http://www.foo.bar/schemas/2006/02/26/wsdl/" > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:types="http://www.foo.bar/schemas/2006/02/26/wsdl/types" > targetNamespace="http://www.foo.bar/schemas/2006/02/26/wsdl/" > name="WSDLFILE"> > > xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> > > > > > > > > > > > > > > > > > > > > > > > > > > > transport="http://schemas.xmlsoap.org/soap/http"/> > > > > xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"> > > use="literal"/> > > > type="application/zip"/> > > > > > > > > > > name="config"> > location="http://localhost:8080/config"/> > > > > ------------------------------------------------------------------ > The whole intention is to send a SOAP attachment as a part of the request for "putBundle" operation. > I am not sure whether this is the correct way of doing it in Axis2 but yes, wsdl specs do suggest the same. > The following is the stack trace for the code-generation error: > ---------------------------------------------------------------------- > Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException > at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:185) > at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32) > at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21) > Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException > at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:93) > at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:140) > ... 2 more > Caused by: java.lang.reflect.InvocationTargetException > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:83) > ... 3 more > Caused by: java.lang.RuntimeException: org.apache.xmlbeans.XmlException: error: src-resolve: type 'PutBundleResponse@http://www.foo.bar/schemas/2006/02/26/wsdl/' not found. > at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:192) > ... 8 more > Caused by: org.apache.xmlbeans.XmlException: error: src-resolve: type 'PutBundleResponse@http://www.foo.bar/schemas/2006/02/26/wsdl/' not found. > at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:665) > at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:161) > ... 8 more > ---------------------------------------------------------------------- > However, if the "PutBundleRequest" message contains only one part, everything works fine. > The following is the ant task i am using to call Wsdl2Java > ------------------------------------------------------------------------------------------------------------------- > > > > > > > > > > > > > > > > --------------------------------------------------------------------------------------------- > Am i missing something or is it a bug? > Also, it will be helpful, if you can suggest a way that works with Axis2 to send SOAP attachments using stubs generated by Wsdl2Java. > thanks and regards, > nitesh -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org For additional commands, e-mail: axis-dev-help@ws.apache.org