It looks like you've done some fiddling in this area already.  Here's
what I believe should work.

    //com.ibm.etools.webservice.runtime.XSDAnyTypeSerializer ser_0 = new
//com.ibm.etools.webservice.runtime.XSDAnyTypeSerializer();
    //com.ibm.etools.webservice.runtime.XSDAnyTypeSerializer deSer_0 =
new
//com.ibm.etools.webservice.runtime.XSDAnyTypeSerializer();

   //smr.mapTypes("http://schemas.xmlsoap.org/soap/encoding/",new
///QName
("http://kmg/","UserProfile";),kmg.UserProfile.class, ser_0, deSer_0);

   BeanSerializer  myObjSer = new BeanSerializer ();
   smr.mapTypes( Constants.NS_URI_SOAP_ENC,new QName
("http://kmg/";, "UserProfile"),
kmg.UserProfile.class, myObjSer, myObjSer );

Specifically, this defines a deserializer (myObjSer) for QName
http://kmg/:UserProfile with encoding Constants.NS_URI_SOAP_ENC.
Whether that deserializer works with that type, I do not know.

Scott Nichol

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 08, 2002 6:54 AM
Subject: Re: PL HELP ME... URGENT HELP REQUIRED


>
> Scott
> MANY MANY TAHNX for ur Patienece to READ all mails and   help US .
>   After lot of problems i am concentrating on a very small example
which
> uses XSD which return a  objects of class type
>
> task
> 1. run from browser using soap apache 2.3.1  and  weblogic6.1
>  2. run through .net client using wsdl
>   i am getting following error with browser  any idea about that...
>
> exception: [SOAPException: faultCode=SOAP-ENV:Client; msg=No
Deserializer
> found to deserialize a 'http://kmg/:UserProfile' using encoding style
> 'http://schemas.xmlsoap.org/soap/encoding/'.;
> targetException=java.lang.IllegalArgumentException: No Deserializer
found
> to deserialize a 'http://kmg/:UserProfile' using encoding style
> 'http://schemas.xmlsoap.org/soap/encoding/'.] ..
>
> here is the code for that
>
>
> deployment decsriptor
>
>
> <?xml version="1.0"?>
> <isd:service id="urn:ROY" xmlns:isd
> ="http://xml.apache.org/xml-soap/deployment";>
>   <isd:provider type="java" scope="Application" methods
> ="getUserApplicationProfile getName">
>     <isd:java class="kmg.getApp" static="false"/>
>   </isd:provider>
>   <isd:mappings>
>     <isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
>             xmlns:x="http://kmg/"; qname="x:UserProfile"
>             javaType="kmg.UserProfile"
>             java2XMLClassName
> ="org.apache.soap.encoding.soapenc.BeanSerializer"
>             xml2JavaClassName
> ="org.apache.soap.encoding.soapenc.BeanSerializer"/>
>     <isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
>              xmlns:x="" qname="x:websvcs"
>              javaType="kmg.websvcs"
>              xml2JavaClassName
> ="org.apache.soap.encoding.soapenc.BeanSerializer"/>
>     <isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
>              xmlns:x="" qname="x:xx"
>              xml2JavaClassName
> ="org.apache.soap.encoding.soapenc.StringDeserializer"/>
>     <isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
>              xmlns:x="" qname="x:string"
>              xml2JavaClassName
> ="org.apache.soap.encoding.soapenc.StringDeserializer"/>
>   </isd:mappings>
> </isd:service>
>
>
> """"""""""proxy class """""""""""""""""""""""""""""""""""""
>
>
> package kmg;
> //import com.ibm.etools.webservice.runtime.XSDAnyTypeSerializer
> import java.net.*;
> import java.util.*;
> import org.w3c.dom.*;
> import org.apache.soap.*;
> import org.apache.soap.encoding.*;
> import org.apache.soap.encoding.soapenc.*;
> import org.apache.soap.rpc.*;
> import org.apache.soap.util.xml.*;
> import org.apache.soap.messaging.*;
> import org.apache.soap.transport.http.*;
>
> public class getAppProxy
> {
>   private Call call;
>   private URL url = null;
>   //private String stringURL
> = "http://localhost:9080/KMGtester/servlet/rpcrouter";;
>   private String stringURL
> = "http://192.168.1.22:7001/soap/servlet/rpcrouter";;
>   private java.lang.reflect.Method setTcpNoDelayMethod;
>
>   public getAppProxy()
>   {
>     try
>     {
>       setTcpNoDelayMethod = SOAPHTTPConnection.class.getMethod
> ("setTcpNoDelay", new Class[]{Boolean.class});
>     }
>     catch (Exception e)
>     {
>     }
>     call = createCall();
>   }
>
>   public synchronized void setEndPoint(URL url)
>   {
>     this.url = url;
>   }
>
>   public synchronized URL getEndPoint() throws MalformedURLException
>   {
>     return getURL();
>   }
>
>   private URL getURL() throws MalformedURLException
>   {
>     if (url == null && stringURL != null && stringURL.length() > 0)
>     {
>       url = new URL(stringURL);
>     }
>     return url;
>   }
>
>   public synchronized kmg.UserProfile
> getUserApplicationProfile(java.lang.String username,java.lang.String
> password) throws Exception
>   {
>     String targetObjectURI = "urn:ROY";
>     String SOAPActionURI = "";
>
>     if(getURL() == null)
>     {
>       throw new SOAPException(Constants.FAULT_CODE_CLIENT,
>       "A URL must be specified via getAppProxy.setEndPoint(URL).");
>     }
>
>     call.setMethodName("getUserApplicationProfile");
>     call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
>     call.setTargetObjectURI(targetObjectURI);
>     Vector params = new Vector();
>     Parameter usernameParam = new Parameter("username",
> java.lang.String.class, username, Constants.NS_URI_SOAP_ENC);
>     params.addElement(usernameParam);
>     Parameter passwordParam = new Parameter("password",
> java.lang.String.class, password, Constants.NS_URI_SOAP_ENC);
>     params.addElement(passwordParam);
>     call.setParams(params);
>     Response resp = call.invoke(getURL(), SOAPActionURI);
>
>     //Check the response.
>     if (resp.generatedFault())
>     {
>       Fault fault = resp.getFault();
>       call.setFullTargetObjectURI(targetObjectURI);
>       throw new SOAPException(fault.getFaultCode(),
fault.getFaultString
> ());
>     }
>     else
>     {
>       Parameter refValue = resp.getReturnValue();
>       return ((kmg.UserProfile)refValue.getValue());
>     }
>   }
>
>   public synchronized java.lang.String getName(java.lang.String xx)
throws
> Exception
>   {
>     String targetObjectURI = "urn:ROY";
>     String SOAPActionURI = "";
>
>     if(getURL() == null)
>     {
>       throw new SOAPException(Constants.FAULT_CODE_CLIENT,
>       "A URL must be specified via getAppProxy.setEndPoint(URL).");
>     }
>
>     call.setMethodName("getName");
>     call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
>     call.setTargetObjectURI(targetObjectURI);
>     Vector params = new Vector();
>     Parameter xxParam = new Parameter("xx", java.lang.String.class,
xx,
> Constants.NS_URI_SOAP_ENC);
>     params.addElement(xxParam);
>     call.setParams(params);
>     Response resp = call.invoke(getURL(), SOAPActionURI);
>
>     //Check the response.
>     if (resp.generatedFault())
>     {
>       Fault fault = resp.getFault();
>       call.setFullTargetObjectURI(targetObjectURI);
>       throw new SOAPException(fault.getFaultCode(),
fault.getFaultString
> ());
>     }
>     else
>     {
>       Parameter refValue = resp.getReturnValue();
>       return ((java.lang.String)refValue.getValue());
>     }
>   }
>
>   protected Call createCall()
>   {
>     SOAPHTTPConnection soapHTTPConnection = new SOAPHTTPConnection();
>     if ( setTcpNoDelayMethod != null)
>     {
>       try
>       {
>         setTcpNoDelayMethod.invoke(soapHTTPConnection, new Object
> []{Boolean.TRUE});
>       }
>       catch (Exception ex)
>       {
>       }
>     }
>     Call call = new Call();
>     call.setSOAPTransport(soapHTTPConnection);
>     SOAPMappingRegistry smr = call.getSOAPMappingRegistry();
>     //com.ibm.etools.webservice.runtime.XSDAnyTypeSerializer ser_0 =
new
> //com.ibm.etools.webservice.runtime.XSDAnyTypeSerializer();
>     //com.ibm.etools.webservice.runtime.XSDAnyTypeSerializer deSer_0 =
new
> //com.ibm.etools.webservice.runtime.XSDAnyTypeSerializer();
>
>    //smr.mapTypes("http://schemas.xmlsoap.org/soap/encoding/",new
///QName
> ("http://kmg/","UserProfile";),kmg.UserProfile.class, ser_0, deSer_0);
>
>    BeanSerializer  myObjSer = new BeanSerializer ();
>    smr.mapTypes( Constants.NS_URI_SOAP_ENC,new QName
> ("http://schemas.xmlsoap.org/soap/encoding/";, "UserProfile"),
> kmg.UserProfile.class, myObjSer, myObjSer );
>
>    SOAPMappingRegistry smr1 = call.getSOAPMappingRegistry();
>     return call;
>   }
> }

<Truncated by the respondent>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to