axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lcopp...@unina.it
Subject RE: PLEASE HELP ME!!! - WS-I Basic Profile compatibility
Date Tue, 27 Jul 2004 15:48:17 GMT
Ok wrapped is good!!!
But now I have a new problem, I don't know if it is axis dependent but I hope to
found an help here.


I'm working with WTK 2.1 and JSR 172. I have published a service (using axis
1.2beta) by 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 an help...
Luigi Coppolino


Quoting Tom Jordahl <tomj@macromedia.com>:

> 
> Wrapped is pure document/literal.
> 
> 
> --
> Tom Jordahl
> Macromedia Server Development
> 
> -----Original Message-----
> From: lcoppoli@unina.it [mailto:lcoppoli@unina.it] 
> Sent: Friday, July 23, 2004 6:43 AM
> To: axis-dev@ws.apache.org
> Subject: RE: PLEASE HELP ME!!! - WS-I Basic Profile compatibility
> 
> Ok I will try wrapped/literal in wsdd but I'm not very trusting in it
> because
> I'm using the J2ME Wireless Toolkit which support only document/literal
> Thanks
> 
> Scrive Tom Jordahl <tomj@macromedia.com>:
> 
> > 
> > Looks like your toolkit doesn't like the fact that the
> "signRequestRequest"
> > message has multiple parts in it.  You should probably use 'wrapped' mode
> > for your service.  That will create a single part with a wrapper element.
> > 
> > 
> > --
> > Tom Jordahl
> > Macromedia Server Development
> > 
> > -----Original Message-----
> > From: lcoppoli@unina.it [mailto:lcoppoli@unina.it] 
> > Sent: Thursday, July 22, 2004 12:17 PM
> > To: axis-dev@ws.apache.org
> > Subject: Fwd: PLEASE HELP ME!!! - WS-I Basic Profile compatibility
> > 
> > 
> > Hi axis' developers, 
> > I'm using axis 1.2 beta. I have tryed to generate the stub clients for a
> web
> > service using the Wireless Toolkit 2.1. The deployed WSDL is:
> > 
> > 
> > *******************************************************
> > <?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="in0" type="xsd:base64Binary"/>
> >    <element name="in1" type="xsd:base64Binary"/>
> >    <element name="signRequestReturn" type="xsd:base64Binary"/>
> >   </schema>
> >  </wsdl:types>
> > 
> >    <wsdl:message name="signRequestRequest">
> > 
> >       <wsdl:part element="impl:in0" name="in0"/>
> > 
> >       <wsdl:part element="impl:in1" name="in1"/>
> > 
> >    </wsdl:message>
> > 
> >    <wsdl:message name="signRequestResponse">
> > 
> >       <wsdl:part element="impl:signRequestReturn"
> name="signRequestReturn"/>
> > 
> >    </wsdl:message>
> > 
> >    <wsdl:portType name="caInt">
> > 
> >       <wsdl:operation name="signRequest" parameterOrder="in0 in1">
> > 
> >          <wsdl:input message="impl:signRequestRequest"
> > name="signRequestRequest"/>
> > 
> >          <wsdl:output message="impl:signRequestResponse"
> > name="signRequestResponse"/>
> > 
> >       </wsdl:operation>
> > 
> >    </wsdl:portType>
> > 
> >    <wsdl:binding name="caSoapBinding" type="impl:caInt">
> > 
> >       <wsdlsoap:binding style="document"
> > transport="http://schemas.xmlsoap.org/soap/http"/>
> > 
> >       <wsdl:operation name="signRequest">
> > 
> >          <wsdlsoap:operation soapAction=""/>
> > 
> >          <wsdl:input name="signRequestRequest">
> > 
> >             <wsdlsoap:body use="literal"/>
> > 
> >          </wsdl:input>
> > 
> >          <wsdl:output name="signRequestResponse">
> > 
> >             <wsdlsoap:body use="literal"/>
> > 
> >          </wsdl:output>
> > 
> >       </wsdl:operation>
> > 
> >    </wsdl:binding>
> > 
> >    <wsdl:service name="caIntService">
> > 
> >       <wsdl:port binding="impl:caSoapBinding" name="ca">
> > 
> >          <wsdlsoap:address location="http://localhost/axis/services/ca"/>
> > 
> >       </wsdl:port>
> > 
> >    </wsdl:service>
> > 
> > </wsdl:definitions>
> > 
> > 
> > ****************************************
> > 
> > 
> > The Wireless Toolkit give me the following message:
> > 
> > 
> > warning: ignoring operation "signRequest": more than one part in input
> > message
> > warning: Port "ca" does not contain any usable operations
> > 
> > 
> > I need an help please...It seems to be a bug...is it? 
> > 
> > Luigi Coppolino
> > 
> > ----------------------------------------------------------------
> > This message was sent using IMP, the Internet Messaging Program.
> > 
> > ----- End forwarded message -----
> > 
> > 
> > 
> > 
> > ----------------------------------------------------------------
> > This message was sent using IMP, the Internet Messaging Program.
> > 
> 
> 
> 
> 
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
> 




----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

Mime
View raw message