How to call Web Services (with javascript) in a view load event ?

Hello to the expert community,
I'm looking for a piece of javascript code allowing to call Web Services in a view load event ?
Any ideas will be really appreciated.
Regards.
Have a nice week.

Thank you for your answer, dongmei.
It seems that the MethodResultTableDataProvider does not return the response of the web service as a value field if the WSDL contains only one result element.
E.g. from WSDL of the USWeather Web Service which returns theGetWeatherReportResult string:
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://www.webserviceX.NET" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace="http://www.webserviceX.NET" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  <wsdl:types>
    <s:schema elementFormDefault="qualified" targetNamespace="http://www.webserviceX.NET">
      <s:element name="GetWeatherReport">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="ZipCode" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GetWeatherReportResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="GetWeatherReportResult" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="string" nillable="true" type="s:string" />
    </s:schema>If I drag the web service method on the page and I should be able to select the response value in the Bind to Data dialog box. But there is no value field. Value fields only occur if the web service returns more than one value.
The question is how can I get the response GetWeatherReportResult from the service.

Similar Messages

  • How to call web service with parameters?

    Hi
    I'm testing a distributed architecture where parameters are queried from an ODBC database, and a web service called with resulting parameters as input, returning a computed result to the integrated Crystal report. I'm unable to successfully associate the database fields with the web service parameters - the web service is always called with empty parameters. When I call the web service manually from CR by entering parameters, it works as expected. I'm using a sub-report with fields linked to the main report.
    Has anyone done something like this / know how to correctly link database fields with web service parameters?
    Help much appreciated,
    Lance

    An update - I solved this problem as follows:
    In CR Design view, right-click on sub-report object, select 'Change Subreport Links'. In the links dialog, transfer database fields into 'Field(s) to link to' list. Select a field in 'Field(s) to link to' and in 'Subreport parameter field to use' below, map the field to the appropriate web service parameter field in the dropdown.
    Tested with version 11.5.8.826.
    - Lance

  • How to access web services with Javascript

    I want to create a XUL/Javascript form which uses CRM On Demand web services. At this time I cannot login (no sample code is given for javascript), therefore I generate my JSESSIONID separately, try and put it in the URL I call in my code, but the server answers back with the logon.jsp page.
         function test()
    var xmlToSend = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:con='urn:crmondemand/ws/contact/' xmlns:con1='urn:/crmondemand/xml/contact'>";
         xmlToSend += "<soapenv:Header/>";
         xmlToSend += "<soapenv:Body>";
         xmlToSend += "<con:ContactWS_ContactQueryPage_Input>";
         xmlToSend += "<con1:ListOfContact>";
         xmlToSend += "<con1:Contact>";
         xmlToSend += "<con1:ContactId></con1:ContactId>";
         xmlToSend += "<con1:AccountId></con1:AccountId>";
         xmlToSend += "<con1:ContactEmail>= '[email protected]'</con1:ContactEmail>";
         xmlToSend += "<con1:ContactFirstName></con1:ContactFirstName>";
         xmlToSend += "<con1:ContactFullName></con1:ContactFullName>";
         xmlToSend += "<con1:ContactLastName></con1:ContactLastName>";
         xmlToSend += "<con1:AccountName></con1:AccountName>";
         xmlToSend += "</con1:Contact>";
         xmlToSend += "</con1:ListOfContact>";
         xmlToSend += "</con:ContactWS_ContactQueryPage_Input";
         xmlToSend += "</soapenv:Body>";
         xmlToSend += "</soapenv:Envelope>";
    var xmlhttp;
         xmlhttp = new XMLHttpRequest();
         xmlhttp.overrideMimeType('text/xml');
         xmlhttp.onreadystatechange=DisplayContact;
         xmlhttp.open("POST", "https://secure-ausomxdsa.crmondemand.com/", false);
         xmlhttp.setRequestHeader('Man', 'POST /Services/Integration;JSESSIONID=blablabla HTTP/1.1');
         xmlhttp.setRequestHeader('Content-Type', 'text/xml');
         xmlhttp.setRequestHeader('Content-Length', xmlToSend.length);
         xmlhttp.setRequestHeader('SOAPAction', 'document/urn:crmondemand/ws/contact/:ContactQueryPage');
    function DisplayContact()
              if (xmlhttp.readyState==4) {
                   if (xmlhttp.status==200) {
                        var response = xmlhttp.responseXML;
                        var responsetxt = (new XMLSerializer()).serializeToString(response);
                        document.write(responsetxt);
    The result is: responsetxt always contains the HTML code of logon.jsp.
    Anyone could help with a login code, or with the interrogation.
    Jeremy

    Hi,
    A JS Sample....
    You can use this JS in a Web Applet
    _____________________________________________ START OF FILE _____________________________________________
    <html>
    <head>
    <script type="text/javascript">
    var sso_token='%%%SSO Token%%%' // You can use an OCOD Variable in OCOD Web Applet
    sso_token = sso_token.replace(/\+/g, "%2B");//re-Encondig SSO-Token
    alert (sso_token);
    //////////////////////////////////// getInnerText() ////////////////////////////////////////
    function getInnerText(node) {
    if (typeof node.textContent != 'undefined') {
    return node.textContent;
    else if (typeof node.innerText != 'undefined') {
    return node.innerText;
    else if (typeof node.text != 'undefined') {
    return node.text;
    else {
    switch (node.nodeType) {
    case 3:
    case 4:
    return node.nodeValue;
    break;
    case 1:
    case 11:
    var innerText = '';
    for (var i = 0; i < node.childNodes.length; i++) {
    innerText += getInnerText(node.childNodes);
    return innerText;
    break;
    default:
    return '';
    //////////////////////////////////// sso_login() ////////////////////////////////////////
    //https://server/Services/SSOTokenValidate?odSsoToken = "ssotoken value"
    //https://server/Services/Integration?command=ssologin&odSsoToken="ssotoken value"
    var ajax=null;
    var browser = navigator.appName;
    if(browser == "Microsoft Internet Explorer"){
         ajax = new ActiveXObject("Microsoft.XMLHTTP");
    }else{
         ajax = new XMLHttpRequest();
    function SSO_Login() {     
    //var url = 'https://secure-ausomxdsa.crmondemand.com/Services/SSOTokenValidate?odSsoToken='+sso_token; // Check SSO Token
    var url = 'https://secure-ausomxdsa.crmondemand.com/Services/Integration?command=ssologin&odSsoToken='+sso_token;
    ajax.open("HEAD", url, true);
    ajax.onreadystatechange = getReponse;
    ajax.send(null);
    //////////////////////////////////// Login() ////////////////////////////////////////
    var ajax=null;
    var browser = navigator.appName;
    if(browser == "Microsoft Internet Explorer"){
         ajax = new ActiveXObject("Microsoft.XMLHTTP");
    }else{
         ajax = new XMLHttpRequest();
    function Login() {     
    var url = 'https://secure-ausomxdsa.crmondemand.com/Services/Integration?command=login';
    ajax.open("HEAD", url, true);
    ajax.onreadystatechange = getReponse;
    ajax.setRequestHeader('UserName','GLABADEN-FR13-15/WSUserName');
    ajax.setRequestHeader('Password','OnDemandPassword');
    ajax.send(null);
    //////////////////////////////////// getReponse() ////////////////////////////////////////     
    function getReponse(){
         switch(ajax.readyState){
              case 0:
              case 1:
                   //open com
              break;
              case 2:
                   //send query
              break;
              case 3:
                   //recieving data
              break;
              case 4:
                   //data received
                   //ajax.status contient 200, 404, ...
                   //ajax.statusText contient OK, NOT FOUND, ...
                   var reponseTexte= ajax.responseText;
                   var responseXml= ajax.responseXml;
                   alert(ajax.getResponseHeader("Set-Cookie"));
              break;     
    //////////////////////////////////// Call_WS() ////////////////////////////////////////     
    function Call_WS(){
    var xmlhttp =null;
    var browser = navigator.appName;
    if(browser == "Microsoft Internet Explorer"){
    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    }else{
    xmlhttp = new XMLHttpRequest();
    xmlhttp.open("POST", "https://secure-ausomxdsa.crmondemand.com/Services/Integration",true);
    xmlhttp.onreadystatechange=function() {
    if (xmlhttp.readyState==4) {
    rteNode = xmlhttp.responseXML.getElementsByTagName("ListOfContact").item(0);
    alert(rteNode.childNodes.length);
    for(var i=0; i<rteNode.childNodes.length; i++){
    switch( rteNode.childNodes.item(i).tagName ){
    case 'Contact':
    var ContactId = rteNode.childNodes.item(i).childNodes.item(0).tagName;
    var ContactIdValue = rteNode.childNodes.item(i).childNodes.item(0).text;
    var ContactIdGetValue = getInnerText(rteNode.childNodes.item(i).childNodes.item(0));
    alert(ContactId+" : "+ContactIdValue +" / "+ContactIdGetValue);
    break;
    case 'Other':
    break;
    default:
    break;
    xmlhttp.setRequestHeader("SOAPAction", "\"document/urn:crmondemand/ws/contact/10/2004:ContactQueryPage\"")
    xmlhttp.setRequestHeader("MessageType", "CALL")
    xmlhttp.setRequestHeader("Content-Type", "text/xml")
    //xmlhttp.setRequestHeader("Content-Type", "text/xml;charset=UTF-8")
    //xmlhttp.setRequestHeader("Content-Type", "text/xml;charset=ISO-8859-1")
    var miSoap=
    '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="urn:crmondemand/ws/contact/10/2004" xmlns:con="urn:/crmondemand/xml/contact"> \n' +
    '<soapenv:Header/> \n' +
    '<soapenv:Body> \n' +
    '<ns:ContactWS_ContactQueryPage_Input> \n' +
    '<ns:PageSize>10</ns:PageSize> \n' +
    '<con:ListOfContact> \n' +
    '<con:Contact> \n' +
    '<con:ContactId></con:ContactId> \n' +
    '</con:Contact> \n' +
    '</con:ListOfContact> \n' +
    '<ns:StartRowNum>0</ns:StartRowNum> \n' +
    '</ns:ContactWS_ContactQueryPage_Input> \n' +
    '</soapenv:Body> \n' +
    '</soapenv:Envelope> \n' ;
    alert(miSoap);
    xmlhttp.send(miSoap);
    //$(document).ready(function () {
    alert("start");
    $("table").each(function() {
    alert("table");
    var $table = $(this);
    var str_id = $table.id;
    alert(str_id);
    </script>
    <h1>Javascript WS</h1>
    <input type="button" onclick="Login()" value="Login">
    <input type="button" onclick="SSO_Login()" value="SSO_Login">
    <input type="button" onclick="Call_WS()" value="Call_WS">
    </body>
    </html>
    _____________________________________________ END OF FILE _____________________________________________
    Best Regards,
    Gerald

  • How to call Web Services with Sun Java Studio Creator?

    Can someone from Sun please explain how to use the sample Web Services USWeather and GoogleSearch in Sun Java Studio Creator (no Portlet Application)?
    I read the Web Service Tutorial Accessing Web Services (http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/webservices.html) and this blog entry: http://blogs.sun.com/roller/page/winston?entry=code_google_search_in_no .
    But the proposed solutions do not work with the services USWeather and GoogleSearch.
    Thank you.

    Thank you for your answer, dongmei.
    It seems that the MethodResultTableDataProvider does not return the response of the web service as a value field if the WSDL contains only one result element.
    E.g. from WSDL of the USWeather Web Service which returns theGetWeatherReportResult string:
    <?xml version="1.0" encoding="utf-8"?>
    <wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://www.webserviceX.NET" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace="http://www.webserviceX.NET" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
      <wsdl:types>
        <s:schema elementFormDefault="qualified" targetNamespace="http://www.webserviceX.NET">
          <s:element name="GetWeatherReport">
            <s:complexType>
              <s:sequence>
                <s:element minOccurs="0" maxOccurs="1" name="ZipCode" type="s:string" />
              </s:sequence>
            </s:complexType>
          </s:element>
          <s:element name="GetWeatherReportResponse">
            <s:complexType>
              <s:sequence>
                <s:element minOccurs="0" maxOccurs="1" name="GetWeatherReportResult" type="s:string" />
              </s:sequence>
            </s:complexType>
          </s:element>
          <s:element name="string" nillable="true" type="s:string" />
        </s:schema>If I drag the web service method on the page and I should be able to select the response value in the Bind to Data dialog box. But there is no value field. Value fields only occur if the web service returns more than one value.
    The question is how can I get the response GetWeatherReportResult from the service.

  • How to call web service using J2SE 1.3?

    Dear All,
    i have developed a web service by jdev 10.1.3 (JAX-RPC with web service security
    enabled).
    i generate the ws proxy (jdev 10.1.3) and run it with wsclient_extended.jar (required JDK 1.4.1 or above??).
    but one of my client say he has to use J2SE 1.3.x (as OS=AIX 4.3 that without J2SE
    1.4.x ), could anyone tell me how can generate ws proxy (with supporting
    library) for jdk 1.3.x?
    if oracle don't have such library / tools, any third party tools / library available?
    thank you.
    lsp

    I'm found answer:
    Java and SAP Portal blog: How to call web service from java code example

  • How to call web services in WEB DYNPRO ABAP

    Hi ABAPER'S,
    Please let me know how to call web services in web dynpro.
    Thanks,
    Sandy.

    Hi Sandy,
    Please check this blog..
    /people/riyaz.sayyad/blog/2006/05/08/consuming-xi-web-services-using-web-dynpro-150-part-ii
    also cehck this...
    call the webservices in webdynpro ABAP.
    calling webservice in webdynpro component
    Re: Web Services in WDA.
    Cheers,
    Kris.
    Edited by: kissnas on May 24, 2011 11:37 AM

  • How to call WEB Service From SAP

    Hi Friends,
    How to call WEB Service From SAP.
    Thanks in advance,
    Murali Krishna K

    Hi,
    if you mean calling a web service in Web Dynpro ABAP, see the <a href="http://help.sap.com/saphelp_nw70/helpdata/en/d7/951b42f828df2ce10000000a1550b0/frameset.htm">documentation</a>, if you mean calling a web service in general, this is not the correct forum. This here is the Web Dynpro ABAP forum, for general questions on ABAP, use the ABAP forum.
    Regards, Heidi

  • How to call web-service using only java code

    Hello, how to call web-service using only java code. I can call it from BPM process or Web Dynpro Java Application, but if I need to call it from ejb component?

    I'm found answer:
    Java and SAP Portal blog: How to call web service from java code example

  • How to call web services from HTML

    Hi All,
    Does anybody have an idea on how to call web services from HTML using axis and i am using jboss-4.0.5 as the application server.

    What did your Google search return?

  • How to call web services from PL/SQL?

    Hi,
    Can one help in how to call web services from PL/SQL? Steps, pros and cons, etc....
    Thanks in advance

    Here's some example skeleton code to get you started...
      PROCEDURE p_soap_request(p_username IN VARCHAR2, p_password IN VARCHAR2, p_proxy IN VARCHAR2) IS
        soap_request  VARCHAR2(30000);
        soap_respond  CLOB;
        http_req      utl_http.req;
        http_resp     utl_http.resp;
        resp          XMLType;
        soap_err      exception;
        v_code        VARCHAR2(200);
        v_msg         VARCHAR2(1800);
        v_len number;
        v_txt Varchar2(32767);
      BEGIN
        UTL_HTTP.SET_PROXY(p_proxy);
        -- Define the SOAP request according the the definition of the web service being called
        soap_request:= '<?xml version = "1.0" encoding = "UTF-8"?>'||
                       '<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">'||
                       '  <SOAP-ENV:Body>'||
                       '    <m:DownloadRequest xmlns:m="http://www.website.net/messages/GetDetails">'||
                       '      <m:UserName>'||p_username||'</m:UserName>'||
                       '      <m:Password>'||p_password||'</m:Password>'||
                       '    </m:DownloadRequest>'||
                       '  </SOAP-ENV:Body>'||
                       '</SOAP-ENV:Envelope>';
        http_req:= utl_http.begin_request
                  ( 'http://www.website.net/webservices/GetDetailsService.asmx'
                  , 'POST'
                  , 'HTTP/1.1'
        utl_http.set_header(http_req, 'Content-Type', 'text/xml');
        utl_http.set_header(http_req, 'Content-Length', length(soap_request));
        utl_http.set_header(http_req, 'Download', ''); -- header requirements of particular web service
        utl_http.write_text(http_req, soap_request);
        http_resp:= utl_http.get_response(http_req);
        utl_http.get_header_by_name(http_resp, 'Content-Length', v_len, 1); -- Obtain the length of the response
        FOR i in 1..CEIL(v_len/32767) -- obtain response in 32K blocks just in case it is greater than 32K
        LOOP
            utl_http.read_text(http_resp, v_txt, case when i < CEIL(v_len/32767) then 32767 else mod(v_len,32767) end);
            soap_respond := soap_respond || v_txt; -- build up CLOB
        END LOOP;
        utl_http.end_response(http_resp);
        resp:= XMLType.createXML(soap_respond); -- Convert CLOB to XMLTYPE
      END;Using secure web services (https)...
    Web serivces call in Plsql
    As for 'pros and cons'... there's nothing to compare against... either you want to call a web service or you don't.

  • How to call WEB Service From SAP 4.6 c

    Hi Friend,
    How to call WEB Service From SAP 4.6 c Report
    Thanks in advance.

    It is not possible to directly call a web service from SAP 4.6c.
    Indeed, web service enablement is available as from Web AS 6.20, thus as from SAP R/3 4.7
    So as described above, the solution is indeed to make use of PI(XI) for this.
    Rgds,
    Karim

  • Calling Web Service with SOAP header from BPEL

    Hi,
    I am calling a web service (with header information) from BPEL. In the Invoke activity, i created a header variable to pass the header information.
    But, when i test the BPEL service, invoke activity fails because the header information is not being passed.
    Below is the error message (copied from clipboard).
    +<messages><input><Invoke_1_getsubinfo_InputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="parameters"><getsubinfoElement xmlns="http://ws/its/tabs/webservices/SingleRowWS/SingleRowWS.wsdl">+
    +<pSubnoin>+
    +<insubno>12345678</insubno>+
    +</pSubnoin>+
    +</getsubinfoElement>+
    +</part></Invoke_1_getsubinfo_InputVariable></input><fault><bindingFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>exception on JaxRpc invoke:+
    start fault message:+
    Internal Server Error (Caught exception while handling request: javax.xml.rpc.JAXRPCException: Not authenticated user)+
    *:end fault message*</summary>
    +</part></bindingFault></fault></messages>+
    As said, no header information is visible in the Invoke activity.
    Please provide help for the above issue.
    -MJ

    Hello Patrick,
    Thanks for the response. I am using normal assign activity to assign values to the header variable as shown below. HeadMT is the header variable which is passed in the invoke activity.
    +<assign name="Assign_Header">+
    +<copy>+
    +<from expression="'tkl12'"/>+
    +<to query="/ns1:LOGIN_INFO/ns1:USER_NAME" variable="*HeadMT*"+
    part="payload"/>
    +</copy>+
    +<copy>+
    +<from expression="'tkl123'"/>+
    +<to query="/ns1:LOGIN_INFO/ns1:PASSWORD" variable="*HeadMT*"+
    part="payload"/>
    +</copy>+
    +<copy>+
    +<from expression="'TKL'"/>+
    +<to query="/ns1:LOGIN_INFO/ns1:CHANNEL_ID" variable="*HeadMT*"+
    part="payload"/>
    +</copy>+
    +</assign>+
    The expected input by the web service is as below with the header information highlighted.
    +<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://ws/webservices/RowWS/RowWS.wsdl">+
    +*<soap:Header>*+
    +*<ns1:LOGIN_INFO>*+
    +*<ns1:USERNAME>tkl12</ns1:USERNAME>*+
    +*<ns1:PASSWORD>tkl123</ns1:PASSWORD>*+
    +*<ns1:CHANNEL_ID>TKL</ns1:CHANNEL_ID>*+
    +*</ns1:LOGIN_INFO>*+
    +*</soap:Header>*+
    +<soap:Body>+
    +<ns1:substatusElement>+
    +<ns1:pInparam>+
    +<ns1:insubno>7674988</ns1:insubno>+
    +</ns1:pInparam>+
    +</ns1:substatusElement>+
    +</soap:Body>+
    +</soap:Envelope>+

  • How to create web services with complex objects as parameters

    Hi,
    Not sure if this is the right place, but...
    I'm using Netbeans 5.5 and trying to learn web services.
    Creating a simple web service with simple parameters like strings and integers is nice and easy. I'm now trying to take the next step, and create a web service with a more complex schema as a parameter.
    I've tried two approaches, and hit dead ends on both:
    (1) Define my complex schema as an xsd file, and then create a WSDL file. Creating the schema and saving it in my EFB project works fine; when I try to create a new WSDL file, the IDE gives me a button to import external schemas - which is where the problem is: the Browse simply won't find my newly created schema file.
    (2) Define a Java class (in this case, it's a fairly simple example containing a single ArrayList), and then use the IDE to generate a web service from Java. The IDE does this fine, but I now have no idea how to consume or test the web service - I don't know where to look for the WSDL that has presumably been generated, and I'm also a bit iffy over what answers to give the WSDL creator about port names etc.
    Ideally, I'd prefer to get approach 1 to work - can someone point me in the direction of a sensible tutorial for these things?
    (Happy to carry on using Netbeans 5.5 or to revert to Sun Studio Enterprise, which I was playing with before.)
    All help appreciated, Thanks

    - For NetBeans related questions, nbusers mailing list is more suited. It is often visited by NetBeans experts.
    http://www.netbeans.org/community/lists/top.html
    ...[email protected]
    The NetBeans users mailing list. General discussion of NetBeans use, this is the place to ask for help and to help others.... (There is a 'Subscribe' button next to the above that you can use to subscribe to the list).
    Can you try posting this question on nbusers list?
    - SJSE 8.1 is based on an older version of NB (NB5.0).
    You should definitely continue with NetBeans, since all development is now being done in NetBeans; all the major JSE modules have been moved to opensource at netbeans.org and are all being developed there. There are as yet no future plans to work on further releases for JSE.
    Please check out http://www.netbeans.org for more details.

  • How to use web service with ABAP Web Dynpro

    Hi.
         do you know, how to web service with ABAP Web Dynpro?

    Hi,
    If you have a webservice ready with you then you can generate a proxy from SE80 and you can use that. You just have to create a port and assign to that generated proxy(CLASS) and you are good to go.
    Let me know if you need more information.
    Thank You,
    Gajendra.

  • Calling web service with basic authentication from EP "unauthorized"

    Hello,
    I need to call a .NET web service with basic authentication on the IIS from my portal application (no http proxy between portal and IIS). But always I get the following exception:
    <b>com.sap.engine. services.webservices.jaxm.soap.accessor. NestedSOAPException:
    Problem in server response: [Unauthorized].</b>
    I'm using the following code for calling the .NET web service:
    <b>...</b><i>Licence_GetList lParameter = new Licence_GetList();
    lParameter.setStatus(CEnvironment.TransformStatus_WebService(search));
    ILicenceManager lLicMan = (ILicenceManager) PortalRuntime.getRuntimeResources().getService("LicenceManager");
    ILicenceManager lLicManSecure = lLicMan.getSecurisedServiceConnection(request.getUser());
    Licence_GetListResponse lGetListResponse = lLicManSecure.Licence_GetList(lParameter);</i><b>...</b>
    I've also configured a http system in the portal system landscape using the following parameters:
    <i>Authentication Method : Basic Authentication
    Authentication Type : Server
    User Mapping Type : admin,user</i>
    The user mapping is also personalized for this system!
    What's wrong? Please help! This is really urgent!
    Kind Regards
    Joerg Loechner

    Hello Renjith,
    here is a small cutout of my "portapp.xml";
    <services>
      <service alias="LicenceManager" name="LicenceManager">
        <service-config>
          <property name="className" value="de.camelotidpro.
                 pct.xi.scm.webservice.LicenceManager"/>
          <property name="startup" value="false"/>
          <property name="WebEnable" value="false"/>
          <property name="WebProxy" value="true"/>
          <property name="SecurityZone" value="de.camelotidpro.
                 pct.xi.scm.webservice.LicenceManager/
                   DefaultSecurity"/>
        </service-config>
        <service-profile>
          <property name="SystemAlias" value="LicMan_NET"/
        </service-profile>
      </service>
    </services>
    I'm using a http system created in the system landscape (alias LicMan_NET). But it seems that this system is not used by the web service call (No error, even if I delete this system!). The code used to call this web service can be found at the top of this threat...
    Regards
    Joerg Loechner

Maybe you are looking for