Proxy object to consume web service
Hi,
I want to consume a web service in ABAP (on a WAS 7 box) and have read many blogs/posts about using a proxy object.
I've gone to SE80 and selected create a service consumer, enter the URL for the WSDL.
The generation of the proxy fails with the following messages;
Proxy-Generierung: Fehler aufgetreten
Exception occured in the library handler
not implemented
There is no other help or information in these errors.
Does anyone have any ideas on what is causing this and what I can do to successfully generate a proxy to consume the web service ?
Cheers
James
Hello Torsten,
It seems that the Web Service You are going to consume is a SOAP 1.2 one.
It is apparently making use of the so-called "SOAP Web Method Feature" which is part of the SOAP 1.2 specification (see [Web Method Feature (W3C)|http://www.w3.org/TR/soap12-part2/#WebMethodFeature]).
Unfortunately, SOAP 1.2 is, to the best of my knowledge, not supported as yet by the SOAP Adapter in SAP NW 7.0 / 7.1. That leaves You, in theory, with one of the following options:
- It might be possible to consume that service with the help of Axis framework (see [Using the Axis Framework in the SOAP Adapter|http://help.sap.com/saphelp_nw04/helpdata/en/45/a4f8bbdfdc0d36e10000000a114a6b/frameset.htm]). SAP Help states that with the help of the Axis framework SOAP 1.2 can be used. However, there are no further details on that subject, especially whether Web Method feature can be utilised (btw - has anyone tried this?).
- Ask service provider for a SOAP 1.1-compatible WSDL.
- Attempt to reverse engineer the SAP SOAP proxy so that it is capable of consuming a SOAP 1.2 Web Method-based web service (has anyone done this before?).
Would You be so kind to post whether, and how, You were able to consume this web service?
Kind regards
Wiktor Nyckowski
Similar Messages
-
Consume web service in ABAP proxy with SOAP header
Hi Thomas ,
I am trying to consume web service in ABAP . I have followed the procedure from one of your web blog <a href="/people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap a Developer's Journal Part XIV - Consuming WebServices with ABAP</a> . (640 release).
I need to pass SOAP header along with SOAP body. As you mentioned I have used if_wsprotocol_ws_header interface to pass header but it is still failing.
Please see below code and please give some direction to fix the issue.
1.Create ABAP proxy for WSDL (http://ws.strikeiron.com/SwanandMokashi/StockQuotes?WSDL). It has created structures only for SOAP body.
2.Create Logical port
3.Create following program to call proxy
REPORT zproxy.
DATA: ref_stock TYPE REF TO zzco_stock_quotes_soap ,
ws_header TYPE REF TO if_wsprotocol_ws_header,
name TYPE string,
namespace TYPE string.
TRY.
CREATE OBJECT ref_stock
get WS_HEADER protocol
ws_header ?= ref_stock->get_protocol('IF_WSPROTOCOL_WS_HEADER').
set somehow header as iXML-DOM tree
DATA: ixml TYPE REF TO if_ixml,
xml_document TYPE REF TO if_ixml_document,
xml_root TYPE REF TO if_ixml_element,
xml_element TYPE REF TO if_ixml_element,
xml_node TYPE REF TO if_ixml_node.
DATA l_xstring TYPE xstring.
DATA l_string TYPE string.
FIELD-SYMBOLS <fs_xstring> TYPE xstring.
Additional Header:
CONCATENATE
'<soap:Header>'
'<s1:LicenseInfo xmlns:s1="http://ws.strikeiron.com">'
'<s1:RegisteredUser>'
'<s1:UserID>[email protected]</s1:UserID>'
'<s1:Password>aaaaaaaa</s1:Password>'
'</s1:RegisteredUser></s1:LicenseInfo>'
'</soap:Header>' INTO l_string.
convert to xstring
l_xstring = cl_proxy_service=>cstring2xstring( l_string ).
IF NOT l_string IS INITIAL.
create iXML DOM document from XML xstring
CALL FUNCTION 'SDIXML_XML_TO_DOM'
EXPORTING
xml = l_xstring
IMPORTING
document = xml_document
EXCEPTIONS
invalid_input = 1
OTHERS = 2.
IF sy-subrc = 0 AND NOT xml_document IS INITIAL.
xml_root = xml_document->get_root_element( ).
xml_element ?= xml_root->get_first_child( ).
add header element by element to SOAP header
WHILE NOT xml_element IS INITIAL.
name = xml_element->get_name( ).
namespace = 'http://swanandmokashi.com' . "xml_element->get_namespace_uri( ).
IF NOT xml_element IS INITIAL.
ENDIF.
ws_header->set_request_header(
name = name
namespace = namespace
dom = xml_element ).
xml_element ?= xml_element->get_next( ).
ENDWHILE.
ENDIF.
ENDIF.
CATCH cx_ai_system_fault .
ENDTRY.
*Call soap body using abap proxy class.
DATA: get_quotes TYPE zzget_quotes_soap_out .
DATA: get_quotes1 TYPE zzget_quotes_soap_in .
get_quotes1-quote_ticker = 'GE'.
TRY.
CALL METHOD ref_stock->get_stock_quotes
EXPORTING
get_quotes1 = get_quotes1
IMPORTING
get_quotes = get_quotes.
CATCH cx_ai_system_fault .
CATCH cx_ai_application_fault .
ENDTRY.
4.It is throwing cx_ai_system_fault error.
SOAP details:
Input:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding" >
<soap:Header>
<s1:LicenseInfo xmlns:s1="http://ws.strikeiron.com">
<s1:RegisteredUser>
<s1:UserID>[email protected]</s1:UserID>
<s1:Password>aaaaaaaa</s1:Password>
</s1:RegisteredUser>
</s1:LicenseInfo>
</soap:Header>
<soap:Body>
<tns:GetQuotes xmlns:tns="http://swanandmokashi.com">
<tns:QuoteTicker>GE</tns:QuoteTicker>
</tns:GetQuotes>
</soap:Body>
</soap:Envelope>
Thanks,
Kavitha.Hi ,
Thank you for the response. Did you passed user email and password ([email protected] /aaaaaaaa) part of licenseinfo->resisteredUser along with Quoteticker GE in analyzer?
<a href="http://www.strikeiron.com/Analyzer/OnlineAnalyzer.aspx?WSDL=http://ws.strikeiron.com/SwanandMokashi/StockQuotes?WSDL">ANALYZER</a>
Thanks,
Kavitha. -
Pros & Cons for consuming web services in ABAP using ABAP PROXY
Hi,
Other then performence is there any other disadvantages like security,etc for consuming web services in ABAP using ABAP proxy?
I really appreciate if some one provide the more details(Pros & Cons ) regarding cosuming web services and I also want to know is there any other way to consume web services in ABAP.
Thanks.<i> is there any other way to consume web services in ABAP</i>
you can use cl_http_client class to make your program to act as http client and post the soap message too webservice. This way you dont need to generate proxy, but you should know the soap message format.
Regards
Raja -
Consuming Web Service - Proxy Generation Terminated
Hello all,
I have recently been exploring the capabilities of consuming Web Services from ABAP and have run into some issues.
When I generate the Client Proxy from different WSDL files, I am frequently getting these two errors:
<i>Proxy generation terminated: "mixed content" not supported</i>
<i>Proxy generation terminated: WSDL error (<extension> not supported)</i>
Is this just a limitation of ABAP? If I get these errors, is there any way to use the Web Service?
Thanks in advance!Hi, had the same issue. try to rename the file to .xml ending.
HTH; rgds, marco -
Windows authentification while consuming web service from ABAP
Hi All,
We are consuming web service from ABAP, we have created client proxy in SE80 and configured logical port in LPCONFIG.
This one was working fine. Now we have added windows user authentification to access this service.
Now when I'm trying to regenerate this proxy in R/3 it is asking for user and password. When I enter these details this one is not working.
If I access this service direcly from internet explorer and I enter same user and password then I would able to access this service.
Could you please let me know how to handle this.
Regards
VikramThe dialog that is produced by HTTP Destination object of the logical port is designed only for use within Classic Dynpro applications. There is no prompt produced when running in Web Dynpro. If possible assign a generic user within the logical port definition and this will be used automatically by all users.
-
Consuming Web Services with ABAP - WSDL
Hi All,
I Want to consume web service in abap, i found lot of documents,Here i am having data in the internal table i need to pass
it to wsdl file, The Web Service or Proxy generates a WSDL file. So this WSDL file can be consumed on ABAP Front and Encrypt the Data that is to be sent to the Banks.
I found the input and output, Where i can find the method generated or we need to create it
CALL METHOD io_clientproxy->XXXXXXXXXXXX
please let me have your valuable ideas
Thanks in advance,
Arun.Hi Miguel,
I have not heared about SPROXY, Here i found some code,which calls a web service method and where it is from.
when i double click on my proxy it shows me some method.IF_PROXY_BASIS_INTERNAL~CREATE_FRAMEWORK
this is the one web service method. and i meed to pass the internal table data to WSDL file.
*-- create web service proxy class instance
TRY.
CREATE OBJECT io_clientproxy
EXPORTING
logical_port_name = 'LP4'.
CATCH cx_ai_system_fault.
ENDTRY.
*-- call web service methods
TRY.
CALL METHOD io_clientproxy->get_airport_information_by_is
EXPORTING
input = input
IMPORTING
output = output.
CATCH cx_ai_system_fault.
CATCH cx_ai_application_fault.
ENDTRY.
*-- text processing
output_string = output-get_airport_information_by_is.
REPLACE ALL OCCURRENCES OF
'<' IN output_string WITH '<' .
REPLACE ALL OCCURRENCES OF
'>' IN output_string WITH '>' .
REPLACE ALL OCCURRENCES OF
'xmlns=' IN output_string WITH 'xmlns:xsl=' .
*-- parsing
TRY .
CALL TRANSFORMATION ('Y_AIRPORT_XML2ABAP')
SOURCE XML output_string
RESULT outtab = outtab.
CATCH cx_xslt_exception INTO xslt_err.
DATA: s TYPE string.
s = xslt_err->get_text( ).
WRITE: ': ', s.
STOP.
ENDTRY .
Regards,
Arun. -
Code for consuming web services in ABAP
*& Report ZVM_GET_CITY_TIME
REPORT zvm_get_city_time.
PARAMETERS:
p_city TYPE zget_city_time_soap_in-city.
DATA:
cl_proxy TYPE REF TO zco_time_service_soap,
input TYPE zget_city_time_soap_in,
output TYPE zget_city_time_soap_out,
systerr TYPE REF TO cx_ai_system_fault,
w_error TYPE c.
TRY.
CREATE OBJECT cl_proxy
EXPORTING
logical_port_name = 'ZCO_TIME_SERVICE_SOAP'.
CATCH cx_ai_system_fault.
CREATE OBJECT systerr.
WRITE:/ 'Error in creating object - ', systerr->errortext.
ENDTRY.
TRY.
input-city = p_city.
CALL METHOD cl_proxy->get_city_time
EXPORTING
input = input
IMPORTING
output = output.
CATCH cx_ai_system_fault.
CREATE OBJECT systerr.
WRITE:/ 'Error in calling the method - ', systerr->errortext.
w_error = 'X'.
ENDTRY.
CHECK w_error NE 'X'.
SKIP.
WRITE:/ 'The current time in ', p_city, ' is ',
output-get_city_time_result.<i> is there any other way to consume web services in ABAP</i>
you can use cl_http_client class to make your program to act as http client and post the soap message too webservice. This way you dont need to generate proxy, but you should know the soap message format.
Regards
Raja -
How to consume WEB SERVICES from ABAP ??
Q: How to consume WEB SERVICES from ABAP program??
the point here is i am using SAP release 620 and the creation of proxy is out of scenario
and also no XI. Its only through ABAP program i need to consume one web service (its a HTTPS one ),
Using cl_http_client... i tried it but i am totally confused of whats happening ???
Req some senior ppl advice on the same/approach.
any hints will suffice my way of approach...!!!
Please do put in your valuable advices..!!
Thanks in advance..!!!!Hello Srinivas,
Following is the code for calling web service:
data: client type ref to if_http_client,
host type string value 'server url',
service type string value '8080',
path type string value '/sap/public/ping',
errortext type string,
proxy_service type string,
scheme type i value 1.
call method cl_http_client=>create
exporting host = host
service = service
proxy_host = host
proxy_service = service
scheme = scheme
importing client = client
exceptions
argument_not_found = 1
internal_error = 2
plugin_not_active = 3
others = 4.
case sy-subrc.
when 0.
write 'Server reached successfully'.
when others.
write: 'sy-subrc =', sy-subrc.
endcase.
Once you got the client object you can call following methods:
"Set the requrie URL for the web service you want to call. This is not WSDL anyway!!
cl_http_utility=>set_request_uri( request = client->request
uri =' url 2 be called ').
*Then you can call send method with proper inputs for sending request to WS
CALL METHOD client->send
Then you can use receive method for getting the response
CALL METHOD client->receive
*You can get last error in case of exceptions
CALL METHOD cl_http_client=>get_last_error
*Close the client object
CALL METHOD client->close
For more information on full code refer my link in previous replay.
Thanks,
Augustin.
Edited by: Augustarian on Aug 18, 2009 1:49 PM -
Error running demo PL/SQL consuming web services
I downloaded and installed the code from:
http://technet.oracle.com/tech/webservices/htdocs/samples/dbwebservice/DBWebServices_PLSQL.html
on Oracle 9i version 2 (on both Windows and Solaris).
But I got the following error running the local time
demo:
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1022
ORA-12545: Connect failed because target host or object does not exist
ORA-06512: at "XN.DEMO_SOAP", line 72
ORA-06512: at "XN.TIME_SERVICE", line 13
ORA-06512: at line 2
The error occurs on this line:
http_req := utl_http.begin_request(url, 'POST','HTTP/1.0');
Can anybody tell me what I do wrong? Thanks a lot!
Also, is there any alternative ways to consume web services
using PL/SQL only? Many thanks!
Henry X.Mike,
Thanks so much for your help. I tried your code just now.
Same error:
ORA-30625: method dispatch on NULL SELF argument is disallowed
ORA-06512: at "XN.DEMO_SOAP", line 50
ORA-06512: at "XN.DEMO_SOAP", line 83
ORA-06512: at "XN.TIME_SERVICE", line 27
ORA-06512: at line 7
Let me post the code I am using. Note that
I removed the code for using proxy in time_service.
Henry
-- code for calling the time_service
DECLARE
ZIPCODE VARCHAR2(200);
v_Return VARCHAR2(200);
BEGIN
ZIPCODE := '94065';
v_Return := TIME_SERVICE.GET_LOCAL_TIME(ZIPCODE => ZIPCODE);
DBMS_OUTPUT.PUT_LINE('v_Return = ' || v_Return);
END;
-- code for the package demo_soap
CREATE OR REPLACE PACKAGE demo_soap AS
TYPE request IS RECORD (
method VARCHAR2(256),
namespace VARCHAR2(256),
body VARCHAR2(32767));
TYPE response IS RECORD (
doc xmltype);
FUNCTION new_request(method IN VARCHAR2,
namespace IN VARCHAR2)
RETURN request;
PROCEDURE add_parameter(req IN OUT NOCOPY request,
name IN VARCHAR2,
type IN VARCHAR2,
value IN VARCHAR2);
FUNCTION invoke(req IN OUT NOCOPY request,
url IN VARCHAR2,
action IN VARCHAR2) RETURN response;
FUNCTION get_return_value(resp IN OUT NOCOPY response,
name IN VARCHAR2,
namespace IN VARCHAR2) RETURN VARCHAR2;
END;
CREATE OR REPLACE PACKAGE BODY demo_soap AS
FUNCTION new_request(method IN VARCHAR2,
namespace IN VARCHAR2)
RETURN request AS
req request;
BEGIN
req.method := method;
req.namespace := namespace;
RETURN req;
END;
PROCEDURE add_parameter(req IN OUT NOCOPY request,
name IN VARCHAR2,
type IN VARCHAR2,
value IN VARCHAR2) AS
BEGIN
req.body := req.body ||
'<'||name||' xsi:type="'||type||'">'||value||'</'||name||'>';
END;
PROCEDURE generate_envelope(req IN OUT NOCOPY request,
env IN OUT NOCOPY VARCHAR2) AS
BEGIN
env := '<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body><'||req.method||' '||req.namespace||'
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">'||
req.body||'</'||req.method||'></SOAP-ENV:Body></SOAP-ENV:Envelope>';
END;
PROCEDURE show_envelope(env IN VARCHAR2) AS
i pls_integer;
len pls_integer;
BEGIN
i := 1; len := length(env);
WHILE (i <= len) LOOP
dbms_output.put_line(substr(env, i, 60));
i := i + 60;
END LOOP;
END;
PROCEDURE check_fault(resp IN OUT NOCOPY response) AS
fault_node xmltype;
fault_code VARCHAR2(256);
fault_string VARCHAR2(32767);
BEGIN
fault_node := resp.doc.extract('/soap:Fault',
'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/');
IF (fault_node IS NOT NULL) THEN
fault_code := fault_node.extract('/soap:Fault/faultcode/child::text()',
'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/').getstringval();
fault_string := fault_node.extract('/soap:Fault/faultstring/child::text()',
'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/').getstringval();
raise_application_error(-20000, fault_code || ' - ' || fault_string);
END IF;
END;
FUNCTION invoke(req IN OUT NOCOPY request,
url IN VARCHAR2,
action IN VARCHAR2) RETURN response AS
env VARCHAR2(32767);
http_req utl_http.req;
http_resp utl_http.resp;
resp response;
BEGIN
generate_envelope(req, env);
-- show_envelope(env);
http_req := utl_http.begin_request(url, 'POST','HTTP/1.0');
utl_http.set_header(http_req, 'Content-Type', 'text/xml');
utl_http.set_header(http_req, 'Content-Length', length(env));
utl_http.set_header(http_req, 'SOAPAction', action);
utl_http.write_text(http_req, env);
http_resp := utl_http.get_response(http_req);
utl_http.read_text(http_resp, env);
utl_http.end_response(http_resp);
resp.doc := xmltype.createxml(env);
resp.doc := resp.doc.extract('/soap:Envelope/soap:Body/child::node()',
'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"');
-- show_envelope(resp.doc.getstringval());
check_fault(resp);
RETURN resp;
END;
FUNCTION get_return_value(resp IN OUT NOCOPY response,
name IN VARCHAR2,
namespace IN VARCHAR2) RETURN VARCHAR2 AS
BEGIN
RETURN resp.doc.extract('//'||name||'/child::text()',
namespace).getstringval();
END;
END;
-- code for the package time_service
CREATE OR REPLACE PACKAGE time_service AS
FUNCTION get_local_time(zipcode IN VARCHAR2) RETURN VARCHAR2;
END;
CREATE OR REPLACE PACKAGE BODY time_service AS
-- Location of Web service definition
-- http://www.alethea.net/webservices/LocalTime.asmx?WSDL
FUNCTION get_local_time(zipcode IN VARCHAR2) RETURN VARCHAR2 IS
req demo_soap.request;
resp demo_soap.response;
BEGIN
req := demo_soap.new_request('LocalTimeByZipCode',
'xmlns="http://www.alethea.net/webservices/"');
demo_soap.add_parameter(req, 'ZipCode', 'xsd:string', zipcode);
resp := demo_soap.invoke(req,
'http://www.alethea.net/webservices/LocalTime.asmx',
'http://www.alethea.net/webservices/LocalTimeByZipCode');
RETURN demo_soap.get_return_value(resp, 'LocalTimeByZipCodeResult',
'xmlns="http://www.alethea.net/webservices/"');
END;
END; -
Best practice for consuming web services
Hi
we are consuming web service in orchestration by "Add Generated Item".By using this option it creates 1 orch,1xsd file and some bindings.
we have different projects for schemas,maps and orchestration under our solution in visual studio.
Now i need to know that what will be the best practice for consuming web service in orchestration i mean in which project should i use "add generated item" (in orchstration project or in schemas project) coz it generates both 1 orch and 1
schema.
thanksFrom a service orientation perspective you should abstract the service artifacts from the other artifacts. Otherwise it will be very difficult to update the service interface without affecting the other artifacts. For example you don't want to have to redeply
your entire application if only one field changes in the service you consume.
So I typically generate the items, remove the unnecessary stuff, and put them in a separate project.
Depending on the control you have over the services you want to consume, it would even be better to create another layer of abstraction. By that I mean create your own interface (schema) and map that one to the one the service exposes. This basically
is only necessary if you consume external services that are beyond your control. By abstracting the interface it exposes, you limit the impact of changes of that interface on the rest of your system. All changes are abstracted behind your own interface.
If you consume internal services, you can probably control the way the interface is defined. In a service oriented world all internal services expose a well known interface, based on the domain objects you have within your organisation.
Jean-Paul Smit | Didago IT Consultancy
Blog |
Twitter | LinkedIn
MCTS BizTalk 2006/2010 + Certified SOA Architect
Please indicate "Mark as Answer" if this post has answered the question. -
How to consume Web Services form ABAP ?
Hi,
Please advise how to consume web services from ABAP Code ? is there any automatic generating proxy class in order to consume web services ?
I am using NW 7.0 SP15
Thank You and Best Regards
Fernand LesmanaHi Fernand,
chk out for this link
Consume an ABAP Webservice (WAS 620) from .Net
Send SMS to India from ABAP
working web service from ABAP
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a4433436-0301-0010-f2a9-9281ad574054
Regards
Sampath -
HI
I am consuming web service WSDL file in ABAP using client proxy concept. But every time i execute the program system is
asking for portal user name and pwd. where can i put user name an pwd so that system can take it directly from there
during run time.
Regards,
Shyam.Yes,
There is a place in SOAMANAGER to put userid and pwd for portal user. and this works.
Thanks,
Shyam -
Consuming Web Services in SSIS Script Task
Hello
Sorry for my English, I' ll try to explain my problem.
I am new to SSIS. Using this article http://blogs.msdn.com/b/dataaccesstechnologies/archive/2010/01/28/consuming-web-services-in-ssis-script-task.aspx I have tried to consume web service.
1. I have created proxy class using VS Command Prompt
2. A have added proxy class to Script Task
3. But when I want to create the instance of the proxy class, it can be accessed from the ScriptMain.cs.
I will be very pleased for the help!perhaps you missed this step:
--> Modify the code and add Credentials before calling the web method:
Public
SubMain()
Dim
ws As NewService1
ws.Credentials =
New System.Net.NetworkCredential("user name",
"password",
"domain name")
MsgBox("Square
of 2 = "& ws.Square(2))
Dts.TaskResult = Dts.Results.Success
End
Sub
Arthur
MyBlog
Twitter -
Creating and consuming web service
Hello Everyone,
Please help me in creating a webservice which can be consumed in a button in Excel sheet i.e. I have to create a button in Excel sheet and on click of that button i have to consume a web service deployed in AS. Also I have to pass the data in Excel sheet to that web service.
PS: This is just a business logic no other view or UI is required here.
Thanks in advance.
Regards
PranavHi Pranav
>2. I know I can download WSDL files from server using the test page. Downloaded zip file has these three wsdl files Config1_document.wsdl, Config1_TestVi_document.wsdl and main.wsdl. But which wsdl to use while consuming.
Actually all the .wsdl files are part of single WSDL document which describes your Web service. Starting/root point here is main.wsdl which references two other .wsdl. You can access any time the root WSDL part by URL like
"http://<host>:<port>/BcfRemoteCheck/Config1?wsdl&style=document&mode=standard".
Hope you know where to see the WSDL URL (in Webservice Navigator or in Single Service Administration where you downloaded the ZIP).
When you are consuming web-service you need all the parts. Usually when a Web-service is consumed the remote WSDL is used for generation of WS Client Proxy. But, the WSDL files can be also downloaded and used locally for generation of the WS Client Proxy.
Sometimes the WSDL is not necessary at all for WS consuming on run-time. In the case it's used only on design-time just to know WS names, ports, operations, etc, for writing the code of WS Client.
BR, Sergei -
Consume Web Service in EJB Application
Hi Experts,
I have EJB Application with some Java Classes.My Requirement is to Consume Web Service in EJB Application.
I am new to EJB Application.Please share if have any ideas regarding the same.
Thanks & Regards,
SatheshKumar RHi Vijay,
Thanks for the Reply.
Please provide the JAR Files i need to add.
I had tried to consume the web service by using the java class in Java Project ie EJB.
After creating the Project i will import the WSDL file in that Project and create the Client Application.
The Request and Response java class is created by importing the WSDL file.
The Client Java Class is created to access the Request and Response objects.
After this Main class is created and I have run the application to execute the Client Java Class. During this time its shows some error.
The Error Message are:
Exception in thread "main" java.lang.NoClassDefFoundError: com/sap/engine/interfaces/sca/logtrace/CallEntry$TraceLevel
at com.sap.engine.services.webservices.espbase.client.bindings.ConfigurationUtil.getTransportBinding(ConfigurationUtil.java:249)
at com.sap.engine.services.webservices.espbase.client.bindings.ConfigurationUtil.createClientConfiguration(ConfigurationUtil.java:109)
at com.sap.engine.services.webservices.espbase.client.jaxws.metadata.InterfaceMetadata.createClientConfigurationContext(InterfaceMetadata.java:178)
at com.sap.engine.services.webservices.espbase.client.jaxws.metadata.InterfaceMetadata.getProxy(InterfaceMetadata.java:70)
at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.getPort(SAPServiceDelegate.java:258)
at javax.xml.ws.Service.getPort(Service.java:92)
at com.sap.tutorial.testwebser1ejb.TestAddService.getTestAddPort(TestAddService.java:38)
at com.sap.tutorial.testwebser1ejb.TestAddClient.testAdd(TestAddClient.java:12)
at com.sap.tutorial.testwebser1ejb.MainClass.main(MainClass.java:12)
Caused by: java.lang.ClassNotFoundException: com.sap.engine.interfaces.sca.logtrace.CallEntry$TraceLevel
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
... 9 more
Thanks & Regards,
SatheshKumar R
Maybe you are looking for
-
Hom System Copy- Error running J2ee migration tool kit
Good Day Guys, Im performing homogenous system copy.I have encountered below error: INFO 2008-10-20 13:05:33 Output of C:\j2sdk1.4.2_18-x64\bin\java.exe -classpath D:/usr/sap/LE1/SYS/global/sltools/sharedlib/launcher .jar;. com.sap.engine.offline.Off
-
Also due to the implementation
Even though e-commerce has brought a large amount of benefits to the user, it also poses a series of disadvantages. Hackers can gain access to sensitive information when these online transactions are made. In addition to the losses sustained by the u
-
HT201401 no music audio through headset when connecting to car or stereo
hello, Im not getting any music audio through the headset when connecting to my car or stereo I can hear iPhone noises though. I'm not having the same problem with iPhone earphones but dont think its lead compatability as both leads have worked fine
-
House Numbers using Map Builder
Hi everyone! I am using Oracle Map Builder (ver. 11.1.1.0.0) in order to draw house numbers along streets, using 20% and 80% offset along the street axis for the "from" and "to" numbering, respectively, and 20% and -20% offset vertically to the stree
-
can you help me with this? Exit Code: 7 Please see specific errors and warnings below for troubleshooting. For example, ERROR: DW050 ... -------------------------------------- Summary -------------------------------------- - 0 fatal error(s), 39 err