I'm using the generic web-service client style to invoke a doc/lit web service.  My code contains a section like this:
 
           Call     call = (Call) service.createCall();
           call.setTargetEndpointAddress( new java.net.URL(endpoint) );
 
           call.setOperationStyle("document");
           call.setOperationUse("literal");
           call.setEncodingStyle(null);
           call.setUsername("someuser");
           call.setPassword("some-password");
//            call.setOperationName(operationName);
           Document d =
               XmlValidator.parse(new BufferedReader(new FileReader(args[0])),
                                  false);
 
           call.setReturnQName(new QName(null, "queryresult"));
           Element ret = (Element) call
               .invoke(operationName,
                       new Object[] {
                           d.getDocumentElement()
                       });
 
 
The document that is handed to invoke as a parameter has some root element <somens:root>.
 
The soap envelope that is constructed for the request contains
  <soap:Body>
      <somens:arg0>
           <somens:root>...
 
That is, an extra wrapper element is placed around the parameter, even though its name is the name of the operation and agrees with the message element name.  This happens whether I build the Service object using the wsdl location or not and whether I set the operation name (see the commented line above) or not.  This problem occurs in Axis 1.2beta.
 
Is there some way to prevent this wrapping, which seems incorrect according to all the settings of the Call object?
 
Jeff

Reply via email to