1
我试图使用WebSphere 6.1的Java2WSDL Ant任务生成WSDL使用Websphere 6.1不产生序列参数正确
端点被编码为
class MySvcEndpoint implements MySvc_SEI {
public SomeOtherComplexType[] myCall(String[] argStrings)
throws javax.xml.soap.SOAPException
{
.
.
}
}
界面生成从端点类WSDL文件:
public interface MySvc_SEI extends java.rmi.Remote {
public SomeOtherComplexType[] myCall(String[] argStrings)
throws javax.xml.soap.SOAPException;
}
的WSDL产生包含下列项:
<element name="myCall">
<complexType>
<sequence/>
</complexType>
</element>
<element name="myCallResponse">
<complexType>
<sequence/>
</complexType>
</element>
正如你所看到的,'argStrings'的论点已经消失,虽然它似乎认识到应该在那里。而且,返回类型似乎也消失了。
无论如何,当我基于WSDL生成存根,产生的界面:
public interface MySvc {
public void myCall() throws java.rmi.RemoteException;
}
有没有人遇到过这个问题,如果是这样,这怎么解决?
由于
[编辑]行,它似乎是当存在数组作为输入参数。我已经试过如下:
public int m1(String s1) throws SOAPException {
return 0;
}
public int[] m2(String s1) throws SOAPException {
int[] a = { 0 };
return a;
}
public int m3(String[] sArr) throws SOAPException {
return 0;
}
public int[] m4(String[] sArr) throws SOAPException {
int[] a = { 0 };
return a;
}
,并得到下面的WSDL输出:
<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>
正如你所看到的,产生了用简单参数的方法确定,但与数组参数的方法进行旋。
我弄明白了。原来,我是从6.1.0.0生成WSDL的。我将修复程序23应用于基本安装,并且WSDL现在可以正确安装。 – GKelly
由于问题不再公开,我应该自己回答问题并接受该问题吗? – GKelly
请做那个。否则,这会留在未答复的类别中。 – user918176