Skip to Content
0
Sep 18, 2008 at 05:19 AM

portal service from a web service not working

64 Views

Hi all,

I created a portal service from web service and i am tryiong to use that in my portal component.

when i am running the portal component i am getting the following error

Exception:-

java.lang.IllegalArgumentException: The SOAP Action "" include in the soap request not corresponding to the Portal service method.

I had an argument which I have to pass

try
    	{
    	
	IPortalRuntimeResources youm = PortalRuntime.getRuntimeResources();
	IService sexy = youm.getService(IServiceFinal.KEY);
	Getempname namr = new Getempname();
	namr.setEmpno("1");
	
	GetempnameResponse someb = new GetempnameResponse();
	IServiceFinal fina = (IServiceFinal)sexy;
	//I am getting error at this statement.There is some problem with my argument i am passing
        someb = fina.getempname(namr);
	someb.getResponse();
    	}
    	catch (Exception e) {
		// TODO: handle exception
		response.write(e.getLocalizedMessage());
		}

I have checked my web service in web service checker.

I am getting response its working fine there.

I am pasting the xml code

request:-Here i am giving input as 1 here for that method

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bns0="urn:lokws89Wsd/Config1/document" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/">
  <SOAP-ENV:Body>
    <ns0:getempname xmlns:ns0="urn:lokws89Vi">
      <ns0:empno>1</ns0:empno>
    </ns0:getempname>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope></SOAP-ENV:Envelope>

response:- I am able to get teh desired response lokesh here.

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <SOAP-ENV:Body>
    <rpl:getempnameResponse xmlns:rpl="urn:lokws89Vi">
      <rpl:Response>lokesh</rpl:Response>
    </rpl:getempnameResponse>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Please let me know why i am not getting this argument exception when i am passing the same argument string there.

Thanks & Regards,

Lokesh