You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Kamal Chandana Mettananda <lk...@gmail.com> on 2009/06/04 08:14:24 UTC

Re: Axis 1.4 - cannot get SOAP request to work

Hi,

An addition to what Greg said.

Even if you are not using Eclipse, you can use TcpMon to monitor your SOAP
messages.

You just have to change the service url to point to Tcpmon and tcpmon will
redirect it to your service.

http://ws.apache.org/axis/java/user-guide.html#AppendixUsingTheAxisTCPMonitorTcpmon

HTH,
Kamal

---------------------------------------
Kamal Mettananda
http://lkamal.blogspot.com




On Sun, May 31, 2009 at 1:26 AM, Greg Stasica <gs...@googlemail.com>wrote:

> hi,
>
> you can monitor SOAP messages going in and out with TCP monitor in your
> eclipse (if this is your dev. env). TCP monitor lets you redirect traffic
> from one port to another so you can specify endpoint_address of your service
> to port 8080 and have the actual call being redirect to port e.g. 8090 where
> your actual server is listening. If you're not using eclipse just google for
> some soap monitoring tools.
>
>
>
> On Thu, May 28, 2009 at 12:00 AM, Pasi Kovanen <pa...@iki.fi>wrote:
>
>>
>> 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?
>>
>>
>>
>>
>>
>>
>
>
> --
> Greg Stasica
>