我是Axis2 wsdl客户端的新手。 我能够使用axis2,eclipse和tomcat生成存根(ConfigurationServiceStub)和回调。 我该如何生成或者我应该为客户端编写什么代码。 Java制作肥皂请求。
请求如下:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:con="http://schema.unitedtote.com/ToteLink/2008/06/Configuration" xmlns:com="http://schema.unitedtote.com/ToteLink/2008/06/Common">
<soapenv:Header/>
<soapenv:Body>
<con:GetConfiguration>
<!--Optional:-->
<con:ConfigurationRequest>
<com:Source>
<com:SystemId>ABCD</com:SystemId>
<com:SourceId>EFG</com:SourceId>
</com:Source>
</con:ConfigurationRequest>
</con:GetConfiguration>
和java代码如下:
=== from Junit tester following code was generated:
/**
* Auto generated test method
*/
public void testStartgetConfiguration() throws java.lang.Exception{
com.unitedtote.configuration.ConfigurationServiceStub stub = new com.unitedtote.configuration.ConfigurationServiceStub();
com.unitedtote.configuration.ConfigurationServiceStub.GetConfiguration getConfiguration8=(com.unitedtote.configuration.ConfigurationServiceStub.GetConfiguration)getTestObject(com.unitedtote.configuration.ConfigurationServiceStub.GetConfiguration.class);
// TODO : Fill in the getConfiguration8 here
stub.startgetConfiguration(
getConfiguration8,
new tempCallbackN65548()
);
public void testgetConfiguration() throws java.lang.Exception{
com.unitedtote.configuration.ConfigurationServiceStub stub =
new com.unitedtote.configuration.ConfigurationServiceStub();//the default implementation should point to the right endpoint
com.unitedtote.configuration.ConfigurationServiceStub.GetConfiguration getConfiguration8=
(com.unitedtote.configuration.ConfigurationServiceStub.GetConfiguration)getTestObject(com.unitedtote.configuration.ConfigurationServiceStub.GetConfiguration.class);
// TODO : Fill in the getConfiguration8 here
assertNotNull(stub.getConfiguration(
getConfiguration8));
}