You're looking for the "unwrapping" option.

On 3/21/07, Tim Koop <[EMAIL PROTECTED]> wrote:
Thanks Anne and Deepal for your responses, and thanks to everyone else
for reading and considering this.

I would love to give more details.  Here goes:

With Axis 1.4, a plain old Java object like this:

public class Greeting {
  public String greeting() {
    return "Hello";
  }
}

would produce a WSDL that contains these lines:

<wsdl:message name="greetingResponse">
  <wsdl:part name="greetingReturn" type="xsd:string"/>
</wsdl:message>

And to display this with PHP would be done like this:

<? $client = new
SoapClient("http://localhost:8080/axis/Greeting.jws?wsdl";); ?>
<? echo $client->greeting() ?>

This all works very nicely, and thank you to the makers of Axis for a
fine piece of software. :)



Now in Axis2, the very same pojo (compiled and with a services.xml file)
would produce a WSDL file that contains these lines:

<xs:element name="greetingResponse">
  <xs:complexType>
     <xs:sequence>
       <xs:element name="return" nillable="true" type="xs:string"/>
     </xs:sequence>
  </xs:complexType>
</xs:element>

<wsdl:message name="greetingResponse">
  <wsdl:part name="part1" element="ns0:greetingResponse"/>
</wsdl:message>

And the PHP code now has to look like this:

<? $client = new
SoapClient("http://localhost:8080/axis2/services/Greeting?wsdl";); ?>
<? echo $client->greeting()->return ?>

Now admittedly, this php code isn't too much worse; there is just that
extra "->return" part there.  But there are 2 other problems also.
Firstly, I don't even know how to pass in arguments using PHP and Axis2
(note that this example doesn't require any).  Everything I've tried
just throws errors, but it works as expected using Axis1.4.  The other
thing is that when I list all the functions available in this web
service using PHP, the Axis1.4 WSDL tells me there is one function with
a return type of "string" (of course), but the Axis2 WSDL tells me there
are three identical functions that each return a type of "greetingResonse".

Any ideas at all are very welcome.  I'm new to Axis and Soap, but I've
already searched through all the documentation I can find.  Hopefully
someone here will have an answer or some thoughts that lead to an answer.

Thank you all very much.

I suspect this is the same problem that Florian is facing.

Tim Koop




Tim Koop wrote:
> Hi everyone.  I've got a little problem.  I'll try to explain it the
> best I can.  I got a POJO working with Axis, but it doesn't work quite
> right with Axis2.
>
> I'm serving out a Web Service with Tomcat and Axis2 and my client is
> PHP.  Everything worked find when I used Axis (1.4), but with Axis2,
> the return types aren't the same.  The WSDL file in Axis2 says the
> return types are all complex, but with Axis1 they are simple.  Simple
> types work with PHP, but PHP chokes on these complex types.
>
> I'm guessing the problem is that PHP (http://php.net/soap) supports
> SOAP 1.1, 1.2, and WSDL 1.1, which Axis1 did too, but now Axis2 is
> using WSDL 2.0 by default.  Does this sound right to anyone else?
>
> If so, how can I get Axis2 to use WSDL 1.1 ? I've looked through the
> documentation, but I can't find anything.  If anyone knows a specific
> place to look for the answer, I thank you.
>
> I'm thinking this is a setting in server.xml with a messageReceiver,
> but I don't know what to set and I can't find this documented anywhere.
>
> Thanks a lot everyone!
>
>
> --
> Tim Koop
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to