You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by Manish Saha <Ma...@ivl.stpt.soft.net> on 2001/04/11 16:27:08 UTC

is EveryBody busy

no it does not work.i really don't understand as how the soap router will be
looking for method with string when the parameter it is having in hand is an
object.


explain somebody

Manish SAHA



-----Original Message-----
From: Prabhakar, V [mailto:V.Prabhakar@compaq.com]
Sent: Wednesday, April 11, 2001 7:47 PM
To: soap-user@xml.apache.org
Subject: RE: did any body look into this


I guess the bean needs a default constructor. Can anyone correct me if
my assumption is wrong? 

-Prabhakar

-----Original Message-----
From: Manish Saha [mailto:Manish@ivl.stpt.soft.net]
Sent: Wednesday, April 11, 2001 9:43 AM
To: soap-user@xml.apache.org
Subject: did any body look into this


hi,

could anybody help out

thanx
ManishSAHA

-----Original Message-----
From: Manish Saha [mailto:Manish@ivl.stpt.soft.net]
Sent: Wednesday, April 11, 2001 7:00 PM
To: soap-user@xml.apache.org
Subject: RE: is there anybody over there


A little more progress..... now i can sent the message to the server 

looks some thing like this

<SOAP-ENV:Body>
<ns1:hello xmlns:ns1="helloworld"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap
.org/soap/encoding/">
<MyName xmlns:ns2="urn:xml-soap-MyName-demo" xsi:type="ns2:MyName">
<name xsi:type="xsd:string">manish</name>
</MyName>
</ns1:hello>

i am invoking the hello function with the MyName object parameter but it
is
throwing a error 


..................<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>HelloWorldService.hello(java.lang.String) -- no signature
match</faultstring>


how to set in the call that i am calling a method with the parameter .

call.setMethod is for setting the method.
is there any method for setting that these are the parameters that the
function should have


thanx
Manish SAHA

-----Original Message-----
From: Doug Davis [mailto:dug@us.ibm.com]
Sent: Wednesday, April 11, 2001 6:47 PM
To: soap-user@xml.apache.org
Subject: RE: is there anybody over there


A little progress... what does your deployment descriptor file look
like?
-Dug


Manish Saha <Ma...@ivl.stpt.soft.net> on 04/11/2001 09:09:35 AM

Please respond to soap-user@xml.apache.org

To:   soap-user@xml.apache.org
cc:
Subject:  RE: is there anybody over there



Now the error is on the server side

.............no deserilazer found for  the
urn:xml-soap-MyName-demo:MyName
using 'http://schemas.xmlsoap.org/soap/encoding/' stack overflow


and the weblogic server stop watson error.


thanx
Manish SAHA


-----Original Message-----
From: Doug Davis [mailto:dug@us.ibm.com]
Sent: Wednesday, April 11, 2001 6:22 PM
To: soap-user@xml.apache.org
Subject: Re: is there anybody over there


Try adding:
  call.setSOAPMappingRegistry(smr);
-Dug


Manish Saha <Ma...@ivl.stpt.soft.net> on 04/11/2001 08:41:27 AM

Please respond to soap-user@xml.apache.org

To:   soap-user@xml.apache.org
cc:
Subject:  is there anybody over there



hi all,

this is a small program i tried work out based on sending a object as
parameter.


import java.net.*;
import java.util.*;

import org.apache.soap.util.xml.*;
import org.apache.soap.*;
import org.apache.soap.rpc.*;
import org.apache.soap.encoding.*;
import org.apache.soap.encoding.soapenc.*;
import org.apache.soap.rpc.*;



public class HelloWorldClient {

                   public static final String DEFAULT_SERVICE_URL =
        "http://ivlt13:7001/myapp1/rpcrouter";

     public static void main(String args[])throws Exception{

          MyName name=new MyName("manish");

              SOAPMappingRegistry smr = new SOAPMappingRegistry();
                   BeanSerializer beanSer = new BeanSerializer();
                   System.out.println("BeanSer"+beanSer);
              smr.mapTypes(Constants.NS_URI_SOAP_ENC,
                 new QName("urn:xml-soap-MyName-demo",
"MyName"),MyName.class,beanSer, beanSer);

          URL url=new URL(DEFAULT_SERVICE_URL);
          String urn="urn:helloworld";
          Call call=new Call();
          call.setTargetObjectURI(urn);
          call.setMethodName("hello");

    call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);

          Vector params=new Vector();
          params.addElement(new
Parameter("MyName",MyName.class,name,null));


 //  MyName is a class which on both the server side and client (this
question i posted as to whether there should be class on  both the
server
and client side)
// there was no answer for that


          call.setParams(params);
          try{
               System.out.println("invoke service\n"+"URL="+url+"\n
URN="+urn);
               Response response =call.invoke(url,"");
               if( !response.generatedFault())
               {
                    Parameter result=response.getReturnValue();

System.out.println("Result="+result.getValue());
               }
               else
               {
                    Fault f=response.getFault();

System.err.println("Fault="+f.getFaultCode());
               }
          }
          catch(SOAPException e){

System.err.println("SOAPException="+e.getFaultCode()+","+e.getMessage())
;
          }
     }
}



MyName is a small class which follows the beans methodology.since apache
bean serlizer support this only.


public class MyName{
     public String name;
     public MyName(String name){
          this.name=name;
     }


     public String getName()
{
     return this.name;
}

     public void setName(String name)
{
     this.name = name;
}

public String toString(){
     return name;
}
}

i get the following error message.


..........................SOAPException=SOAP-ENV:Client,No Serializer
found
to serialize a 'MyName' using encoding style
'http://schemas.xmlsoap.org/soap/encoding/'.


and could tell me as to how to write our own bean serlizer.








---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org