It looks to me like your Call or a Parameter must have encoding Constants.NS_URI_SOAP_ENV, which is a typographical error. The encoding should be Constants.NS_URI_SOAP_ENC.
On 2 Jul 2003 at 12:18, Prasad,Bhanchand wrote: > Hi, > Have trouble calling a .Net Service using Java SOAP Client. The error > message being returned is as follows: > No Deserializer found to deserialize a > 'http://schemas.xmlsoap.org/soap/envelope/:Parameter' using encoding style > 'null' > Havaing read on the net about the XML parameters, added the following to the > SOAP client code > smr.mapTypes( > Constants.NS_URI_SOAP_ENC, > new QName("", "ClaimSearchResult"), > null, > null, > stringDser); > > What I can make out from this is that the Web Services is executing > successfully at the .Net end but fails when the receive occurs. > > Thanks in advance. > > Prasad > > The details of the call are as below: > > > The TCP Tunnel Request is as follows: > ---------------------------------------------------------------------------- > ----------- > <?xml version='1.0' encoding='UTF-8'?> <SOAP-ENV:Envelope > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <SOAP-ENV:Body> <ClaimSearch > xmlns="http://rhino.arts/ArtsClaim/"> > <strXML> test </strXML> > </ClaimSearch> > </SOAP-ENV:Body> > </SOAP-ENV:Envelope> > > The TCP Tunnel Response is as follows: > ---------------------------------------------------------------------------- > --------------- > <?xml version="1.0" encoding="utf-8"?><soap:Envelope > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:xsd="http://www.w3.org/2001/XMLSchema"> > <soap:Body> > <ClaimSearchResponse xmlns="http://rhino.arts/ArtsClaim/"> > <ClaimSearchResult>Hello World</ClaimSearchResult> > </ClaimSearchResponse> > </soap:Body></soap:Envelope> > > The Java client code is as follows: > ---------------------------------------------------------------------------- > --------------- > package proxy.soap; > > import java.net.MalformedURLException; > import java.net.URL; > import java.util.Vector; > > import org.apache.soap.Constants; > import org.apache.soap.Fault; > import org.apache.soap.SOAPException; > import org.apache.soap.encoding.SOAPMappingRegistry; > import org.apache.soap.encoding.soapenc.StringDeserializer; > import org.apache.soap.rpc.Call; > import org.apache.soap.rpc.Parameter; > import org.apache.soap.rpc.Response; > import org.apache.soap.util.xml.Deserializer; > import org.apache.soap.util.xml.QName; > import org.apache.soap.util.xml.Serializer; > > public class MyInterface_Interface1Proxy { > private Call call = new Call(); > private URL url = null; > private String stringURL = > "http://localhost:9999/ArtsClaim/ArtsClaim.asmx"; > > public MyInterface_Interface1Proxy() { > } > > 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 java.lang.String ClaimSearch(java.lang.String > parameters) > throws Exception { > String targetObjectURI = "http://rhino.arts/ArtsClaim"; > String SOAPActionURI = > "http://rhino.arts/ArtsClaim/ClaimSearch"; > > if (getURL() == null) { > throw new SOAPException( > Constants.FAULT_CODE_CLIENT, > "A URL must be specified via > MyInterface_Interface1Proxy.setEndPoint(URL)."); > } > > SOAPMappingRegistry smr = new SOAPMappingRegistry(); > > Deserializer stringDser = new StringDeserializer(); > > smr.mapTypes( > Constants.NS_URI_SOAP_ENC, > new QName("", "ClaimSearchResult"), > null, > null, > stringDser); > > call.setSOAPMappingRegistry(smr); > > call.setMethodName("ClaimSearch"); > call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC); > > call.setTargetObjectURI(targetObjectURI); > > Vector params = new Vector(); > Parameter parametersParam = > new Parameter( > "ns1:strXML", > java.lang.String.class, > parameters, > Constants.NS_URI_SOAP_ENC); > params.addElement(parametersParam); > call.setParams(params); > > Response resp = call.invoke(getURL(), SOAPActionURI); > > System.out.println(resp.getReturnValue()); > > //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()); > } > } > > > } > Scott Nichol Do not reply directly to this e-mail address, as it is filtered to only receive e-mail from specific mailing lists.