java - Generating WSDL using Websphere 6.1 not generating sequence arguments correctly -
i trying generate wsdl file endpoint class using websphere 6.1 java2wsdl ant task
the endpoint coded as
class mysvcendpoint implements mysvc_sei { public someothercomplextype[] mycall(string[] argstrings) throws javax.xml.soap.soapexception { . . } }
interface is:
public interface mysvc_sei extends java.rmi.remote { public someothercomplextype[] mycall(string[] argstrings) throws javax.xml.soap.soapexception; }
the wsdl generated contains following entries:
<element name="mycall"> <complextype> <sequence/> </complextype> </element> <element name="mycallresponse"> <complextype> <sequence/> </complextype> </element>
as can see, 'argstrings' argument has disappeared, though seems recognize something should there. also, return type seems have disappeared too.
anyway, when generate stubs based on wsdl, interface generated is:
public interface mysvc { public void mycall() throws java.rmi.remoteexception; }
has come across issue before, , if how solved?
thanks
[edit] ok, seems when there array input argument. i've tried following:
public int m1(string s1) throws soapexception { return 0; } public int[] m2(string s1) throws soapexception { int[] = { 0 }; return a; } public int m3(string[] sarr) throws soapexception { return 0; } public int[] m4(string[] sarr) throws soapexception { int[] = { 0 }; return a; }
and gotten following wsdl output:
<element name="m1"> <complextype> <sequence> <element name="s1" nillable="true" type="xsd:string"/> </sequence> </complextype> </element> <element name="m1response"> <complextype> <sequence> <element name="m1return" type="xsd:int"/> </sequence> </complextype> </element> <element name="m2"> <complextype> <sequence> <element name="s1" nillable="true" type="xsd:string"/> </sequence> </complextype> </element> <element name="m2response"> <complextype> <sequence> <element name="m2return" nillable="true" type="impl:arrayof_1368777266_int"/> </sequence> </complextype> </element> <element name="m3"> <complextype> <sequence/> </complextype> </element> <element name="m3response"> <complextype> <sequence/> </complextype> </element> <element name="m4"> <complextype> <sequence/> </complextype> </element> <element name="m4response"> <complextype> <sequence/> </complextype> </element>
as can see, methods simple arguments generated ok, methods array arguments screwed.
turns out due patch versions of websphere application server. on investigating, installed websphere 6.1.0.0. on upgrading patch level 23 or above, issue fixed.
make sure @ latest patch version, that's can say!
Comments
Post a Comment