Re: Re[2]: please, help with "no deserializer found ..." message

"Scott Nichol" <[email protected]>
Newsgroups gmane.text.xml.soap.user
Message-ID <225801c4c66b$42dc4a30$6401a8c0@northgate>
Your service class is written to use the messaging API:

   public void SubmitReq(Envelope envelope, SOAPContext soapcontext, SOAPContext soapcontext1)

Your deployment descriptor should read

   <isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
     id="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2"
     type="message"
     > 

You do not need the type mappings in the deployment descriptor, since your code will be responsible for interpretting the XML.

Scott Nichol

Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message ----- 
From: "Vladimir Brezhnev" <[email protected]>
To: <[email protected]>
Sent: Tuesday, November 09, 2004 9:12 AM
Subject: Re[2]: please, help with "no deserializer found ..." message


> Hello Scott,
> 
> Tuesday, November 9, 2004, 4:36:15 PM, you wrote:
> 
> SN> When a service uses the RPC API, the SOAP request is parsed
> SN> into parameters for the service method call.  Each parameter has a
> SN> Java type specified by the method signature.  Apache SOAP normally
> SN> uses the XML Schema type of an element in the request to determine
> SN> the Java type of the parameter using a type map defined in the
> SN> Apache SOAP code, but which the programmer can also extend.  In
> SN> your case, the parameters do not have an XML Schema type
> SN> specified, so Apache SOAP uses the element name instead.  However,
> SN> you have not specified a mapping for this type.  For the service,
> SN> Apache SOAP type mapping are specified in the deployment
> SN> descriptor.
> 
> SN> The Apache SOAP 2.3.1 documentation for type mapping is at
> SN> http://ws.apache.org/soap/docs/guide/serializer.html.
> 
> I specify type mappings in a deployment descriptor.
> But i get now this error:
> 
> "
> <?xml version='1.0' encoding='UTF-8'?>
> <SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
> <SOAP-ENV:Body>
> <SOAP-ENV:Fault>
> <faultcode>SOAP-ENV:Server</faultcode>
> <faultstring>Exception while handling service request: com.ericsson.services.mms.sdk.vasp.samples.sim.MMCRelay.SubmitReq(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,javax.activation.DataHandler) -- no signature match</faultstring>
> <faultactor>/vaspsubmit/servlet/rpcrouter</faultactor>
> <detail>
> <stackTrace>java.lang.NoSuchMethodException: com.ericsson.services.mms.sdk.vasp.samples.sim.MMCRelay.SubmitReq(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,javax.activation.DataHandler) -- no signature match
> 
>   at org.apache.soap.util.MethodUtils.getEntryPoint(MethodUtils.java:154)
> [...skipped...]"
> 
> SOAP tries to call method with many java.lang.String parameters.
> 
> There is the deploy.xml:
> <?xml version="1.0"?>
>   <isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
>     id="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2"
>     > 
> 
>       <isd:provider type="java"
>                     scope="Application"
>         methods="SubmitReq CancelReq">
>         <isd:java class="com.ericsson.services.mms.sdk.vasp.samples.sim.MMCRelay"
>                          static="false"/>
>       </isd:provider>
>       <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener>
>   <isd:mappings>
>                 {skipped}
>   </isd:mappings>
>   </isd:service>
> 
> 
> 
> What i must change in the client code or in the deploy.xml to get success
> answer? I could not change server code (MMCRelay).
> 
> There is a class, which was set in deploy.xml.
>                          
> MMCRelay class:
> 
> package com.ericsson.services.mms.sdk.vasp.samples.sim;
> 
> import com.ericsson.services.mms.sdk.vasp.api.*;
> import java.io.*;
> import java.util.*;
> import javax.mail.MessagingException;
> import javax.xml.parsers.DocumentBuilder;
> import javax.xml.parsers.DocumentBuilderFactory;
> import org.apache.soap.*;
> import org.apache.soap.encoding.SOAPMappingRegistry;
> import org.apache.soap.rpc.SOAPContext;
> import org.w3c.dom.*;
> 
> // Referenced classes of package com.ericsson.services.mms.sdk.vasp.samples.sim:
> //            VASPSenderThread
> 
> public class MMCRelay
> {
> 
>     public MMCRelay()
>     {
>     }
> 
>     private MultiMediaSubmitResponse MultiMediaSubmitProcess(MultiMediaApplication multimediaapplication, MultiMediaMessage multimediamessage)
>         throws SOAPException
>     {
>         String s = TransactionManager.genTransactionID();
>         MultiMediaSubmitResponse multimediasubmitresponse = null;
>         try
>         {
>             if(multimediamessage.getSubject() != null && multimediamessage.getSubject().length() > 32)
>             {
>                 multimediasubmitresponse = new MultiMediaSubmitResponse(2001, "Subject Too Long");
>                 throw new IllegalArgumentException();
>             }
>             Date date = new Date();
>             if(multimediamessage.getTimeofExpiry() == null && multimediamessage.getRelativeTimeofExpiry() != 0L)
>                 multimediamessage.setTimeofExpiry(new Date(date.getTime() + 1000L * multimediamessage.getRelativeTimeofExpiry()));
>             if(multimediamessage.getTimeofExpiry() != null && date.after(multimediamessage.getTimeofExpiry()))
>             {
>                 multimediasubmitresponse = new MultiMediaSubmitResponse(2002, "Invalid Expiry");
>                 throw new IllegalArgumentException();
>             }
>             if(multimediamessage.getEarliestDeliveryTime() == null && multimediamessage.getRelativeEarliestDeliveryTime() != 0L)
>                 multimediamessage.setEarliestDeliveryTime(new Date(date.getTime() + 1000L * multimediamessage.getRelativeEarliestDeliveryTime()));
>             if(multimediamessage.getEarliestDeliveryTime() != null && multimediamessage.getTimeofExpiry() != null && multimediamessage.getEarliestDeliveryTime().after(multimediamessage.getTimeofExpiry()))
>             {
>                 multimediasubmitresponse = new MultiMediaSubmitResponse(2004, "Earliest Delivery clashed with Expiry");
>                 throw new IllegalArgumentException();
>             }
>             if(multimediamessage.getFrom() != null && multimediamessage.getFrom().length() > 12)
>             {
>                 multimediasubmitresponse = new MultiMediaSubmitResponse(2002, "Origination address error");
>                 throw new IllegalArgumentException();
>             }
>             if(multimediamessage.getNumberDestinationAddress() > 10)
>             {
>                 multimediasubmitresponse = new MultiMediaSubmitResponse(2002, "Invalid Number of Destinationsr");
>                 throw new IllegalArgumentException();
>             }
>             multimediasubmitresponse = new MultiMediaSubmitResponse(s);
>         }
>         catch(IllegalArgumentException illegalargumentexception)
>         {
>             throw new SOAPException(Constants.FAULT_CODE_CLIENT, multimediasubmitresponse == null ? "Submit" : multimediasubmitresponse.getSubmitResultDescription());
>         }
>         if(multimediasubmitresponse != null && multimediasubmitresponse.isSuccess())
>         {
>             MultiMediaApplication multimediaapplication1 = new MultiMediaApplication();
>             ArrayList arraylist = new ArrayList();
>             arraylist.addAll(multimediamessage.getAllDestination());
>             for(int i = 0; i < arraylist.size(); i++)
>             {
>                 Object obj = null;
>                 Address address = (Address)arraylist.get(i);
>                 if(multimediamessage.getDeliveryReport())
>                 {
>                     MultiMediaDeliveryReport multimediadeliveryreport = new MultiMediaDeliveryReport();
>                     multimediadeliveryreport.setRecipient(address.toString());
>                     multimediadeliveryreport.setFrom(multimediamessage.getFrom());
>                     multimediadeliveryreport.setReportStatus("Delivered");
>                     multimediadeliveryreport.setMessageID(multimediasubmitresponse.getMessageID());
>                     multimediadeliveryreport.setReportTime(new Date());
>                     VASPSenderThread vaspsenderthread = new VASPSenderThread(multimediamessage.getReportAddress(), multimediaapplication1, multimediadeliveryreport);
>                     vaspsenderthread.start();
>                     vaspsenderthread = null;
>                 }
>                 if(multimediamessage.getReadReport())
>                 {
>                     MultiMediaReadReport multimediareadreport = new MultiMediaReadReport();
>                     multimediareadreport.setRecipient(address.toString());
>                     multimediareadreport.setFrom(multimediamessage.getFrom());
>                     multimediareadreport.setMessageID(multimediasubmitresponse.getMessageID());
>                     multimediareadreport.setReportTime(new Date());
>                     VASPSenderThread vaspsenderthread1 = new VASPSenderThread(multimediamessage.getReportAddress(), multimediaapplication1, multimediareadreport);
>                     vaspsenderthread1.start();
>                     vaspsenderthread1 = null;
>                 }
>             }
> 
>         }
>         return multimediasubmitresponse;
>     }
> 
>     public void SubmitReq(Envelope envelope, SOAPContext soapcontext, SOAPContext soapcontext1)
>         throws SOAPException
>     {
>         System.out.println("SubmitReq Entered");
>         MultiMediaMessage multimediamessage = new MultiMediaMessage();
>         try
>         {
>             multimediamessage.unmarshall(envelope);
>             MultiMediaSubmitResponse multimediasubmitresponse = new MultiMediaSubmitResponse(1000, "Successfull message submission");
>             multimediasubmitresponse.setMessageID("1");
>             multimediasubmitresponse.setSubmitResultDescription("Successfull message submission");
>             multimediasubmitresponse.setTransactionId("12345");
>             multimediasubmitresponse.setTransactionID(multimediamessage.getTransactionId());
>             Envelope envelope1 = multimediasubmitresponse.marshall();
>             StringWriter stringwriter = new StringWriter();
>             envelope1.marshall(stringwriter, new SOAPMappingRegistry(), soapcontext1);
>             soapcontext1.setRootPart(stringwriter.toString(), "text/xml");
>         }
>         catch(Exception exception)
>         {
>             throw new SOAPException(Constants.FAULT_CODE_SERVER, exception.getMessage(), exception);
>         }
>         finally
>         {
>             System.out.println("SubmitReq Exited");
>         }
>     }
> 
>     /**
>      * @deprecated Method MultiMediaSubmit is deprecated
>      */
> 
>     public void MultiMediaSubmit(Envelope envelope, SOAPContext soapcontext, SOAPContext soapcontext1)
>         throws SOAPException, MessagingException, IOException
>     {
>         System.out.println("MultiMediaSubmit Entered");
>         MultiMediaMessage multimediamessage = new MultiMediaMessage();
>         try
>         {
>             multimediamessage.unmarshall(envelope);
>             MultiMediaSubmitResponse multimediasubmitresponse = new MultiMediaSubmitResponse(1000, "Successfull message submission");
>             multimediasubmitresponse.setMessageID("1");
>             multimediasubmitresponse.setSubmitResultDescription("Successfull message submission");
>             multimediasubmitresponse.setTransactionId("12345");
>             multimediasubmitresponse.setTransactionID(multimediamessage.getTransactionId());
>             Envelope envelope1 = marshall(multimediasubmitresponse);
>             StringWriter stringwriter = new StringWriter();
>             envelope1.marshall(stringwriter, new SOAPMappingRegistry(), soapcontext1);
>             soapcontext1.setRootPart(stringwriter.toString(), "text/xml");
>         }
>         catch(Exception exception)
>         {
>             throw new SOAPException(Constants.FAULT_CODE_SERVER, exception.getMessage(), exception);
>         }
>         finally
>         {
>             System.out.println("MultiMediaSubmit Exited");
>         }
>     }
> 
>     [some code skipped]
> }
> 
>   
>   
> -- 
> Best regards,
>  Vladimir
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.