You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Basil ARBYIG <ba...@hotmail.com> on 2004/08/05 11:42:18 UTC

using axis web service, want to create wsdl from java

Hi,

I would like to create an internal webservice for the other developers

some developers use Java and others use .Net ...

providing them a wsdl file will allow them to develop in the environment 
they prefer.

I visted the ws.apache.org/axis site I've seen example on how to create the 
java to wsdl

but st'ill dont know how to generate these codes from java to wsdl.

for example I have this information:
< xsd:complexType name="phone" >
< xsd:all >
< xsd:element name="areaCode" type="xsd:int"/ >
< xsd:element name="exchange" type="xsd:string"/ >
< xsd:element name="number" type="xsd:string"/ >
< /xsd:all >
< /xsd:complexType >

WSDL2Java will generate:

public class Phone implements java.io.Serializable {
public Phone() {...}
public int getAreaCode() {...}
public void setAreaCode(int areaCode) {...}
public java.lang.String getExchange() {...}
public void setExchange(java.lang.String exchange) {...}
public java.lang.String getNumber() {...}
public void setNumber(java.lang.String number) {...}
public boolean equals(Object obj) {...}
public int hashCode() {...}
}

what I like is to have the java code example to generate this wsdl example:
< xsd:complexType name="phone" >
< xsd:all >
< xsd:element name="areaCode" type="xsd:int"/ >
< xsd:element name="exchange" type="xsd:string"/ >
< xsd:element name="number" type="xsd:string"/ >
< /xsd:all >
< /xsd:complexType >

the problem is when I use this java code example:
public java.lang.String getExchange() {...}
public void setExchange(java.lang.String exchange) {...}

java2wsdl generate this:
< xsd:operation name="getExchange" .../ >
< xsd:operation name="setExchange" .../ >

and its not what I want ... but simply something like this:
< xsd:element name="exchange" type="xsd:string"/ >

I want the developers to create the objects and set the fields without 
needing to connect to my webservice. Like your wsdl file, when we create for 
example a contact, the contact object is created and completed without 
needing to make make any connecton nor login. Once the developer has created 
their objects, they can post the information like we do iwith your web 
service using for example the create call.

the aim of my demand to make the minimum connection as possible to my 
webservice, the connection is used only when necessary, when the information 
is needed to be posted.

hope you will be able to help, by giving me an example or hints


thanks

Basil ARBYIG

_________________________________________________________________
Trouvez l'âme soeur sur MSN Rencontres http://g.msn.fr/FR1000/9551