You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Tom Jordahl <to...@macromedia.com> on 2004/11/12 16:25:59 UTC

RE: WSDL2Java generating holder classes for non in/out parameter types

You are probably triggering the wrapped sensing code in WSDL2Java by having
the element name be the same as the operation name.  When you change the
name, the tool does not "unwrap" the elements and treat each of them as
arguments to the service method.

You can turn this off with the --nowrap switch in WSDL2Java.


--
Tom Jordahl
Macromedia Server Development

> -----Original Message-----
> From: Jeremy Nix [mailto:Jeremy.Nix@sfsltd.com]
> Sent: Friday, November 12, 2004 10:08 AM
> To: axis-dev@ws.apache.org
> Subject: RE: WSDL2Java generating holder classes for non in/out parameter
> types
> 
> As a follow-up, I find that when I change the operation to something
> other than "GeocodeAddress", the method signature gets created just the
> way that I wanted it to:
> 
> public
> com.sfsltd.webservices.geocode.geocodeaddress.GeocodeAddressResponse
> geocodeAddressOperation(com.sfsltd.webservices.geocode.geocodeaddress.Ge
> ocodeAddress body) throws java.rmi.RemoteException {
>     return null;
> }
> 
> Is there a requirement in Axis for the operation names to be something
> different from the actual input message names?
> 
> _________________________________
> Jeremy Nix
> Senior Application Developer
> Southwest Financial Services, LTD.
> (513) 621-6699 x1158
> www.sfsltd.com
> 
> 
> 
> -----Original Message-----
> From: Jeremy Nix
> Sent: Friday, November 12, 2004 8:52 AM
> To: Axis-Dev@ws.apache.org
> Subject: WSDL2Java generating holder classes for non in/out parameter
> types
> 
> 
> I attempted posting this in the user mailing lists, but there was no
> response.  I was hoping to find some help here.  When I generate my Java
> server code using the WSDL2Java utility holder classes are being
> generated when I do not want them to.  The parameters are not in/out
> parameters.  The methods I'm wanting to define within my service are
> simple methods that take input params and returns an out param.  Is
> there a known bug in Axis that is causing the holder classes to be
> generated, or do I have something defined incorrectly.  Any help would
> be much appreciated.
> 
> I'm generating my Java objects by running the WSDLtoJava utility (using
> the latest/greatest code) against the following WSDL. <?xml
> version="1.0" encoding="UTF-8"?>
> <definitions name="Geocode" xmlns="http://schemas.xmlsoap.org/wsdl/"
> targetNamespace="http://geocode.webservices.sfsltd.com"
> xmlns:tns="http://geocode.webservices.sfsltd.com"
> xmlns:gans="http://geocodeaddress.geocode.webservices.sfsltd.com"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> 
> <types>
> <!-- schema imports -->
> <xsd:import
> namespace="http://geocodeaddress.geocode.webservices.sfsltd.com"
> schemaLocation="GeocodeAddress.xsd"/>
> </types>
> 
> <!-- messages -->
> <message name="GeocodeAddressSoapIn">
> <part name="GeocodeAddressRequest" element="gans:GeocodeAddress" />
> </message>
> <message name="GeocodeAddressSoapOut">
> <part name="GeocodeAddressResponse"
> element="gans:GeocodeAddressResponse" />
> </message>
> 
> <!-- port types -->
> <portType name="GeocodeSoapPort">
> <operation name="GeocodeAddress">
> <documentation>Method for geocoding/standardizing
> address</documentation>
> <input message="tns:GeocodeAddressSoapIn" />
> <output message="tns:GeocodeAddressSoapOut" />
> </operation>
> </portType>
> 
> <!-- bindings -->
> <binding name="GeocodeSoapBinding" type="tns:GeocodeSoapPort">
> <soap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http"/>
> <operation name="GeocodeAddress">
> <soap:operation soapAction="GeocodeAddress_V1"/>
> <input>
> <soap:body use="literal" />
> </input>
> <output>
> <soap:body use="literal" />
> </output>
> </operation>
> </binding>
> 
> <!-- service definition -->
> <service name="Geocode">
> <documentation>Internal application for providing geocode
> information</documentation>
> <port name="Geocode" binding="tns:GeocodeSoapBinding">
> <soap:address location="https://localhost/webservices/services/Geocode"
> />
> </port>
> </service>
> </definitions>
> 
> For some reason, the skeleton is being generated like this:
> 
> public void
> geocodeAddress(com.sfsltd.webservices.geocode.common.TypeRawAddress
> address, com.sfsltd.webservices.geocode.common.TypeMatchOptions
> matchOption, com.sfsltd.webservices.geocode.common.TypeDataSource
> dataSource, com.sfsltd.webservices.geocode.common.TypeAuth
> authentication,
> com.sfsltd.webservices.geocode.common.holders.TypeAddressCollectionHolde
> r geocodeAddressResults, javax.xml.rpc.holders.StringHolder
> errorDescription) throws java.rmi.RemoteException
> {
> impl.geocodeAddress(address, matchOption, dataSource, authentication,
> geocodeAddressResults, errorDescription);
> }
> 
> Where the objects geocodeAddressResults and errorDescription are suppose
> to be apart of the complexType GeocodeAddressResponse not in/out
> parameters. I can send the full schema/wsdl if necessary. Just wondering
> if I'm defining something within my WSDL that is causing AXIS to think
> that these params are in/out.
> 
> Thanks for any help.
> 
> _________________________________
> Jeremy Nix
> Senior Application Developer
> Southwest Financial Services, LTD.
> (513) 621-6699 x1158
> www.sfsltd.com