[ALBPM-5.7] - How to use the result of a invoked web service?
Using PBL I wrote the following piece of code:
........some rows........
request as Ex1_WebServices.Ph.GetSuperiorRequest2
response as Ex1_WebServices.Ph.GetSuperiorResponse2
lm as MyPrj.LineManager
request.alias = "danieas"
getSuperior PeopleHierarchyNavigatorService
using getSuperiorRequest = request
returning response = superiorResponse
if response is not null then
lm.firstname = String(response.people.person.firstname)
lm.lastname = String(response.people.person.lastname)
else
logMessage "response is null" using severity = DEBUG
end
the service is correctly called and the right answer is received:
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header />
<SOAP-ENV:Body>
<tns:people xmlns:tns="http://ws1.example.com">
<tns:person>
<tns:deptNumber>1111111111111</tns:deptNumber>
<tns:unit>16</tns:unit>
<tns:team>49</tns:team>
<tns:email>[email protected]</tns:email>
<tns:firstname>Franz</tns:firstname>
<tns:lastname>PAGNOTTA</tns:lastname>
</tns:person>
</tns:people>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
anyway
lm.firstname = String(response.people.person.firstname)
fails reporting the following stacktrace:
Null reference found in 'response.people'. The expected type was 'ROQ_WebServices.Ph.ListOfPeople'.
fuego.compiler.NullReferenceException: Null reference found in 'response.people'. The expected type was 'ROQ_WebServices.Ph.ListOfPeople'.
at fuego.compiler.MemberReference.run(MemberReference.java:553)
at fuego.compiler.Node.value(Node.java:2279)
Anybody can help?
A partial solution
The real answer is:
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header />
<SOAP-ENV:Body>
<ns1:people xmlns:ns1="http://ws1.example.com">
<ns1:person>
<ns1:deptNumber>1111111111111</ns1:deptNumber>
<ns1:unit>16</ns1:unit>
<ns1:team>49</ns1:team>
<ns1:email>[email protected]</ns1:email>
<ns1:firstname>Franz</ns1:firstname>
<ns1:lastname>PAGNOTTA</ns1:lastname>
</ns1:person>
</ns1:people>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
instead of
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header />
<SOAP-ENV:Body>
<tns:people xmlns:tns="http://ws1.example.com">
<tns:person>
<tns:deptNumber>1111111111111</tns:deptNumber>
<tns:unit>16</tns:unit>
<tns:team>49</tns:team>
<tns:email>[email protected]</tns:email>
<tns:firstname>Franz</tns:firstname>
<tns:lastname>PAGNOTTA</tns:lastname>
</tns:person>
</tns:people>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
that is there is ns1 instead of tns as name prefix (I see it by the debugger).
To get out a string, for example the lastname, an Xpath expression can be used:
"/ns1:people/ns1:person/ns1:lastname"
that put into BPL becomes:
selectString(response, xpath : "/ns1:people/ns1:person/ns1:lastname")
but to write this code I can only figure out that BPM substituted tns with ns1 in other words noone garantee that the prefix will be always ns1.
Is there a way to get it out by a program?
Similar Messages
-
How to use the same element in different Web-Services?
I have defined a web-services in two WSDL files.
I want to use the same type in this two services. Because if one service call the other one, it could pass the class it just got. Otherwise, the classes can't be casted.
Web-Service1:
public com.package1.State inputValue (com.package1.State state) {
return state;
Web-Service2:
public com.package2.State inputValue (com.package2.State state) {
return state;
}And now, If I call from the Service2, the Service1 and put
Service1.inputValue(com.package2.State state) ;
I can't do this, can't cast and so on. But I want my tool WSDL2Java, will create the same State.class for two Web-Services, like:
Web-Service1:
public com.package3.State inputValue (com.package3.State state) {
return state;
Web-Service2:
public com.package3.State inputValue (com.package3.State state) {
return state;
}Is it possible? How to define it in wsdl?
Thanks in advance.You can certainly do this in WSDL, simply put your
common element in a schema file and "include" it into
each of your WSDL files. Obviously your element will
have to use the same namespace in all places.
I'm not sure whether wsdl2java can cope with
"include" statements in WSDL. I know plenty of other
similar tools, e.g. Axis and .Net tools, didn't
support this however they may have moved on since I
used them.
To get around this you have to "manually" include the
schema in each wsdl for code generation purposes.Thanks for the answer. I did as you said and it works fine. -
How to use the set functions effectively in webi ,please let me know with detail
how to use the set functions effectively in webi ,please let me know with detail
Hi,
we use use set functions on heirarchies with aggregate functions mostly .
If you include member_set, Min returns the minimum value of the aggregated data for all members in the member set.
Member_set can include multiple sets separated by semicolons (;).
The list of member sets must be enclosed in {}.
If the member set expression does not specify a precise member or node, the hierarchy referenced must be present in the table, then the member set expression references the current member in the hierarchy in the table. If the hierarchy is not in the table, the function returns the message #MULTIVALUE.
Eg .
1) Ancestor
=Sum([YTD] ; {Ancestor([Test Hierarchy];2)})
2) IsLeaf
=[Test Hierarchy].IsLeaf
You can use this function when you want to show your Measure only at lower level .
3) .Depth
=[Test Hierarchy].Depth
This is also function used with hierarchy to find Level of Members .
Follow this link for PDF reference .
Page 147
https://www.google.co.in/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&ved=0CDIQFjAB&url=https%3A%2F%2Fhelp.sap.com%2Fbusinessobject%2Fproduct_guides%2Fboexir4%2Fen%2Fxi4sp5_ffc_en.pdf&ei=nBAUU-iUM4WWrAeMuoCoDg&usg=AFQjCNHakXsEjd_yUk2y3lVdibf3PXpEOA&bvm=bv.61965928,d.bmk
search on SCN this question was discussed before also one those links .
http://scn.sap.com/thread/3183380
Hope this will help you . -
How to use a cascading LOV as a Web Services Consumer?
How to use a cascading LOV as a Web Services Consumer?
We are trying to populate a prompt programmatically.
Our program is a Web Services Consumer.
As an example we use Island Resorts Marketing
The cascading LOV for City is
Country -> Region -> City
The City object is key-aware to the customer table
The query is
Customer | Revenue
(where) City = [prompt]
In order to make the key-awareness work, we must select the value (rowIndex) from the LOV
When we run our program below, the LOV for City is not populated, as expected since we must first select the Country, then the Region.
The code snippet below shows that the LOV for Country is populated. We have no idea how to go from there.
Any hint will be immensely appreciated.
Let us know if anything is unclear in the code.
Source
RetrieveMustFillInfo retrieveMustFillInfo = RetrieveMustFillInfo.Factory.newInstance();
RetrievePromptsInfo retrievePromptInfo = RetrievePromptsInfo.Factory.newInstance();
retrievePromptInfo.setPromptLOVRetrievalMode(PromptLOVRetrievalMode.ALL);
retrievePromptInfo.setRefreshReturnedLOVs(true);
retrievePromptInfo.setReturnLOVOnMustFillPrompts(true);
retrieveMustFillInfo.setRetrievePromptsInfo(retrievePromptInfo);
// *-- need the "Refresh" action to get the .promptToBeFilled
Action[] boActions = new Action[1];
boActions[0] = Refresh.Factory.newInstance();
try {
documentInformation = reportEngine.getDocumentInformation(Integer.toString(infoObject.getID()), retrieveMustFillInfo, boActions, null, null);
m_Token = documentInformation.getDocumentReference();
} catch (Exception ex) {
System.out.println(GetWSError(ex));
return;
if (documentInformation.getMustFillPrompts()) {
PromptInfo[] promptInfoS = documentInformation.getPromptInfoArray();
for (PromptInfo promptInfo : promptInfoS) {
System.out.println(String.format("Prompt '%1$s', hasLOV=%2$s", promptInfo.getName(), (promptInfo.getHasLOV() ? "Yes" : "No")));
if (promptInfo.getHasLOV()) {
LOV boLOV = promptInfo.getLOV();
for (Value boLOVValue : boLOV.getValuesArray()) {
System.out.println(String.format(" LOV item '%1$s' RowIndex=%2$s", boLOVValue.getColumnsArray(0), (boLOV.getRowIndexed() ? boLOVValue.getRowIndex() : "")));
System.out.println("--End LOV");
PromptInfo[] promptInfoS2 = promptInfo.getPromptToBeFilledArray();
if (promptInfoS2.length > 0) {
PromptInfo promptInfo2 = promptInfoS2[0];
System.out.println(String.format(" linked to %1$s", promptInfo2.getName()));
if (promptInfo2.getHasLOV()) {
LOV boLOV2 = promptInfo2.getLOV();
for (Value boLOVValue : boLOV2.getValuesArray()) {
System.out.println(String.format(" LOV item '%1$s' RowIndex=%2$s", boLOVValue.getColumnsArray(0), (boLOV2.getRowIndexed() ? boLOVValue.getRowIndex() : "")));
System.out.println("--End LOV");
Result
Prompt 'Enter value(s) for City:', hasLOV=Yes
--End LOV
linked to Enter value for Country of origin
LOV item 'Australia' RowIndex=6
LOV item 'France' RowIndex=2
LOV item 'Germany' RowIndex=4
LOV item 'Holland' RowIndex=7
LOV item 'Japan' RowIndex=5
LOV item 'UK' RowIndex=3
LOV item 'US' RowIndex=1
--End LOVHi,
Refer SAP Note 1278947. You would require a Service Market Place logon to access this article.
Let me know if this helps.
Regards,
Shreyans Surana -
How to use an ABAP exception as a web service fault
Hi experts,
I have created a web service out of an ABAP function module, using the SAP standard wizard for web services. The ABAP function has some exceptions defined. Now the question is: How can I "translate" these ABAP function exceptions to web service faults?
In the WSDL file I can see that the web service defines the faults, but they are not part of the web service operation (in the WSDL file). So when I load the definition into JDeveloper, the faults are not recognized.
Any ideas what I am missing here?
Thanks in advance!
Kind regards, MatthiasExceptions from SAP function module are not translated as web service fault message, this is a standard behaviour due among other to the fact that exceptions are not "in line" with the definition a web service fault message.
Usually when you want to use a standard SAP function module and expose it as web service, you need to "wrap-it" into a new Z function module.
In that new function module you must capture the exceptions and convert them into a web service fault message structure (usually containing error type, text and number)
Karim -
We are using the Azure server for our web services. Server is generating an error "Unable to connect to the remote server". What is this error means
Hello,
Did you means that you use the Windows Azure Virtual Machine DNS name as the server name in the Reporting Server Web Services URL?
For example:
Report server:http://uebi.cloudapp.net/reportserver
Report manager:http://uebi.cloudapp.net/reports
If you want to connect to Report Manager on the virtual machine from a remote computer, you should create a virtual machine TCP Endpoint and open the port in the virtual machine’s firewall. By default, the report server listens for HTTP requests
on port 80.
Reference:http://msdn.microsoft.com/en-us/library/jj992719.aspx#bkmk_ssrs_connect_2_remote_RM
Regards,
Fanny Liu
Fanny Liu
TechNet Community Support -
Problems using the Java API inside a Web Service
Hi,
after I've built a standalone Java RMI client, using the API, I wanted to use the same code in a Web Service I've built and deployed in tomcat (jwsdp-1.3). But i ran into a few problems..
- although I have the exact same code in both programs, the one in the web service simply blocks when I initiate the Locator class (see above...);
- all the .jar's that I use in the client are deployed in the WEB-IF/lib of the web service directory on tomcat;
- no exceptions are thrown in tomcat, so i don't know what's going on;
Is there any specific configuration for the API to run on tomcat?
Could it be that the .jar's needed by the Locator class may have some kind of conflict with the ones in tomcat?
Thanks...
Note: The code on the client is totaly stable and fully operational.
The web service uses java.rmi.Remote (extends Remote).
Here's part of the code:
Properties env = new Properties();
env.setProperty("orabpel.platform", "oc4j_10g");
env.setProperty("java.naming.factory.initial","com.evermind.server.rmi.RMIInitialContextFactory");
env.setProperty("java.naming.provider.url","ormi://dellpc05/orabpel");
env.setProperty("java.naming.security.principal","admin");
env.setProperty("java.naming.security.credentials","welcome");
Locator locator = new Locator("default", "bpel", env);
IDeliveryService deliveryService = (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME );
(...)I've put a
try{Locator...}
}catch(Throwable t) {
System.out.println(t.getMessage());
t.printStackTrace();
around the Locator..
I still don't know why it's throwing this...
Here's what it gets:
before Locator
javax/jms/JMSException
java.lang.NoClassDefFoundError: javax/jms/JMSException
at com.evermind.server.ThreadState.getCurrentState(ThreadState.java:206)
at com.evermind.server.rmi.RMIConnection.checkServletCaller(RMIConnection.java:3448)
at com.evermind.server.rmi.RMIConnection.<init>(RMIConnection.java:181)
at com.evermind.server.rmi.RMIServer.addNode(RMIServer.java:856)
at com.evermind.server.rmi.RMIServer.getConnection(RMIServer.java:953)
at com.evermind.server.rmi.RMIInitialContextFactory.getInitialContext(RMIInitialContextFactory.java:309)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:195)
at com.collaxa.cube.util.CXBeanRegistry.lookupDomainManagerBean(CXBeanRegistry.java:205)
at com.oracle.bpel.client.auth.DomainAuthFactory.authenticate(DomainAuthFactory.java:84)
at com.oracle.bpel.client.Locator.<init>(Locator.java:120)
at com.oracle.bpel.client.Locator.<init>(Locator.java:91)
at dmc.tm.resultprovider.ResultProviderImpl$ResultProviderThread.taskTimeoutExceeded(ResultProviderImpl.java:231)
at dmc.tm.resultprovider.ResultProviderImpl$ResultProviderThread.run(ResultProviderImpl.java:160) -
How to use the result from a taglib?
Hi people.
I've been looking arround for some feedback on how to use the output generated by a taglib on jsp code but I haven't been able to find any.
Could somebody tell me how to do that please?It works something like this:
The tab library consists of a class library and a tag libraray descriptor file. In your jsp header you include a taglib directive which associated athe TLD with a particular name prefix. Then you can include XML tags with that prefix and the tag library class to which they are connected will be invoked from the servlet that is generated from the JSP. This tag code can do pretty much anything, but usually what it mostly does is write HTML to the response stream. Opening tags and closing tags can both add whatever text they like to the stream which is sent to the client.
So including the tag in you JSP will usually suffice to cause generated output, it's up to the taglib. -
Using the UWL API inside a Web Service
I wrote a Web Service to get the number of new tasks and the total number of tasks for a user like it is displayed in the UWL in the DefaultView.
The numbers are retrieved by the following code:
user = com.sap.security.api.UMFactory.getAuthenticator().getLoggedInUser();
// JNDI lookup for getting the service because we are not in the PRT container
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sapportals.portal.prt.registry.PortalRegistryFactory");
InitialContext initialContext = new InitialContext(env);
uwlService = (IUWLService) initialContext.lookup("/broker/services/" + IUWLService.ALIAS_KEY);
if (uwlService == null) {
throw new Exception("Cannot get UWL Service");
context = new UWLContext();
if (user == null) {
throw new Exception("No user");
context.setUser(user);
context.setLocale(user.getLocale());
session = uwlService.beginSession(context, 200);
context.setSession(session);
context.setAllowBackEndConnections(true);
itemManager = uwlService.getItemManager(context);
UWLView view = uwlService.getViewManager(context).getView("DefaultView", context);
if (view != null) {
QueryProperties properties = new QueryProperties();
properties.setMaxNumberOfItemsToFetch(0);
QueryResult result = itemManager.getItemsForView(context, view, properties, null);
totals = itemManager.getTotalAndEmphasizedItemCountForView(context, view, "", null);
In the first step I chose basic authentication. When debugging I see that the web service gets the information about the logged on user. The UWLService, item manager, session and view, all of them are determined resp. created.
But when calling getItems the UWL exception "Logged in users context or session doesn't exist" is thrown.
When calling the same functionality from Web Dynpro everything works fine.
Service and session are determined like this
uwlService = (IUWLService) WDPortalUtils.getServiceReference(IUWLService.ALIAS_KEY);
context = new UWLContext();
IUser user = WDClientUser.getLoggedInClientUser().getSAPUser();
wdContext.currentUIStateElement().setUserName(user.getFirstName() + " " + user.getLastName());
context.setUser(user);
context.setLocale(WDResourceHandler.getCurrentSessionLocale());
session = uwlService.getUwlSessionForWebDynproClient(context);
Does anyone know how to work with the UWL API in a web service context?
Thanks in advance
AntjeHi Experts,
We are also facing the same issue as of Yomesh.
The strange part here is that, yesterday, the code was fetching the User and we were able to run the whole web service.
Suddenly, this doesnt seems to be working today. And after debugging, we found that, the User is not being returned with the below code:
user = UMFactory.getAuthenticator().getLoggedInUser(wsContext.getHttpServletRequest(), null);
Any help is highly appreciated.
Thanks in Advance!!
BR,
Uday -
How to use SAP Router String with SAP Web Services
Hi All,
I have developed an SAP Web Service and I'm using it from a vb.net dll by using web reference.
I want to use an SAP Router string when I try to call web service but I don't how to do it.Should the url of my proxy contain this router string in itself or is there any other attribute that I should configure for this purpose?
Please help!!!
MERAL
My code is as in the followings .
(And my SAP router string is like /H/111.11.111.11/H/)
Dim srvProxy As New PSUDamacanaProxy4.Z_SDB_RFC_GetList
srvProxy.Url = s"http://21.11.1.43:8000/sap/bc/soap/rfc"
srvProxy.Timeout = 10000
srvProxy.Credentials = New System.Net.NetworkCredential(strUserName, strPassword)
srvProxy.Z_SDB_RFC_GetList(p_bayi, durum, True, miktar, telefon, expMusteri, expReturnValue, expSiparis, expTeslimat, expAdSoyad)
musteriAdSoyad = expAdSoyad
ReturnValue = expReturnValue
srvProxy.Dispose()
srvProxy = NothingSince I posted this question, I have abandoned the notion of
auto-generated web services and embraced the good old FDS concept
where the RemoteObject meta-tag does all the conversion work for
me. We are now using the Granite DS package and it is working well
for us. I would love to consume web services, but it just isn't
worth the hassle when all you have to do with Granite (and FDS) is
cast your return objects to the proper object type.
BTW, since this posting, I have investigated competing Flex
app frameworks. After my research, I checked out the PureMVC
framework. Wow!! Cairngorm always left me with an uneasy feeling
and I guess I am not alone. Apparently, Cliff Hall felt the same
way. That is why he started the project. I like his approach alot
more than Cairngorm especially since it includes notifications
which allow me to broadcast my own app level events independent
from the AS Event framework. Check out PureMVC. For what it is
worth, it has my humble endorsement. Cliff was even gracious enough
to acknowledge the other Adobe Consulting guys for their work. Good
for you Cliff, I respect that. Check out a better way at
http://www.puremvc.org/ -
How to use the result of a sql query for a max () function
Hi
I wrote a query on which i wrote
"select max(id) from users "
how can i use the returned value.
if i made the var name ="userid"
can it be userid.rows[0] or what.
thnx for any helpHi!
The result of this query will be the max ID of users' IDs.
Let say we have:
String sql="select max(users.id) from users";
Statement st = ctx.conn.createStatement();
ResultSet rs = st.executeQuery(sql);
rs.next();
So you can get the max Id in the following way:
int maxId=rs.getInt("id");
Regards,
Rossi -
How to Use the 'Result' line to caculate a special value?
Hi experts:
For example,the dimension is product (a ,b c ,d),and key figure is revenue,
then I want to show the value -->the percentage of the revenue of each product .
so that's the problem , how I can get it,or how i can get the sum of all products.
can I get it from the result line or is there a better way to get it?
thx
chankeep your Product in Rows, Revenue in Colomns.
You can get Sum of each Product Revenue by settings Product Charecterstic Properties.
Coming to % Share of Revenue for each product. Create a Calculated KF or Formula in Colomns. In the Formula or CKF definition screen, you can see Percentage Functions along with Mathemetical Functions. Select % Share of Over all Result (%GT) under Percentage Functions .
Take a look into this link if you have any Questions.<a href="http://help.sap.com/saphelp_nw04s/helpdata/en/e2/16f13a2f160f28e10000000a114084/content.htm">http://help.sap.com/saphelp_nw04s/helpdata/en/e2/16f13a2f160f28e10000000a114084/content.htm</a>
Hope this helps.
Nagesh Ganisetti.
Assign points if it helps. -
How to use the result of simple shell script?
The shell script below retrieves the length of an audio file:
set aFile to choose file
do shell script "afinfo " & quoted form of (POSIX path of aFile) & "|grep duration"
I'm wondering, how can I copy the result to the clipboard or set the value of a variable to it?
Total newbie question. I have no idea about shell scripts - I just found the script above online.
Thank you so much!Here:
set the clipboard to (do shell script "afinfo " & quoted form of (POSIX path of aFile) & "|grep duration")
or:
set A to do shell script "afinfo " & quoted form of (POSIX path of aFile) & "|grep duration"
(53997) -
How to use the catalog in our own Web Dynpro program?
Hi Expert,
How to access MDM catalog and bring the product data back to a our own Web Dynpro program?Hi Masa,
The Catalog Search UI of SRM that is referred to as UI as aforementioned is a page which is capable of the selection of catalog items is linked from the shopping cart creation.
Our biz requirement content two scenarioes to processing the purchase requirement.
A. Create shopping cart via the catalog (PR) --> SRM PO Process --> SUS(PO and Invoice)
This is the standard SRM purchase scenario and we have already implemented that.
B. Create a requirement document via the catalog (This document is same with the SC but very simple, and we create this function by the own web dynpro program) --> transfer the requirement document to other purchasing system(none SAP) in our intranet.
So the key problems we faced are below:
1. How to connect to the catalog search UI from our own web dynpro program.
( If we connect the catalog via the MDM ABAP API, that will make the catalog serach UI could not be used;
Also it has been failed to simulate the function of SC's connection to the catalog;
So we decide to link the catalog serach UI via the URL, the linkage is "http://<J2EEserver:J2EEport>/SRM-MDM/SRM_MDM?sap-locale=EN&HOOK_URL=&mask=&namedSearch=General&username=&password=&catalog=<Repository Name>&server=&datalanguage=EN". )
2. How to transfer the catalog item data to our own web dynpro program.
If we link the catalog search UI by URL, we can not find any good method to transfer the catalog item data to our own program. -
How to use XML bean in 9.1 web service.
hi,
im trying to deploy a small web service with only one method in WLS 9.1.
That method accepts an XMLbean as the input parameter and returns the same type of xmlBean as the output.
how can i specify the name of corresponding .xsd file in the ant script.
the source code of web service file is given below.
Please have a look at it and help me.
package com.test;
import javax.jws.WebService;
import com.mlt.eai.login.LoginDocument;
import java.util.Date;
@WebService(name="LoginServiceType", serviceName="LoginService")
public class LoginServiceImpl
static final long serialVersionUID = 1L;
public LoginDocument userAuthentication(LoginDocument lInfo)
Dealer dealer =
new Dealer(lInfo.getLogin().
getRequest().getInputData().getLoginID(), lInfo.getLogin().getRequest().getInputData().getPassoword(), new Date());
if(dealer.doIFSAuthentication()){
lInfo.getLogin().getResponse().getResult().setReturnCode(1);
lInfo.getLogin().getResponse().getResult().setReturnMessage("Session Started");
else{
lInfo.getLogin().getResponse().getResult().setReturnCode(0);
lInfo.getLogin().getResponse().getResult().setReturnMessage("Invalid username / password");
return lInfo;
thanks
-BinuCan anyone help me with this XPath query
I get result [title: null]
import java.io.*;
import javax.xml.parsers.*;
import org.xml.sax.*;
import org.w3c.dom.*;
import org.jaxen.*;
import org.jaxen.dom.*;
import org.jaxen.saxpath.*;
import java.util.*;
public class TestX {
public void ggg() {
try {
File f = new File("journal.xml");
DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
org.w3c.dom.Document doc = docBuilder.parse(f);
XPath xpath = new DOMXPath( "/journal/article/title" );
List result = (List) xpath.evaluate(doc);
System.out.println(result.get(0));
} catch (Exception e) {
e.printStackTrace();
public static void main(String[] args) {
TestX tx = new TestX();
tx.ggg();
}journal.xml
<journal>
<article id="article.1">
<title>Art1</title>
<author>
<first>Bob</first>
<last>McWhirter</last>
</author>
<text>
</text>
</article>
<article id="article.2">
<title>Art2</title>
<author>
<first>James</first>
<last>Strachan</last>
</author>
<text>
</text>
</article>
</journal>
Maybe you are looking for
-
Service Desk: How do i Reply back to a support message?
I am in the process of configuring the servcie desk. I am using Solution manager 4.0 sp13. I am recieving the messages in the Service desk, and the suport team members are able to get their respective messges based on the PFAC responsibility rules
-
Camera Roll on iphone 4S doesn't show up on ipad2
Camera Roll on iphone 4S doesn't show up on ipad2, I have icloud on on both devices, in settings have icloud sharing turned on. Ther is no sync command. Oh, do I have to go through itunes to accomplish this? I thought that if it was turned on on both
-
ZEN TOUCH or Zen Micro? Which is bett
I'm interested in buying one or the other but am unsure which to purchase. I like the fact that Zen Micro has repeat, resume and random play as well as a stand and belt clip. I also like the fact that it has fm radio and comes in lots of colors. But
-
Hi, I am converting a Tiff image in to Jpeg by using JAI. But facing a performance bottleneck in this process. The performance of JAI will be better if the native acceleration is used. I want to make sure whether the dlls are being used while this co
-
Recovering Windows password from fingerprint reader
Hello, I have used fingerprint reader for a long time and forgotten my windows password. However, I need it now. I'm running Windows 8 on Lenovo E530 with Fingerprint reader 6.0.200.75. Is it possible to reveal your windows password in the same way t