Hi Anne,
 
Thanks for helping
 
I have got it working by adding the -W switch to the WSDL2Java
 
java
org.apache.axis.wsdl.WSDL2Java
-v
-W
file.wsdl
 
============================================================================
 
With no -W switch the generated operation has 4 parameters and returns an array object.
 
With the -W switch the generated operation has 1 bean parameter and a bean wrapper on the return array object.
 
See attached images
 
============================================================================
 
From WSDL2Java reference guide
 
-W, --noWrapped
 
This turns off the special treatment of what is called "wrapped" document/literal style operations.
 
By default, WSDL2Java will recognize the following conditions:
If an input message has is a single part.
 
The part is an element.
 
The element has the same name as the operation
 
The element's complex type has no attributes
When it sees this, WSDL2Java will 'unwrap' the top level element, and treat each of the components of the element as arguments to the operation.
 
This type of WSDL is the default for Microsoft .NET web services, which wrap up RPC style arguments in this top level schema element.
 
============================================================================

[Alick Buckley]  -----Original Message-----
From: Anne Thomas Manes [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 16 November 2005 1:31 AM
To: [email protected]
Subject: Re: Operation name is not passed in envelope

We need to see more of the WSDL --

What does the input <message> look like and what does the element referenced by the message <part> look like?

Anne

On 11/14/05, Alick Buckley <[EMAIL PROTECTED]> wrote:

Hi,

I have been using Apache Axis 1.3 WSDL2Java to generate the necessary java code to execute a web service operation.

I have received a WSDL from another party that can be processed by the WSDL2Java program.

I would like to supply the WSDL, but I would need to ok it with the other party, so the example has been changed slightly.

<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http "/>
<operation name="GetInvoice">
   <soap:operation soapAction="http://www.company.au/GetInvoice "/>
      <input>
         <soap:body use="literal"/>
      </input>
      <output>
         <soap:body use="literal"/>
      </output>
</operation>
</binding>

My java client program calls the generated stub method

   stub.getInvoice ( "ID", "2005-11-10", "2005-11-15" ) ;


The Axis SOAP message is different to the .NET Web Service Studio SOAP message ?.

I have looked throught the mail list archive and other people have reported a similar problem.

Is there a problem with Apache Axis 1.3 using document/literal ?

Do I need to change the WSDL ?

Do I need to set a property before calling the stub method ?

Do I need to add a handler that modifies the SOAP request ?

Thanks

==========================================================================

Sent by Axis 1.3

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ " xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance">

<soapenv:Body>

  <Identifier xmlns="">ID</Identifier>
  <Datefrom xmlns="">2005-11-10</Datefrom>
  <Dateto xmlns="">2005-11-15</Dateto>

</soapenv:Body>
</soapenv:Envelope>

==========================================================================

Sent by Microsoft .NET Web Service Studio

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/ " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd=" http://www.w3.org/2001/XMLSchema">

<soap:Body>
 
  <GetInvoice xmlns="http://www.company.au">
    <Identifier xmlns="">ID</Identifier>
    <Datefrom xmlns="">2005-11-10</Datefrom>
    <Dateto xmlns="">2005-11-15</Dateto>
  </GetInvoice>

</soap:Body>
</soap:Envelope>

==========================================================================

http://marc.theaimsgroup.com/?l=axis-user&m=107652052102886&w=2

http://marc.theaimsgroup.com/?l=axis-user&m=109932987003381&w=2

http://marc.theaimsgroup.com/?l=axis-user&m=109942808807265&w=2

http://marc.theaimsgroup.com/?l=axis-user&m=112178286224688&w=2

==========================================================================

regards

Alick Buckley

LANSA Research and Development
LANSA Pty Ltd

Phone: +61289070243

http://www.lansa.com
mailto:Alick.Buckley@ lansa.com.au





Attachment: Type1.gif
Description: GIF image

Attachment: Type2.gif
Description: GIF image

Reply via email to