on 02-20-2013 1:18 PM
Hi expert,
As described into thread Call a Web Service from within an e-Sourcing script, I've used code described below:
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;
import javax.xml.rpc.ParameterMode;
import javax.xml.namespace.QName;
String endpoint = "http://api.google.com/search/beta2";
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperationName( "doSpellingSuggestion" );
call.setOperationName(new QName("urn:GoogleSearch", "doSpellingSuggestion"));
call.addParameter("key", XMLType.XSD_STRING, ParameterMode.IN);
call.addParameter("phrase", XMLType.XSD_STRING, ParameterMode.IN);
call.setReturnType( XMLType.XSD_STRING );
String ret = (String) call.invoke( new Object[] { "googlekey", doc.getDocumentDescription()} );
doc.setDocumentDescription(ret);
However, when I try to execute it (because I've included it in a toolbar script), following error is raised:
Typed variable declaration: Class: Service not found in namespace
If I understood correctly the information on the previous thread, the open source Axis library is included with E-Sourcing. Therefore, it should work because corresponding libraries have been imported at the very beginning of the code.
Could you please let me know what I'm doing wrong? Is my previous understanding correct regarding Axis library or should it be included in Sourcing system?
Just to add further information: I'm testing it in SAP Sourcing Wave 9.
Thanks in advance for your help and support and best regards,
Isaac
Hi Isaac,
as of version 9, SAP shifted from Axis to CXF.
kr,
Bram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bram,
Thanks again for the info.
I will keep on looking for further support on this topic. But thanks again for your answers.
@Rest of SND Experts: Have you ever worked in CXF technology? It will be very appreciated if you could help me in this topic.
Thanks a lot and best regards,
Isaac
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.