Problem in running code from web service
All,
We are experiencing a problem while running a code from a web service. The code based on ecliselink. The same code works from JUnit. When running from webservice, we observed the the following warning
*0 WARN [[ACTIVE] ExecuteThread: '20' for queue: 'weblogic.kernel.Default (self-tuning)'] openjpa.Runtime - The configuration property named "openjpa.Id" was not recognized and will be ignored, although the name closely matches a valid property called "openjpa.Id".*
*0 INFO [[ACTIVE] ExecuteThread: '20' for queue: 'weblogic.kernel.Default (self-tuning)'] openjpa.Runtime - Starting BEA Kodo 4.2.0*
Does this mean it is picking kodo implementation? Our expectation is to use eclipselink implementation. What could this warning? Any pointers would be of great help.
Thanks,
Sounds like it is using Kodo, is anything from EclipseLink logged?
Have you configured your JPA provider in your persistence.xml? If you have not, then you will just get the default.
James : http://ww.eclipselink.org
Similar Messages
-
Problem with XML replied from web services
<cfset ServiceResult = "">
<cfset xmltext=xmlParse('<?xml version="1.0" ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<runProcess xmlns="http://3e.pl/ADInterface">
<ModelRunProcessRequest>
<ModelRunProcess AD_Process_ID="1000000" AD_Menu_ID="0" AD_Record_ID="0" DocAction="">
<serviceType>IInvoice</serviceType>
<ParamValues>
<field column="DocumentNo">
<val>#DOCNO_P#</val>
</field>
</ParamValues>
</ModelRunProcess>
<ADLoginRequest>
<user>WebService</user>
<pass>WebService</pass>
<lang>en_US</lang>
<ClientID>11</ClientID>
<RoleID>50004</RoleID>
<OrgID>11</OrgID>
<WarehouseID>103</WarehouseID>
<stage />
</ADLoginRequest>
</ModelRunProcessRequest>
</runProcess>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>')>
<cfhttp method="post" url="http://192.168.1.11:8080/ADInterface/services/ModelADService">
<cfhttpparam type ="XML" value=#xmltext#>
</cfhttp>
<cfset ServiceResult = cfhttp.fileContent>
from the code above, i will get replied and store into ServiceResult as below
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body><ns1:runProcessResponse
xmlns:ns1="http://3e.pl/ADInterface"><RunProcessResponse
xmlns="http://3e.pl/ADInterface" IsError="false">
<Summary>99 : Transaction Failed C_InvoiceLine</Summary><LogInfo />
</RunProcessResponse></ns1:runProcessResponse></soap:Body></soap:Envelope>
actually what i need is only those information inside the <summary> tag. How can i get the result i need?
Any expert can give their advies? thank you.You will need to use CF's built-in XML tags and functions. See sample below:
<cfsavecontent variable="serviceResult"><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body><ns1:runProcessResponse
xmlns:ns1="http://3e.pl/ADInterface"><RunProcessResponse
xmlns="http://3e.pl/ADInterface" IsError="false">
<Summary>99 : Transaction Failed C_InvoiceLine</Summary><LogInfo />
</RunProcessResponse></ns1:runProcessResponse></soap:Body></soap:Envelope>
</cfsavecontent>
<!--- verify content if well formed XML --->
<cfif IsXml(serviceResult)>
<!--- create an XML object that CF's XML functions can use --->
<cfset xmlResult=XmlParse(serviceResult, true) />
<!--- check for a summary element, will return an array of matching objects
Note that second parameter for XmlSearch function is an Xpath expresssion
For an overview of Xpath see http://msdn.microsoft.com/en-us/library/ms256115.aspx
For seaching XML which uses namespaces in CF see: http://www.coldfusionguy.com/ColdFusion/blog/index.cfm/2008/9/26/XMLSearch-Specify-xmlns-n amespaces-in-an-xPath-Search
--->
<cfset summarySearch=XmlSearch(xmlResult, "//*[local-name()='Summary' and namespace-uri()='http://3e.pl/ADInterface']") />
<cfif ArrayLen(summarySearch) gt 0>
Summary found: <cfoutput>#summarySearch[1].XmlText#</cfoutput>
<cfelse>
Summary not found
</cfif>
</cfif> -
Problem in running example in web service tutorial
Hi,
I have installed jwsdp 1.1. When I followed the procedures stated in the tutorial and compiled the example in the dir
{jwsdp home}\docs\tutorial\examples\cb\jaxm\, errors occur.
Here are the errors occurs in the launcher.server.log.
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:260)
at org.apache.commons.digester.Digester.endElement(Digester.java:830)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:552)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1071)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1533)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:346)
at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:529)
at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:585)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1142)
at org.apache.commons.digester.Digester.parse(Digester.java:1302)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:335)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:804)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:452)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:409)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:882)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:368)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1198)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:739)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1190)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
at org.apache.catalina.core.StandardService.start(StandardService.java:499)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2187)
at org.apache.catalina.startup.Catalina.start(Catalina.java:504)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:399)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.commons.launcher.ChildMain.run(ChildMain.java:269)
Caused by: java.lang.IllegalStateException: Context path /RegistryServer is already in use
at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:523)
... 42 more
[ERROR] Digester - -End event threw exception <java.lang.reflect.InvocationTargetException>
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:260)
at org.apache.commons.digester.Digester.endElement(Digester.java:830)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:552)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1071)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1533)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:346)
at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:529)
at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:585)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1142)
at org.apache.commons.digester.Digester.parse(Digester.java:1302)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:335)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:804)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:452)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:409)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:882)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:368)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1198)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:739)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1190)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
at org.apache.catalina.core.StandardService.start(StandardService.java:499)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2187)
at org.apache.catalina.startup.Catalina.start(Catalina.java:504)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:399)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.commons.launcher.ChildMain.run(ChildMain.java:269)
Caused by: java.lang.IllegalStateException: Context path /Xindice is already in use
at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:523)
... 42 more
[ERROR] Digester - -End event threw exception <java.lang.reflect.InvocationTargetException>
Sorry for posting such a long error capturing above.
But I really don't know which part goes wrong. I have already copied the endorse dir to my java sdk 1.4.1 home.
Any ideas?
A million thanks in advance ^^
SherinaI have this problem too. Please let me know if you have resolved it.
-
Facing problem while going to catch return result from web-services.
Hi everybody,
I am new to BPEL. I am facing problem while going to catch the attributes of resultsets returning from web-services(QAS). As far as my knowledge, two types of results it should return - XML entities and another is attributes which is coming as the part of XML entitites. I am able to catch the XML entities, but can't catch the attributes under it. Even, I am not able to see whether web-services returning something within that field.
When, I tried to catch the attribute and store to a temporary varilable using the following code:
*<assign name="AssignQASDoGetAddress1">*
*<copy>*
*<from variable="InvokeQAS_DoSearch_OutputVariable"*
part="body"
query="/ns6:QASearchResult/ns6:QAPicklist/ns6:PicklistEntry/@PostcodeRecoded"/>
*<to variable="temp"/>*
*</copy>*
*</assign>*
but, I am facing the following selectionFailure errors after running it:
*"{http://schemasxmlsoap.org/ws/2003/03/business-process/}selectionFailure" has been thrown.*
-<selectionFailure xmlns="http://schemasxmlsoap.org/ws/2003/03/business-process/">
-<part name="summary">
*<summary>*
empty variable/expression result.
xpath variable/expression expression "bpws:getVariableData('InvokeQAS_DoSearch_OutputVariable', 'body', '/ns6:QASearchResult/ns6:QAPicklist/ns6:PicklistEntry/@PostcodeRecoded')" is empty at line 269, when attempting reading/copying it.
Please make sure the variable/expression result "bpws:getVariableData('InvokeQAS_DoSearch_OutputVariable', 'body', '/ns6:QASearchResult/ns6:QAPicklist/ns6:PicklistEntry/@PostcodeRecoded')"is not empty.
*</summary>*
*</part>*
*</selectionFailure>*
Getting this error it seems to me that web-service is returning nothing, but, it returns something as it has been catched using a method called isPostcodeRecoded() Java Code in Oracle ADF. This method has been used as it should return boolean whereas for catching the xml entities using java code we used the method like getPostcode(), getMoniker().
For your information, we are using Jdeveloper as the development tool for building the BPEL process.
Am I doing any syntax error. Please consider it as urgent and provide me asolution.
Thanks in advance.
Chandrachur.Thanks Dave and Marc, for your suggestions. Actually what I found is QAS web-service is returning nothing as attributes when the attributes are set to the default value. For example, following is the part of the wsdl of the result which QAS webservice returns.
<xs:element name="QASearchResult">
- <xs:complexType>
- <xs:sequence>
<xs:element name="QAPicklist" type="qas:QAPicklistType" minOccurs="0" />
<xs:element name="QAAddress" type="qas:QAAddressType" minOccurs="0" />
</xs:sequence>
<xs:attribute name="VerifyLevel" type="qas:VerifyLevelType" default="None" />
</xs:complexType>
</xs:element>
<xs:complexType name="QAPicklistType">
- <xs:sequence>
<xs:element name="FullPicklistMoniker" type="xs:string" />
<xs:element name="PicklistEntry" type="qas:PicklistEntryType" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="Prompt" type="xs:string" />
<xs:element name="Total" type="xs:nonNegativeInteger" />
</xs:sequence>
<xs:attribute name="AutoFormatSafe" type="xs:boolean" default="false" />
<xs:attribute name="AutoFormatPastClose" type="xs:boolean" default="false" />
<xs:attribute name="AutoStepinSafe" type="xs:boolean" default="false" />
<xs:attribute name="AutoStepinPastClose" type="xs:boolean" default="false" />
<xs:attribute name="LargePotential" type="xs:boolean" default="false" />
<xs:attribute name="MaxMatches" type="xs:boolean" default="false" />
<xs:attribute name="MoreOtherMatches" type="xs:boolean" default="false" />
<xs:attribute name="OverThreshold" type="xs:boolean" default="false" />
<xs:attribute name="Timeout" type="xs:boolean" default="false" />
</xs:complexType>
<xs:complexType name="PicklistEntryType">
- <xs:sequence>
<xs:element name="Moniker" type="xs:string" />
<xs:element name="PartialAddress" type="xs:string" />
<xs:element name="Picklist" type="xs:string" />
<xs:element name="Postcode" type="xs:string" />
<xs:element name="Score" type="xs:nonNegativeInteger" />
</xs:sequence>
<xs:attribute name="FullAddress" type="xs:boolean" default="false" />
<xs:attribute name="Multiples" type="xs:boolean" default="false" />
<xs:attribute name="CanStep" type="xs:boolean" default="false" />
<xs:attribute name="AliasMatch" type="xs:boolean" default="false" />
<xs:attribute name="PostcodeRecoded" type="xs:boolean" default="false" />
<xs:attribute name="CrossBorderMatch" type="xs:boolean" default="false" />
<xs:attribute name="DummyPOBox" type="xs:boolean" default="false" />
<xs:attribute name="Name" type="xs:boolean" default="false" />
<xs:attribute name="Information" type="xs:boolean" default="false" />
<xs:attribute name="WarnInformation" type="xs:boolean" default="false" />
<xs:attribute name="IncompleteAddr" type="xs:boolean" default="false" />
<xs:attribute name="UnresolvableRange" type="xs:boolean" default="false" />
<xs:attribute name="PhantomPrimaryPoint" type="xs:boolean" default="false" />
</xs:complexType>
here the attributes like FullAddress, PostcodeRecodedare , etc. are not being return by the web-service when it is getting the default value false. But, if it gets true then , it is being displayed at the BPEL console.
Do you have any idea how can I catch the attributes and its value even when it gets the default value which is already set. Previously, it was returning(it was not being displayed at the console).
Thanks once again for your valuable suggestions...!!!
Chandrachur. -
Hi,
I'm currently trying to consume in VC a CAF Application Service exposed as a Web Service. I'm able to retrieve what I want but I have a problem with dates format.
The web service returns dates in the following format: YYYY-MM-DDTHH:NN:SS
When I test my data service in VC it works fine. When I run my iview, VC swap the month and the day and compute the new date...
It's not just a problem of formatting with DVAL and DSTR because the date is already computed.
Example:
Date returned from web service: 2007-09-21T00:00:01
Date returned from test data service in VC: 21.09.2007
Date returned at runtime: 09.09.2008
VC understand 21.09.2007 not like DD.MM.YYYY but like MM.DD.YYYY so 21.09.2007 becomes 09.09.2008
I also tried to check on the server Regional and Language option but it doesn't come from there.
Have you ever faced this problem?
ThxHi,
It is a Web Service generated by NWDS (to expose my CAF Application Service)and deployed on the server.
The url si like http://<hostname>:<port>/mywebservice/Config1?wsdl
The Web Service runs correctly.
When I call a method of my web service to retrieve a list of objects (CAF Entity Services) and their attributes, it returns attributes of type String and Dates of type 'java.util.GregorianCalendar'.
It seems that VC doesn't correctly understand this type of Date at runtime
Regards,
Thomas -
Presence data from web service
Hello,
i like to get presence data from the presenceconsumer web service. But everytime a call getUserPresence i get a PolicyException (POL0002): 'Privacy verification failed for address %1, request is refused'.
I use a web service proxy generated from the wsdl of the presenceconsumer web service. Authentication is made against the appregationproxy by setting username and password. Both users (the one i use for authentication and the one whose presence data i want to get) are registered in the timesten database.
The user whose presence data should be accessed is logged in the OracleCommunicator and has the other user on the allowed list for presence data.
All other operations of the presence web services work without any problem, so why not getUserPresence?
Thanks for helpHi,
I have found the problem and fixed it :)
If you see my code, I was checking for the pending subscriptions after publish() method. When I tried this check before publish() method, I got the expected results (All the pending subscriptions).
Also, I got an error (ServiceException) while dynamically retrieving the subscribed attributes for some reason. I have found an alternative solution, by manually allowing only the PresenceAttributeType.Activity (instead of all getSubscribedAttributes()).
Note: This code was working fine in my local machine because, I have already setup-ed the users (Buddy list) through Oracle communicator in my machine. I was not able to install OC in the VM for some reason though OS is same in both my machine and the VM (OS: Windows 2000 SP4).
thanks & regards,
S.Vasanth Kumar.
My latest code for your reference.
=======================================================
package presencedemo;
import java.net.URI;
import java.rmi.RemoteException;
import java.util.Calendar;
import org.csapi.schema.parlayx.common.v2_0.PolicyException;
import org.csapi.schema.parlayx.common.v2_0.ServiceException;
import org.csapi.schema.parlayx.common.v2_0.SimpleReference;
import org.csapi.schema.parlayx.presence.v2_0.ActivityValue;
import org.csapi.schema.parlayx.presence.v2_0.AttributeTypeAndValue;
import org.csapi.schema.parlayx.presence.v2_0.CommunicationMeans;
import org.csapi.schema.parlayx.presence.v2_0.CommunicationMeansType;
import org.csapi.schema.parlayx.presence.v2_0.CommunicationValue;
import org.csapi.schema.parlayx.presence.v2_0.OtherValue;
import org.csapi.schema.parlayx.presence.v2_0.PlaceValue;
import org.csapi.schema.parlayx.presence.v2_0.PresenceAttribute;
import org.csapi.schema.parlayx.presence.v2_0.PresenceAttributeType;
import org.csapi.schema.parlayx.presence.v2_0.PresencePermission;
import org.csapi.schema.parlayx.presence.v2_0.PrivacyValue;
import org.csapi.schema.parlayx.presence.v2_0.SphereValue;
import org.csapi.schema.parlayx.presence.v2_0.SubscriptionRequest;
import org.csapi.wsdl.parlayx.presence.consumer.v2_0.interface_.PresenceConsumerClient;
import org.csapi.wsdl.parlayx.presence.supplier.v2_0.interface_.PresenceSupplierClient;
/* PresenceDemoClient.java
* This class contains the primary functionality for
* connecting to the Presence Server and retreiving
* presence information for a set of buddies
public class PresenceDemoClient {
PresenceSupplierClient supplier;
PresenceConsumerClient consumer;
private String PresenceServer;
private String PresenceUsername;
private String PresencePassword;
private String PresenceRealm;
private String PresencePort;
URI BuddyList[];
PresenceAttributeType[] pat1;
// Constructor - creates a supplier and consumer presence client
// for publishing, subscribing to, and retrieving user presence.
public PresenceDemoClient(String server, String username, String password,
String realm, String port, URI[] buddies) {
try {
supplier = new PresenceSupplierClient();
consumer = new PresenceConsumerClient();
PresenceServer = server;
PresenceUsername = username;
PresencePassword = password;
PresenceRealm = realm;
PresencePort = port;
BuddyList = new URI[buddies.length];
BuddyList = (URI[])buddies.clone();
} catch (Exception e) {
System.out.println(e.toString());
// publishPresence - this method publishes presence on behalf of the
// current user. Allowed information includes and activityString and a note
public void publishPresence(String activityString, String note) {
try {
System.out.println("Publishing presence for " + PresenceUsername);
// create supplier web service endpoint
supplier.setEndpoint("http://" + PresenceServer + ":" +
PresencePort +
"/aggregationproxy/presencesupplierws/presencesupplier");
System.out.println("Supplier URL: " + "http://" + PresenceServer + ":" +
PresencePort +
"/aggregationproxy/presencesupplierws/presencesupplier");
supplier.setMaintainSession(true);
supplier.setUsername(PresenceUsername);
supplier.setPassword(PresencePassword);
ActivityValue activity = null;
String expires = "3600"; // default expiration of subscription
if (note == null || note.length() < 1)
note = "From Web Service Client";
if (activityString == null)
activity = ActivityValue.ActivityNone;
else if (activityString.equals("Available"))
activity = ActivityValue.Available;
else if (activityString.equals("Busy"))
activity = ActivityValue.Busy;
else if (activityString.equals("Meeting"))
activity = ActivityValue.Meeting;
else if (activityString.equals("Away"))
activity = ActivityValue.Away;
else
activity = ActivityValue.ActivityNone;
PresenceAttribute pa = new PresenceAttribute();
AttributeTypeAndValue typeValue = new AttributeTypeAndValue();
typeValue.setActivity(activity);
if (Integer.parseInt(expires) == 0)
typeValue.setUnionElement(PresenceAttributeType.Other);
else
typeValue.setUnionElement(PresenceAttributeType.Activity);
CommunicationMeans mean = new CommunicationMeans();
System.out.println(new URI("sip:" + PresenceUsername + "@" +
PresenceRealm));
mean.setContact(new URI("sip:" + PresenceUsername + "@" +
PresenceRealm));
mean.setPriority(1);
mean.setType(CommunicationMeansType.Chat);
CommunicationValue commValue = new CommunicationValue();
commValue.setMeans(new CommunicationMeans[] { mean });
typeValue.setCommunication(commValue);
OtherValue other = new OtherValue();
other.setName("Expires");
other.setValue(expires);
typeValue.setOther(other);
typeValue.setPrivacy(PrivacyValue.PrivacyNone);
typeValue.setPlace(PlaceValue.PlaceNone);
typeValue.setSphere(SphereValue.SphereNone);
pa.setTypeAndValue(typeValue);
pa.setNote(note);
//Allowing all pending subscriptions
SubscriptionRequest[] srArray = supplier.getOpenSubscriptions();
for (SubscriptionRequest sr:srArray) {
URI watcher = sr.getWatcher().normalize();
/*System.out.println("Blocking: " + watcher);
supplier.blockSubscription(watcher);*/
System.out.println("Allowing: " + watcher);
/*PresenceAttributeType patArray[] = supplier.getSubscribedAttributes(watcher.toString());
PresencePermission permissions[] = new PresencePermission[supplier.getSubscribedAttributes(watcher.toString()).length];
for(int i=0;i<patArray.length;i++){
PresenceAttributeType pat = patArray;
System.out.println("\tPermission: " + pat);
PresencePermission pp = new PresencePermission();
pp.setPresenceAttribute(pat); //You always pass in Activity
pp.setDecision(true); //Put the user on the allow list
permissions[i] = pp;
supplier.updateSubscriptionAuthorization(watcher,permissions);*/
PresenceAttributeType pat = PresenceAttributeType.Activity;
PresencePermission pp = new PresencePermission();
pp.setPresenceAttribute(pat); //You always pass in Activity
pp.setDecision(true); //Put the user on the allow list
supplier.updateSubscriptionAuthorization(watcher,new PresencePermission[]{pp});
Calendar dateTime = Calendar.getInstance();
pa.setLastChange(dateTime);
supplier.publish(new PresenceAttribute[] { pa });
System.out.println("Publish done: " + "sip:" + PresenceUsername + "@" +
PresenceRealm);
} catch (Exception e) {
System.out.println("Publish failed: " + e.toString());
e.printStackTrace();
// subscribePresence - this method subscribes to
// presence information of buddylist members
public void subscribePresence() {
try {
// create web services endpoint
consumer.setEndpoint("http://" + PresenceServer + ":" +
PresencePort +
"/aggregationproxy/presenceconsumerws/presenceconsumer");
System.out.println("Consumer URL: " + "http://" + PresenceServer + ":" +
PresencePort +
"/aggregationproxy/presenceconsumerws/presenceconsumer");
consumer.setMaintainSession(true);
consumer.setUsername(PresenceUsername);
consumer.setPassword(PresencePassword);
// Setting the attribute to activity.
PresenceAttributeType pa = PresenceAttributeType.Activity;
PresenceAttributeType[] pat = new PresenceAttributeType[] { pa };
// These input are required but not used.
SimpleReference sr = new SimpleReference();
sr.setCorrelator("unused_correlator");
sr.setInterfaceName("unused_interfacename");
sr.setEndpoint(new URI("http://unused.com"));
int counter = 0;
// Calling the subscribe web service with sip
// address of each buddy
for (counter = 0; counter < BuddyList.length; counter++) {
System.out.println("Subscribing presence for: " + BuddyList[counter]);
consumer.subscribePresence(BuddyList[counter], pat, "unused",
sr);
Thread.sleep(3000); // Give the backend enough time to get the subscription.
// Define Presence Activity types and attribute storage
PresenceAttributeType pa1 = PresenceAttributeType.Activity;
pat1 = new PresenceAttributeType[] { pa1 };
} catch (Exception e) {
System.out.println("Exception " + e.toString());
e.printStackTrace();
// getUserPresence - this method retuns the presence information
// of a particular buddy(user)
public PresenceAttribute getUserPresence(URI user) {
PresenceAttribute pa;
try {
System.out.println(consumer.getEndpoint() + "," + consumer.getUsername());
pa = consumer.getUserPresence(user, pat1)[0];
} catch (PolicyException pEx) {
pa = null;
System.out.println("PolicyException:getUserPresence: " + pEx.getMessageId() + ":" + pEx.getText());
String[] variables = pEx.getVariables();
for(String str:variables){
System.out.println(str);
} catch (ServiceException serEx) {
pa = null;
System.out.println("ServiceException:getUserPresence: " + serEx.toString());
} catch (RemoteException rEx) {
pa = null;
System.out.println("RemoteException:getUserPresence: " + rEx.toString());
return pa;
public static void main(String args[]) throws Exception{
URI[] buddy_list = {new URI("sip:[email protected]"),new URI("sip:[email protected]"),new URI("sip:[email protected]")};
PresenceDemoClient client = new PresenceDemoClient("192.168.111.222","employee1","welcome1","vitkovice","8888",buddy_list);
client.publishPresence("Available",":)");
client.subscribePresence();
URI[] buddy_list2 = {new URI("sip:[email protected]"),new URI("sip:[email protected]"),new URI("sip:[email protected]")};
PresenceDemoClient client2 = new PresenceDemoClient("192.168.111.222","employee2","welcome1","vitkovice","8888",buddy_list2);
client2.publishPresence("Available",":)");
client2.subscribePresence();
URI[] buddy_list3 = {new URI("sip:[email protected]"),new URI("sip:[email protected]"),new URI("sip:[email protected]")};
PresenceDemoClient client3 = new PresenceDemoClient("192.168.111.222","employee3","welcome1","vitkovice","8888",buddy_list3);
client3.publishPresence("Available",":)");
client3.subscribePresence();
URI[] buddy_list4 = {new URI("sip:[email protected]"),new URI("sip:[email protected]"),new URI("sip:[email protected]")};
PresenceDemoClient client4 = new PresenceDemoClient("192.168.111.222","employee4","welcome1","vitkovice","8888",buddy_list4);
client4.publishPresence("Available",":)");
client4.subscribePresence();
Thread.sleep(10000); //Allow some time for all the subscription notifications.
PresenceAttribute pa = client.getUserPresence(buddy_list[0]);
System.out.println(buddy_list[0] + ": " + pa.getTypeAndValue().getActivity() + " " + pa.getNote());
PresenceAttribute pa2 = client2.getUserPresence(buddy_list2[0]);
System.out.println(buddy_list2[0] + ": " + pa2.getTypeAndValue().getActivity() + " " + pa2.getNote());
PresenceAttribute pa3 = client2.getUserPresence(buddy_list3[0]);
System.out.println(buddy_list3[0] + ": " + pa3.getTypeAndValue().getActivity() + " " + pa3.getNote());
PresenceAttribute pa4 = client2.getUserPresence(buddy_list4[0]);
System.out.println(buddy_list4[0] + ": " + pa4.getTypeAndValue().getActivity() + " " + pa4.getNote()); -
Create a schema from web service in eclipse
Hi all,
I'm trying to export some data out of SF to an 3rd party via a web service. In the webUI I have the possibility(Attachment 1) to create a schema from web service so my outgoing file matches the requirements. In Eclipse I cannot find that option and I'm encoutering some errors (attachement 2).
Can anyone tell me if there is a possibility like the web UI in eclipse?
Thanks in advance.Hi,
You can create a portal service which can access KM to create a folder and then expose this portal service as Web Services.
To know more:
http://help.sap.com/saphelp_nw2004s/helpdata/en/43/cb213e578c0262e10000000a11466f/frameset.htm
https://www.sdn.sap.com/irj/sdn/thread?threadID=324931
To know the api to create folder in your service method, check this:
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5d0ab890-0201-0010-849d-98d70bd1d5f0
Some code:
IResourceContext context = new ResourceContext(user);
ICollection parent = (ICollection) ResourceFactory.getInstance()
.getResource(″/documents″, context);
IResource resource = parent.createResource(″file″, null, null);
ICollection collection = parent.createCollection(″folder″, null);
Greetings,
Praveen Gudapati
p.s. Points are always welcome for helpful answers -
While upgrading Adobe Creative Suite CS4 ME into Adobe Creative Suite CS5.5 Design Premium, I get an error saying This serial number is not of a qualifying product, please try another. I used to be able to get a code from customer service but I can't get to the chat. Please advise!!!!
MoeGhazal I reviewed your account and it looks like you have have upgraded from a CS4 volume license for Design Premium to a retail upgrade of Design Premium 5.5.
I also show that you made two purchases of CS5.5 Design Premium but the second purchase was canceled. Please make sure you are utilizing the serial number which ends in 7886.
If you are using the correct serial number then it is likely the installer will not recognize your volume license CS4 serial number as being valid for an upgrade. If you can contact our support team then you can be walked through an unlocking procedure to allow you to proceed with the installation. You can contact our support team directly at Contact Customer Care. You may want to try installing a web browser you have not previously utilized. It is likely a toolbar or some other software application is affecting your ability to access chat support successfully.
If you are still unable to reach our support team then please verify the information under your account is accurate. If you can please then update this discussion after confirming this then I can request a member of our support team contact you directly.
Again I would recommend reaching out directly if possible as it will be the most efficient method of resolving your current error. -
Problem to integrate Adobe LiveCycle Web Service to BizFlow
I have problem in integrating BizFlow with Adobe LiveCycle Web Service. We use LiveCycle Output Service module, it has Web Service, EJB, Remoting and REST for external application to call. Then I try to create a Web Service Application in BizFlow to call that LiveCycle Web Service.
The LiveCycle project is input an XML parameter from Web Service then fill in the LiveCycle form to generate PDF then send it to an email address.
The problem is BizFlow can only accommodate with RPC Web Service and does not work with other web service, and in default LiveCycle only present Document style Web service to external. We have problem in integration.
Anyone could give some information on how to integrate BizFlow and LiveCycle service? Like can LiveCycle present RPC protocol Web Service?
The help is highly appreciated
DanielI did fine a solution to this, which was to use the distiller Web service for PostScript files.
-Kelly -
Problem in stubbing out Soap Web Service
Hi,
I have a problem stubbing out a SOAP web service in Flash Builder 4. The problem is that not all the classes are created. This happens when a base class is referenced by a method in the schema. The classes that extends the base class do not get created.
Here is an example: method doSomething returns a class called ResponseBase. Even though MyResponse, which extends ResponseBase, is in a xsd which is referenced by the WSDL, MyResponse class is not created as value objects.
Another example is: method doSomething takes a parameter called ParamClass. ParamClass contains a property of type SomeClassBase. MyClass which extends SomeClassBase is not created even though it is defined in an xsd.
Does that sound like a limitation of the Flash Builder 4? Is there another way to create the proxy classes from a web service?
Thanks,
MingSekar,
I have the same problem.
How did you change your web service as Anonymous?
I have a user id and pwd, i tried by appending end of the service and tried with basic authentication by passing uid and pwd. No luck.
Can you please help me how to change web service as anonymous?
Regards,
Sridhar -
GenericServiceFactory initialization problem when trying to load Web servic
Hi,
I am making a Guided procedure that calls a webservice. I have created a new Destination Template and was able to load the webservice definition successfully, but when I test the callable object I created for that same webservice y get the error:
GenericServiceFactory initialization problem when trying to load Web service model for WSDL.
Somehow I think there is something wrong with the user authentication. The Destination template has a user and password but somehow I think the callable object test is not using this information at all.
Can anyone help ?
Thanks in advanceHi Hans,
Have you verified if you can call any external web service calls from your J2EE engine? Go into the SOA Management / Global settings (if you are on CE - if you're on 7.0 it's in manage WS desintations).
Look at your proxy settings and set them like your web browser that enables external calls. For example, in the SAP network I set my global proxy settings on my local J2EE engine to be:
Proxy host: proxy
Proxy port: 8080
Exclude list: *.sap.corp
Does that make sense - have you verified if your settings are correct for your company?
Regards
Ginger -
Calling portal service from web service
Hello,
I'm trying to call portal service from web service. Is this possible? I'm getting an error.
For example, code:
IJCOClientService clientService = (IJCOClientService) PortalRuntime.getRuntimeResources().getService(IJCOClientService.KEY);
.. is generating exception:
java.lang.LinkageError: Class com/sapportals/portal/prt/runtime/IPortalRuntimeResources violates loader constraints
Do anybody knows what's wrong?
Best regards,
Josef MotlHi Josef,
Is the IJCOClientService located on the producer side or on the consumer side?
Amit -
Set listbox items from web service response
Hi All
I am trying to set list box items from a web service response. Couple of issues over here:
1. The user should be able to select multiple items from the list. Hence if I set "Allow multiple values" and set Commit on "exit", then after the web service returns the output, no data is displayed in the listbox. I need to click inside the list box to see the data returned by the web service. How to overcome this..?? ( However this problem (clicking inside the listbox to see the items) does not exist if "Allow multiple values" is unchecked and Commit is set on "Select". )
2. After the list box is filled up, certain default values should be selected. This selection is based on one of the response field (which is actually a table with multiple values... ). Hence, how to capture this response field and set the default values in the above list..??
3. The same case for a dropdown. The values are visible in dropdown. However, a default value should be selected and displayed after returning a response from web service. Again, this default value is dependant on another field in the response as in point no.2
I am trying to use postExecute event as described in [this|http://forms.stefcameron.com/2009/03/23/pre-process-web-service-responses/] link...however not able to achieve the functionality. Please provide suggestions / inputs.
Thanks
DeepakHello,
first: I don´t know anything about the right solution. I am unaware of the existence of the solution, because there were quite many of question about this multiple selection problem and I don´t remember a single "answer".
I can recommend you to simplify everything and create the functionality yourself. I have done that before to avoid these "Adobe-standard" problems. If you have a problem with autofill of the object, ask your WS to send you a single string and pass it yourself using scripting (JS).
And if you have problems with multiple selection, create your own field/ object. Get the string of values, parse it, create multiple lines of the dynamic table with some suitable tool to check/ select the rows you need (use checkbox for example, and your text as a table row). This way you can selected anything you want with no problems at all. It wil only cost you some extra work.
Regards, Otto -
Error when calling BPEL process from web service client
I have created three projects here ,there're no problem when testing Composite Application(SynchronousSampleApplication) by test case inside this project.
When I create a Java Application(SynchronousSampleApp),inside this project I've created a web service client from file WSDL of BPEL. After that, In Main class, I call an operation from web service client.But have the following error:
Jul 17, 2008 4:48:22 PM synchronoussampleapp.Main main
SEVERE: null
java.rmi.RemoteException: HTTP transport error: java.net.MalformedURLException: For input string: "${HttpDefaultPort}"; nested exception is:
HTTP transport error: java.net.MalformedURLException: For input string: "${HttpDefaultPort}"
at SynSample.SynchronuosSamplePortType_Stub.synchronuosSampleOperation(SynchronuosSamplePortType_Stub.java:83)
at synchronoussampleapp.Main.main(Main.java:24)
Caused by: HTTP transport error: java.net.MalformedURLException: For input string: "${HttpDefaultPort}"
at com.sun.xml.rpc.client.http.HttpClientTransport.invoke(HttpClientTransport.java:140)
at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:96)
at SynSample.SynchronuosSamplePortType_Stub.synchronuosSampleOperation(SynchronuosSamplePortType_Stub.java:67)
... 1 more
Please help me soon. Thanks very much!Can't anyone help me? I'm using Netbean 6.1 and Glassfish server.
Do I need any additional plugin? -
How to catch client information from web service server side?
Is there any possibilities to get the client information (any id or ipaddress or anything) from web service running server side(or in console)? I didn't get any idea how to catch this information. If someone knowing this, that would be great and appreciate that help.
hellloo to u tooooooo
if u r using any request object u will get the host ipaddress as
request.getRemoteHost() funciton
regards
shanu
Maybe you are looking for
-
Moving exisiting iview to new page in MSS buisness package
Hello there, We are using the MSS bp for ECC 6.0. I want to change location of existing iview from the general information page to a differ existing page. I want to use FPM to support events between this iview to the search employee iview. Is it pos
-
Transferring Problems W/ 30 GB New Ipod
So I'm not exactly sure how to describe this but this is what happens and I wanna know why and how I can change this. I went on my ipod the other day to say search for a Method Man song I have on my itunes. I have about 5959 songs on my itunes and it
-
E-filling India localization Annual Returns - Extended Withholding Tax
Hi All Please provide custamzation steps for Efilling TDS returns - India in R/3 4.6C Thanks
-
Apply a Batch Process of Clean Up and Level Voice Over?
I want to apply a batch proces of "Clean Up and Level Voice Over," which is a preset. However, batch processes can only use "favorites." So I try to create a favorite with the preset. But this gives me an error, "A new favorite could not be recorded
-
I created a folder in my photostream on my iphone but I can not see the folder on my iPad 1. My wife does see the folder on her iPad 3. Is there anything I can do for my older iPad?