users@jax-rpc.java.net

if nillable="true" then wscompile omits parameter from method signature

From: alan sparago <alanjay_at_qwest.net>
Date: Mon, 12 Jul 2004 08:31:29 -0700

If I use the following in a WSDL file and then run wscompile to generates
the service endpoint, the generated interface and implementation classes do
NOT contain the parameter 'middleName' in any of the method signatures. This
is due to nillable="true" for that parameter in the WSDL file. If I remove
nillable="true" from the WSDL file, it will create the correct method
signatures with 'middleName' as one of the parameters.

Note; I am not using a complexType.

.

<definitions

    targetNamespace=" http://www.xxxxx.com/xxxx/xxxx "

    xmlns="http://schemas.xmlsoap.org/wsdl/"

    xmlns:as=" http://www.xxxxx.com/xxxx/xxxx "

    xmlns:soapbind="http://schemas.xmlsoap.org/wsdl/soap/"

    xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<types>

            <xsd:schema elementFormDefault="qualified"
targetNamespace="http://www.xxxxx.com/xxxx/xxxx">

                        <xsd:element name="nullString" nillable="true"
type="xsd:string" />

            </xsd:schema>

 </types>

 <message name="Process">

        <part name="firstName" type="xsd:string"/>

        <part name="lastName" type="xsd:string"/>

        <part name="middleName" element="as:nullString"/>

 </message>

.

 

Is this a correct way to create a WSDL file? Is there an issue with
wscompile? Or am I doing something else wrong?

 

My wscompile command looks like the following (it runs sucessfully with no
errors generated);

wscompile -f:wsi -import -keep -verbose -mapping config/mapping.xml -d
classes -nd config -model config/model.gz config.xml

 

the method signature from the generated java interface looks like the
following (Note the missing parameter 'middleName');

public interface PaymentGateway extends java.rmi.Remote {

    public void process(java.lang.String firstName, java.lang.String
lastName) throws java.rmi.RemoteException;

}

 

Running JWSDP 1.4 on windows XP.

 

Thanks for any help.