Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

portal service from a web service not working

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

replied

Lokesh,

Herez how I fixed it, I hope it should fix your problem too. If not then paste the error trace here:

In your Portal Service (The CLASS that is generated by NWDS, and the one that you use to communicate with the web service ) you will find a method that takes input and returns output to your Portal component.

In that method, search for :

HashMap httpheaders = new HashMap();

and replace:

		  httpheaders.put("soapaction","\"\""); 

by

		  httpheaders.put("soapaction","");  

The reason being the parameters to httpheader are not being passed as it required.

Also, what Portal Version and SP level are you on? Above SP 13 (I guess), Portal Services are no longer supported, you will have to use JAVA Proxies. You might have to upgrade your NWDS to a SP level compatible with your Portal Server SP Level if your are on NW2004s and SP 14 and/or above,

Let me know how it goes.

SB

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question