Hi Axis,
 
I'm trying to write a call and need to add a message element part to my message but am unsure of how to achieve this. Can someone point me in the right direction.
 
I do not know how to get a handle on the SOAPEvenlope or even if I require to. I use WSDL2Java to generate everything. I have included the method signature and QUERY class. Any help or advice is great.
 
Thanks,
Barry
 
**************************************************************************************************************************************************************************
 
public static final String QUERY_STRING = <query><name>Barry</name></query>;
 
public SearchResult[] queryContent()throws Exception{
  LORAXSoap soap = new LORAXLocator().getLORAXSoap();
  QUERY query = new QUERY ( getBodyElement( QUERY_STRING ) );
  return soap.queryContent(query , USERNAME, PASSWORD);
 }   
 
 /**
  * @param inputStream
  * @return
  * @throws Exception
  */
 private MessageElement[] getBodyElement(String query)throws Exception{  
  SOAPBodyElement bodyElement = new SOAPBodyElement( query  );
  MessageElement messageElement[] = new MessageElement[1];
  messageElement[0] = bodyElement;
  return messageElement;
 } 
 
**************************************************************************************************************************************************************************
 
/**
     * Retrieves an array of SearchResult's given an (XML) Criteria
     * search term.
     */
    public au.edu.thelearningfederation.lex.webservices._2004._07.LORAX.SearchResult[] queryContent(au.edu.thelearningfederation.lex.webservices._2004._07.Definitions.QuerySyntax.QUERY QUERY, java.lang.String username, java.lang.String password) throws java.rmi.RemoteException;
 
**************************************************************************************************************************************************************************
 
public class QUERY  implements java.io.Serializable, org.apache.axis.encoding.AnyContentType, org.apache.axis.encoding.MixedContentType {
    private org.apache.axis.message.MessageElement [] _any;
 
    public QUERY() {
    }
 
    public QUERY(
           org.apache.axis.message.MessageElement [] _any) {
           this._any = _any;
    }
.....
}

Reply via email to