axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Keese <bi...@tech.beacon-it.co.jp>
Subject Re: Document/Literal : bad part name in axis server response
Date Tue, 11 Jan 2005 00:57:04 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Anne -<br>
<br>
What is the correct behavior of AXIS supposed to be?<br>
<br>
Since all the method request/response info is in the WSDL file, I
thought you shouldn't need to duplicate any of that information in the
WSDD file.&nbsp; You would simply have the WSDD file point to the WSDL file.<br>
<br>
On the other hand, WSDL2Java generates a gigantic WSDD file,
duplicating all the information from the WSDL file.&nbsp; That makes me
think that you have to have that information in the WSDD.<br>
<br>
Thanks,<br>
Bill<br>
<br>
Anne Thomas Manes wrote:
<blockquote cite="midbf414ee6050107093018738871@mail.gmail.com"
 type="cite">
  <pre wrap="">Even though there is a work-around, this is still a bug. When using
document/literal, Axis must generate a response message according to
the structure defined in the schema in the WSDL. It should generate
its own function return value only when using RPC style.

- Anne

On Fri, 07 Jan 2005 17:34:59 +0900, Bill Keese
<a class="moz-txt-link-rfc2396E" href="mailto:billk@tech.beacon-it.co.jp">&lt;billk@tech.beacon-it.co.jp&gt;</a>
wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Ah, I see.  Yes, you should be able to use document style or wrapped
style,
and in document style you don't put the action name inside the soapBody.

I just looked at the AXIS code that serializes the response
(Emitter.getResponseMessage()).  It seems like, regardless of the WSDL file,
AXIS serializes your function return value as
   &lt;XXXReturn&gt;
       12345
   &lt;/XXXReturn&gt;

where 12345 is the return value, and XXX is supposed to be the operation
name  (see the code "retName = oper.getName() + "Return";").  Although in
your case, it's getting confused about what the operation name is.  However,
you can override the name of that tag by writing the return information into
the WSDD file.  Something like this:

        &lt;operation name="reverse" qname="operNS:reverse" 
                 xmlns:operNS=<a class="moz-txt-link-rfc2396E" href="http://ws.moon.net/j2me05">"http://ws.moon.net/j2me05"</a>

                 returnQName="retNS:reverseResult" 
                 xmlns:retNS=<a class="moz-txt-link-rfc2396E" href="http://ws.moon.net/j2me05">"http://ws.moon.net/j2me05"</a>

                 returnType="rtns:string" 
                 xmlns:rtns=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>
&gt;
        &lt;parameter qname="pns:in0" xmlns:pns=<a class="moz-txt-link-rfc2396E" href="http://ws.moon.net/j2me05">"http://ws.moon.net/j2me05"</a>

                   type="tns:string"
xmlns:tns=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>/&gt;
      &lt;/operation&gt;

According to my reading of Emitter.getResponseMessage() that should let you
control the name of the tag immediately below &lt;soap:Body&gt;.   Does that work?

Bill


Ephemeris Lappis wrote: 
Hello.
    </pre>
  </blockquote>
  <pre wrap=""><!---->I don't think the problem comes from the request format.
First,
  </pre>
  <blockquote type="cite">
    <pre wrap="">similar
    </pre>
  </blockquote>
  <pre wrap=""><!---->examples, all in document/literal style works fine with
the same
  </pre>
  <blockquote type="cite">
    <pre wrap="">client
    </pre>
  </blockquote>
  <pre wrap=""><!---->(Wireless Toolkit) running against the SUN's JWSDK server.
Then, i
  </pre>
  <blockquote type="cite">
    <pre wrap="">suppose
    </pre>
  </blockquote>
  <pre wrap=""><!---->that if the requests were not correct, the axis server should
  </pre>
  <blockquote type="cite">
    <pre wrap="">respond with a
    </pre>
  </blockquote>
  <pre wrap=""><!---->fault, and not serve them with an invalid response. Although
  </pre>
  <blockquote type="cite">
    <pre wrap="">i'm not an
    </pre>
  </blockquote>
  <pre wrap=""><!---->expert, i think the form you give is like a 'wrapped' style
  </pre>
  <blockquote type="cite">
    <pre wrap="">request while
    </pre>
  </blockquote>
  <pre wrap=""><!---->i'm trying to use the 'document' style...
I've tried the two
  </pre>
  <blockquote type="cite">
    <pre wrap="">forms (original and the one you suggested) with a simple
    </pre>
  </blockquote>
  <pre wrap=""><!---->HttpURLConnection,
  </pre>
  <blockquote type="cite">
    <pre wrap="">and wile the first one always produce the successful
    </pre>
  </blockquote>
  <pre wrap=""><!---->invalid response, the
  </pre>
  <blockquote type="cite">
    <pre wrap="">modified one ends with an axis server fault response.
    </pre>
  </blockquote>
  <pre wrap=""><!---->See bellow the test
  </pre>
  <blockquote type="cite">
    <pre wrap="">code...
    </pre>
  </blockquote>
  <pre wrap=""><!---->I'd really like an answer to my bug report from the axis
  </pre>
  <blockquote type="cite">
    <pre wrap="">team...
    </pre>
  </blockquote>
  <pre wrap=""><!---->Thanks anyway...

package my.tests;

import
  </pre>
  <blockquote type="cite">
    <pre wrap="">java.io.BufferedReader;
    </pre>
  </blockquote>
  <pre wrap=""><!---->import java.io.InputStreamReader;
import
  </pre>
  <blockquote type="cite">
    <pre wrap="">java.io.PrintStream;
    </pre>
  </blockquote>
  <pre wrap=""><!---->import java.net.HttpURLConnection;
import
  </pre>
  <blockquote type="cite">
    <pre wrap="">java.net.URL;
    </pre>
  </blockquote>
  <pre wrap=""><!---->
public class Test1 {

 public static void main(final String[]
  </pre>
  <blockquote type="cite">
    <pre wrap="">args) throws Exception {
    </pre>
  </blockquote>
  <pre wrap=""><!---->
 StringBuffer sb = new StringBuffer();
  </pre>
  <blockquote type="cite">
    <pre wrap="">sb.append("&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;").append("\r\n");
sb.append("&lt;soap:Envelope
    </pre>
  </blockquote>
  <pre wrap=""><!---->xmlns:xsi=\<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema-instance\">"http://www.w3.org/2001/XMLSchema-instance\"</a>").append("\r\n");

sb.append("xmlns:xsd=\<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema\">"http://www.w3.org/2001/XMLSchema\"</a>").append("\r\n");

sb.append("xmlns:soap=\<a class="moz-txt-link-rfc2396E" href="http://schemas.xmlsoap.org/soap/envelope/\">"http://schemas.xmlsoap.org/soap/envelope/\"</a>").append
("\r\n");
  </pre>
  <blockquote type="cite">
    <pre wrap="">sb.append("xmlns:tns=\<a class="moz-txt-link-rfc2396E" href="http://ws.moon.net/j2me05\">"http://ws.moon.net/j2me05\"</a>&gt;").append("\r\n");
sb.append("&lt;soap:Body&gt;").append("\r\n");
sb.append("&lt;tns:in0&gt;ABC&lt;/tns:in0&gt;").append("\r\n");
sb.append("&lt;/soap:Body&gt;").append("\r\n");
    </pre>
  </blockquote>
  <pre wrap=""><!----> sb.append("&lt;/soap:Envelope&gt;");
  </pre>
  <blockquote type="cite">
    <pre wrap="">call(sb);
    </pre>
  </blockquote>
  <pre wrap=""><!---->
 sb = new StringBuffer();
 sb.append("&lt;?xml version=\"1.0\"
  </pre>
  <blockquote type="cite">
    <pre wrap="">encoding=\"utf-8\"?&gt;").append("\r\n");
sb.append("&lt;soap:Envelope
    </pre>
  </blockquote>
  <pre wrap=""><!---->xmlns:xsi=\<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema-instance\">"http://www.w3.org/2001/XMLSchema-instance\"</a>").append("\r\n");

sb.append("xmlns:xsd=\<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema\">"http://www.w3.org/2001/XMLSchema\"</a>").append("\r\n");

sb.append("xmlns:soap=\<a class="moz-txt-link-rfc2396E" href="http://schemas.xmlsoap.org/soap/envelope/\">"http://schemas.xmlsoap.org/soap/envelope/\"</a>").append
("\r\n");
  </pre>
  <blockquote type="cite">
    <pre wrap="">sb.append("xmlns:tns=\<a class="moz-txt-link-rfc2396E" href="http://ws.moon.net/j2me05\">"http://ws.moon.net/j2me05\"</a>&gt;").append("\r\n");
sb.append("&lt;soap:Body&gt;").append("\r\n");
sb.append("&lt;tns:reverse&gt;").append("\r\n");
sb.append("&lt;tns:in0&gt;ABC&lt;/tns:in0&gt;").append("\r\n");
sb.append("&lt;/tns:reverse&gt;").append("\r\n");
sb.append("&lt;/soap:Body&gt;").append("\r\n");
    </pre>
  </blockquote>
  <pre wrap=""><!----> sb.append("&lt;/soap:Envelope&gt;");
  </pre>
  <blockquote type="cite">
    <pre wrap="">call(sb);
    </pre>
  </blockquote>
  <pre wrap=""><!---->
 }

 static void call(final StringBuffer sb) throws Exception {

  </pre>
  <blockquote type="cite">
    <pre wrap="">URL url =
new
    </pre>
  </blockquote>
  <pre wrap=""><!---->URL(<a class="moz-txt-link-rfc2396E" href="http://localhost:9999/j2me05ws-ejb/J2ME-05-WS/J2ME05WS">"http://localhost:9999/j2me05ws-ejb/J2ME-05-WS/J2ME05WS"</a>);
  </pre>
  <blockquote type="cite">
    <pre wrap="">HttpURLConnection http = (HttpURLConnection) url.openConnection();
http.setRequestMethod("POST");
    </pre>
  </blockquote>
  <pre wrap=""><!----> http.setDoOutput(true);
  </pre>
  <blockquote type="cite">
    <pre wrap="">http.setRequestProperty("Content-Type", "text/xml");
http.setRequestProperty("Content-Length", String.valueOf(sb.length()));
http.setRequestProperty("SOAPAction", "");
    </pre>
  </blockquote>
  <pre wrap=""><!----> PrintStream ps = new
  </pre>
  <blockquote type="cite">
    <pre wrap="">PrintStream(http.getOutputStream());
    </pre>
  </blockquote>
  <pre wrap=""><!----> ps.print(sb);
 ps.flush();

  </pre>
  <blockquote type="cite">
    <pre wrap="">BufferedReader reader = new
BufferedReader(new
    </pre>
  </blockquote>
  <pre wrap=""><!---->InputStreamReader(http.getInputStream()));
 for (;;) {
  </pre>
  <blockquote type="cite">
    <pre wrap="">String line = reader.readLine();
    </pre>
  </blockquote>
  <pre wrap=""><!----> if (line == null)
 break;
  </pre>
  <blockquote type="cite">
    <pre wrap="">System.out.println(line);
    </pre>
  </blockquote>
  <pre wrap=""><!----> }

 http.disconnect();

 }

}




 
  </pre>
  <blockquote type="cite">
    <pre wrap="">-----Message d'origine-----
    </pre>
  </blockquote>
  <pre wrap=""><!---->De : Bill Keese
  </pre>
  <blockquote type="cite">
    <pre wrap="">[<a class="moz-txt-link-freetext" href="mailto:billk@tech.beacon-it.co.jp">mailto:billk@tech.beacon-it.co.jp</a>]
    </pre>
  </blockquote>
  <pre wrap=""><!---->Envoy&eacute; : vendredi 7 janvier 2005 02:39
&Agrave;
  </pre>
  <blockquote type="cite">
    <pre wrap="">: <a class="moz-txt-link-abbreviated" href="mailto:axis-user@ws.apache.org">axis-user@ws.apache.org</a>
    </pre>
  </blockquote>
  <pre wrap=""><!---->Objet : Re: Document/Literal : bad part name in
  </pre>
  <blockquote type="cite">
    <pre wrap="">axis server response
    </pre>
  </blockquote>
  <pre wrap=""><!---->

OK. I looked over your mail again and I saw a
  </pre>
  <blockquote type="cite">
    <pre wrap="">problem. You are using
    </pre>
  </blockquote>
  <pre wrap=""><!---->document/literal, right? For the request, you should
  </pre>
  <blockquote type="cite">
    <pre wrap="">have the name of
    </pre>
  </blockquote>
  <pre wrap=""><!---->the method within your soap body. And for the response,
I'm
  </pre>
  <blockquote type="cite">
    <pre wrap="">not sure
    </pre>
  </blockquote>
  <pre wrap=""><!---->what is correct but I listed my hypothesis below. (I'm still
  </pre>
  <blockquote type="cite">
    <pre wrap="">figuring
    </pre>
  </blockquote>
  <pre wrap=""><!---->it out myself)

Here's the current request:

 
  </pre>
  <blockquote type="cite">
    <pre wrap=""> &lt;soap:Body&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!----> &lt;tns:in0&gt;ABC&lt;/tns:in0&gt;
 &lt;/soap:Body&gt;
 &lt;/soap:Envelope&gt;

 You
  </pre>
  <blockquote type="cite">
    <pre wrap="">are calling the method "reverse" with the parameter "in0",
    </pre>
  </blockquote>
  <pre wrap=""><!---->right? I
think
  </pre>
  <blockquote type="cite">
    <pre wrap="">the SOAP body should be:
    </pre>
  </blockquote>
  <pre wrap=""><!---->
&lt;soap:Body&gt;
 &lt;reverse&gt;
 &lt;in0&gt;ABC&lt;/in0&gt;
  </pre>
  <blockquote type="cite">
    <pre wrap="">&lt;/reverse&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!---->&lt;/soap:Body&gt;

(I'm not sure about the namespaces though)

Here's
  </pre>
  <blockquote type="cite">
    <pre wrap="">the current response
    </pre>
  </blockquote>
  <pre wrap=""><!---->
 
  </pre>
  <blockquote type="cite">
    <pre wrap=""> &lt;soapenv:Body&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!----> &lt;in0Return
  </pre>
  <blockquote type="cite">
    <pre wrap="">xmlns=<a class="moz-txt-link-rfc2396E" href="http://ws.moon.net/j2me05">"http://ws.moon.net/j2me05"</a>&gt;CBA&lt;/in0Return&gt;
&lt;/soapenv:Body&gt;&lt;/soapenv:Envelope&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!---->
 It thinks that in0 is the name of your
  </pre>
  <blockquote type="cite">
    <pre wrap="">method, rather than the name of
    </pre>
  </blockquote>
  <pre wrap=""><!---->the parameter to the method.

To setup the
  </pre>
  <blockquote type="cite">
    <pre wrap="">request, you need a schema type with the same name as your
    </pre>
  </blockquote>
  <pre wrap=""><!---->method:

&lt;schema
  </pre>
  <blockquote type="cite">
    <pre wrap="">xmlns=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>
    </pre>
  </blockquote>
  <pre wrap=""><!---->targetNamespace=<a class="moz-txt-link-rfc2396E" href="http://ws.moon.net/j2me05">"http://ws.moon.net/j2me05"</a>
elementFormDefault="qualified"&gt;
  </pre>
  <blockquote type="cite">
    <pre wrap="">&lt;complexType name="reverse"&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!----> &lt;element name="in0" type="xsd:string"/&gt;
  </pre>
  <blockquote type="cite">
    <pre wrap="">&lt;/complexType&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!---->&lt;/schema&gt;

Then you setup a message that just points to the
  </pre>
  <blockquote type="cite">
    <pre wrap="">schema type
    </pre>
  </blockquote>
  <pre wrap=""><!---->(it's useless but you have to put it in because that's the
  </pre>
  <blockquote type="cite">
    <pre wrap="">way
    </pre>
  </blockquote>
  <pre wrap=""><!---->WSDL works):

&lt;wsdl:message name="reverseRequest"&gt;
 &lt;wsdl:part
  </pre>
  <blockquote type="cite">
    <pre wrap="">name="parameters" element="impl:reverse"/&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!---->&lt;/wsdl:message&gt;


I'm not sure
  </pre>
  <blockquote type="cite">
    <pre wrap="">how to setup the WSDL with regard to responses.
    </pre>
  </blockquote>
  <pre wrap=""><!---->If you look at
  </pre>
  <blockquote type="cite">
    <pre wrap=""><a class="moz-txt-link-freetext" href="http://www.n2soft.net/Services/HNDCAP.asmx?wsdl">http://www.n2soft.net/Services/HNDCAP.asmx?wsdl</a>
    </pre>
  </blockquote>
  <pre wrap=""><!---->(or other links from
  </pre>
  <blockquote type="cite">
    <pre wrap=""><a class="moz-txt-link-abbreviated" href="http://www.mindreef.com">www.mindreef.com</a>),
you will see this:
    </pre>
  </blockquote>
  <pre wrap=""><!---->
&lt;s:element name="PostScoreResponse"&gt;
  </pre>
  <blockquote type="cite">
    <pre wrap="">&lt;s:complexType&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!----> &lt;s:sequence&gt;
 &lt;s:element minOccurs="1"
  </pre>
  <blockquote type="cite">
    <pre wrap="">maxOccurs="1"
    </pre>
  </blockquote>
  <pre wrap=""><!---->name="PostScoreResult" type="s:boolean"/&gt;
 &lt;/s:sequence&gt;
  </pre>
  <blockquote type="cite">
    <pre wrap="">&lt;/s:complexType&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!---->&lt;/s:element&gt;

&lt;wsdl:message name="PostScoreSoapOut"&gt;
  </pre>
  <blockquote type="cite">
    <pre wrap="">&lt;wsdl:part name="parameters"
element="tns:PostScoreResponse"/&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!---->&lt;/wsdl:message&gt;

(Again, the message just
  </pre>
  <blockquote type="cite">
    <pre wrap="">points to the schema definition, where
    </pre>
  </blockquote>
  <pre wrap=""><!---->the element name is methodName +
  </pre>
  <blockquote type="cite">
    <pre wrap="">"Response".
    </pre>
  </blockquote>
  <pre wrap=""><!---->I guess that this would produce a response like

&lt;soap:Body&gt;
  </pre>
  <blockquote type="cite">
    <pre wrap="">&lt;PostScoreResponse&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!----> &lt;PostScoreResult&gt;42&lt;/PostScoreResult&gt;
  </pre>
  <blockquote type="cite">
    <pre wrap="">&lt;/PostScoreResponse&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!---->&lt;/soap:Body&gt;

It seems like a lot of overhead for one
  </pre>
  <blockquote type="cite">
    <pre wrap="">number but I've got a
    </pre>
  </blockquote>
  <pre wrap=""><!---->feeling that the clients won't work unless you
  </pre>
  <blockquote type="cite">
    <pre wrap="">structure it
    </pre>
  </blockquote>
  <pre wrap=""><!---->like that. I'm still experimenting though.


Bill

Ephemeris
  </pre>
  <blockquote type="cite">
    <pre wrap="">Lappis wrote:
    </pre>
  </blockquote>
  <pre wrap=""><!---->
 
  </pre>
  <blockquote type="cite">
    <pre wrap="">Before i open a bug, i'd like to have the opinion of experts !
    </pre>
  </blockquote>
  <pre wrap=""><!---->All my last
  </pre>
  <blockquote type="cite">
    <pre wrap="">tests around document/literal style let me with
    </pre>
  </blockquote>
  <pre wrap=""><!----> troubles. To
 
  </pre>
  <blockquote type="cite">
    <pre wrap="">start again with simple things, i have made a basic service to
    </pre>
  </blockquote>
  <pre wrap=""><!----> evaluate
  </pre>
  <blockquote type="cite">
    <pre wrap="">the
    </pre>
  </blockquote>
  <pre wrap=""><!----> 
  </pre>
  <blockquote type="cite">
    <pre wrap="">primary interoperability with my J2ME client. This simple
    </pre>
  </blockquote>
  <pre wrap=""><!----> service provides
  </pre>
  <blockquote type="cite">
    <pre wrap="">a
    </pre>
  </blockquote>
  <pre wrap=""><!----> 
  </pre>
  <blockquote type="cite">
    <pre wrap="">single operation that takes a string, reverses it and return it.
    </pre>
  </blockquote>
  <pre wrap=""><!---->On the
  </pre>
  <blockquote type="cite">
    <pre wrap="">client side, i work with the SUN Wireless toolkit that
    </pre>
  </blockquote>
  <pre wrap=""><!----> support the
 
  </pre>
  <blockquote type="cite">
    <pre wrap="">JSR172 (web-service for J2ME). Using the axis wsdl i have
successfully
    </pre>
  </blockquote>
  <pre wrap=""><!---->generated the j2me client stubs, and built my midlet to
call
  </pre>
  <blockquote type="cite">
    <pre wrap="">the web
    </pre>
  </blockquote>
  <pre wrap=""><!---->service. At run time, the client reports an error in the
 server
  </pre>
  <blockquote type="cite">
    <pre wrap="">response :
    </pre>
  </blockquote>
  <pre wrap=""><!----> 
  </pre>
  <blockquote type="cite">
    <pre wrap="">the name of the response part for the return value is not as
    </pre>
  </blockquote>
  <pre wrap=""><!----> defined in
  </pre>
  <blockquote type="cite">
    <pre wrap="">the
    </pre>
  </blockquote>
  <pre wrap=""><!----> 
  </pre>
  <blockquote type="cite">
    <pre wrap="">wsdl descriptor. To be sure, i had made the test again putting the
tcp
    </pre>
  </blockquote>
  <pre wrap=""><!---->monitor in the middle... and it seems the client is right
!
The name of
  </pre>
  <blockquote type="cite">
    <pre wrap="">the part in the wsdl is 'reverseReturn' and axis uses
    </pre>
  </blockquote>
  <pre wrap=""><!---->'in0Return'...
Is it a
  </pre>
  <blockquote type="cite">
    <pre wrap="">bug, or just another mis-interpretation of mine ?
    </pre>
  </blockquote>
  <pre wrap=""><!---->Thanks to give your
  </pre>
  <blockquote type="cite">
    <pre wrap="">opinion before i open an unnecessary bug report...
    </pre>
  </blockquote>
  <pre wrap=""><!---->

Here the java code
  </pre>
  <blockquote type="cite">
    <pre wrap="">:
    </pre>
  </blockquote>
  <pre wrap=""><!---->
--- java interface ---
package net.moon.me.five.ws;

import
  </pre>
  <blockquote type="cite">
    <pre wrap="">java.rmi.Remote;
    </pre>
  </blockquote>
  <pre wrap=""><!---->import java.rmi.RemoteException;

public interface
  </pre>
  <blockquote type="cite">
    <pre wrap="">StringTool extends Remote {
    </pre>
  </blockquote>
  <pre wrap=""><!---->
 public String reverse(String string) throws
  </pre>
  <blockquote type="cite">
    <pre wrap="">RemoteException;
    </pre>
  </blockquote>
  <pre wrap=""><!---->
}
----------------------

I have successfully generated
  </pre>
  <blockquote type="cite">
    <pre wrap="">the wsdl with the following ant script :
    </pre>
  </blockquote>
  <pre wrap=""><!---->
--- wsdl2java ant script
  </pre>
  <blockquote type="cite">
    <pre wrap="">---
    </pre>
  </blockquote>
  <pre wrap=""><!---->&lt;property name="my.namespace" value=<a class="moz-txt-link-rfc2396E"
href="http://ws.moon.net/j2me05">"http://ws.moon.net/j2me05"</a>
  </pre>
  <blockquote type="cite">
    <pre wrap="">/&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!---->&lt;java2wsdl output="./wsdl/j2me05ws.wsdl"
  </pre>
  <blockquote type="cite">
    <pre wrap="">className="net.moon.me.five.ws.StringTool"
    </pre>
  </blockquote>
  <pre wrap=""><!----> namespace="${my.namespace}"
  </pre>
  <blockquote type="cite">
    <pre wrap="">porttypename="StringUtility"
    </pre>
  </blockquote>
  <pre wrap=""><!----> serviceportname="StringUtilityPort"
  </pre>
  <blockquote type="cite">
    <pre wrap="">serviceelementname="J2ME05"
    </pre>
  </blockquote>
  <pre wrap=""><!----> style="DOCUMENT"
  </pre>
  <blockquote type="cite">
    <pre wrap="">location=<a class="moz-txt-link-rfc2396E" href="http://ws.moon.net/j2me05">"http://ws.moon.net/j2me05"</a>&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!----> &lt;classpath&gt;
 &lt;pathelement
  </pre>
  <blockquote type="cite">
    <pre wrap="">location="${my.services.compile-directory}" /&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!----> &lt;path
  </pre>
  <blockquote type="cite">
    <pre wrap="">refid="my.axis.classpath" /&gt;
&lt;/classpath&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!---->&lt;/java2wsdl&gt;
----------------------------

The resulting WSDL,
  </pre>
  <blockquote type="cite">
    <pre wrap="">with the expected part names !
    </pre>
  </blockquote>
  <pre wrap=""><!---->
--- WSDL ---
&lt;?xml version="1.0"
  </pre>
  <blockquote type="cite">
    <pre wrap="">encoding="UTF-8"?&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!---->&lt;wsdl:definitions
  </pre>
  <blockquote type="cite">
    <pre wrap="">targetNamespace=<a class="moz-txt-link-rfc2396E" href="http://ws.moon.net/j2me05">"http://ws.moon.net/j2me05"</a>
    </pre>
  </blockquote>
  <pre wrap=""><!---->xmlns:impl=<a class="moz-txt-link-rfc2396E" href="http://ws.moon.net/j2me05">"http://ws.moon.net/j2me05"</a>
xmlns:intf=<a class="moz-txt-link-rfc2396E" href="http://ws.moon.net/j2me05">"http://ws.moon.net/j2me05"</a>
xmlns:apachesoap=<a class="moz-txt-link-rfc2396E" href="http://xml.apache.org/xml-soap">"http://xml.apache.org/xml-soap"</a>
xmlns:wsdlsoap=<a class="moz-txt-link-rfc2396E" href="http://schemas.xmlsoap.org/wsdl/soap/">"http://schemas.xmlsoap.org/wsdl/soap/"</a>
xmlns:xsd=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>
xmlns:wsdl=<a class="moz-txt-link-rfc2396E" href="http://schemas.xmlsoap.org/wsdl/">"http://schemas.xmlsoap.org/wsdl/"</a>&gt;
&lt;!--WSDL
  </pre>
  <blockquote type="cite">
    <pre wrap="">created by Apache Axis version: 1.2RC2
    </pre>
  </blockquote>
  <pre wrap=""><!---->Built on Nov 16, 2004 (12:19:44
  </pre>
  <blockquote type="cite">
    <pre wrap="">EST)--&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!---->&lt;wsdl:types&gt;
 &lt;schema
  </pre>
  <blockquote type="cite">
    <pre wrap="">xmlns=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>
    </pre>
  </blockquote>
  <pre wrap=""><!---->targetNamespace=<a class="moz-txt-link-rfc2396E" href="http://ws.moon.net/j2me05">"http://ws.moon.net/j2me05"</a>
  </pre>
  <blockquote type="cite">
    <pre wrap="">elementFormDefault="qualified"&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!----> 
  </pre>
  <blockquote type="cite">
    <pre wrap=""> &lt;element name="in0" type="xsd:string"/&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!----> &lt;element name="reverseReturn"
  </pre>
  <blockquote type="cite">
    <pre wrap="">type="xsd:string"/&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!----> &lt;/schema&gt;
&lt;/wsdl:types&gt;

 &lt;wsdl:message
  </pre>
  <blockquote type="cite">
    <pre wrap="">name="reverseRequest"&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!---->
 &lt;wsdl:part name="in0" element="impl:in0"/&gt;

  </pre>
  <blockquote type="cite">
    <pre wrap="">&lt;/wsdl:message&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!---->
 &lt;wsdl:message name="reverseResponse"&gt;

 &lt;wsdl:part
  </pre>
  <blockquote type="cite">
    <pre wrap="">name="reverseReturn" element="impl:reverseReturn"/&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!---->
 &lt;/wsdl:message&gt;

  </pre>
  <blockquote type="cite">
    <pre wrap="">&lt;wsdl:portType name="StringUtility"&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!---->
 &lt;wsdl:operation name="reverse"
  </pre>
  <blockquote type="cite">
    <pre wrap="">parameterOrder="in0"&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!---->
 &lt;wsdl:input name="reverseRequest"
  </pre>
  <blockquote type="cite">
    <pre wrap="">message="impl:reverseRequest"/&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!----> 
  </pre>
  <blockquote type="cite">
    <pre wrap=""> &lt;wsdl:output name="reverseResponse"
    </pre>
  </blockquote>
  <pre wrap=""><!---->message="impl:reverseResponse"/&gt;

  </pre>
  <blockquote type="cite">
    <pre wrap="">&lt;/wsdl:operation&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!---->
 &lt;/wsdl:portType&gt;

 &lt;wsdl:binding
  </pre>
  <blockquote type="cite">
    <pre wrap="">name="StringUtilityPortSoapBinding"
    </pre>
  </blockquote>
  <pre wrap=""><!---->type="impl:StringUtility"&gt;

  </pre>
  <blockquote type="cite">
    <pre wrap="">&lt;wsdlsoap:binding
style="document"
    </pre>
  </blockquote>
  <pre wrap=""><!---->transport=<a class="moz-txt-link-rfc2396E" href="http://schemas.xmlsoap.org/soap/http">"http://schemas.xmlsoap.org/soap/http"</a>/&gt;

  </pre>
  <blockquote type="cite">
    <pre wrap="">&lt;wsdl:operation name="reverse"&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!---->
 &lt;wsdlsoap:operation soapAction=""/&gt;

  </pre>
  <blockquote type="cite">
    <pre wrap="">&lt;wsdl:input name="reverseRequest"&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!---->
 &lt;wsdlsoap:body use="literal"/&gt;

  </pre>
  <blockquote type="cite">
    <pre wrap="">&lt;/wsdl:input&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!---->
 &lt;wsdl:output name="reverseResponse"&gt;

 &lt;wsdlsoap:body
  </pre>
  <blockquote type="cite">
    <pre wrap="">use="literal"/&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!---->
 &lt;/wsdl:output&gt;

 &lt;/wsdl:operation&gt;

 &lt;/wsdl:binding&gt;

  </pre>
  <blockquote type="cite">
    <pre wrap="">&lt;wsdl:service name="J2ME05"&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!---->
 &lt;wsdl:port
  </pre>
  <blockquote type="cite">
    <pre wrap="">name="StringUtilityPort"
    </pre>
  </blockquote>
  <pre wrap=""><!---->binding="impl:StringUtilityPortSoapBinding"&gt;

  </pre>
  <blockquote type="cite">
    <pre wrap="">&lt;wsdlsoap:address location=<a class="moz-txt-link-rfc2396E"
href="http://ws.moon.net/j2me05">"http://ws.moon.net/j2me05"</a>/&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!---->
 &lt;/wsdl:port&gt;

  </pre>
  <blockquote type="cite">
    <pre wrap="">&lt;/wsdl:service&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!---->
&lt;/wsdl:definitions&gt;
-------------------------------------

And
  </pre>
  <blockquote type="cite">
    <pre wrap="">now, the dumped http request and response :
    </pre>
  </blockquote>
  <pre wrap=""><!---->
--- request ---
POST
  </pre>
  <blockquote type="cite">
    <pre wrap="">/j2me05ws-ejb/J2ME-05-WS/J2ME05WS HTTP/1.1
    </pre>
  </blockquote>
  <pre wrap=""><!---->User-Agent: Profile/MIDP-1.0
  </pre>
  <blockquote type="cite">
    <pre wrap="">Configuration/CLDC-1.0
    </pre>
  </blockquote>
  <pre wrap=""><!---->Content-Language: en-US
Content-Type:
  </pre>
  <blockquote type="cite">
    <pre wrap="">text/xml
    </pre>
  </blockquote>
  <pre wrap=""><!---->SOAPAction: "
Content-Length: 315
Host: localhost

&lt;?xml
  </pre>
  <blockquote type="cite">
    <pre wrap="">version="1.0" encoding="utf-8"?&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!----> &lt;soap:Envelope
  </pre>
  <blockquote type="cite">
    <pre wrap="">xmlns:xsi=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema-instance">"http://www.w3.org/2001/XMLSchema-instance"</a>
    </pre>
  </blockquote>
  <pre wrap=""><!---->xmlns:xsd=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>
xmlns:soap=<a class="moz-txt-link-rfc2396E" href="http://schemas.xmlsoap.org/soap/envelope/">"http://schemas.xmlsoap.org/soap/envelope/"</a>
xmlns:tns=<a class="moz-txt-link-rfc2396E" href="http://ws.moon.net/j2me05">"http://ws.moon.net/j2me05"</a>&gt;
  </pre>
  <blockquote type="cite">
    <pre wrap="">&lt;soap:Body&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!----> &lt;tns:in0&gt;ABC&lt;/tns:in0&gt;
 &lt;/soap:Body&gt;
  </pre>
  <blockquote type="cite">
    <pre wrap="">&lt;/soap:Envelope&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!---->---------------

--- response ---
HTTP/1.1 200
  </pre>
  <blockquote type="cite">
    <pre wrap="">OK
    </pre>
  </blockquote>
  <pre wrap=""><!---->Set-Cookie: JSESSIONID=75C329A6CED0EE74D896E083043AFA0A;
  </pre>
  <blockquote type="cite">
    <pre wrap="">Path=/j2me05ws-ejb
    </pre>
  </blockquote>
  <pre wrap=""><!----> 
  </pre>
  <blockquote type="cite">
    <pre wrap="">Content-Type: text/xml;charset=utf-8
    </pre>
  </blockquote>
  <pre wrap=""><!---->Transfer-Encoding: chunked
Date: Tue,
  </pre>
  <blockquote type="cite">
    <pre wrap="">21 Dec 2004 14:15:18 GMT
    </pre>
  </blockquote>
  <pre wrap=""><!---->Server: Apache-Coyote/1.1

123
&lt;soapenv:Envelope
  </pre>
  <blockquote type="cite">
    <pre wrap="">xmlns:soapenv=<a class="moz-txt-link-rfc2396E" href="http://schemas.xmlsoap.org/soap/envelope/">"http://schemas.xmlsoap.org/soap/envelope/"</a>
    </pre>
  </blockquote>
  <pre wrap=""><!----> 
  </pre>
  <blockquote type="cite">
    <pre wrap="">xmlns:xsd=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>
    </pre>
  </blockquote>
  <pre wrap=""><!---->xmlns:xsi=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema-instance">"http://www.w3.org/2001/XMLSchema-instance"</a>&gt;
  </pre>
  <blockquote type="cite">
    <pre wrap="">&lt;soapenv:Body&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!----> &lt;in0Return
  </pre>
  <blockquote type="cite">
    <pre wrap="">xmlns=<a class="moz-txt-link-rfc2396E" href="http://ws.moon.net/j2me05">"http://ws.moon.net/j2me05"</a>&gt;CBA&lt;/in0Return&gt;
&lt;/soapenv:Body&gt;&lt;/soapenv:Envelope&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!---->0
----------------


  </pre>
</blockquote>
</body>
</html>

Mime
View raw message