HI,

I am trying to access a .jws which is as follows :-

import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.message.SOAPBodyElement;
import org.apache.axis.utils.Options;
import org.apache.axis.utils.XMLUtils;
import org.w3c.dom.CDATASection;
import org.w3c.dom.Document;
import org.w3c.dom.Element;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import java.net.URL;
import java.util.Vector;

public class Hello {
  public SOAPBodyElement[] display(String Name,int EID) throws Exception
  {
              SOAPBodyElement[] input = new SOAPBodyElement[3];

        input[0] = new SOAPBodyElement(XMLUtils.StringToElement("Name",
                                                                "e1", Name));
        input[1] = new SOAPBodyElement(XMLUtils.StringToElement("urn:foo",
                                                                "e1", "World"));

        DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
        Document doc            = builder.newDocument();  
        Element cdataElem       = doc.createElementNS("urn:foo", "e3");
        CDATASection cdata      = doc.createCDATASection("Text with\n\tImportant  <b>  whitespace </b> and tags! ");            
        cdataElem.appendChild(cdata);
               
        input[2] = new SOAPBodyElement(cdataElem);

         return input;
  }

}

Using the command on the browser as follows :-

http://localhost:8080/axis/Hello.jws?method=display&Name=Mohit&EID=24

I get the following response

  <?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>
- <soapenv:Fault>
  <faultcode>soapenv:Server.userException</faultcode>
  <faultstring>java.io.IOException: No serializer found for class org.apache.axis.message.SOAPBodyElement in registry [EMAIL PROTECTED]</faultstring>
  <detail />
  </soapenv:Fault>
  </soapenv:Body>
  </soapenv:Envelope>

How do I serialize when I do not have  a  .jws registered using a .wsdd.

thanks in advance,
Parag

***********************  HSS-Unclassified   ***********************

Reply via email to