I'm really struggling to get my first AXIS SOAP client to work. I'm using Axis 
v1.4.

Our WSDL contains this:

....
<element name="GetParameters">
  <complexType>
    <sequence>
      <element name="param1" type="codeapi:SomeParam"/>
      <element name="param2" type="unsignedShort" minOccurs="0"/>
      <element name="param3" type="string" minOccurs="0"/>
      <element name="param4" type="unsignedShort" minOccurs="0"/>
      <element name="param5" type="unsignedShort" minOccurs="0"/>
      <element name="param6" type="string" minOccurs="0"/>
      <element name="param7" type="string" minOccurs="0"/>
      <element name="param8" type="string" minOccurs="0"/>
      <element name="param9" type="codeapi:AnotherParam" minOccurs="0"/>
    </sequence>
  </complexType>
</element>
....

I have ran wsdl2java to generate the code.

--

I'm initializing the port:

SimpleProvider conf = new SimpleProvider(new BasicClientConfig());
conf.setGlobalRequest(new LoggingHandler(LOG, Level.FINE,
    "Request sent:\n"));
conf.setGlobalResponse(new LoggingHandler(LOG, Level.FINE,
    "Response received:\n"));

MyService = new MyServiceLocator(conf);

URL myServiceURL = "http://<removed>";

MyServicePort myServicePort = myService.getMyServiceSOAPPort(myServiceUrl);

--

My first attempt the access the request:

SomeParam param1 = new SomeParam();
param1.setParamA("blah"); // this is the only needed parameter
   
Entry[] allEntries = myServicePort.getParameters(param1, null, null, null, 
null, null, null, null, null);

This results in NullPointerException (in the client side), even though all the 
null parameters are optional.
   
--

My second attempt:   
   
SomeParam param1 = new SomeParam();
param1.setParamA("blah");

Entry[] allEntries = myServicePort.listCodes(param1, new UnsignedShort(), new 
StringHolder(), new UnsignedShort(), new UnsignedShort(), new String(), new 
String(), new String(), new AnotherParam());


This results in no exception, but null value returned to allEntries, and I have 
no idea whether a SOAP request was actually sent (most probably not).

The code is running on top of Oracle AS. In either one of the cases not a 
single line of debug information is written to the log by Axis, even though all 
the different debug classes have been activated in Oracle, and LoggingHandlers 
have been initialized.

What am I doing wrong here?



      

Reply via email to