File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes How to show and hide the elment in WSDL? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "How to show and hide the elment in WSDL?" Watch "How to show and hide the elment in WSDL?" New topic
Author

How to show and hide the elment in WSDL?

chaohua wang
Ranch Hand

Joined: Dec 22, 2002
Posts: 61
Hi Folks,

I have a DataObject, like this

public class DataObject implements java.io.Serializable
{
pivate Integer commandKey;
private File outputFile;

public DataObject(){}

public void setCommandKey(Integer aKey)
{
commandKey = aKey;
}

public Integer getCommandKey()
{
return commandKey;
}

public void setOutputFile(File aFile)
{
outputFile = aFile;
}

public File getOutputFile()
{
return outputFile;
}

}


I use wscompile to generate WSDL file, but it can not show File element in WSDL? HOw can I do that.

For commandKey element. I don't want to show this element in WSDL. How to do it? Thank you very much.

Chwang
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 32767
I'm not sure how to hide elements; you can try declaring it transient.

File is not a datatype that is supported by WSDL, as there is no cross-platform support for it. Maybe just the file name suffices for your purposes?


Android appsImageJ pluginsJava web charts
chaohua wang
Ranch Hand

Joined: Dec 22, 2002
Posts: 61
Hi, Thank you for the reply.

I tyied to use transient, but still can show up. but if I set hte getcommandkey and setCommandKey menthod as protect or private, it would nor show up. Looks like is related to menthod signature. but I must make them as public for other usages. Can I set it a method as 'transient'?
have web service interfce

My web service interface is like this,
public interface DataObjectProcess extends Remote
{
DataObject jobRequest(DataObject aDataObject) throws RemoteException;
}

I read this article's examples,
https://jax-rpc.dev.java.net/whitepaper/1.1/index-part1.html#3.5.1

It can show Vector in WSDL file, but I need to write SerializerFactory and DeserializerFactory code.


Thank you

chaohua
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 32767
The transient qualifier only has meaning for fields, not methods.

If serialization depends on the visibility of the the accessor methods, then the usual Java Bean rules probably apply, i.e. if the getter and setter are public, then the field is deemed to be serilizable. That's actually mentioned in the documentation.
chaohua wang
Ranch Hand

Joined: Dec 22, 2002
Posts: 61
Thank you,

I found a way to show File, this is reference
https://jax-rpc.dev.java.net/whitepaper/1.1/index-part1.html#3.5

But I don't know what is SerializerFactory and DeserializerFactory, or downloaded the source codes?

Chaohua
 
 
subject: How to show and hide the elment in WSDL?
 
Threads others viewed
Please Help: Can't generate wsdl and mapping file
Testing for close() inside loop
Weird IllegalMonitorStateException -- explanations/suggestions wanted
Read from file and display nonduplicate words in ascending order.
Pause / Sleep in Java
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture