How to avoid redeclaring your web service interface?
Hi there,
How can one avoid having to redeclare your wsdl interface on
each mxml page where it is accessed? I only want to declare the web
service and the operation is has once and then just include it in
the component where I use it to access/update data.
I am new to flex so this may be obviouse to other but not me.
I tried including it in its own mxml file and then using the normal
component include tag to include it. I get errors about not being
able to access the webservice via its id.
e.g.
Error: Access of undefined property WebService.
[mxmlc] WebService.getSiteOptions.send();
thanks
The solution is to place the web definition in a separate
file and then use the "include" like functionality of defining your
own namespace in the xml. You do the include in the main
application file.
eg
<mx:Panel
xmlns:mx="
http://www.adobe.com/2006/mxml"
xmlns:webservice="webservice.*"
width="100%"
height="100%"
title="Reports Menu"
creationComplete="onInit();" >
On the main application page to include your web service file
do a
<webservice:webservices id="services"/>
The webservices.mxml file will contain your definitions.
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="
http://www.adobe.com/2006/mxml"
height="0"
visible="false">
<mx:Script>
<![CDATA[
import mx.rpc.soap.mxml.WebService;
import mx.rpc.events.FaultEvent;
import mx.controls.Alert;
[Bindable]
public var webServiceWSDL:String ="
http://127.0.0.1:8080/jumpingbean/services/AddWebService?wsdl";
public function onServiceFault(evt:FaultEvent):void
var err:Error = new Error(evt.fault.faultCode + " , " +
evt.fault.faultString);
parentApplication.showError(err);
public function onSuccess(evt:Event):void
Alert.show(evt.toString());
]]>
</mx:Script>
<!-- ======================================== -->
<!-- Remote Services -->
<!-- ======================================== -->
<mx:WebService id="webservice"
wsdl="{this.webServiceWSDL}" service="ValueAddWebService"
port="AppWebServiceHttpPort" fault="onServiceFault(event)"
showBusyCursor="true" >
etc
In your child components you can refer to the component by
doing a "parentApplication.services.webservice"
Similar Messages
-
Hi All,
I need to develop a monitoring application for SAP system which will monitor both Host systems and instances.
For this I need to collect Host data as well as instance data. In the below links I could find the SAP netweaver
monitoring agents
Monitoring Hosts with SAPHostControl and saphostexec - Infrastructure of the SAP NetWeaver Management Agents - SAP Libra…
Central Monitoring with SAP NetWeaver Management Agents - Infrastructure of the SAP NetWeaver Management Agents - SAP Li…
Administration/Monitoring of SAP Components with sapstartsrv - Infrastructure of the SAP NetWeaver Management Agents - S…
These links tell that CCMS agent is replaced by these agents from SAP Netweaver 7.0 Eph 2.
I found below doc which explains "How to use the SAPControl Web Service Interfaces" exposed by "sapstartsrv" to execute instance specific tasks,
But it does not tells any methods/APIs/webservice interfaces specific to Host system or get OS data using "saposcol".
SAP Control WebService
Similar to this, Is there any API/webservice to retrieve the OS and Host related data??.
Also, Is there any other doc for SAPHostControl or saphostexec similar to sapstartsrv ??
Thanks,
SwapnilHi Swapnil,
I too wanted this info and came across these.
Take a look at these urls :-
http://localhost:1128/SAPHostControl/?wsdl
http://localhost:1128/SAPOscol/?wsdl
grep saphost /etc/services
saphostctrl 1128/tcp # SAPHostControl over SOAP/HTTP
saphostctrls 1129/tcp # SAPHostControl over SOAP/HTTPS
Hope this helps.
Cheers
Craig -
WLS 9.1 - How to declare datasource for web service?
If the code for a web service is generated (either a web application or ejb endpoint), how do I make sure the datasource mapping gets added to the appropriate descriptor file?
I would like to avoid having to do this manually after running the web service compiler. Can anyone help me with this?
Regards,
JoshuaJames,
Which version of Eclipse are you using? Do you have Oracle Enterprise Pack for Eclipse installed? Which version?
According to the docs, OEPE 11.1.1.6 (the latest of this post) supports WLS back to version 9.2.
http://download.oracle.com/docs/cd/E15315_05/help/oracle.eclipse.tools.common.doc/html/index.html
Make sure that you have a WLS 9.2 Server Runtime defined.
Window->Prefereces->Server->Runtime Environments
Add a BEA System, Inc WLS 9.2 server runtime and make sure it is pointing to the right place on your file system and try creating your Web Service project again.
If you still have issues, try the OEPE forum.
Enterprise Pack for Eclipse -
A problem with initiating a BPEL process through its web service interface
hi,
i am trying to initiate the helloWorld BPEL process through its web service interface. i use a proxy class that i wrote and i use it from J#.net.
this is the relevant code part:
hello.HelloWorldBinding wsProxy = new hello.HelloWorldBinding();
wsProxy.initiate("Hello");
and the server shows the following message:
ORABPEL-05002
Message handle error.
An exception occurred while attempting to process the message "com.collaxa.cube.
engine.dispatch.message.invoke.InvokeInstanceMessage"; the exception is: Cannot
decode properties.
The process domain was unable to decode the properties for message guid 10, whic
h are stored in column String index out of range: 3094; the exception reported i
s: {2}.
sql statement: SELECT conv_id, message_guid, domain_ref, process_id, revision_ta
g, operation_name, receive_date, state, priority, properties FROM invoke_message
WHERE message_guid = ?
at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(Dispatc
hHelper.java:152)
at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseSche
duledWorker.java:70)
at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java
:86)
at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDriven
BeanInvocation.java:123)
at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome
.java:755)
at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:
928)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(Relea
sableResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:534)
<2006-05-10 21:21:15,171> <ERROR> <default.collaxa.cube.engine.data> <BaseDeliveryPersistenceAdaptor::loadInvokeMetaDa
java.lang.StringIndexOutOfBoundsException: String index out of range: 3094
at java.lang.String.substring(String.java:1441)
at com.collaxa.common.util.LVDecoder.decodeElement(LVDecoder.java:152)
at com.collaxa.common.util.LVDecoder.decodeToMap(LVDecoder.java:45)
at com.collaxa.cube.engine.adaptors.common.BaseDeliveryPersistenceAdaptor.loadInvokeMetaData(BaseDeliveryPersi
r.java:2186)
at com.collaxa.cube.engine.adaptors.common.BaseDeliveryPersistenceAdaptor.__loadInvoke(BaseDeliveryPersistence
:2112)
at com.collaxa.cube.engine.adaptors.common.BaseDeliveryPersistenceAdaptor.loadInvoke(BaseDeliveryPersistenceAd
079)
at com.collaxa.cube.engine.data.DeliveryPersistenceMgr.loadInvoke(DeliveryPersistenceMgr.java:357)
at com.collaxa.cube.engine.delivery.DeliveryService.handleInvoke(DeliveryService.java:465)
at com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleInvoke(CubeDeliveryBean.java:335)
at ICubeDeliveryLocalBean_StatelessSessionBeanWrapper16.handleInvoke(ICubeDeliveryLocalBean_StatelessSessionBe
java:1796)
at com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessageHandler.handle(InvokeInstanceMessageHa
7)
at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:125)
at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:123)
at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:755)
at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:928)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:534)
what is the problem? how come i can't initiate the process?
i will be happy if i could get help..
thanks in advancecan you initate the process from the bpel console successfully?
if so can you use obtunnel from the installation to trace the soap message (that goes over the wire), my best guess in this case is a problem with a header (holding the wsa information) ..
after starting obtunnel it will liesten to a custom port, and will forward the request to the engine, so you need to point your client to this new port..
hth clemens -
EJB Web Service Interface parameters name changed
Hi, all,
I create a simple Session EJB 3.0 with Web Service interface in Jdeveloper 10.1.3.4. and I deployed it into the embedded OC4J server.
The question is I found that the web service operator parameters is changed to "String_1" (actually the parameter in EJB method is String ss). And I found the WSDL file is also String_1.
How to create the real parameter name in WSDL from EJB Web Service interface? Any help on that?
Best Regards,
Billif you do a lookup for the name "java:comp/env/ejb/queryProc" in the servlet, the deployment descriptor of your web-archive must contain an ejb-reference with the ref-name 'ejb/queryProc'.
-
Business Objects Web Service Interface for Scheduling (without Java SDK)
Task:
> use BO web service interface to schedule report generation and fetch job with generated PDF object without having to use Java (Webservice) SDK
Detailed requirements:
> get session ID : ok, session WSDL, <BO server alias>/dswsbobje/services/Session , method "session"
> schedule a specific report : in general clear, via <BO server alias>/dswsbobje/services/BIPlatform, method "schedule"
> set report format to "PDF": is that possible ? With which WSDL and method ?
> schedule right now and only once: is that possible ? With which WSDL and method ?
> can I provide a parameter value for that report ?
> does schedule response contain jobID for later fetching of completed job ?
> how to fetch scheduled job for check of completion ?
> how to check status of job concerning completion ?
> how to fetch created PDF from completed job ?
With focus on my research (have checked and tested with soapUI), WSDL interface of BO seems not to be sufficient to fullfil the upper requirements, so I have to use BO Java SDK, which is powerful enough. Am I right ? Can you provide insights how to fullfil the requirements with the web service interface ? Would make whole implementation simpler (invocation from Tibco, ESB implementation).The error you're hitting is presumably JBO-25030.
Look to the "merge" command. In the parent you specify just the key of the preexisting parent record, and then in the child you specify your new child record.
CM. -
How do I invoke a web service?
I'm new to web services... and I have to find a way to connect to the microsoft reporting services web service....
But well I don't know how to connect to a web services...
Can someone direct me to a java tutorial about invoking web services?
Please? =)
Thanks,
Renato FontesEnter the string without the quote, then try to switch to the XML view and add the quotes. This should be a workaround for simple values.
You should also be able to generate a java client from JDeveloper in a few clicks, using the Wizard. As you can generate the JUnit template for the proxy (or stub), it's usually faster to re-run your test.
If this does not work for you, can you post the WSDL so we can see if there is any reason it does not work for you.
All the best,
-Eric -
How can I create a web Service from my Web Dynpro Application ?
Hi,
Kindly let me know How I could create a "Web Service" with my Web Dynpro DC project.
Awaiting your responses.
Regards,
MaheshHi Mahesh,
You can use the web services by creating the Model in web Dynpro
And if you want to publish your own web service then you have to create a EJB module and publish as a web service.
Thanks
Ninad -
How to use WS-RM web Service from Session Bean?
Hi all.
Could you tell me the way how to call WS-RM web service(Staring BPM Process) from SessionBean?
Our environment: SAP NetWeaver CE 7.2 SP3
I do the following.
I have created a BPM Process starting with Message Start Event.
This Message Start Event was created by Service Interface(stateless and asynchronous) which was imported from ESR.
I deployed this into my server and it worked fine in webservice navigator as a WS-RM WebService.
But I can't call this webservice from SessionBean in EJBExplorer.
I get the following error message:
Caused by: This exception is wrapper of javax.xml.ws.soap.SOAPFaultException. com.sap.engine.services.webservices.espba
se.client.bindings.exceptions.SOAPFaultException: Invalid WS-RM message. There are no WS-RM headers within SOAP message.
at com.sap.engine.services.webservices.espbase.client.bindings.impl.JAXWSUtil.processFault(JAXWSUtil.java:412)
at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.call_SOAP(SOAPTransportBinding.java:1366)
at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.callWOLogging(SOAPTransportBinding.java:960)
at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.call(SOAPTransportBinding.java:915)
at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.processTransportBindingCall(WSInvocationHandler.java:168)
at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invokeSEISyncMethod(WSInvocationHandler.java:121)
at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invokeSEIMethod(WSInvocationHandler.java:84)
at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invoke(WSInvocationHandler.java:65)
at $Proxy2753.zwsvCheckOrderdataMainprocessStart(Unknown Source)
at jp.co.ogis_ri.WSTestSessionBean.exeWS(WSTestSessionBean.java:81)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
I created this SessionBean as follows:
I created DCs for EJB and created SessionBean in EJB DC.
I imported a WSDL file(WS-RM web service) from Service Registory and
I created service clients and Service References.
After that I implemented SessionBean to call web service checking with this help.
http://help.sap.com/saphelp_nwce72/helpdata/en/44/4d2bb1c6b00597e10000000a155369/frameset.htm
After deploying this EJB,I configured properties in nwa.
Thanks
YuichiYuichi
Did you manage to solve this? I'm doing something similar and seeing the same problem, although they're up to 7.3 SP7.
Any help greatly appreciated.
Lewis -
How to create a new web service project of Weblogic 9.2 on Eclise ?
Dear experts,
I have to use weblogic server 9.2.2 and eclipse as my developing environment.
But when I execute eclipse->File->New->Project->WebLogic Web Services->Web Service Project.
I can't see the choice for weblogic server 9.x in the Target runtime field.
Even I download the additional server adapters, the oldest version is Oracle WebLogic Server 10gR3 (newer than 9.x).
So, how can I create a weblogic server9.x web server project on eclipse ?
Thanks,
James TungJames,
Which version of Eclipse are you using? Do you have Oracle Enterprise Pack for Eclipse installed? Which version?
According to the docs, OEPE 11.1.1.6 (the latest of this post) supports WLS back to version 9.2.
http://download.oracle.com/docs/cd/E15315_05/help/oracle.eclipse.tools.common.doc/html/index.html
Make sure that you have a WLS 9.2 Server Runtime defined.
Window->Prefereces->Server->Runtime Environments
Add a BEA System, Inc WLS 9.2 server runtime and make sure it is pointing to the right place on your file system and try creating your Web Service project again.
If you still have issues, try the OEPE forum.
Enterprise Pack for Eclipse -
How to Remove & Re-Enable Web Services on LaserJet printers supporting ePrint
If your LaserJet printer has been disconnected from or failed to connect to Web Services, you may need to power cycle your printer to reconnect. If that does not resolve the problem, you can remove web services, wait 30 seconds, then re-enable web services to re-establish your connection to ePrint and Print Apps. Note: this last step will result in a new email address being assigned to your printer.
How do I remove HP Web Services for my LaserJet printer?
Print a configuration page from your product, and locate the IP address.
At your computer, open a Web browser and type the product IP address into the address line and press Enter. The HP Embedded Web Server opens.
Click the HP Web Services tab.
Select the option to disable Web Services.
How do I enable or re-enable HP Web Services for my LaserJet printer?
To use HP ePrint, you must first enable HP Web Services. Re-Enabling Web Services uses the same procedure as enabling the Web Services.
Print a configuration page from your product, and locate the IP address.
At your computer, open a Web browser and type the product IP address into the address line and press Enter. The HP Embedded Web Server opens.
Click the HP Web Services tab.
Select the option to enable Web Services.
When Web Services are enabled, ePrint information appears in the HP Embedded Web Server. Look for the e-mail address that is automatically assigned to the product. The product also prints an HP Web Services information sheet that contains this e-mail address and instructions
If you were unable to register your printer in www.hpeprintcenter.com within 24 hours of printing your information sheet, you must re-enable the printer code by reprinting your information sheet. The information sheet will also provide your email address if you have forgotten it.
How do I print the Web Services Information Sheet for my LaserJet printer?
You can only add the printer to your HP ePrintCenter account within 24 hours after printing the information sheet. You can re-print the information sheet at any time from the printer control panel.
Print a configuration page from your product, and locate the IP address.
At your computer, open a Web browser and type the product IP address into the address line. The HP Embedded Web Server opens.
Click the HP Web Services tab.
Click the Print Information Sheet button.
I am an HP employee.To help improve the organization and information sharing in this forum this post/discussion has been closed and replaced.
Please see this post: <link to new “Enable Disable Web Services on your printer” post.
If after reviewing the post above you still have questions/issues with your web-connected printer, you can either review and comment in existing posts in this forum that report issues like yours, or if necessary start a new post requesting assistance.
Miles
HP Employee -
How to deploy my own web services to the Start BPEL PM Server?
Recently, I am learning the JDeveloper BPEL Designer(version 10.1.2.0), I had finished my first BPEL process CreditFlow flowing the quickstart guider.
Now I wonder how to deploy my own web services to the Start BPEL PM Server? I mean I don't want to invoke the CreditRatingService as I did flowing the quickstart guider, but to invoke my own web servcies. Now I had made some web services with eclipse and deployed them to the tomcat5.0. but how can I invoke these my own web services just like I invoked the CreditRatingService in the JDeveloper BPEL Designer?
Thank you!Copy the WSDL file from your Tomcat server onto your development machine. Add them to your project in JDeveloper. Then add a partnerlink and specify the WSDL location. Then add you role, variables and compile!
-
How to switch off ni web services
I enabled the NIweb services by checking "Enable Web Server" in Tools/Options/Web Server: Configuration. As I do not need this functionality I disabled the feature, but still my compiled applications create a "niwebserver.conf" file causing a runtime error. How can I disable the Web Services function?
Andreas LHi Andreas,
Exit LabVIEW. Rename your labview.ini file to something (to back it up). Ensure that there is no labview.ini file beside labview.exe. Now launch LabVIEW. If you are still getting an error, the error is not due to web services. We'll require more information to solve the problem.
If the problem persist, please try repairing the LabVIEW installation. -
How to overload method in web services ?
hi all !
how can i overload a web services method ? , i hear about using javax.xml.ws.RequestWrapper , but when i try to use wsimport , it say : error dupplicate method.
this is the sample from forum :
package my.ws;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.ResponseWrapper;
@WebService
//(name="HelloWS", serviceName="HelloWSService")
public class Hello {
* Web service operation
@WebMethod
@RequestWrapper(className = "com.veera.Clac.CalculatorRequest", targetNamespace = "http://Calc.veera.com/")
@ResponseWrapper(className = "com.veera.Clac.CalculatorResponse", targetNamespace = "http://Calc.veera.com/")
public int add(@WebParam(name = "a")
int a, @WebParam(name = "b")
int b) {
// TODO implement operation
return 0;
* Web service operation
@WebMethod
@RequestWrapper(className = "com.veera.Clac.CalculatorOverloadRequest", targetNamespace = "http://CalcOverLoad.veera.com/")
@ResponseWrapper(className = "com.veera.Clac.CalculatorOverloadResponse", targetNamespace = "http://CalcOverLoad.veera.com/")
public String add(@WebParam(name = "v")
String v) {
// TODO implement operation
return "Veera";
}thanksHi, Eric,
Thank you for your quick reply.
The web service I am trying to develop is basically a generic Data Access Component to bridge between SQL server and a desktop .Net application. The application will have about 3000 users from WAN, therefore we want to have a server side component to handle connection pooling etc. Because of limitation of current servers, we are asked to develop a Java Web Service, instead of MS WS.
To make the component more reusable, I am thinking to have methods like this in the service:
RunQueryReturnRS(String Sql, WebRowSet, rs)
RunQueryReturnInt(String Sql, int NumRecdImpacted)
RunStoredProcedureReturnRS(â¦.)
RunStoredProcedureReturnInt(â¦.)
â¦â¦
You see, I would like to get whole resultset back to client, including both metadata and data in a format of generic resultset. When I paged through the Sunâs document, finding WebRowSet is claimed to be seariable, and ready for Web Service. I thought if I can use WebRowSet that will save me time to write new classes to hold resultset info and pass back to client.
Could you please tell me if it is a feasible approach?
Thank you.
-Qing -
How to Create and Deploy Web Services Using Oracle 9i JDeveloper
Hi,
My Question is how to create and deploy Web Services using Oracle 9i JDeveloper.Anybody please give me a detailed Reply.Please Reply to [email protected]
Hopr to Hear From you,
Regards,
G SreekumarYou could use datasources. You should do this in your BC4J Configuration. Then when deploying your applicaiton use the command -installDataSource (from admin.jar) to create the right datasource.
You could probably use the name of your connection + "DS" so you can also use it locally in JDeveloper as JDev seesm to create this automaticly for your Connections.
Maybe you are looking for
-
I'd like to have my playlists sorted by Album by Artist/Year when exporting, but I can't figure out how to do it.
-
Two versions of XSD with same namespace in one project
I'm working with a two very large version of the same set of XSDs. For some uses I need to use the old version for other the new ones. They use the exact same namespace. So when I include them in the same project there is overlap and conflicts. The s
-
What are the best export settings to use in Premiere for the best quality video in Presenter. The video was shot on miniDV (720x480). We want to use the Presenter output through a video projector for standup training, then put the show on the Interne
-
I would like to burn a DVD direct from a Quick Time movie that I created in iMovie, without going through the iDVD process of creating a project, selecting a theme, etc. The movie is in .mov format. Is there a way to do this? I simply want to burn t
-
Tried reinstalling, rebooting and updating grafic drivers several of times. Nothing seems to work... Can't enter anything when it look's like this, and can't see or read what the different fields are. Please help! System info: HP Compaq 8510p with 12