axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chandrasegaram Jeyakumaran" <jkuma...@opensource.lk>
Subject Re: PLEASE HELP ME!!! JSR 172 and axis
Date Fri, 30 Jul 2004 03:08:37 GMT
Hi,

I couldn't really get your problem. But have you checked the SOAP using
the tcpmonitor.
That may give you a clear idea of the problem.
Because you will clearly know the elements in the response SOAP.
Try the tcpmonitor and check whether the expected result with the format
arrives.Then only you can find whether it is a problem with the axis
webservice deployment or with the stubs.

regards,
Jeyakumaran

> I have a new problem, I don't know if it is axis dependent but I hope to
> found help here.
>
>
> I'm working with WTK 2.1 and JSR 172. I have published a service (using
> axis
> 1.2beta) having the following WSDL
> **************************************************
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions targetNamespace="http://DefaultNamespace"
> xmlns:apachesoap="http://xml.apache.org/xml-soap"
> xmlns:impl="http://DefaultNamespace" xmlns:intf="http://DefaultNamespace"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <!--WSDL created by Apache Axis version: 1.2beta
> Built on Mar 31, 2004 (12:47:03 EST)-->
>  <wsdl:types>
>   <schema elementFormDefault="qualified"
> targetNamespace="http://DefaultNamespace"
> xmlns="http://www.w3.org/2001/XMLSchema">
>    <element name="sayHello">
>     <complexType/>
>    </element>
>    <element name="sayHelloResponse">
>     <complexType>
>      <sequence>
>       <element name="sayHelloReturn" type="xsd:string"/>
>      </sequence>
>     </complexType>
>    </element>
>   </schema>
>  </wsdl:types>
>
>    <wsdl:message name="sayHelloResponse">
>
>       <wsdl:part element="impl:sayHelloResponse" name="parameters"/>
>
>    </wsdl:message>
>
>    <wsdl:message name="sayHelloRequest">
>
>       <wsdl:part element="impl:sayHello" name="parameters"/>
>
>    </wsdl:message>
>
>    <wsdl:portType name="EducatoInt">
>
>       <wsdl:operation name="sayHello">
>
>          <wsdl:input message="impl:sayHelloRequest"
> name="sayHelloRequest"/>
>
>          <wsdl:output message="impl:sayHelloResponse"
> name="sayHelloResponse"/>
>
>       </wsdl:operation>
>
>    </wsdl:portType>
>
>    <wsdl:binding name="educatoSoapBinding" type="impl:EducatoInt">
>
>       <wsdlsoap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http"/>
>
>       <wsdl:operation name="sayHello">
>
>          <wsdlsoap:operation soapAction=""/>
>
>          <wsdl:input name="sayHelloRequest">
>
>             <wsdlsoap:body use="literal"/>
>
>          </wsdl:input>
>
>          <wsdl:output name="sayHelloResponse">
>
>             <wsdlsoap:body use="literal"/>
>
>          </wsdl:output>
>
>       </wsdl:operation>
>
>    </wsdl:binding>
>
>    <wsdl:service name="EducatoIntService">
>
>       <wsdl:port binding="impl:educatoSoapBinding" name="educato">
>
>          <wsdlsoap:address
> location="http://localhost/axis/services/educato"/>
>
>       </wsdl:port>
>
>    </wsdl:service>
>
> </wsdl:definitions>
>
> *************************************************************
>
> I'have generated client Stubs by using J2ME Wireless Toolkit. Then I'have
> generated a simple client as follow:
>
> *************************************************************
> import educato.*;
> import javax.xml.rpc.*;
> import java.rmi.RemoteException;
>
> public class Client{
>
> final static String serviceURL = "http://127.0.0.1/axis/services/educato";
>
> public static void main(String args[]){
> try{
> EducatoInt_Stub e = new EducatoInt_Stub();
> e._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, serviceURL);
> e._setProperty(Stub.SESSION_MAINTAIN_PROPERTY, new Boolean(true));
>
> String risposta = e.sayHello();
> System.out.println("Ha risposto: " + risposta +"!!!");
> }catch(Exception e){
> e.printStackTrace();
> }
> }
> }
> *************************************************
> Now the problem: executing the client by
>
> java Client
>
> I obtain the following error message:
>
> ******************************
> java.rmi.MarshalException: Invalid Element in Response: sayHelloReturn
> at
> com.sun.j2mews.xml.rpc.SOAPDecoder.decode(Ljavax/microedition/xml/rpc/Type;Ljava/io/InputStream;Ljava/lang/String;J)Ljava/lang/Object;(Unknown
> Source)
> at
> com.sun.j2mews.xml.rpc.OperationImpl.invoke(Ljava/lang/Object;)Ljava/lang/Object;(Unknown
> Source)
> at
> educato.EducatoInt_Stub.sayHello()Ljava/lang/String;(EducatoInt_Stub.java:77)
> at Client.main([Ljava/lang/String;)V(Client.java:15)
> *****************************
>
>
> I need help...
> Luigi Coppolino
>
>
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
>


Lanka Software Foundation
Promoting opensource in Srilanka

Mime
View raw message