How to use generic webservice methods in java
Hi,
I am working on jdk1.5 and axis web service client version 1.3.
I am calling webservice which developed in wcf service using .net ,Extesion like .svc?asmx
input of webservice method is generic like list<IEmployee>
When i try to call in cleint side , it is showing like object[] array.
but it has to show like list<object>
May i know solution for this.
Thanks,
Murali
Hi konanki,
Web services are using SOAP as protocol and SOAP has been designed for interoperability between computers installed with different platforms : Java, .Net, PHP, ...
As List<IEmployee> or List<Object> are specific to Java language, they are translated in a way understandable for other platforms. Just have a look to your WSDL file.
Similar Messages
-
How to call SAP Webservice in standalone java program
Hi,
In our Java application, we want to use the SAP Webservices. I dont know much about authentication mechanism used by SAP. Can any one please help me with any sample code how to Call SAP webservice in Standalone Jave Program. I searched alot on the web regarding this, but helpless. Please help me.
Thanks,
MohanHi Mohan,
You need an account for the ES Workplace. I'm afraid this is not free, e.g. check [SAP NetWeaver, Composition Subscription|https://www.sdn.sap.com/irj/sdn/subscriptions/composition].
But I thought you wanted to play with a WSDL [you already had at hand|Sample code to access BAPI Web services from JAVA required;? -
How to use a webservice in JSPDyn page
hai,
I have created one webservices but i donot how to use that webservices in JSPDyn page.
can anyone give solution for this problem
Rds
ShanthakumarCheck out the Axis user's guide at: http://ws.apache.org/axis/java/user-guide.html
-
How to use This webservice in PHP ?
Hello.
I'm trying to use this webservice in PHP but there isn't a documentation or something that can help me.
I have this function, and she returns to me a sessionID :
function wslogin() {
global $crmdomain;
$url = $crmdomain . "/Services/Integration?command=login";
$page = "/Services/Integration?command=login";
$headers = array(
"GET ".$page." HTTP/1.0",
"UserName: *****",
"Password: *****",
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_HEADER, true);
$data = curl_exec($ch);
if (!curl_errno($ch)) {
// Show me the result
$sessionid = substr($data,(strpos($data,"Set-Cookie:")+23),(strpos($data,";")-strpos($data,"Set-Cookie:")-23));
curl_close($ch);
return $sessionid;
Now, i want to retrieve for example an user... i need to get an user, set an user (insert or update), check if a user exist or not...
I have test this :
function getContactInfo ($contactid,$sessionid) {
global $crmdomain;
$serverpath = $crmdomain . "/Services/Integration;jsessionid=$sessionid";
$namespace= "urn:crmondemand/ws/contact/10/2004";
$soapaction = "document/urn:crmondemand/ws/contact/10/2004:ContactQueryPage";
$param = "<ListOfContact>
<Contact>
<IntegrationId>='$contactid'</IntegrationId>
<MrMrs/>
<ContactFirstName/>
<ContactLastName/>
<JobTitle/>
<Department/>
<AccountName/>
<AccountId/>
<PrimaryAddress/>
<PrimaryCity/>
<PrimaryZipCode/>
<PrimaryCounty/>
<PrimaryCountry/>
<AlternateAddress1/>
<AlternateAddress2/>
<AlternateAddress3/>
<AlternateCity/>
<AlternateZipCode/>
<AlternateCounty/>
<AlternateCountry/>
<ContactEmail/>
<WorkPhone/>
<WorkFax/>
<CellularPhone/>
</Contact>
</ListOfContact>
$method = "ContactWS_ContactQueryPage_Input";
$response = getwsresponse($serverpath,$namespace,$soapaction,$method,$param,$debug);
return $response;
function getwsresponse($serverpath,$namespace,$soapaction,$method,$param,$headers=""){
require_once('nusoap-0.9.5/lib/nusoap.php');
$client = new nusoap_client($serverpath, array('trace' => 1));
if($headers != ""){
$client->setHeaders("$headers");
$response = $client->call($method,$param,$namespace,$soapaction);
return $response;
But when i check : var_dump(getContactInfo("Integrationd",wslogin())); i have always false...
I have no idea how to use this webservice. Can you help me ?
Thanks !
Edited by: 990614 on 27 févr. 2013 00:29Perhaps a shorter example would be more appropriate to ask about.
Use bbcode code tag http://www.phpbb.com/phpBB/faq.php?mode=bbcode#5 to enclose code.
-- cj -
How to deprecate my own method in java
How to deprecate my own method in java, so that my compiler gives a warning when i use a deprecated method?
Mark it as deprecated as specified in the javadoc guide, (available on this site). You deserve an RTFM but I'm feeling nice today ;->
-
How to use my findTheHighest method to find the highest value in my two dim
I am going to create a 13row by 10 colume two dimensional array.
how to use my findTheHighest method to find the highest value in my two dimensional array.
.When i compile this program , i got those as following;
"Exception in thread "main" java.lang.ArrayIndexOutOfBoundsExce
at TaxEvolution.findTheHighest(TaxEvolution.java:31)
at TaxEvolutionClient.main(TaxEvolutionClient.java:25)"
public class TaxEvolution{
public double[][] salesTaxRates;
public TaxEvolution()
salesTaxRates = new double[13][10];
fillProvinTaxRates();
private void fillProvinTaxRates()
for ( int row = 0; row < salesTaxRates.length; row++ )
for ( int column = 0; column < salesTaxRates[row].length; column++ )
salesTaxRates[row][column]= (int)(Math.random()*5000) + 1;
public double findTheHighest()
double highest = salesTaxRates[0][0];
for ( int row = 0; row <= salesTaxRates.length; row++ )
for ( int column = 0; column <= salesTaxRates[row].length; column++ )
if ( salesTaxRates[row][column] >= highest )
highest = salesTaxRates[row][column];
return highest;
public double[][] arrayTaxEvolution()
double[][] returnTaxRates = new double[13][10];
for ( int row = 0; row < salesTaxRates.length; row++ )
for ( int column = 0; column < salesTaxRates[row].length; column++ )
returnTaxRates = salesTaxRates;
return returnTaxRates;
public class TaxEvolutionClient{
public static void main( String[] args ){
TaxEvolution protaxRateList = new TaxEvolution();
double[][] taxRateList = protaxRateList.arrayTaxEvolution();
for ( int i = 0; i < taxRateList.length; i++ )
for ( int j = 0; j < taxRateList[0].length; j++ )
System.out.print( taxRateList[i][j] + "\t" );
System.out.print( protaxRateList.findTheHighest + "\t" );
}Multiposted
http://forum.java.sun.com/thread.jspa?threadID=699057&tstart=0 -
How to call backing bean method from java script
Hi,
I would like to know how to call backing bean method from java script.
I am aware of serverListener and [AjaxAutoSuggest article|http://www.oracle.com/technology/products/jdev/tips/mills/AjaxAutoSuggest/AjaxAutoSuggest.html]
but i am running in to some issues with [AjaxAutoSuggest article|http://www.oracle.com/technology/products/jdev/tips/mills/AjaxAutoSuggest/AjaxAutoSuggest.html]
regarding which i asked for help in other thread with subject ....Question on AjaxAutoSuggest article (Ajax Transactions Using ADF and J...)
The reason why i posted is ( though i realise both are duplicates) .. that threads looks as a specific question to that article hence i would like to ask the quantified problem is asked in this thread.
So could any please letme know how to call backing bean method from java script
Thanks
Murali
Edited by: mchepuri on Oct 24, 2009 6:17 PM
Edited by: mchepuri on Oct 24, 2009 6:20 PMHello,
May know how to submit a button autoamtically on onload of page with clicking a welcome alert box. the submit button has managed button too to show a message on console using SOP.
the problem is.
1. before loading the page a javascript comes on which i clicked ok
2. the page gets loaded and the button is there which gets automatically clicked and the managed bean associated with prints a message on console using SOP.
I m trying to do this through server listener and click listener. the code is(adf jspx page)
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<jsp:directive.page contentType="text/html;charset=UTF-8"/>
<f:view>
<af:document id="d1" binding="#{backingBeanScope.backing_check4.d1}">
<af:form id="f1" binding="#{backingBeanScope.backing_check4.f1}">
<af:commandButton text="commandButton 1"
binding="#{backingBeanScope.backing_check4.cb1}"
id="cb1" action="#{beanCheck4.submit1}"/>
<af:clientListener type="click" method="delRow"/>
<af:serverListener type= "jsServerListener"
method="#{backingBeanScope.backing_check4.submit1}"/>
<f:facet name="metaContainer">
<af:resource type ="javascript">
x=confirm("hi");
// if(x){
delRow = function(event){
AdfCustomEvent.queue(event.getSource(), "jsServerListener", {}, false);
return true;
</af:resource>
</f:facet>
</af:form>
</af:document>
</f:view>
<!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_check4-->
</jsp:root>
the backing bean code is -----
public class classCheck4 {
public classCheck4() {
public String submit1() {
System.out.println("hello");
return null;
} -
How to use the index method for pathpoints object in illustrator through javascripts
hii...
am using Illustrator CS2 using javascripts...
how to use the index method for pathpoints object in illustrator through javascripts..Hi, what are you trying to do with path points?
CarlosCanto -
How to use the POST method In Oracle APEX 3.1
Hi,
In APEX if we are submitting the page the parameters( Variables ) will pass through URL.
How to hide the these parameters from URL??
I Hope POST method will solve this problem.
How to use the POST method in APEX???
Help me out to solve this problem.
thanks in advance.
Cheers,
ShanIn APEX if we are submitting the page the parameters( Variables ) will pass through URL.No they won't. Submission POSTs the <tt>wwv_flow</tt> form.
Sometimes a branch may be performed after submission, generating a URL in which parameter values are visible. To avoid this, use the save state before branching option.
Other actions—like using navigation lists, or clicking a link in a report—will perform a GET using parameters in the URL. In these cases using Session State Protection is advised. -
How to use the TCP/IP in Java?Thanks!
How to use the TCP/IP in Java?Thanks!
Look at the java.net package, more specifically to classes ServerSocket (The server TPC conection) and Socket (the client TCP conection)
Abraham -
How to Use Windows XP theme in Java
How to Use Windows XP theme in Java.
I am an developing application which L&F should be like Windows XP.
Because I am going use this application in different OS.
Which LookAndFeel I have to use ittry this in main:
try {UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());}
catch (Exception exc) {System.err.println("Eroare la incarcarea look & feel" + exc);} -
How to use HTML Tags in webdynpro java
Hi,
Can any body tell me how to use HTML Tags in webdynpro java.
If u provide me with sample code it will become more usefull.
Thanks & Regards,
SNHI,
Please find the steps:
Create a html file and store in your webdynpro project
Add the html contents in your file
& Create a IFRAME UI element and refer you html file
Now you able to see the html in webdynpro
Thanks & Regards,
Ram -
How to use a Webservice (deployableproxy) within a portal component?
hi,
i need to know how to use a webservice using a deployable proxy within a portal component?
i've created the proxies and they work (with servlets).
i know how to use them in servletes (context lookup, jndi mapping, application references) but i cant find a way to use them in a portal component.. tried the context lookup way but cant figure out which jndi mapping to use.
any help?
thanks in advance,
constantini've found this document:
http://help.sap.com/saphelp_nw2004s/helpdata/en/43/cb2e29578c0262e10000000a11466f/frameset.htm
but it doesn't help...
i should add a privatesharing resource...
<property name="PrivateSharingReference" value="SAPJ2EE::rh21.de/pca~wsproxy"/>
which works
this is my code
public void doContent(IPortalComponentRequest request,IPortalComponentResponse response) {
try {
Context context = new InitialContext();
WSPhonebook obj = (WSPhonebook) context.lookup("/wsclients/proxies/rh21.de/pca~wsproxy/de.rh21.wsproxy.phonebook.WSPhonebook");
WSPhonebookViDocument phonebook = (WSPhonebookViDocument) obj.getLogicalPort("Config1Port_Document", WSPhonebookViDocument.class);
} catch.....
now the lookup works (i guess, no messages about that anymore), but i catch ClassNotDefFoundError-Exceptions, but the classes are there, i can strg+click them in the editor, they are in the used dc's etc.
any help? its quite uurgent :/ -
How to use SPML Webservice.xml template in VDS(Virtual Directory Server) ?
Hiii all,
How to use SPML Webservice.xml template in VDS(Virtual Directory Server) ? In my case , i am researching and wanting to add,search,delete an user object request from Web Services Client to SPML webservice in VDS by SPML request. anybody has documents or tutorials please share to me.
ThanksHiii all,
How to use SPML Webservice.xml template in VDS(Virtual Directory Server) ? In my case , i am researching and wanting to add,search,delete an user object request from Web Services Client to SPML webservice in VDS by SPML request. anybody has documents or tutorials please share to me.
Thanks -
How to use singloeton factory methods ?
Hi Guys,
Can any one please help me like how to use singleton factory methods in oops? i am very new to OOPS concepts ?
Thanks in advancePRINTER - part2
METHOD constructor.
"initial printer cartridge fill
me->number = i_number.
me->cartridge = i_units.
me->cost = me->cartridge * 10.
ENDMETHOD.
METHOD increase_cost.
cost = cost + i_units.
ENDMETHOD.
METHOD consume_cartrigde.
cartridge = cartridge - i_units.
ENDMETHOD.
METHOD get_total_cost.
DATA lo_printer TYPE REF TO lcl_printer.
LOOP AT it_printers INTO lo_printer.
r_cost = r_cost + lo_printer->get_cost( ).
ENDLOOP.
ENDMETHOD.
METHOD get_cost.
r_cost = cost.
ENDMETHOD.
METHOD get_cartridge.
r_cartridge = cartridge.
ENDMETHOD.
METHOD get_number.
r_number = number.
ENDMETHOD.
* helper method to show current state of printers
METHOD show_printers.
DATA lv_mess TYPE string.
DATA lv_number TYPE i.
DATA lv_cartridge TYPE i.
DATA lv_cartridge_c TYPE c LENGTH 5.
DATA lv_cost TYPE i.
DATA lv_cost_c TYPE c LENGTH 5.
DATA lv_number_c TYPE c LENGTH 2.
DATA lo_printer TYPE REF TO lcl_printer.
LOOP AT it_printers INTO lo_printer.
lv_number_c = lv_number = lo_printer->get_number( ).
lv_cost_c = lv_cost = lo_printer->get_cost( ).
lv_cartridge_c = lv_cartridge = lo_printer->get_cartridge( ).
CONCATENATE lv_mess 'Printer:' lv_number_c ', cost:' lv_cost_c ', cartridge:' lv_cartridge_c
cl_abap_char_utilities=>cr_lf INTO lv_mess SEPARATED BY space.
ENDLOOP.
MESSAGE lv_mess TYPE 'I'.
ENDMETHOD.
ENDCLASS.
CLIENT
DATA go_printer TYPE REF TO lcl_printer. "printers
DATA go_job TYPE REF TO lcl_job. "job
DATA gv_mess TYPE string.
DATA: gv_number TYPE i,
gv_number_c TYPE c LENGTH 10.
SELECTION-SCREEN BEGIN OF BLOCK bl1 WITH FRAME.
PARAMETERS: pa_print TYPE i OBLIGATORY, "printer number
pa_units TYPE i DEFAULT 100. "initial printer filling
SELECTION-SCREEN PUSHBUTTON /10(15) addp USER-COMMAND fcadd VISIBLE LENGTH 15.
SELECTION-SCREEN PUSHBUTTON /10(15) refil USER-COMMAND fcref VISIBLE LENGTH 15.
SELECTION-SCREEN PUSHBUTTON /10(15) show USER-COMMAND fcshow VISIBLE LENGTH 15.
SELECTION-SCREEN PUSHBUTTON /10(15) print USER-COMMAND fcprnt VISIBLE LENGTH 15.
SELECTION-SCREEN PUSHBUTTON /10(15) total USER-COMMAND fctot VISIBLE LENGTH 15.
SELECTION-SCREEN END OF BLOCK bl1.
SELECTION-SCREEN BEGIN OF BLOCK bl2 WITH FRAME.
PARAMETERS: pa_col TYPE c1,
pa_pages TYPE i,
pa_numb TYPE i. "to which printer you want the job be send to
SELECTION-SCREEN END OF BLOCK bl2.
INITIALIZATION.
addp = 'Add printer'.
show = 'Show printers'.
print = 'Print'.
total = 'Total cost'.
refil = 'Refill'.
AT SELECTION-SCREEN.
CLEAR: gv_number, gv_number_c, gv_mess.
CASE sy-ucomm.
WHEN 'FCADD'.
go_printer = lcl_printer=>factory( i_number = pa_print
i_units = pa_units ).
WHEN 'FCSHOW'.
IF go_printer IS NOT BOUND.
MESSAGE 'Add at least one printer first' TYPE 'E'.
ELSE.
go_printer->show_printers( ).
ENDIF.
WHEN 'FCPRNT'.
IF pa_pages IS INITIAL.
MESSAGE 'Provide number of pages' TYPE 'E'.
ENDIF.
CREATE OBJECT go_job EXPORTING i_pages = pa_pages i_color = pa_col.
IF lcl_printer=>get_printer( pa_numb ) IS NOT BOUND.
gv_number_c = pa_numb.
condense gv_number_c.
CONCATENATE 'Printer' gv_number_c 'doesn`t exist, select correct one' INTO gv_mess SEPARATED BY space.
MESSAGE gv_mess TYPE 'E'.
ELSE.
go_printer->print( i_number = pa_numb
io_job = go_job ).
ENDIF.
WHEN 'FCTOT'.
IF go_printer IS BOUND.
gv_number_c = gv_number = go_printer->get_total_cost( ).
ENDIF.
CONCATENATE 'Total cost of all printers for printing and initial cartridge filling is: ' gv_number_c INTO gv_mess
SEPARATED BY space.
MESSAGE gv_mess TYPE 'I'.
WHEN 'FCREF'.
IF lcl_printer=>get_printer( pa_print ) IS NOT BOUND.
gv_number_c = pa_print.
CONCATENATE 'Printer doesn`t exist' gv_number_c INTO gv_mess SEPARATED BY space.
MESSAGE gv_mess TYPE 'E'.
ELSE.
go_printer->fill_cartridge( i_number = pa_print
i_units = pa_units ).
ENDIF.
ENDCASE.
Regards
Marcin
Maybe you are looking for
-
Getting the Portal URL in the code
Hi All, Is it possible to get the URL of the Enterprise Portal (http://<host>:<port>/irj/portal) in the web dynpro code? Actaully i am sending mails from my application to various users and need to include the URL of the Enterprise Portal in the mail
-
anyway, first i thought it may be due to Adopt Flash Player...so i did install a new update of Adopt Flash Player, but it still doesnt work at all...the game doesnt load.... usually i played Farmville by using Firefox....but now i encountered that pr
-
Xtrememusic - a sudden code 10 error after installing the newest dri
I have been using the Xtrememusic for about two years and it has no problem at all until I tried to install the newest update. It worked for about two days normally after the update before the code 0 error(this device cannot start)?appeared. I've tri
-
Image capture from itunes movie/ tv show purchases and rentals ?
I'd like to get screen grabs (preferably high quality images) from itunes movies for personal use. Is there any way to do this with Lion ? I have tried Snapz Pro already and just get the chequered grey and white image. My macbook pro does not have a
-
A new version does not appear automatically in a stack
Adjusting a raw photo use to create a stack with the new version. Any other change to the existing version would create another version. This stopped working. I checked the two entries in the Preference and there are ok. I restarted my MBP, I removed