No Deserializer found to deserialize a
Hi Guys
PLease could you offer some assistance..
i have been searching the net and debugging code for a week now because of this error..
basically what i have done is created a Webservice from a pl/sql procedure.
i have done this with 3 procedures and they all work fine..
after generating the webservice i generated the web service stub..
i did all this in Jdeveloper 10.1.2
when calling the webservice i receive the following error
**********************************
[SOAPException: faultCode=SOAP-ENV:Client; msg=No Deserializer found to deserialize a 'http://xx.wsf.ap.webservice.interfaces.supplier/SupplierAPInterfaceWS.xsd:xx_wsf_ap_webservice_interfaces_supplier_SupplierAPInterfaceWSImpl_insertVendorSite_Out' using encoding style 'http://schemas.xmlsoap.org/soap/encoding/'.; targetException=java.lang.IllegalArgumentException: No Deserializer found to deserialize a 'http://xx.wsf.ap.webservice.interfaces.supplier/SupplierAPInterfaceWS.xsd:xx_wsf_ap_webservice_interfaces_supplier_SupplierAPInterfaceWSImpl_insertVendorSite_Out' using encoding style 'http://schemas.xmlsoap.org/soap/encoding/'.]
at org.apache.soap.SOAPException.<init>(SOAPException.java:77)
at org.apache.soap.rpc.Call.invoke(Call.java:308)
at xx.wsf.ap.webservice.interfaces.supplier.stub.SupplierAPInterfaceWSStub.insertVendorSite(SupplierAPInterfaceWSStub.java:135)
at xx.wsf.ap.webservice.am.WsfAppServiceImpl.callSupplier(WsfAppServiceImpl.java:523)
at xx.wsf.ap.webservice.am.WsfAppServiceImpl.CallProcedureFromDatabase(WsfAppServiceImpl.java:878)
at xx.wsf.ap.webservice.qdxml.QDParser.importValuesFromVoToDB(QDParser.java:320)
at xx.wsf.ap.webservice.reader.Conf.parseXMLForAP(Conf.java:673)
at xx.wsf.ap.webservice.reader.Conf.main(Conf.java:730)
Below is the Java class
++++++++++++++++++++++++++++++++++++++++++++++++++++=
package xx.wsf.ap.webservice.interfaces.supplier.stub;
import oracle.soap.transport.http.OracleSOAPHTTPConnection;
import org.apache.soap.encoding.SOAPMappingRegistry;
import org.apache.soap.encoding.soapenc.ArraySerializer;
import xx.wsf.ap.webservice.interfaces.supplier.SupplierAPInterfaceWSImpl_insertVendorSite_Out;
import xx.wsf.ap.webservice.interfaces.supplier.SupplierAPInterfaceWSImpl_insertVendors_Out;
import java.net.URL;
import org.apache.soap.rpc.Call;
import org.apache.soap.Constants;
import java.util.Vector;
import org.apache.soap.rpc.Parameter;
import org.apache.soap.rpc.Response;
import org.apache.soap.Fault;
import org.apache.soap.SOAPException;
import java.math.BigDecimal;
import org.apache.soap.encoding.soapenc.BeanSerializer;
import org.apache.soap.util.xml.QName;
import java.util.Properties;
/**
* Generated by the Oracle JDeveloper 10g Web Services Stub/Skeleton Generator.
* Date Created: Thu Jun 28 11:37:54 CAT 2007
* WSDL URL: file:/C:/jDevHomeOA/jdevhome/jdev/mywork/XXWsfAPWebserviceApp/Project/src/xx/wsf/ap/webservice/interfaces/supplier/SupplierAPInterfaceWS.wsdl
*/
public class SupplierAPInterfaceWSStub
{
public SupplierAPInterfaceWSStub()
{
m_httpConnection = new OracleSOAPHTTPConnection();
m_smr = new SOAPMappingRegistry();
BeanSerializer beanSer = new BeanSerializer();
m_smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("http://xx.wsf.ap.webservice.interfaces.supplier/SupplierAPInterfaceWS.xsd", "xx_wsf_ap_webservice_interfaces_supplier_SupplierAPInterfaceWSImpl_insertVendors_Out"), SupplierAPInterfaceWSImpl_insertVendors_Out.class, beanSer, beanSer);
}
private String _endpoint = "http://orat.wesbank.co.za:7777/XXWsfAPWebserviceApp-Project-context-root/SupplierAPInterfaceWS";
public String getEndpoint()
{
return _endpoint;
}
public void setEndpoint(String endpoint)
{
_endpoint = endpoint;
}
private OracleSOAPHTTPConnection m_httpConnection = null;
private SOAPMappingRegistry m_smr = null;
public SupplierAPInterfaceWSImpl_insertVendors_Out insertVendors(String isupplierName, String isupplierType, String isupplierNumber) throws Exception
{
SupplierAPInterfaceWSImpl_insertVendors_Out returnVal = null;
URL endpointURL = new URL(_endpoint);
Call call = new Call();
call.setSOAPTransport(m_httpConnection);
call.setTargetObjectURI("SupplierAPInterfaceWS");
call.setMethodName("insertVendors");
call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
Vector params = new Vector();
params.addElement(new Parameter("isupplierName", String.class, isupplierName, null));
params.addElement(new Parameter("isupplierType", String.class, isupplierType, null));
params.addElement(new Parameter("isupplierNumber", String.class, isupplierNumber, null));
call.setParams(params);
call.setSOAPMappingRegistry(m_smr);
Response response = call.invoke(endpointURL, "");
if (!response.generatedFault())
{
Parameter result = response.getReturnValue();
returnVal = (SupplierAPInterfaceWSImpl_insertVendors_Out)result.getValue();
}
else
{
Fault fault = response.getFault();
throw new SOAPException(fault.getFaultCode(), fault.getFaultString());
}
return returnVal;
}
public SupplierAPInterfaceWSImpl_insertVendors_Out insertVendorSite(BigDecimal iorgId, String isupplierId, String isupplierSiteName, String isupplierNumber, String iaddress1, String iaddress2, String iaddress3, String icity, String ipostalCode, String icountry, String iareaCode, String iphone, String ifaxAreaCode, String ifax, String iremittanceEmail, String ibankname, String ibranchName, String ibranchCode, String ibankAccountName, String ibankAccountNum, String iprimaryAccountFlag, String ibankAccountType) throws Exception
{
SupplierAPInterfaceWSImpl_insertVendors_Out returnVal = null;
URL endpointURL = new URL(_endpoint);
Call call = new Call();
call.setSOAPTransport(m_httpConnection);
call.setTargetObjectURI("SupplierAPInterfaceWS");
call.setMethodName("insertVendorSite");
call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
Vector params = new Vector();
params.addElement(new Parameter("iorgId", BigDecimal.class, iorgId, null));
params.addElement(new Parameter("isupplierId", String.class, isupplierId, null));
params.addElement(new Parameter("isupplierSiteName", String.class, isupplierSiteName, null));
params.addElement(new Parameter("isupplierNumber", String.class, isupplierNumber, null));
params.addElement(new Parameter("iaddress1", String.class, iaddress1, null));
params.addElement(new Parameter("iaddress2", String.class, iaddress2, null));
params.addElement(new Parameter("iaddress3", String.class, iaddress3, null));
params.addElement(new Parameter("icity", String.class, icity, null));
params.addElement(new Parameter("ipostalCode", String.class, ipostalCode, null));
params.addElement(new Parameter("icountry", String.class, icountry, null));
params.addElement(new Parameter("iareaCode", String.class, iareaCode, null));
params.addElement(new Parameter("iphone", String.class, iphone, null));
params.addElement(new Parameter("ifaxAreaCode", String.class, ifaxAreaCode, null));
params.addElement(new Parameter("ifax", String.class, ifax, null));
params.addElement(new Parameter("iremittanceEmail", String.class, iremittanceEmail, null));
params.addElement(new Parameter("ibankname", String.class, ibankname, null));
params.addElement(new Parameter("ibranchName", String.class, ibranchName, null));
params.addElement(new Parameter("ibranchCode", String.class, ibranchCode, null));
params.addElement(new Parameter("ibankAccountName", String.class, ibankAccountName, null));
params.addElement(new Parameter("ibankAccountNum", String.class, ibankAccountNum, null));
params.addElement(new Parameter("iprimaryAccountFlag", String.class, iprimaryAccountFlag, null));
params.addElement(new Parameter("ibankAccountType", String.class, ibankAccountType, null));
call.setParams(params);
BeanSerializer beanSer = new BeanSerializer();
m_smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("http://xx.wsf.ap.webservice.interfaces.supplier/SupplierAPInterfaceWS.xsd", "xx_wsf_ap_webservice_interfaces_supplier_SupplierAPInterfaceWSImpl_insertVendorsSite_Out"), SupplierAPInterfaceWSImpl_insertVendorSite_Out.class, beanSer, beanSer);
// ArraySerializer arraySer = new ArraySerializer();
// m_smr.mapTypes(Constants.NS_URI_SOAP_ENC,
// new QName("http://xx.wsf.ap.webservice.interfaces.supplier/SupplierAPInterfaceWS.xsd", "ArrayOf_xsd_string"),
// String[].class, arraySer, arraySer);
call.setSOAPMappingRegistry(m_smr);
Object a = call.invoke(endpointURL, "");
Response response = call.invoke(endpointURL, "");
if (!response.generatedFault())
{
Parameter result = response.getReturnValue();
returnVal = (SupplierAPInterfaceWSImpl_insertVendors_Out)result.getValue();
}
else
{
Fault fault = response.getFault();
throw new SOAPException(fault.getFaultCode(), fault.getFaultString());
}
return returnVal;
}
public void setMaintainSession(boolean maintainSession)
{
m_httpConnection.setMaintainSession(maintainSession);
}
public boolean getMaintainSession()
{
return m_httpConnection.getMaintainSession();
}
public void setTransportProperties(Properties props)
{
m_httpConnection.setProperties(props);
}
public Properties getTransportProperties()
{
return m_httpConnection.getProperties();
}
}
Please can anyone help me...
when i call the service that is hosted on my app server i receive a normal response as below
<?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>
- <ns1:insertVendorSiteResponse xmlns:ns1="http://xx/wsf/ap/webservice/interfaces/supplier/SupplierAPInterfaceWS.wsdl" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
- <return xmlns:ns2="http://xx.wsf.ap.webservice.interfaces.supplier/SupplierAPInterfaceWS.xsd" xsi:type="ns2:xx_wsf_ap_webservice_interfaces_supplier_SupplierAPInterfaceWSImpl_insertVendorSite_Out">
<ostatusOut xsi:type="xsd:string">F</ostatusOut>
<omsgOut xsi:type="xsd:string">This Site name already exists for this supplier. Re-enter.</omsgOut>
</return>
</ns1:insertVendorSiteResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>