axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aegis1888 <>
Subject Defining Custom WSDL
Date Fri, 10 Oct 2008 17:08:22 GMT

Hi guys,

My work has come to a bit of a stand still because I am trying to define a
complex data type that I cannot seem to describe in a wsdl. I'm new to web
services so I bear with me if this doesn't come out right. 

I'm using axis2 to build my web services, which adheres to the SOAP
specification. Now, I want my SOAP service to be as simple to use as
possible. If I understand correctly, SOAP is just transfer of xml data
between two services. Axis2 uses many different implementations to achieve
this transfer both on client and server side, e.g, ADB, XMLBeans, AXIOM. The
last implementation, AXIOM, parses the XML directly. The other
implementations encapsulate the processing of this XML and this allows you
to create a web service without the need to directly parse the xml message
for data.

I am trying to build a service with a simple request but a more complicated
response. For example; I want to send the parameters; accountNumber, name.
And I want my service to response with the following parameters;
product1{name,price},product2{name,price}....In addition, I want to be able
to send a response code so that every time I send a service call I am giving
some indication as to whether or not the call was successful. For example if
the call was successful than the response code is 0, if something went wrong
the response code is 1. If I try to represent that using SOAP, I'm assuming
the xml messages will look like this;


     <name>Solid Snake</name>



Follow so far?

I have created the service using AXIOM, by adding these nodes directly to
the SOAP body content. I have all also created a client to deal with this
service using AXIOM. The service has one method that accepts the SOAP
message and parses it to get the data and the client does something similar.

Now the problem I have is that I don't want my client to be dependent on any
implementation. In other words I want the client to be able to use ADB or
XML Beans or whatever, regardless of whether or not I use AXIOM. So I
thought I would create a custom WSDL, with custom complex datatypes so that
anyone generating code from the wsdl will be able send the correct
parameters. Confused? Okay lets look at a simple request-response;



This service will take two numbers as its argument and add them together.
Now i'm guessing here, but i think the wsdl will look something like this;


<message name="addRequest">
   <part name="number1" type="xs:int"/>
   <part name="number2" type="xs:int"/

<message name="addResponse">
   <part name="result" type="xs:int"/>

<portType name="glossaryAdd">
  <operation name="add">
      <input message="addRequest"/>
      <output message="addResponse"/>


Given the above, assuming its all correct, my question is; how do I create
the wsdl for the more complex example above?
View this message in context:
Sent from the Axis - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message