How to consume service made in java in Multi-device hybrid App
I'm doing a project in the newly launched Multi-Device Hybrid App and I need to consume existing wsdl services made in java. But I'm not able to find the way to add the service reference as can be done in other project types. Please Enlighten me.
Hi MaGirl,
This forum is for questions about Visual Studio Integrate, yours seems to be irrelevant。 Please elaborate with detailed information:
1. What kind of project? Winform, WPF, ASP.NET or VS extensibility projects?
2. What language? C#, VB.NET, C++ or?
3. What kind of wsdl? Does svcutil.exe work for you to generate a proxy client class?
4. What error message did you get?
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.
Similar Messages
-
How to consume web service in Agentry in SMP 3.0
Dear All , I am using web service in Agentry to retrive data but could not able to fetch it . I have made connection with HTTP-XML for consuming webservices. and also give proper information in Agentry.ini files Ex : [HTTPXML-2] name=HTTP-XML Back End authenticationCertificateStore=MY authenticationCertificateStorePassword= authenticationCertificateStorePasswordEncoded=false autoDequote=true ;baseURL=http://localhost:81 baseURL=http://sapes1.sapdevcenter.com:8080/sap/opu/odata/iwbep/gwdemo/ basicAuthenticationPassword=123456 basicAuthenticationPasswordEncoded=false basicAuthenticationUserID=P1466405733 constantsFile=httpxml_sd.ini enableAuthentication=false enablePreviousUserAuthentication=false httpConnectTimeout=300 httpReceiveTimeout=300 httpResolveTimeout=300 httpSendTimeout=300 listenOn= timeout=300 timeZoneName= useSSL=false xmlAllowXSLTScript=true xmlNamespaces= xmlResolveExternals=true xmlValidateOnParse=true for more information i have attached agentry XML screen shot as well . Can you please guide me how to consume web services in Agentry correct way ? Note : Currently i am using standard netweaver demo web services . Thanks & Regards , Kunal Varaiya
Tags edited by: Michael ApplebyThe XML Steps URL will be added to the Agentry.ini BaseURL. So you dont' need the full URL on the step.
So when Agentry Runs the step to call the backend it will go:
<BaseURL>/<Step's URL>
This way if you need to change the base URL, IE, going from Dev to QA to Production Server you only need to change the Base, and not go into every step and update it.
URL: This attribute contains the URL to which the Agentry Server will make a request. This value will be appended to the value configured as the base URL for the HTTP-XML system connection. This base URL is configured within the HTTP-XML system connection configuration options for the Agentry Server. Proper use of both this base URL option and the URL entered in the requests of the step definitions can support portability for the application, with the base URL being the implementation-specific portion and the step’s URL being the portion not likely to change for the same back end system from one implementation to the next.
http://help.sap.com/saphelp_smp303sdk/helpdata/en/7c/143d5d70061014b323be16eb0b0a77/frameset.htm
Stephen -
How to consume a web service provided by third party system from SAP system
Hi Friends,
Could any of you provide me a clear picture on how to consume a web service from SAP system and is provided by a third party system?
Do we get an URL to create a client proxy for consuming the web service?
Thanx in advance,
RamHi Ram,
of course you cannot supply the WSDL URL. Inside the WSDL (just view it in your browser) you find (usually but not necessary) towards the end something like
<soap:address location="http://www.weather.gov/forecasts/xml/SOAP_server/ndfdXMLserver.php"/>
which is the actual adress of the service.
An example service can be found here:
<a href="http://www.weather.gov/xml/">National Digital Forecast Database</a>
containing the WSDL URL at
<a href="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl">this address</a>.
You might also want to browse for the amazon webservices which allow you to embed queries against amazon into your application.
have fun,
anton -
XML Deserialization error while consuming Enterprise service in wd java..
Hello,
I am trying to build 2 webdynpro java webdynpro applications which consumes enterprise service for purchase order and another application for Busines partner.
While i was able to successfully consume the PO service in webdynpro java and get the desired output for PO..i get XML Deserialization error while running appliation for Business Partner..
These are the details/steps i followed for the Business Partner application:
1. After creating the model using the enterprise service, i created a service controller from the model to the component controller..
2. Out of many inputs/output attributes during mapping from model to component controller. i further mapped the context from CC to ViewC.
3. In the wdDoInit() method, i added the follwing code:
BPCreate model1 = new BPCreate();
Request_BusinessPartnerERPCreateRequestConfirmation_In RequestC = new Request_BusinessPartnerERPCreateRequestConfirmation_In(model1);
BPERPCrteReqMsg_S CreateMessage = new BPERPCrteReqMsg_S(model1);
BPERPCrteReq_SBP Cpartner = new BPERPCrteReq_SBP(model1);
String Category = new String();
String lf = new String();
Cpartner.setInternalID(new String());
Cpartner.setNumberRangeIntervalBusinessPartnerGroupCode(new String());
Cpartner.setLifeCycleStatusCode(lf);
Cpartner.setCategoryCode(Category);
CreateMessage.setBusinessPartner(Cpartner);
RequestC.setBusinessPartnerERPCreateRequestMessage_Sync(CreateMessage);
wdContext.nodeBusinessPartnerERPCreateRequestMessage_Sync().bind(CreateMessage);
4. When i comment this code and run the application, the aplication comes up but the input fields are non-editable..
5. If i place this code in wdDoInit() method, i get the Deserialization error..
Any idea about why this error occurs and which areas in the application can lead to these errors?
I checked that the service runs fine in soamanager.
Thanks, JVRHi Kishore,
This error is majorly because while executing this Webdynpro application you are not entering all the mandatory fileds of WS.
Please try to execute this WS from WS-Navigator, check which fileds are mandatory and then
appropriately instantiate it in wdDoInit and pass all the fields required.
Regards,
Vaibhav Modi. -
How to consume Web Service in ABAP WebDynpro
Hi
I want to know the entire details about how to consume Web Service in WebDynpro application.
regards
PiyushhI piyush,
Have a look at this Blog by Thomas Jung.
/people/thomas.jung/blog/2007/12/17/consuming-services-with-abap
on consuming webservies thru webdynpro ABAP
Cheers
Mary -
Access "Business Intelligence Consumer Services (BICS)" over WebDynpro Java
Dear all
I have to access the SAP BI from WebDynpro Java.
At the moment I do this over the BI-JAVA-SDK which has unfortunately no integration with the BEx-QueryDesigner.
Therefore my question:
1. Is it possible to access the SAP BI over the "Business Intelligence Consumer Services (BICS)"? And if yes, where can I find the corresponding documentation? (I have not found it by myself)
2. What is your preferred way to get data from the SAP BI in WebDynpro Java?
Greetings
RolfHi
Did you solve problem with number 1?
Aleksander -
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 -
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 -
How to consume SOA service in SSRS
0
Hi,
I am working on SSRS.I deployed my application in reporting server 2012 R2.I am having only RDL files and HTML file.Through HTMl with parameters i am calling RDL files.
Now i need to consume SOA service for the live data.Please help me how to consume SOA service in SSRS.
Thanks,
VijayHi RSingh,
Thanks for your help and could you please let me know how exactly we need to consume SOA service.
In my datset Query part i am having the Query like this
<Query>
<Method Name="" Namespace="http://tempuri.org/">
<Parameters>
<Parameter Name=""></Parameter>
</Parameters>
</Method>
<SoapAction>
</SoapAction>
</Query>
Is this the way of consuming SOA??.Please let me know on this.
Thanks,
vijay -
How to consume OData service in sapui5
hi,
how to consume Odata service in sapui5 (table).
If any idea please share with me.i tryed but some error comes:-
Failed to load resource: the server responded with a status of 401 (Unauthorized) https://xxxxxxxxxxxxxx.com/sap/opu/odata/sap/Z_BANK/$metadata
Failed to load resource: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:55176' is therefore not allowed access. -
How to consume web service in interactive forms?
Does anyone knows how to consume the web services in Interactive forms?
Where my interactive forms is created using SAP Netweaver and my web services is created using myEclipse?
Your help wil be greatly appreciated...and i would not be stingy with the points i award as long as it is useful to me..
thanks...Check this
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f09cf040-237b-2a10-54bb-bbcbf2d48639
Regards,Anilkumar -
How to Consume web service in Adobe live cycle
Hi Experts,
I created a web service from FM and trying to consume that in Adobe live cycle. My problem is:
1. I don't know how can I test this webservice layout?
Could you please provide me the steps on how to consume it properly and how to test it becuase for me its not giving any response back.
I will appreciate if you can send a step by step document at tyagi.sandeep10atgmaildotcom
Regards,
Sandeep
Edited by: sandeep tyagi on Oct 16, 2008 1:36 AM
Edited by: sandeep tyagi on Oct 16, 2008 1:37 AMHi Sandeep,
Please go through this pdf. It will help you to integrate web service in adobe form.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/148ec26e-0c01-0010-e488-decaafae3b26
Thanks & Regards
Sagar Ingalwar
Edited by: Sagar Ingalwar on Oct 24, 2008 9:29 AM -
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 invoke a proxy service from a java client
Hi all,
how could I invoke a proxy service from a java client ?
The proxy service type is 'any xml service' with http protocol.
For a proxy with web service type I can export the related WSDL and generate the java client source.
With 'any xml service' there is no associated wsdl and I'm wondering how to do that.
Thanks
ferpHi Ferp,
I used ClientGEN to generate client files from WSDL deployed in ALSB. You can also use Axis for client file generation.
You need to know the WSDL URL. Generate Client files from WSDL URL.
Sample ANT Script
<project name="simple-web" default="mytask" basedir=".">
<taskdef name="clientgen" classname="weblogic.wsee.tools.anttasks.ClientGenTask" classpath="C:\bea92\weblogic92\server\lib\weblogic.jar"/>
<target name="mytask" description="Generate web service client">
<clientgen wsdl="http://<hostname>:<port>/URL?WSDL"
destDir="src"
packageName="com.client.mytask"
classpath="${java.class.path}" />
</target>
</project>
Use the following JAVA Code,
try {
ActivationService service = new ActivationService_Impl("http://<hostname>:<port>/url?WSDL");
client = service.getActivationServicePort();
} catch (Exception ex) {
// Handle Exception
client.activateNumber();
Let me know if you need any more information.
Thanks,
Suman. -
[Best practice] How to call a service from custom Java code
Hi all,
I'm wondering what the best method is to call a standard service from custom Java code?
In a specific situation iDoc script is extended with custom functions with a custom component. There's Java code mapping to these functions that is executing these functions. The iDoc script functions are called from a workflow entry script.
In the Java code that runs when the custom iDoc functions are called, I want to call a standard Content Server service. I don't think that the m_service variable is available, so filling the binder and using m_service.executeService() probably isn't possible.
Also, if it were possible (that is, if I want to call a standard service from my own custom service Java code), what would then be the best method to do so?
Regards, StijnHi Sapan,
Let me explain a bit further.
I'm an UCM consultant trying to solve a problem that occured at a client when they installed the CS10gR35CoreUpdateBundle.
Content items are entered into a Workflow when they are checked in. Part of one of the entry scripts of the a workflow step is that related content to the content item in the workflow is (re)submitted for conversion.
To achive this, a custom component provides an iDoc script extension. This iDoc function (resubmitForConversion) is implemented in Java (the class extends ScriptExtensionsAdaptor).
In this Java method, first the related content items are fetched. Then the service RESUBMIT_FOR_CONVERSION should be called for all dID's in of the related content.
Thus, at a certain point in the custom Java code, a native Content Server service must be called. Of course the class of this Java code does not extend the Service class, so the m_service object isn't available.
The thing is: before installed the 10gR35CoreUpdateBundle everything worked OK. This code was used to execute the service:
Workspace workspace = CommonUtils.getSystemWorkspace();
String cmd = binder.getLocal("IdcService");
if (cmd == null) throw new DataException("!csIdcServiceMissing");
ServiceData serviceData = ServiceManager.getFullService(cmd);
if (serviceData == null) throw new DataException(LocaleUtils.encodeMessage("!csNoServiceDefined", null, cmd));
Service service = ServiceManager.createService(serviceData.m_classID, workspace, null, binder, serviceData);
UserData fullUserData = CommonUtils.getFullUserData(userName, service);
service.setUserData(fullUserData);
binder.m_environment.put("REMOTE_USER", userName);
ServiceException error = null;
try {
service.setSendFlags(true, true);
service.initDelegatedObjects();
service.globalSecurityCheck();
service.preActions();
service.doActions();
service.postActions();
service.updateSubjectInformation(true);
service.updateTopicInformation(binder);
} catch (ServiceException e) {
error = e;
} finally {
service.cleanUp(true);
if (!CommonUtils.isWorkspaceConnectionInTransaction(workspace)) {
workspace.releaseConnection();
}the first problem was that the CS began to complain that a transaction was started within another transaction. So I suspect that the 10gR35 update wrapped a transaction around a workflow script entry.
With some decompiling I figured out how a service is called from iDoc with the <$executeService()$> command. So I replaced the code above with:
String cmd = binder.getLocal("IdcService");
ServiceData serviceData = ServiceManager.getFullService(cmd);
if (serviceData == null) throw new DataException(LocaleUtils.encodeMessage("!csNoServiceDefined", null, cmd));
Workspace workspace = CommonUtils.getSystemWorkspace();
Service service = ServiceManager.createService(serviceData.m_classID, workspace, null, binder, serviceData);
UserData fullUserData = CommonUtils.getFullUserData(userName, service);
service.setUserData(fullUserData);
binder.m_environment.put("REMOTE_USER", userName);
service.initDelegatedObjects();
service.executeSafeServiceInNewContext(cmd, true);This solved the transaction problem but introduces another problem: !csUnableToResubmitItem,(null)!csIllegalScriptAccess,RESUBMIT_FOR_CONVERSION
The Service Reference Guide says that the access level for RESUBMIT_FOR_CONVERION is 33 (Read, Scriptable). However, in shared/config/resources/std_services.htm the access level is specified as 2 (write).
Thus, my question still is:
What is the best method to call a standard Content Server service from any Java code (so without extending the Service class, or having the m_service object available)?
Maybe you are looking for
-
HT204053 Transfer purchased song
How do I transfer songs from one iTunes account to another on the same device?
-
Spry Photo Gallery "Controls" Hi Don Booth, David Powers, Kinblas et al, Thank you all for your commitment, and I hope Spry isnt dead?! I am years behind but I antē d up for the CS4 Master Collection at the beginning of the year and have been plow
-
Error"XI Error CLIENT_RECEIVE_FAILED.INTERNAL: Queue sto" in SMQ2
Hi, When i am trying to test my JDBC to ABAP Server proxy i am getting the error(XI Error CLIENT_RECEIVE_FAILED.INTERNAL: Queue sto) in SMQ2 please advice me what could be the problem? Regards, Bhoj
-
I have a project with servlets in the 2 following folders myprojects and myclasses In my projects I have the helloProject and inside it I have the helloHtml folder and the helloPackage. So in the helloHtml folder I have the hello.html file and in the
-
Finder: "Devices" vs. "Places." Why are the programs different?
I'm perpetually perplexed by the way the the same applications work differently under "Devices" and under "Places" when accessed from the "Finder." For example, often when I access a program like iPhoto from the Finder and click on it, it will appear