help tomcat webservice and examples
"Alexandru SAMOILA" <[email protected]> Fri, 14 May 2004 15:19:57 +0200
| Newsgroups | gmane.comp.java.enhydra.ksoap |
|---|---|
| Message-ID | <[email protected]> |
Hello,
I am new to both web services and j2me applications, so that's why i
appologise if my questiin would seem dumb.
I have modified the AirportWeather example to acces a webservice i have
created an deployed using jwsdp (tomcat).
However, although i am able to acces it threough a simple java application,
and it works fine, i can't make it work with j2me. I have tried several ways
of accesing it and i get either "Internal Server Error" or "Bad Request".
Here is the interface to the webservice
/*
Interfata
*/
package helloservice;
import java.rmi.Remote;
import java.rmi.RemoteException;
public interface HelloIF extends Remote {
public int getTemp(String s) throws RemoteException;
public int getVant(String s) throws RemoteException;
public int getUmid(String s) throws RemoteException;
public int getPres(String s) throws RemoteException;
public int getVizib(String s) throws RemoteException;
public String getCer(String s) throws RemoteException;
}
And here are the messages i send and get from the webservice:
<SOAP-ENV:Envelope xmlns:HelloIF="urn:Foo"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-
ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-
ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body SOAP-
ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<HelloIF:getUmid id="o0" SOAP-ENC:root="1">
<s xsi:type="xsd:string">HECA</s>
</HelloIF:getUmid>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns0="urn:Foo"
env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><env:Body><env:F
ault><faultcode>env:Client</faultcode><faultstring>JAXRPC.TIE.01: caught
exception while handling request: deserialization error: unexpected XML
reader state. expected: END but found: START:
s</faultstring></env:Fault></env:Body></env:Envelope>
Please help...I am stuck and out of ideas...
Thx,
Alex
--
Computer Sharing Bucuresti