axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jess Fisher <d_i...@yahoo.com>
Subject Re: Axis2 1.1.1 WSDL2JAVA - Not generating java classes for <wsdl:portType>
Date Wed, 07 Mar 2007 07:43:53 GMT
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? 
   
  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!
   
  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 <amilasuriarachchi@gmail.com> wrote:
  

  On 3/7/07, Jess Fisher <d_irej@yahoo.com> 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: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org





-- 
Amila Suriarachchi,
WSO2 Inc. 

 
---------------------------------
It's here! Your new message!
Get new email alerts with the free Yahoo! Toolbar.
Mime
View raw message