hi all,
i have a question how to use in/out parameter with local java
invocation.
as you know, in/out parameter is defined by adding same part name
in input and output message at wsdl operation definition. and
according to jax-rpc spec, in/out parameters are mapped onto
appropriate holder classes.
does anyone can tell me how?
i just tried it with modifying localjava sample in the wsif
package.
what i did is:
1. modify the wsdl
i added same part in two messages.
<message name="GetAddressFromNameRequestMessage">
<part name="name" type="xsd:string"/>
<part name="inout" type="xsd:string"/> <!-- here -->
</message>
<message name="GetAddressFromNameResponseMessage">
<part name="address" type="typens:address"/>
<part name="inout" type="xsd:string"/> <!-- here -->
</message>
and modifyed the parameterOrder attr in java:operation.
<operation name="getAddressFromName">
<java:operation
methodName="getAddressFromName"
parameterOrder="name, inout"
methodType="instance"
returnPart="address" />
2. generate stub
i generated stub with wsdl2java. the stub interface was generated
as:
public interface AddressBook extends java.rmi.Remote {
...
public localjava.client.stub.addressbook.wsiftypes.Address
getAddressFromName(
java.lang.String name,
javax.xml.rpc.holders.StringHolder inout
) throws java.rmi.RemoteException;
3. modify the impl class.
i modified the AddressBookImpl#getAddressFromName method signiture
to fit the generated stub interface.
4. run client
when i run the client, i got the following error.
C:\tmp\wsif>java localjava.client.stub.Run \
localjava\AddressBook.wsdl
...
org.apache.wsif.WSIFException: Method getAddressFromName(class
java.lang.String, class javax.xml.rpc.holders.StringHolder) was not
found in portType {http://wsifservice.addressbook/}AddressBook
at
org.apache.wsif.base.WSIFClientProxy.findMatchingOperation(Unknown
Source)
at org.apache.wsif.base.WSIFClientProxy.invoke(Unknown Source)
at $Proxy0.getAddressFromName(Unknown Source)
at localjava.client.stub.Run.queryAddresses(Run.java:103)
at localjava.client.stub.Run.main(Run.java:180)
--
sigemoto