Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

additional types not in the WSDL file.  RSS feed

 
Bob Green
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the following interface:
public interface PaymentManager extends Remote {
public PaymentInfo getPaymentInfo() throws RemoteException;
}

PaymentInfo class:
public class PaymentInfo implements Serializable {
public String description;
public String getDescription() {
return description;
}
public void setDescription(String desc) {
description = desc;
}
}

I have the CreditCardInfo class that extends the PaymentInfo class.

My question is when I generate the WSDL file with wscompile, it only has the PaymentInfo class and I need to include the CreditCardInfo class too, does anyone know how to accomplish this with wscompile?

Thanks in advance.
 
Bob Green
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can someone please tell me whether or not it is doable.

Thanks.
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A SOAP web service client and server exchange data, possibly complex data, formatted in XML, as messages inside of a SOAP envelope. The WSDL describes the messages that are exchanged to accomplish that task.
Objects are data + behavior. There is no facility to describe behavior in WSDL; therefore WSDL cannot describe objects. If you wish to transfer objects then you have to provide platform-specific custom serializers and deserializers to your web services client which is outside of the scope of (i.e. has to be done in addition to) the WSDL.

You could however use the facilities of XML Schema to achieve a similar effect. Your could define an XML Schema that declares an PaymentInfo complex type. Then you could use XML schema inheritance to either restrict or extend the PaymentInfo type. In your case I suspect that you want to extend the PaymentInfo type to a CreditCardInfo type by adding new elements and attributes. Once you have a schema you like, you can reference either type in a WSDL that uses that schema.
[ August 17, 2007: Message edited by: Peer Reynders ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!