Use the Document object rather than the Element object in your interface.

Anne

On Thu, Mar 6, 2008 at 9:32 AM, Duseja, Sushil
<[EMAIL PROTECTED]> wrote:
>
>
>
>
> I am using Axis 1.4 and I am having a problem accessing an echo service
> (doc/literal).
>
> Here's the code:-
>
>
>
> MyService
>
>
>
> public class MyService {
>
>       public Element[] serviceMethod(Element[] elems) {
>
>             String xmlStr = elems[0].getTextContent();
>
>             return elems;
>
>     }
>
> }
>
>
>
> Input String
>
>
>
> <soapenv:Envelope
> xsi:schemaLocation=\"http://schemas.xmlsoap.org/soap/envelope/
> http://schemas.xmlsoap.org/soap/envelope/\";
> xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\";
> xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\";
> xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\";
> xmlns:web=\"http://webService.fgs.com\";>
>
>   <soapenv:Body>
>
>     <web:serviceMethod>Hello</web:serviceMethod>
>
>   </soapenv:Body>
>
> </soapenv:Envelope>
>
> Output String
>
> <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";>
>
> <SOAP-ENV:Header/>
>
> <SOAP-ENV:Body>
>
> <SOAP-ENV:Fault>
>
> <faultcode>SOAP-ENV:Server</faultcode>
>
> <faultstring>unexpected XML tag. expected:
> {http://schemas.xmlsoap.org/soap/envelope/}Body but found:
> http://schemas.xmlsoap.org/soap/envelope/}Envelope</faultstring>
>
> <faultactor></faultactor>
>
> </SOAP-ENV:Fault>
>
> </SOAP-ENV:Body>
>
> </SOAP-ENV:Envelope>
>
> There is a message that was returned to me (via TCPMonitor):
>
> HTTP/1.1 500 Internal Server Error
>
> Accept: text/xml, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
>
> Content-Type: text/xml;charset=utf-8
>
> Content-Length: 410
>
> Date: Thu, 06 Mar 2008 13:30:37 GMT
>
> Connection: close
>
>
>
> <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";>
>
>    <SOAP-ENV:Header/>
>
>    <SOAP-ENV:Body>
>
>       <SOAP-ENV:Fault>
>
>          <faultcode>SOAP-ENV:Server</faultcode>
>
>          <faultstring>unexpected XML tag. expected:
> {http://schemas.xmlsoap.org/soap/envelope/}Body but found:
> {http://schemas.xmlsoap.org/soap/envelope/}Envelope</faultstring>
>
>          <faultactor></faultactor>
>
>       </SOAP-ENV:Fault>
>
>    </SOAP-ENV:Body></SOAP-ENV:Envelope>
>
>
>
> Can anybody help me finding the solution to this problem?
>
>
>  Thanks.
>
>
>
>

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

Reply via email to