Hi Robert – Thank you for your reply. Can you point me to where I can find the actual source code for version 1.8.2? I downloaded the Source distribution along with the binary distribution for version 1.8.2 from https://axis.apache.org/axis2/java/core/download.html, however the source code is not included in the associated zip file and it seems to require a Maven build, which doesn’t work for me.
Is there an easier way to get the source code? If not, I will attempt to build it again and provide you with the Maven error log. Thanks for your help! -Debra From: robertlazarski <robertlazar...@gmail.com> Sent: Sunday, February 9, 2025 12:07 PM To: deb...@drummondgroup.com.invalid Cc: java-user@axis.apache.org Subject: Re: Need help with Axis 1.0 to Axis 2 Migration This is my best guess at what is happening in the code you posted - with the caveat that I haven't used Axis 1.x nor a WSDL in my own projects in many years, albeit I help maintain both areas of code. The WSDL2Java error indicates it is expecting to conform specifically to the RPC / Literal style - FYI, Doc / literal is somewhat more common. See the source file SDL11ToAxisServiceBuilder and isRPC() that generates the error. There seems to be some type of conflict between Doc / literal configuration and RPC / literal The XML schema pasted shows some complex types and elements with a name attribute. Seems wrong for RPC / literal. I don't see "binding style=" or keywords like "encoded" or "literal" in what you posted but that could be a clue. I suggest analyzing the arguments you are using for the auto generation on both the WSDL and Java sides. The Ant arguments on one side at least needs to change - not necessarily both but possible so. On Thu, Feb 6, 2025 at 9:44 AM robertlazarski <robertlazar...@gmail.com<mailto:robertlazar...@gmail.com>> wrote: This has been a busy week for me and the email is long over a complicated subject however I expect to see what advice I can give in the next few days. On Fri, Jan 31, 2025 at 11:15 AM Debra Petta <deb...@drummondgroup.com.invalid<mailto:deb...@drummondgroup.com.invalid>> wrote: Hi Everyone – I am in the process of attempting to convert my Axis 1.0 application to Axis 2 (version 1.8.2). I have been reviewing the User Guide and the related documentation for Axis 2 for several weeks now, however I couldn’t find any documentation that addresses my specific questions, so I hope someone in this group can assist me. Basically, my current Axis 1.0 application has a server implementation and an interface that is converted into client-side code. The client then makes RPC calls to specific methods through the generated client stubs. My deploy.wsdd file (snippet below) contains several <beanMapping> elements for my custom return types, so it is my assumption that I need to use xmlbean data binding. <deployment xmlns=http://xml.apache.org/axis/wsdd/ xmlns:java=http://xml.apache.org/axis/wsdd/providers/java > <service name="VendorSvc" provider="java:RPC" > <parameter name="className" value="com.dgi.insitusvc.ws.VendorSvcWS"/> <parameter name="allowedMethods" value="*"/> <beanMapping qname="dgiNS:GenericResult" xmlns:dgiNS="urn:vendorsvc.dgi.com<http://vendorsvc.dgi.com>" languageSpecificType="java:com.dgi.insitusvc.itf.GenericResult"/> ... [snip] Based on these assumptions, I converted my java2wsdl ant task from: <echo message="Generating WSDL files from server Java classes..."/> <java fork="yes" classname="org.apache.axis.wsdl.Java2WSDL"> <arg line=' -o server/src/wsdl-gen/vendorsvc.wsdl -l http://localhost:8080/axis/services/VendorSvc -n "urn:com.dgi.vendorsvc" -p "com.dgi.insitusvc.itf" "urn:vendorsvc.dgi.com<http://vendorsvc.dgi.com>" com.dgi.insitusvc.ws.VendorSvcWS'/> <classpath> <pathelement location="build/classes"/> <pathelement location="../externlib/axis.jar"/> <pathelement location="../externlib/commons-discovery.jar"/> <pathelement location="../externlib/commons-logging.jar"/> <pathelement location="../externlib/wsdl4j.jar"/> <pathelement location="../externlib/jaxrpc-api.jar"/> <pathelement location="../externlib/xsdlib.jar"/> <pathelement location="../externlib/saaj.jar"/> </classpath> </java> to: <echo message="Generating WSDL files from server Java classes..."/> <java fork="yes" classname="org.apache.ws.java2wsdl.Java2WSDL"> <arg line=' -o server/src/wsdl-gen -l http://localhost:8080/axis2/services/VendorSvc -tn "urn:com.dgi.vendorsvc" -p2n [com.dgi.insitusvc.itf,urn:vendorsvc.dgi.com<http://vendorsvc.dgi.com>] -cn com.dgi.insitusvc.ws.VendorSvcWS -xc com.dgi.insitusvc.itf.ParticipantVO -xc com.dgi.insitusvc.itf.PhaseVO -xc com.dgi.insitusvc.itf.TestCaseInstanceVO -xc com.dgi.insitusvc.itf.TestCasesVO -xc com.dgi.insitusvc.itf.TestCaseOverviewVO -wv 1.1 -st rpc -sn VendorSvc'/> <classpath> <pathelement location="build/classes"/> <fileset dir="externlib" includes="*.jar"/> </classpath> </java> Running the updated task creates a VendorSvcWS.wsdl file with the schema definitions for all the complex types, message/parameter elements, operations and bindings. I then converted the wsdl2java ant task from: <echo message="Generating client Java classes from server WSDL files..."/> <java fork="yes" classname="org.apache.axis.wsdl.WSDL2Java"> <arg line='-p com.dgi.client.vendorsvc -o client/src/java-gen server/src/wsdl-gen/vendorsvc.wsdl'/> <classpath> <pathelement location="../externlib/axis.jar"/> <pathelement location="../externlib/commons-discovery.jar"/> <pathelement location="../externlib/commons-logging.jar"/> <pathelement location="../externlib/wsdl4j.jar"/> <pathelement location="../externlib/jaxrpc-api.jar"/> <pathelement location="../externlib/xsdlib.jar"/> <pathelement location="../externlib/saaj.jar"/> </classpath> </java> to: <echo message="Generating client Java classes from server WSDL files..."/> <java fork="yes" classname="org.apache.axis2.wsdl.WSDL2Java"> <arg line=' -uri server/src/wsdl-gen/VendorSvcWS.wsdl -d xmlbeans -p com.dgi.client.vendorsvc -o client/src/java-gen -ssi -uw'/> <classpath> <fileset dir="externlib" includes="*.jar"/> </classpath> </java> When I run the converted wsdl2java task, this exception information is logged: wsdl2java: [echo] Generating client Java classes from server WSDL files... [java] Retrieving document at 'server/src/wsdl-gen/VendorSvcWS.wsdl'. [java] Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL [java] at org.apache.axis2.wsdl.codegen.CodeGenConfiguration.loadWsdl(CodeGenConfiguration.java:748) [java] at org.apache.axis2.wsdl.codegen.CodegenConfigLoader.loadConfig(CodegenConfigLoader.java:328) [java] at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:53) [java] at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24) [java] Caused by: org.apache.axis2.AxisFault: The binding operation validateParticipant is RPC/literal. The message parts for this operation must use the type attribute as specificed by WS-I Basic Profile specification (4.4.1). Message part, parameters, violatesthis rule. Please remove the element attribute and use the type attribute. [java] at org.apache.axis2.AxisFault.makeFault(AxisFault.java:431) [java] at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:408) [java] at org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllServices(WSDL11ToAllAxisServicesBuilder.java:107) [java] at org.apache.axis2.wsdl.codegen.CodeGenConfiguration.loadWsdl(CodeGenConfiguration.java:742) [java] ... 3 more [java] Caused by: org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessingException: The binding operation validateParticipant is RPC/literal. The message parts for this operation must use the type attribute as specificed by WS-I Basic Profile specification (4.4.1). Message part, parameters, violatesthis rule. Please remove the element attribute and use the type attribute. [java] at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.addPartToElement(WSDL11ToAxisServiceBuilder.java:2252) [java] at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.getNewComplextType(WSDL11ToAxisServiceBuilder.java:2110) [java] at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.createSchemaForPorttype(WSDL11ToAxisServiceBuilder.java:1760) [java] at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.generateWrapperSchema(WSDL11ToAxisServiceBuilder.java:1648) [java] at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:352) [java] ... 5 more [java] Java Result: 1 I have pasted all references to the ‘validateParticipant’ from the WSDL below: From the schema section: <xs:element name="validateParticipant"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="data" nillable="true" type="ax22:ParticipantFullVO"/> <xs:element name="useHtmlBreaks" type="xs:boolean"/> <xs:element name="forceCheck" type="xs:boolean"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="validateParticipantResponse"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> Messages: <wsdl:message name="validateParticipantRequest"> <wsdl:part name="parameters" element="ns:validateParticipant"/> </wsdl:message> <wsdl:message name="validateParticipantResponse"> <wsdl:part name="parameters" element="ns:validateParticipantResponse"/> </wsdl:message> Operation: <wsdl:operation name="validateParticipant"> <wsdl:input message="tns:validateParticipantRequest" wsaw:Action="urn:validateParticipant"/> <wsdl:output message="tns:validateParticipantResponse" wsaw:Action="urn:validateParticipantResponse"/> </wsdl:operation> <wsdl:operation name="validateParticipant"> <soap:operation soapAction="urn:validateParticipant" style="rpc"/> <wsdl:input> <soap:body use="literal"/> </wsdl:input> <wsdl:output> <soap:body use="literal"/> </wsdl:output> </wsdl:operation> From what I can tell, it appears that the above stack trace requires some sort of manual intervention to convert the highlighted ‘element’ parameter to ‘type’, however I have no idea how to resolve this issue since my hope was that the process of generating the WSDL and the client classes would be automated through ant. Is it possible that I generated the WSDL incorrectly or have called the WSDL2Java with incorrect parameters? I did try to generate the source code using ‘mvn clean install’ (using Maven 3.9.2) to see if I can figure out where it is failing however, I cannot get past the plug-in exceptions even after following the instructions in the readme to build the plugins individually. Thank you for whatever advice that you can provide. -Debra