Simple custom return type in Apache Axis

Discussion in 'Java' started by Jeffrey.Rodriguez@gmail.com, Apr 29, 2005.

  1. Guest

    I'm trying to figure out how exactly to return a custom type using
    Apache Axis.

    I'm implementing a method in all future web services called
    "ServiceStatus". This method will return 2 fields "status" (string) and
    "comment" (string).

    What would be the easiest way to implement this in Axis? I *think* it
    would be to use an interface at which I would point Java2WSDL, but the
    docs don't really go into detail about how exactly I would return a
    custom type using this method.

    After I use Java2WSDL and WSDL2Java, what file do I need to look at in
    order to setup my service?
     
    , Apr 29, 2005
    #1
    1. Advertising

  2. Rhino Guest

    <> wrote in message
    news:...
    > I'm trying to figure out how exactly to return a custom type using
    > Apache Axis.
    >
    > I'm implementing a method in all future web services called
    > "ServiceStatus". This method will return 2 fields "status" (string) and
    > "comment" (string).
    >
    > What would be the easiest way to implement this in Axis? I *think* it
    > would be to use an interface at which I would point Java2WSDL, but the
    > docs don't really go into detail about how exactly I would return a
    > custom type using this method.
    >
    > After I use Java2WSDL and WSDL2Java, what file do I need to look at in
    > order to setup my service?
    >

    I really don't understand your problem: String is *not* a custom type.

    Rhino
     
    Rhino, Apr 29, 2005
    #2
    1. Advertising

  3. Guest

    I was trying to create a complex type which contained 2 strings, but
    decied to use two <part> tags instead.

    I couldn't find an easy to get Java2WSDL to generate either, instead I
    had to resort to editing the WSDL after I generated a basic WSDL with
    JavaWSDL. After doing so I modified my method to return a 2 part
    response:
    <wsdl:message name="getServiceStatusResponse">
    <wsdl:part name="status" type="xsd:string"/>
    <wsdl:part name="comment" type="xsd:string"/>
    </wsdl:message>

    Now I need to figure out how to get that response into my client :)
     
    , Apr 29, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mjcsfo
    Replies:
    0
    Views:
    860
    mjcsfo
    Aug 14, 2003
  2. Joey Vendetta
    Replies:
    0
    Views:
    3,454
    Joey Vendetta
    Apr 1, 2004
  3. Replies:
    0
    Views:
    940
  4. mjcsfo
    Replies:
    0
    Views:
    1,267
    mjcsfo
    Aug 14, 2003
  5. malli

    Apache AXIS Custom Header

    malli, Mar 24, 2008, in forum: Java
    Replies:
    0
    Views:
    506
    malli
    Mar 24, 2008
Loading...

Share This Page