Title: Message

You could create a service implementation described in wsdl, who’s implementation delegates to the “actual” implementation of the business method.   This then will decouple your business interfaces definitions from your webservice interface definitions.   You then write either an adapter, or transformation logic, to allow the interface types to transform between one another.

 

 

 

 

 

 

 

 

-----Original Message-----
From: Oleg Lebedev [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 29, 2004 1:28 PM
To: [EMAIL PROTECTED]
Subject: RE: Generating wsdl for interfaces

 

 

 > If you are going to trick java2wsdl into using the State class, then you might as well return a State object from getState(), 
> since that kinda defeats the purpose of returning an interface in the first place, right? 

Not true, because this interface is used in other projects. 

 

 >  I see alot of questions on this list where someone is trying to make axis produce a wsdl to fit their classes that they  
want to expose as a service. I'm a newbie here, so maybe I don't get it, but it seems this is the reverse of the process to be  
followed. Shouldn't you design your interface such that it exposes your web service in a way that meets the requirements of  
how a wsdl file is created and used, instead of trying to make the wsdl match an interface that was designed without a web 
service in mind? 

This is true only for new applications, which are created with the only purpose of exposing their functionality as web services.

Currently, I added the following dircting to my java2wsdl target:
extraclasses="State "
This forces java2wsdl to add State type to wsdl types. Then I can replace IState type refernce in my wsdl with State and it works. I wonder if there is a more straightforward way to do this.

 

Thanks.

 

-----Original Message-----
From: Oleg Lebedev [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 29, 2004 1:09 PM
To: [EMAIL PROTECTED]
Subject: Generating wsdl for interfaces

Greetings.

 

I am trying to figure out how to get wsdl2java to work with methods which return interfaces.

I have an interface, which declares the following method which returns IState interface:

public IState getState(); 

java2wsdl generates correct wsdl, but shows a warning saying:

    [axis-java2wsdl]  WARN [main] (Types.java:1193) - The class 
    org.waterford.sequencer.interfaces.engine.IState does not contain a default constructor, 
    which is a requirement for a bean class.  The class cannot be converted into an xml schema
    type.  An xml schema anyType will be used to define this class in the wsdl file.

wsdl2java chokes and throws the following exception:

    [axis-wsdl2java] java.io.IOException: Type {urn:datatypes:engine.interfaces.sequ
    encer.waterford.org}IState is referenced but not defined.

I have a State class, which implements IState interface. I wonder if there is a way to trick java2wsdl or wsdl2java to use that class instead of IState interface.

Thanks.

 

*************************************

This e-mail may contain privileged or confidential material intended for the named recipient only.
If you are not the named recipient, delete this message and all attachments.
Unauthorized reviewing, copying, printing, disclosing, or otherwise using information in this e-mail is prohibited.
We reserve the right to monitor e-mail sent through our network.

*************************************

 

*************************************

This e-mail may contain privileged or confidential material intended for the named recipient only.
If you are not the named recipient, delete this message and all attachments.
Unauthorized reviewing, copying, printing, disclosing, or otherwise using information in this e-mail is prohibited.
We reserve the right to monitor e-mail sent through our network.

*************************************

Reply via email to