I still cannot get all the portTypes generated even with Axis 1.2. Any plans on fixing this ?
Bo Xie <[EMAIL PROTECTED]> wrote: Sorry to bother you again. Just want to know if this is a bug or I did not set the parameter correctly. Any advice on how to make this work. Thanks, -Bo On 5/20/07, Bo Xie <[EMAIL PROTECTED]> wrote: I attached the wsdls from the original email. Thanks, -Bo On 5/20/07, Amila Suriarachchi < [EMAIL PROTECTED] > wrote: Can you send your wsdl? do you have ports for each bining? Actually code is generated per port. On 5/20/07, Bo Xie < [EMAIL PROTECTED]> wrote: Hi, Just wondering if this is still an issue in Axis2 1.2 or I did not put the parameters properly. Thanks, -Bo On 5/17/07, Bo Xie < [EMAIL PROTECTED]> wrote: Thanks, Amila. I tried your advice using no -pn and -sn. It still only generated last one binding out of the 4. I used asix2 1.2 release. Here is the command line. Anything I did not do right? Attached is the output files and wsdl files. Sorry for the 500k size. C:\programs\work>wsdl2java -o output -p com.xyz.nbi -t -ss -sd -g -S src -R src -uri wsrp_service.wsdl Using AXIS2_HOME: C:\programs\axis2-1.2 Using JAVA_HOME: C:\programs\jdk1.5.0_09 Retrieving document at 'wsrp_v1_bindings.wsdl', relative to 'file:/C:/programs/work/'. Retrieving document at 'wsrp_v1_interfaces.wsdl', relative to 'file:/C:/programs/work/wsrp_v1_bindings.wsdl'. Retrieving schema at 'wsrp_v1_types.xsd', relative to 'file:/C:/programs/work/wsrp_v1_interfaces.wsdl'. Retrieving schema at 'http://www.w3.org/2001/xml.xsd', relative to 'file:/C:/programs/work/wsrp_v1_types.xsd'. Retrieving document at 'wsrp_v1_bindings.wsdl', relative to 'file:/C:/programs/work/'. Retrieving document at 'wsrp_v1_interfaces.wsdl', relative to 'file:/C:/programs/work/wsrp_v1_bindings.wsdl'. Retrieving schema at 'wsrp_v1_types.xsd', relative to 'file:/C:/programs/work/wsrp_v1_interfaces.wsdl'. Retrieving schema at 'http://www.w3.org/2001/xml.xsd', relative to 'file:/C:/programs/work/wsrp_v1_types.xsd'. May 17, 2007 11:55:31 AM org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile INFO: The output\src\com\xyz\nbi\InvalidHandleException.java file cannot be overwritten. May 17, 2007 11:55:31 AM org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile INFO: The output\src\com\xyz\nbi\AccessDeniedException.java file cannot be overwritten. May 17, 2007 11:55:31 AM org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile INFO: The output\src\com\xyz\nbi\InvalidRegistrationException.java file cannot be overwritten. May 17, 2007 11:55:31 AM org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile INFO: The output\src\com\xyz\nbi\MissingParametersException.java file cannot be overwritten. May 17, 2007 11:55:31 AM org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile INFO: The output\src\com\xyz\nbi\InvalidUserCategoryException.java file cannot be overwritten. May 17, 2007 11:55:31 AM org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile INFO: The output\src\com\xyz\nbi\OperationFailedException.java file cannot be overwritten. May 17, 2007 11:55:31 AM org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile INFO: The output\src\com\xyz\nbi\InconsistentParametersException.java file cannot be overwritten. Thanks, -Bo On 5/17/07, Amila Suriarachchi <[EMAIL PROTECTED]> wrote: On 5/17/07, Bo Xie <[EMAIL PROTECTED] > wrote: Hi I tried on Axis2 1.2 release package. I see there is an -pn operation. Here is the command line I used. The skeleton file still only have the operations in the last port(see attached skeleton file). My questions are: 1. Is "-pn WSRPRegistrationService" used correctly, why the skeleton file does not have the operations from this portType. pn is for port name not for port type. 2. Is there any options to have wsdl2java generate all the portTypes in the WSDL. C:\programs\work>wsdl2java -o output -p com.cisco.csm.nbi -t -ss -sd -g -S src -R src -pn WSRPRegistrationService -uri wsrp_service.wsdl if you do not use the -pn and -sn parameters it will generate the code for all bindings. Using AXIS2_HOME: C:\programs\axis2- 1.2 Using JAVA_HOME: C:\programs\jdk1.5.0_09 Retrieving document at 'wsrp_v1_bindings.wsdl', relative to 'file:/C:/programs/work/'. Retrieving document at 'wsrp_v1_interfaces.wsdl', relative to 'file:/C:/programs/work/wsrp_v1_bindings.wsdl'. Retrieving schema at 'wsrp_v1_types.xsd', relative to 'file:/C:/programs/work/wsrp_v1_interfaces.wsdl'. Retrieving schema at ' http://www.w3.org/2001/xml.xsd ', relative to 'file:/C:/programs/work/wsrp_v1_types.xsd'. Retrieving document at 'wsrp_v1_bindings.wsdl', relative to 'file:/C:/programs/work/'. Retrieving document at 'wsrp_v1_interfaces.wsdl', relative to 'file:/C:/programs/work/wsrp_v1_bindings.wsdl'. Retrieving schema at 'wsrp_v1_types.xsd', relative to 'file:/C:/programs/work/wsrp_v1_interfaces.wsdl'. Retrieving schema at ' http://www.w3.org/2001/xml.xsd ', relative to 'file:/C:/programs/work/wsrp_v1_types.xsd'. May 16, 2007 6:05:12 PM org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile INFO: The output\src\com\cisco\csm\nbi\InvalidHandleException.java file cannot be overwritten. May 16, 2007 6:05:12 PM org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile INFO: The output\src\com\cisco\csm\nbi\AccessDeniedException.java file cannot be overwritten. May 16, 2007 6:05:12 PM org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile INFO: The output\src\com\cisco\csm\nbi\InvalidRegistrationException.java file cannot be overwritten. May 16, 2007 6:05:12 PM org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile INFO: The output\src\com\cisco\csm\nbi\MissingParametersException.java file cannot be overwritten. May 16, 2007 6:05:12 PM org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile INFO: The output\src\com\cisco\csm\nbi\InvalidUserCategoryException.java file cannot be overwritten. May 16, 2007 6:05:12 PM org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile INFO: The output\src\com\cisco\csm\nbi\OperationFailedException.java file cannot be overwritten. May 16, 2007 6:05:12 PM org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile INFO: The output\src\com\cisco\csm\nbi\InconsistentParametersException.java file cannot be overwritten. Thanks, -Bo On 3/14/07, Amila Suriarachchi <[EMAIL PROTECTED]> wrote: I recently added multi services support to axis2. can you have a look with a nighly build? On 3/7/07, Amila Suriarachchi < [EMAIL PROTECTED]> wrote: On 3/7/07, Jess Fisher <[EMAIL PROTECTED]> wrote: I'm trying to understand what's happening here, so bear with me... Using Axis 1.4, I run the WSDL2Java like this: java org.apache.axis.wsdl.WSDL2Java -s -o C:\temp\generated_source C:\temp\wsrp_service.wsdl This created all the java interfaces for the defined wsdl:portType. See attached java_interfaces.zip This also automatically generated all the binding classes for the <wsdl:binding> defined in wsrp_v1_bindings.wsdl (see my previous post where I attached this file there) These were all defined in wsrp_v1_bindings.wsdl: <wsdl:binding name="WSRP_v1_Markup_Binding_SOAP" type="intf:WSRP_v1_Markup_PortType"> <wsdl:binding name="WSRP_v1_ServiceDescription_Binding_SOAP" type="intf:WSRP_v1_ServiceDescription_PortType"> <wsdl:binding name="WSRP_v1_Registration_Binding_SOAP" type="intf:WSRP_v1_Registration_PortType"> <wsdl:binding name="WSRP_v1_PortletManagement_Binding_SOAP" type="intf:WSRP_v1_PortletManagement_PortType"> The way I run Axis2's wsdl2java is as follows: wsdl2java.bat -uri C:\temp\wsrp_service.wsdl -o C:\temp\generated_source -ss -d adb -g -ns2p urn:oasis:names:tc:wsrp:v1:types=oasis.names.tc.wsrp.v1.types ,urn:oasis:names:tc:wsrp:v1:intf=oasis.names.tc.wsrp.v1.intf,urn:oasis:names:tc:wsrp:v1:bind =oasis.names.tc.wsrp.v1.bind,urn:oasis:names:tc:wsrp:v1:wsdl=oasis.names.tc.wsrp.v1.wsdl -ssi However when I used Axis2's wsdl2java I did not get the java interfaces for <wsdl:portType>. Why does the axis 1.x generate the java interfaces but axis 2 doesn't? well Axis2 generates the interface if you have specified the -ssi parameter. But the difference is it has the service name instead of the porttype name. I am not familiar with the axis 1.x but actually this interface method signatures are depends on the binding. Also, I had to run wsdl2java seperately on wsrp_v1_bindings.wsdl before it would read my <wsdl:binding> defined there to create my java classes for my wsdl bindings. Note that wsrp_service.wsdl already imports wsrp_v1_bindings.wsdl. It also does not generate the java classes for all my wsdl:binding (I guess due to multiple defined wsdl:binding in my wsdl file). I get this message when I run the wsdl2java on wsrp_v1_bindings.wsdl: org.apache.axis2.description.WSDL11ToAxisServiceBuilder findBinding INFO: A service element was not found - picking a random binding! In Axis2 it generates the code for only one binding in one service. So if there is no service it creates a random service.Actually this is an axis2 limitation. What I did to workaround this is to manually run wsdl2java on each of my wsdl:binding, so I can get the java classes for all of my bindings. Axis 1.x wsdl2java automatically generated java classes for all my wsdl:binding defined in wsrp_v1_bindings.wsdl. Any thoughts? Thanks again! Amila Suriarachchi <[EMAIL PROTECTED]> wrote: On 3/7/07, Jess Fisher <[EMAIL PROTECTED] > wrote: From the attached wsdl file:wsrp_v1_interfaces.wsdl, the following are defined: <wsdl:portType name="WSRP_v1_Markup_PortType"> <wsdl:portType name="WSRP_v1_ServiceDescription_PortType"> <wsdl:portType name="WSRP_v1_Registration_PortType"> <wsdl:portType name="WSRP_v1_PortletManagement_PortType"> But, when running Axis2's WSDL2Java, the corresponding java classes (for the wsdl:portType) are not created. Using Axis 1.4's WSDL2Java, the corresposing java classes were generated. using axis2 you can not generate the code for portTypes. The reason for this is the skelton and and stub interfaces depends on the binding. Why you need to generate the code for a port type? I run the WSDL2Java against wsrp_service.wsdl first which imports wsrp_v1_bindings.wsdl which then imports wsrp_v1_interfaces.wsdl. Is this a bug? no I believe. If yes, does anybody know of the bug ID ? I cannot find it in JIRA. Or is there a WSDL2Java option I need to set to generate java classes for the portType, specifically? if you do not have specified any parts or namespace ( in rpc) in soap:body (in your binding) and generate the code with parameters -ss -sd -ssi and with any binding (-d adb, -d jibx, -d xmlbeans, -d jaxbri) I think you can get what you need. It simply generates the skelton, skelton interface and the service.xml. (I've used -ss, -g, -d adb, -ssi) Thanks. --------------------------------- Need Mail bonding? Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users. --0-1424838073-1173226094=:65510-- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Amila Suriarachchi, WSO2 Inc. --------------------------------- It's here! Your new message! Get new email alerts with the free Yahoo! Toolbar. --0-1402565997-1173253433=:40062-- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Amila Suriarachchi, WSO2 Inc. -- Amila Suriarachchi, WSO2 Inc. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Amila Suriarachchi, WSO2 Inc. -- Amila Suriarachchi, WSO2 Inc. --------------------------------- Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out.