0

我是 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));
        }
4

0 回答 0