Accessing a configuration file from a Web Service
I have a business logic class that loads in a file of records and then has various searching methods provided. The way that it is currently used is via a servlet that has one parameter in the web.xml file that is the location of the properties file. This servlet creates a Configuration singleton by passing the location from the web.xml. The Configuration singleton reads in the properties file. The business logic class gets the location of the record file from the Configuration singleton to then read it in. I am trying to wrap this business logic class with a web service now and am not sure how to go about initializing the Configuration singleton without hardcoding the location of the properties file.
Can anyone tell me what the best method of reading in configuration items from within a web service (i.e. an equivalent to the servlet web.xml method)? Where in the EAR or WAR should this properties file be located and then how do you get to it? I am using WebLogic 8.1 and creating the web service with the WebLogic Ant tasks (servicegen, wspackage, clientgen, etc.).
Thanks,
Adam
okay, so actually, was attributing my problem to the wrong thing. in fact, another coding error (the way i was reading lines from the buffered reader) is to blame. turns out you CAN read from a file in the init or the doGet...
bear with me, i'm just learning but anybody able to tell me why i can't trigger a FileNotFoundException here, even if i pass the FileReader a file that doesn't exist:
try {
BufferedReader r = new
BufferedReader(new FileReader("???"));
String s = r.readLine();
int i=1, j=0;
while (s != null) {
if (i%2==0) {
mailInfo[j] = s;
j++;
s = r.readLine();
i++;
catch (FileNotFoundException e) {
e.printStackTrace();
catch (IOException e) {
e.printStackTrace();
}
Similar Messages
-
Open a local file from a web Service
Hello!
Likely this is a trivial question, but I need to open a local file from a Web Service and i don't know how to get the file path. I mean that I have a WS source code placed in a proper package (my.ws.package) with an additional configuration XML file placed in the same directory. I need to read it, but if I use merely
File conf = new File("Conf.xml");it can't find it. I've tryed with:
MyWS.class.getClass().getProtectionDomain().getCodeSource().getLocation().getPath()in order to get the file path, but a
java.security.AccessControlException access denied (java.lang.RuntimePermission getProtectionDomain)arises...
I don't know...
Suggestions?
Thanks.
AnhurHello!
Likely this is a trivial question, but I need to open a local file from a Web Service and i don't know how to get the file path. I mean that I have a WS source code placed in a proper package (my.ws.package) with an additional configuration XML file placed in the same directory. I need to read it, but if I use merely
File conf = new File("Conf.xml");it can't find it. I've tryed with:
MyWS.class.getClass().getProtectionDomain().getCodeSource().getLocation().getPath()in order to get the file path, but a
java.security.AccessControlException access denied (java.lang.RuntimePermission getProtectionDomain)arises...
I don't know...
Suggestions?
Thanks.
Anhur -
I am encountering the following error when trying to connect to an Access 2013 database:
The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.
I have Visual Studio 2013 SP3 running on Windows 8.1 64bit OS which also has Office 2013 installed (which includes MS Access 2013). My project is a WCF web service using .NET Framework 4.5.1 using any cpu as target. I have tried reluctantly
to install the older drivers as described by in the below article:
https://social.msdn.microsoft.com/Forums/en-US/1d5c04c7-157f-4955-a14b-41d912d50a64/how-to-fix-error-the-microsoftaceoledb120-provider-is-not-registered-on-the-local-machine?forum=vstsdb
and also went through the "Add Data Source" wizard in the Project menu to have the connect string automatically built. Even with the automatically built connect string I can not connect to the .accdb file from within my WCF web service.
What's odd is if I use the Database Explorer in Visual Studio it has no problem connecting the my Access file. I inspected the connect string and tried to use it as well but still get the same error. Even stranger is that I have no problem connecting
to the Access DB in an ASP.NET project on the same PC. I am also able to connect to the Access file using a simple Windows Forms application. So I'm wondering if it has something to do with trying to connect to the Access file from a WCF web service
project.
What I'd like to know is if anyone has been able to get this to work in an environment as I described above as a 64bit WCF web service project? I tried to switch my project to 32bit but when I do I get a different error which reads:
System.BadImageFormatException: Could not load file or assembly 'file:
Almost to the point of trying to get this web service project done with SQL Express but would like to know if it can be done with MS Access 2013. Any information anyone can provide to help me get past this issue is greatly appreciated. Thanks.Have you installed the 64-bit Access driver on your machine? See
Data Source Names and 64-Bit Operating Systems for the differences in odbcad32. Call %SystemRoot%\system32\odbcad32.exe to check the drivers.
How do you host your service? Stand-alone or IIS or embedded to another application? Keep in mind that IIS7 runs it in its application pool which is defaullt 64bit. Thus the bad image exception, when compiling your service as 32bit.
When you need the Access database for your service to store informtation, then I would switch to SQL Server (Express) or XML files depending on your actual needs.
Also check whether your account under which your service is run has the necessary NTFS file permissions on the access file and the folder. This is getting even more complex when it's a remote folder. -
Reading XML file from java web service
Hi
I am developing web service using Netbeans and the application server is glassfish.
but I am facing a problem
I have folder called "config" which will include the xml files. What I need to do setting path into that folder
but it will read from another location when I am deploying it
How to set our own path ?
Error
DPL5306:Servlet Web Service Endpoint [NewWebService] listening at address [http://kapila.epic.lk:8080/WebApplication2/NewWebServiceService]
deployed with moduleid = WebApplication2
java.io.FileNotFoundException: /root/MyWorks/glassfish-v2/domains/domain1/config/OSconfig/MConfig.xml (No such file or directory)
at java.io.FileInputStream.open(Native Method)
My "conifg" folder, i have put in to working directory but it will read from "/root/MyWorks/glassfish-v2/domains/domain1/config/OSconfig/MConfig.xm"
below method is used for getting its contain value
public String getMainCofig() {
String v ="";
try{
DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory
.newInstance();
DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
Document doc = docBuilder.parse(new File("OSconfig/MConfig.xml"));
doc.getDocumentElement().normalize();
NodeList listOfSPRMs = doc.getElementsByTagName("MainConfig");
Node firstSPRMNode = listOfSPRMs.item(0);
if (firstSPRMNode.getNodeType() == Node.ELEMENT_NODE) {
Element firstSPRAMElement = (Element) firstSPRMNode;
// Getting platform
NodeList server_port = firstSPRAMElement
.getElementsByTagName("RunningPlatform");
Element server_port_el = (Element) server_port.item(0);
NodeList server_port_List = server_port_el.getChildNodes();
v= ((Node) server_port_List.item(0))
.getNodeValue().trim();
}catch (Exception e){
e.printStackTrace();
return v;
Regards
I didn't quite get what the problem is but if the the desired file is in custom directory why don't you just use absolute path to reference it?
Like: "/home/my/OSconfig/MConfig.xml" -
Use installshield to create setup file from mvc web service
I need help from gurus :)
I have an mvc web service and I need to create a setup package with installshield but I don't know how to do it.
I want create setup to install at another machine (under IIS)
Can someone help me please?
Thanks in advance.Hello,
Welcome to MSDN forum.
Your issue is out of support range of VS General Question forum which mainly discusses
the usage of Visual Studio IDE such as WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System
and Visual Studio Editor.
Because you want to use InstallShield which we don't provide support, I suggest you to consult your issue on InstallShield forums for better support.
Thanks,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Hello:
I have a Mac running OS 10.8.5 and I use Acrobat Pro and Acrobat Reader. Today for some reason, any time I try and access a pdf file from a web page, it won't open. I get a blank window. PDF files already on my computer open fine and I can create PDF files from Word docs, but I can't download or view any pdf file from any web page. Strangely, PDF files on web pages open just fine on my iPhone.
I checked that both my copy of Acrobat Pro and Acrobat Reader are up-to-date. They are.
I checked that my copy of Firefox is up-to-date. It is. And nothing changed with Firefox within the last 24 hours.
I am a humble computer end-user. I am baffled as to why this would suddenly not work. I have not changed any settings, etc. Any help or suggestions would be greatly appreciated.Thank you.
I checked your instructions you sent and as far as I can tell all of my settings, etc for Firefox (plugin updates and preferences) are correct but I am having the same problem.
However, everything works in Safari. I don't have time to attempt to diagnose why Firefox no longer works. I will just switch to Safari.
Many thanks.
Charles
Charles Deister
(503) 949-5762
[email protected]<applewebdata://81CB4171-226F-49DF-BD59-A38A7360B3FB/[email protected]>
PO Box 5032
Salem, OR 97304
http://www.pilotstrat.com<http://www.pilotstrat.com/>
This transmission (including any attachments) may contain confidential information, privileged material, or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful. -
Revision: 3519
Author: [email protected]
Date: 2008-10-08 04:17:40 -0700 (Wed, 08 Oct 2008)
Log Message:
Fix typo in error string for situations where there are advanced messaging configuration settings from LCDS used in the configuration files but no AdvancedMessagingSupport service. The error string said that there was no flex.messaging.services.AdvancedMessagingService registered but it is the flex.messaging.services.AdvancedMessagingSupport service that needs to be registered.
Add configuration test that starts the server with a destination that has the reliable property set which is an advanced messaging feature but there is no AdvancedMessagingSupport service registered.
Modified Paths:
blazeds/trunk/modules/common/src/flex/messaging/errors.properties
Added Paths:
blazeds/trunk/qa/apps/qa-regress/testsuites/config/tests/messagingService/ReliableDestina tionWithNoAdvancedMessagingSupport/
blazeds/trunk/qa/apps/qa-regress/testsuites/config/tests/messagingService/ReliableDestina tionWithNoAdvancedMessagingSupport/error.txt
blazeds/trunk/qa/apps/qa-regress/testsuites/config/tests/messagingService/ReliableDestina tionWithNoAdvancedMessagingSupport/services-config.xmlHi,
Unfortunately I already tried all kinds of re-installs (the full list is in my original message). The only one remaining is the reinstall of Windows 8 itself, which I would really like to avoid.
What I find really strange is the time it takes for the above error message to appear. It's like one hour or even more (never measured exactly, I left the computer running).
What kind of a timeout is that? I would expect that, if ports are really used by some other application, I get the message in less than a minute (seconds, actually). To me this looks like the emulator itself for some reason believes there's a problem with
some port while in reality there isn't.
I'll eventually contact Microsoft Support, thanks for the suggestion.
▼
▲ -
How to access HTTP Header from within Web service?
Hello,
Is there a way to access HTTP header variables like CONTENT_TYPE, CONTENT_LENGTH from within Web Logic web service.
I was able to get the HTTP header variable from within Apache AXIS services by calling context.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST
How can i do this from weblogic web service.
I need this to verify the client SSL_CLIENT_DN
In access I can get the header as follows.
HttpServletRequest req = (HttpServletRequest) context
.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);
clientID = req.getHeader("SSL_CLIENT_S_DN_Email");
Thanks
--Arunhi
the following link may helpful to you
http://e-docs.bea.com/wls/docs81/webserv/anttasks.html#1111537
Regards
Prasanna Yalam -
I can't figure out data binding from a web service.
Hi,
I've been trying to figure out how to connect a TreeTable control with data from a non-SAP web server. Here's what I have so far;
I have a sample program that uses json in a variable called oData.
I have a TreeTable control named oTable.
I create a model;
var oModel = new sap.ui.model.json.JSONModel();
I feed the oData variable into it;
oModel.setData(oData);
Finally, I feed the oModel to the oTable;
oTable.setModel(oModel);
That all makes sense. What I want to do is get the data from a web service. The only examples I've been able to find show how to configure an SAP data service and then connect to that. They don't give any details of the format that the SAP data service is sending. I don't have access to an SAP system so I can't set one up to reverse-engineer the data. I'm going to be writting my own oData service for this so I need a couple of things;
1. An example of json or xml data as it's sent from a web server.
2. An example of how you pull that data from the web service to an SAP ui model.
I could really use some help. I haven't been able to find any examples that make sense to me.Hi Joe
Here is an small example. Maybe it is useful to you.
In this example, I bind the tree to /root and you can see that we have 0: 1: elements under each element recursively.
Thanks
-D -
How to access Portal Logged in user in Web Service application
Hi Experts,
I have created one Deployable Proxy and based on that i have created Web Based (WAR) project. to consume the proxy i have created Servlet based java file which invokes Web services. Based on this WAR project i created EAR application which deploys on J2EE server.
I am facing issue while accessing Portal Logged in user in my Servlet Class in WAR project so can you please provide inputs for how we can access Portal Logged in user in our Servlet class? also how we can access LDAP detailes of portal Logged inuser ?
I tried to fetch the Logged in user from servlet request but i can't access it giving me null value. Following is the method details that i am using in my servlet.
protected void doGet(HttpServletRequest request,HttpServletResponse response)throws ServletException, IOException
IUser user = UMFactory.getAuthenticator().getLoggedInUser();
String strName = user.getFirstName();
If I checked in LDAP values First name for logged in user is present but in my code its giving Null value.
Can you please provide your inputs on above issue.
Regards,
Rahulhave you found a solution this problem yet?
-
How to access a PDF file from Oracle DATABASE SERVER
Hi
I have some pdf files in "\home2\docs" directory in Oracle database server 10g. (OS is Linux) I want to access those pdf files from my client system through Oracle Forms. How is it possible?
Please Help!!!! It is very urgent !!!
Expecting fast response!!!!!
Byehi
Thank u for ur response.
Initially i tried to access pdf file from database server. I didn't get any solution for that. So I copied all my pdf files to Application server which is in Linux environment at "/home2/docs" directory.
I gave the following command for accessing the pdf files kept in Lnux Application Server from Oracle 10g forms in a button press trigger.
web.show_document('http://192.168.1.53:7779/home2/docs/test.pdf');
It says "page cannot be found"
So I copied one of the pdf file named "test.pdf" to "/oracle/oas10g/IasHome/forms90/java" in Linux Application Server . Then the following command
web.show_document('http://192.168.1.53:7779/forms90/java/test.pdf');
has opened the the pdf file in browser.
192.168.1.53 is my Linux Application Server IP. and 7779 is the port.
Actually we have lacs of pdf files. So i cannot keep all the pdf files in "/oracle/oas10g/IasHome/forms90/java" directory in Linux Application Server. And also all the pdf files not in the same directory , "/home2/docs" some of the pdf files r in the subdirectories of "/home2/docs/" like /home2/docs/sub1, /home2/docs/sub2, /home2/docs/sub3 etc.
Then how to configure my "/oracle/oas10g/IasHome/forms90/server/forms90.conf" file for retrieving pdf files from "/home2/docs/" and its subdirectories. Is Anything other than this, required for solving my problems.
Now My PDF files r in LINUX APPLICATION SERVER not in database server.
Please help!! It is VERY URGENT!!! -
Erro while recieving a signed response from a web service
i'm not sure whether this is the right forum to post this topic, but anyways i'm going fwd as i was not able to find a rite one, if any body knows, plz redirect me to that, anyways below is my issue.
i'm using axis as a web service engine on my client side and getting a signed response from a web service.
But while recieving the response im gettng the following error.
Verification failed for URI "#id-13753285"
org.apache.ws.security.WSSecurityException: The signature verification failed
at org.apache.ws.security.processor.SignatureProcessor.verifyXMLSignature(SignatureProcessor.java:332)
at org.apache.ws.security.processor.SignatureProcessor.handleToken(SignatureProcessor.java:79)
at org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:279)
at org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:201)
at org.apache.ws.axis.security.WSDoAllReceiver.invoke(WSDoAllReceiver.java:159)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:190)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.sterlingcommerce.www.mesa.GISBindingStub.executeLightweightJDBCAdapterQuery(GISBindingStub.java:210)
at client.MyClient.makeRequest(MyClient.java:105)
at client.MyClient.main(MyClient.java:134)
failed becoz of remote exception: org.apache.ws.security.WSSecurityException: The signature verification failed
Exception in thread "main" org.apache.ws.security.WSSecurityException: The signature verification failed
at org.apache.ws.security.processor.SignatureProcessor.verifyXMLSignature(SignatureProcessor.java:332)
at org.apache.ws.security.processor.SignatureProcessor.handleToken(SignatureProcessor.java:79)
at org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:279)
at org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:201)
at org.apache.ws.axis.security.WSDoAllReceiver.invoke(WSDoAllReceiver.java:159)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:190)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.sterlingcommerce.www.mesa.GISBindingStub.executeLightweightJDBCAdapterQuery(GISBindingStub.java:210)
at client.MyClient.makeRequest(MyClient.java:105)
at client.MyClient.main(MyClient.java:134)
below are my hadler configurations and properties file
<handler type="java:org.apache.ws.axis.security.WSDoAllReceiver" >
<parameter name="action" value="Signature"/>
<parameter name="user" value="signverf"/>
<parameter name="passwordCallbackClass" value="client.PWCallback"/>
<parameter name="passwordType" value="PasswordDigest"/>
<parameter name="signaturePropFile" value = "signatureVerifyCrypto.properties"/>
<parameter name="signatureKeyIdentifier" value="DirectReference"/>
</handler>properties file
org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
org.apache.ws.security.crypto.merlin.keystore.type=jks
org.apache.ws.security.crypto.merlin.keystore.password=password
org.apache.ws.security.crypto.merlin.keystore.alias=signverf
org.apache.ws.security.crypto.merlin.alias.password=password
org.apache.ws.security.crypto.merlin.file=certs/signverf/signverf_pubkeystore
commands i used to generate keystore:
keytool -import -alias signverf -file privCert4Sign.cer -keystore signverf_pubkeystore -storepass password
keytool -list -alias signverf -keystore signverf_pubkeystore
i tried goggling for this error,in one thread i got this is because of some issue in axis 1.4 which i'm using and if i try using axis 1.2, this will not come,
for the time i'm not able to download axis 1.2 from any of the apache mirrors :( ,
if some one can provide me the link,it will be really helpful.
also if anyone as faced similar issue or can see whats going wrong here, please reply.
also below is my soap response capture using tcpmon
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><ds:Signature Id="Signature-18290758" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/>
<ds:Reference URI="#id-13753285" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:Transforms xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/>
<ds:DigestValue xmlns:ds="http://www.w3.org/2000/09/xmldsig#">jAaM4xp/2ZOch7iqyyLynojMpV0=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
JiOjIFgJ2qMvzJsirbjgV7AeDWfsS0Ak3xzue1nK+LXELM3tZ/h/eFyxCLZfLk+553vJbmnlU423
8NgjgngYcYa+bB6yTovZJKB66LdQEHLpmTX4WNteLrcVOBfHyZcJCKemF2XyaF4yX03XGAIdNnFV
1d8wZQcBgakPIrjJGAZtwo94bYBlL/MJedBP819Ecf/N6hEmafFxHD46Xapi+HdcDjQmCqxaol/I
bQuM3ikJJ2v+46bQNKEWavdG7lIicjUsvH3xpyzZthj26nAHV6nAOEe8tybKhKLga6KDM+3eAJNq
3s52yZTz68n7z5AijdmhMkc7ivCxELBx5TQYsw==
</ds:SignatureValue>
<ds:KeyInfo Id="KeyId-20631690" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<wsse:SecurityTokenReference wsu:Id="STRId-5317380" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><wsse:KeyIdentifier EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3">MIIDLDCCAhSgAwIBAgICBNIwDQYJKoZIhvcNAQEFBQAwTzEWMBQGA1UEAwwNcHJpdkNlcnQ0U2lnbjEMMAoGA1UECgwDYWJzMQswCQYDVQQGEwJVUzEaMBgGCSqGSIb3DQEJARYLeHl6QGFiYy5jb20wHhcNMDcwOTA0MDQzNzMxWhcNMDgwMzAyMDQzNzMxWjBPMRYwFAYDVQQDDA1wcml2Q2VydDRTaWduMQwwCgYDVQQKDANhYnMxCzAJBgNVBAYTAlVTMRowGAYJKoZIhvcNAQkBFgt4eXpAYWJjLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJSG2UR8nMAxctBlR5YSnEVeuHNFMM7t8YQX6J8GRausKPXyDT4pIfPHRaeag62K4cUhBDYBLyUmZqYTZBHpKISgYkYsXqYHoB4gif664rZvpMKw+cTpD/3WzViOeHHWfQM5/XUatLBPXzRUB78PcM9RnCEeznKUEPoWxTfl2qsR0d4CxOVzH9dHn6JCEaQQWzntH61YCw4Qm6Kq78+sLfnv7CBrg/NYewFX9JozZk7UzlmPZWCm7pp2d4UDn1KB7nLnLFxD6aMgjAikWKAU4h15ihJxu6Appc+ggAdAV/jQiaIeAtokfe2Iw1bUh8SOOR8iUa9lK0Jf6C/N9ZTnxCcCAwEAAaMSMBAwDgYDVR0PAQH/BAQDAgTwMA0GCSqGSIb3DQEBBQUAA4IBAQCKfRu1cXkwwnNZ+0brwT4iI1q/Ti/OVMWpP15Ob7bDE5rUjwpNUJXXlqKdOh7pkk1gLTiebQrMkd0ozpbi/Xdmea1xf9diCc4IApg6K9G4KACR2sLeXcKy7d4hakYqMLeaPJwBcd3V6DGiJgfP2S8Ui8rQzDpslTBM1+YaBdUVIv1/VCFO/K5I4lkPkjGDp/qDm4lXn3Mup9HG9INgklA02hPnYHWunVZm/5MZpEn4BYks+B3VqCXSAkRVD9aAuM3Tv4atblHDs3oKTV1awoVQbKkw+Eonnc/+Mex8A5sJ/8eUnQ3UPdT77U0+WcrvwFxoFP2e0J8xHW8N8b2fIr8H</wsse:KeyIdentifier></wsse:SecurityTokenReference>
</ds:KeyInfo>
</ds:Signature></wsse:Security></soapenv:Header>
<soapenv:Body wsu:Id="id-13753285" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<mesa:processData xmlns:mesa="http://www.sterlingcommerce.com/mesa" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ProcessData>
<service>Test_Web2</service>
<b2b-protocol>http</b2b-protocol>
<transport-instance-id>MESAHttpServerAdapter_HttpServerAdapter_node1</transport-instance-id>
<SyncModeBP>false</SyncModeBP>
<http-request-uri>/soap-new</http-request-uri>
<transport-session-id>Fri Aug 31 14:04:57 IST 2007:110</transport-session-id>
<incomingSOAPTransportMode>http</incomingSOAPTransportMode>
<VERIFICATION_KEY/>
<DECRYPTION_KEY/>
<SECURITY_TOKEN_NAME>ST1</SECURITY_TOKEN_NAME>
<SIGNING_CERTIFICATE>blrgislin13:10.11.23.37:114bb0fb841:12328</SIGNING_CERTIFICATE>
<SIGNING_ALGO>http://www.w3.org/2000/09/xmldsig#rsa-sha1</SIGNING_ALGO>
<SIGNING_KEY_IDENTIFIER_TYPE>3</SIGNING_KEY_IDENTIFIER_TYPE>
<CANONICALIZATION_ALGO>http://www.w3.org/TR/2001/REC-xml-c14n-20010315</CANONICALIZATION_ALGO>
<SIGNATURE_ENCRYPTION_ORDER>-1</SIGNATURE_ENCRYPTION_ORDER>
<SOAP_URI>/soap-new</SOAP_URI>
<SOAPEnvNSPrefix>soapenv</SOAPEnvNSPrefix>
<SOAPEnvNSURI>http://schemas.xmlsoap.org/soap/envelope/</SOAPEnvNSURI>
<messageMode>1</messageMode>
<query_type>SELECT</query_type>
<result_name>result</result_name>
<pool>mysqlPool</pool>
<row_name>row</row_name>
<sql>SELECT * FROM MBX_MAILBOX</sql>
<serviceMode>1</serviceMode>
<typeName>LightweightJDBCAdapterQuery</typeName>
<PrimaryDocument SCIObjectID="blrgislin13:10.11.23.37:114bb0fb841:19200"/>
<ADD_SOAP_ENVELOPING>false</ADD_SOAP_ENVELOPING>
<INSERT_SECURITY_HEADER>false</INSERT_SECURITY_HEADER>
</ProcessData>
</mesa:processData>
</soapenv:Body>
</soapenv:Envelope>
sorry for this long mail, but we are really stuck and need to move forward,
looking for your help.Hi,
The Service Control Manager will generate an event if a service does not respond within the defined timeout period (the default timeout period is 30000 milliseconds). You could modify the registry to increase the default time-out value for the service control
manager.
For more detailed information, please see:
Event ID 7011: Service Timeout
http://social.technet.microsoft.com/wiki/contents/articles/13765.event-id-7011-service-timeout.aspx
The Event 12362 indicates that a destination LUN could not be located or could not be restarted. You could refer to the article below to troubleshoot the issue:
Event ID 12362 — VSS Shadow Copy Provider Operations
http://technet.microsoft.com/en-us/library/ee264223(v=ws.10).aspx
Best Regards,
Mandy
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place. -
I'm unable to print pdf files from certain web sites. I have just changed to Mavericks
i'm unable to print pdf file from certain web site. I just changed over to Mavericks.
You will need to access that PDF on your computer first, before you can print it — unless that PDF is corrupted, which occasionally happens. Your printer needs to be configured and working.
Default PDF web-browser plug-in in Safari, latest (Firefox/Chrome) also built-in.
Click on the remote PDF link to open in browser
On Mavericks, you will need to click through security challenges for the PDF
File menu > Print
Right-click on remote PDF file and then choose Download Linked File As...Open that file in /Applications/Preview.appFile > print
Adobe Reader 11.0.04 PDF plug-in
Same security challenges on Mavericks as first bullet
With PDF imaged in browser, either select print icon from the plug-in toolbar, or mouse over the bottom one inch of displayed document and you will see a printer icon in the popup toolbar. Use that. -
Null Values From MS Web Services Toolkit Client
Hi,
I've been bashing my head against a wall on this one for too long now.
I've got a JAX-WS web service deployed to Glassfish v2 b33 which works fine when called by a Java client. It also works fine when methods with no parameters are called from the MS client, i.e. simple and complex types are returned as they should be. However the problem I am having is that when the web service methods that take parameters are called from the MS client, the values received by the service are always null. I've montitored the service and values are being sent in the soap request, but a simple System.out.println statement in the first line of the method indicates a null value. I've captured a request from the Java client and the MS client to show the difference:
A java request:
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header/>
<soapenv:Body>
<ns0:getConfig xmlns:ns0="http://ws.firestorm.alternativenetworks.com/">
<arg0>Inbound</arg0>
</ns0:getConfig>
</soapenv:Body>
</soapenv:Envelope>and a request from the web services toolkit:
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema"
xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAPSDK3="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<SOAPSDK4:getConfig xmlns:SOAPSDK4="http://ws.firestorm.alternativenetworks.com/">
<SOAPSDK4:arg0>Inbound</SOAPSDK4:arg0>
</SOAPSDK4:getConfig>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>I've tried everything I can think of, including changing the style from RPC/LITERAL to DOCUMENT/LITERAL, but the Java web service just seem to like the way the SOAP message is wrapped up.
Any help on this would be greatly appreciated.
Cheers
TonyThanks Milan, your suggestion put me on the right track, however I've hit another snag.
I decided the best way to solve the problem was to use the Glassfish Transformation Rules feature to take the SOAP request and transform it to a valid format before reaching the code. The XSLT file I created looks like this (I'm no XSLT guru so this will definitely need some tidying up, but for now it works): <?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema"
xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAPSDK3="http://schemas.xmlsoap.org/soap/encoding/">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="*">
<xsl:copy><xsl:copy-of select="@*"/><xsl:apply-templates/></xsl:copy>
</xsl:template>
<xsl:template match="/SOAP-ENV:Envelope/SOAP-ENV:Body/*">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:for-each select="*">
<xsl:text disable-output-escaping="yes"><arg</xsl:text>
<xsl:value-of select="position() - 1"/>
<xsl:text disable-output-escaping="yes">></xsl:text>
<xsl:value-of select="."/>
<xsl:text disable-output-escaping="yes"></arg</xsl:text>
<xsl:value-of select="position() - 1"/>
<xsl:text disable-output-escaping="yes">></xsl:text>
</xsl:for-each>
</xsl:copy>
</xsl:template>
</xsl:stylesheet> which transforms the problem SOAP request: <SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema"
xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAPSDK3="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<SOAPSDK4:getConfig xmlns:SOAPSDK4="http://ws.firestorm.alternativenetworks.com/">
<SOAPSDK4:arg0>Inbound</SOAPSDK4:arg0>
</SOAPSDK4:getConfig>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope> to the following valid format: <?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema"
xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAPSDK3="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<SOAPSDK4:getConfig xmlns:SOAPSDK4="http://ws.firestorm.alternativenetworks.com/">
<arg0>Inbound</arg0>
</SOAPSDK4:getConfig>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope> But when I load the .xsl file using the Transformation Rules page and call the web service using the Microsoft Web Services Toolkit, I'm getting the following exception: [#|2007-05-11T09:23:46.530+0100|INFO|sun-appserver9.1|javax.enterprise.system.tools.admin|_ThreadID=15;_ThreadName=Thread-15;com.sun.enterprise.admin.event.wsmgmt.TransformationRuleEvent -- server [1 Change(s), Id:1, ts:1178871826530];|ADM1041:Sent the event to instance:[com.sun.enterprise.admin.event.wsmgmt.TransformationRuleEvent -- server [1 Change(s), Id:1, ts:1178871826530]]|#]
[#|2007-05-11T09:27:31.675+0100|INFO|sun-appserver9.1|javax.enterprise.system.tools.admin|_ThreadID=12;_ThreadName=httpWorkerThread-4848-0;com.sun.enterprise.admin.event.wsmgmt.TransformationRuleEvent -- server [1 Change(s), Id:2, ts:1178872051675];|ADM1041:Sent the event to instance:[com.sun.enterprise.admin.event.wsmgmt.TransformationRuleEvent -- server [1 Change(s), Id:2, ts:1178872051675]]|#]
[#|2007-05-11T09:28:00.269+0100|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=13;_ThreadName=httpSSLWorkerThread-8080-0;_RequestID=89eadb09-2894-4ace-95f6-75043c1e6988;|
ERROR: ''|#]
[#|2007-05-11T09:28:00.285+0100|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=13;_ThreadName=httpSSLWorkerThread-8080-0;_RequestID=89eadb09-2894-4ace-95f6-75043c1e6988;|
com.sun.enterprise.admin.wsmgmt.transform.TransformException: javax.xml.transform.TransformerException: java.lang.NullPointerException
at com.sun.enterprise.admin.wsmgmt.transform.FilterChain.process(FilterChain.java:238)
at com.sun.enterprise.admin.wsmgmt.transform.TransformFilter.process(TransformFilter.java:144)
at com.sun.enterprise.admin.wsmgmt.filter.spi.FilterRouter.applyFilters(FilterRouter.java:69)
at com.sun.enterprise.admin.wsmgmt.agent.GlobalMessageListenerImpl.processRequest(GlobalMessageListenerImpl.java:181)
at com.sun.enterprise.webservice.monitoring.WebServiceEngineImpl.processRequest(WebServiceEngineImpl.java:265)
at com.sun.enterprise.webservice.monitoring.JAXWSEndpointImpl.processRequest(JAXWSEndpointImpl.java:53)
at com.sun.enterprise.webservice.MonitoringPipe.process(MonitoringPipe.java:127)
at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:79)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:559)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:518)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:503)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:400)
at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:70)
at com.sun.xml.ws.mex.server.MetadataServerPipe.process(MetadataServerPipe.java:97)
at com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:191)
at com.sun.enterprise.webservice.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:113)
at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:79)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:559)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:518)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:503)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:400)
at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:208)
at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:374)
at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:175)
at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:134)
at com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:100)
at com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:74)
at com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:187)
at com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServiceServlet.java:116)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:101)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:558)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:207)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:558)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1067)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:558)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1067)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:249)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:618)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:549)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:790)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:326)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:248)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:199)
at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:328)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:93)
Caused by: javax.xml.transform.TransformerException: java.lang.NullPointerException
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:651)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:281)
at com.sun.enterprise.admin.wsmgmt.transform.FilterChain.process(FilterChain.java:224)
... 54 more
Caused by: java.lang.NullPointerException
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1235)
at com.sun.org.apache.xalan.internal.xsltc.trax.TrAXFilter.parse(TrAXFilter.java:105)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:588)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:642)
... 56 moreCould this be a bug or am I doing something wrong?
Cheers again,
Tony -
Retrieve data from a web service.
Hi,
I need to retrieve the data from Oracle CRM On Demand therefore I downloaded the web service "CustomObject15" from Oracle CRM On Demand then used the netbeans Tool to generate XML files then call Web Service "CustomObject15" then I created small java code to retrieve the data through a web service but the data did not retrieved.
Only retrieved "CustomObject15Data.CustomObject15Data@1be0799a"
Kindly, Can you help me and provide me small java code to the data through a web service "CustomObject15".
Best Regards.Hi,
just create a skeleton for the Web Service. In JDeveloper, create a new project and then use the "NEW" context menu option.
Navigate to "Business Tier" --> Web Services and select "Web Service Proxy"
In teh following, provide the WSDL reference to create the Java proxy. This gives you accss to the WS without having to parse the XML yourself
Frank
Maybe you are looking for
-
What are the REAL system requirements for High Definition Editing?
According to Apple, you can edit HD in iMovie with: a G4 1GHz or faster processor, 512MB RAM or higher, and OSX 10.3.6 or higher. I am running a G4 iMac 1.25GHz with 512MB DDR SDRAM and Tiger 10.4.3 My machine can barely import HD from my new Sony HD
-
Firefox 3.6.6 will not allow Windows 7 to log off or shut down
I have a HP DV6 laptop (32 bit) with Windows 7. Firefox 3.6.6. seems to work well but the computer became slow and unresponsive and it will not log off, shut down or restart unless in safe mode. I uninstalled FF 3.6.6. and Adobe Flash 10 and now it w
-
why wont my ipod contact to the internet,please dont be techincal as i wont understand you. the router has a laptop connected and my sky tv.
-
Satellite L755-S5368 - PrintService Error Event ID 372
I got a Toshiba Satellite L755-S5368 laptop with Windows 7 64b. I have an HP 1020 LaserJet printer with the latest HP software installed lj1020-HB-pnp-win64-en.exe that I can find from HP. The printer works fine, but everytime I print something an er
-
Missing some values for Navigation attr
Hi All, 1. We are using a Navigational attr for an MD Info object 2. This Nav attr is used in Cube(Checked box - as Nav @ cube level) 3. Problem is : I am able to see all Navigation attr values data , but randomly missing some values for