• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to show and hide the elment in WSDL?

 
chaohua wang
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
chaohua wang
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!