Unable to access web service through SOAP
My script is as follows:
var bank = "Yolo FCU";
var cURL = "https://vdevcluster01.drmain.local/AcrobatIntegration/1.0/VOService.svc?wsdl";
var service = SOAP.connect(cURL);
var response = service.GetVODStringByFinancialInstution(bank);
I can connect to many other public web services but am having trouble connecting to my company's.
The full error message is as follows:
Batch undefined:Exec
1
RaiseError:
SOAP.request:1:Batch undefined:Exec
===>
12
255
65535
Error()@:0
("Yolo FCU")@1:1
@Batch:Exec:5
I'm not extremely knowledgeable about web services but as a general question, is there an issue with my code or the web service, or is it impossible for anyone to tell me since it's on a private server?
Any suggestions for me to ask my IT dept. or any help at all would be appreciated. Thanks
I have imported the cert. But the problem still persists.
In the Adobe LiveCycle Designer, when i make a new Data Connection for WSDL.
If I key in http://server_IP:port/webservices/webmethod?WSDL, it works.
But If I key in https://server_IP:ssl_port/webservices/webmethod?WSDL,
it prompted back
Cannot load "https://server_IP:ssl_port/webservices/webmethod?WSDL". Check that the path is correct and that the file
is a valid WSDL file. Also ensure you have access rights to the file.
Similar Messages
-
Exception while accessing web service through code
I have a web service developed using AXIS deployed on Weblogic 8.1
Another web application cotaining GUI deployed on Weblogic 10 tries to access this web service through code.
This piece of code to invoke the web service is written in Action Class present inside web application. (Struts is used in GUI based web app)
When the code tries to invoke web service I am getting following error.
(401)Unauthorized xxx
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:630)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:128)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:180)
at org.apache.axis.client.Call.invokeEngine(Call.java:2564)
at org.apache.axis.client.Call.invoke(Call.java:2553)
at org.apache.axis.client.Call.invoke(Call.java:1753)
at com.ebv.app.web.action.UCS77_1ProcessOfficialChangeSaveDetailsAction.invokeAx(UCS77_1ProcessOfficialChangeSaveDetailsAction.java:243)
at com.ebv.app.web.action.UCS77_1ProcessOfficialChangeSaveDetailsAction.callUCS77_1ProcessOfficialChangeWebService(UCS77_1ProcessOfficialChangeSaveDetailsAction.java:173)
at com.ebv.app.web.action.UCS77_1ProcessOfficialChangeSaveDetailsAction.processAction(UCS77_1ProcessOfficialChangeSaveDetailsAction.java:133)
at com.ebv.framework.web.action.EBVAction.execute(EBVAction.java:106)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
The web service URL is as follows:
http://10.140.96.5:7808/services/ucs77_1/ProcessOfficialChangeSave77_1-v0001.soap
However
When I try to hit the webservice URL directly on browser login window appears where same username/password I provide which are passed in code to invoke the web service. I get the success page indicating that web service is invoked on hitting enter.
The method used in UCS77_1ProcessOfficialChangeSaveDetailsAction.java to invoke web service is as follows:
public String invokeAx
String xmlMessage,
String webServiceURL,
String webServiceOperation,
String username,
String password)
String xmlResponse = null;
Call webServiceCall = null;
InputStream input = new ByteArrayInputStream(xmlMessage.getBytes());
Service service = new Service();
try
webServiceCall = (Call) service.createCall();
SOAPEnvelope env = new SOAPEnvelope(input);
SOAPEnvelope resEnv = null;
webServiceCall.setTargetEndpointAddress(new URL(webServiceURL));
webServiceCall.setOperationName(new QName(webServiceOperation));
webServiceCall.setUsername(username);
webServiceCall.setPassword(password);
try
resEnv = webServiceCall.invoke(env);
catch (AxisFault e)
e.printStackTrace();
Message responseMessage = webServiceCall.getResponseMessage();
SOAPEnvelope soapXml = (SOAPEnvelope) responseMessage.getSOAPEnvelope();
xmlResponse = new String(soapXml.toString().getBytes(AppConstants.UTF8),AppConstants.UTF8);
if (xmlResponse == null)
xmlResponse = resEnv.toString();
catch (Exception e1)
e1.printStackTrace();
return xmlResponse;
Both the weblogic server reside on two different AIX machines.
Can anybody tell what's the problem while invoking web service through code?time to look into the gateway logs as stated by the fault ..
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode xmlns:p="http://schemas.oblix.com/ws/2003/08/Faults">c</faultcode><faultstring>Step execution failed with an exception</faultstring><detail></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
looks like the cipher step might have failed -
Interactive Statement unable to access Web Service
I have a working Flash Builder project from which I generate a nav file which I use to generate an Interactive Statement using a process in Workbench.
The Interactive Statement works fine with all the Flash content and data merged from xml.
When I incorporate using a Web Service in the Flash Builder project code to populate a data grid, and regenerate the nav file to generate the interactive statement, the interactive statement gives the following security error when opened:
Security error accessing url
Destination: DefaultHTTP
It seemed that this issue is related to cross domain policy or something like that, BUT I do not get this error when:
1. I run the Flash Builder project directly from Flash Builder that fires up IE and my flash content works perfectly fine in the HTML wrapper, including the web service call that works fine. This works fine both from the bin-debug and the bin-release folders of my Flash Builder project.
2. I created an AIR application from scratch, and consumed the same webservice as used in the earlier Flash Builder project being used to generate nav file for Interactive Statement. The AIR application also works perfectly fine in invoking the web service and does not give any errors.
Question: Why is my Interactive Statement unable to access the web service and gives the error as mentioned above when the same web service is being accessed and consumed successfully by the same flash content in an html wrapper and in an AIR application. How to make my flash content embedded in the PDF container to access and consume the web service?Hi Muhammad,
Acrobat has different crossdomain restrictions. Try a crossdomain file that looks like to test the connection:
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<site-control permitted-cross-domain-policies="all"/>
<allow-access-from domain="*" to-ports="*" />
<allow-http-request-headers-from domain="*" headers="*"/>
</cross-domain-policy>
Following there are a couple of good articles dealing with web services calls:
http://forums.adobe.com/message/3784114#3784114
http://tv.adobe.com/watch/flex-in-a-week-day-2/retrieving-and-handling-data-using-webservi ce/
http://blogs.4point.com/brad.white/2008/12/4-ways-to-invoke-a-webservice-in-flex-with-mxml -and-actionscript.html
http://blog.flexexamples.com/2008/04/14/calling-a-simple-web-service-from-flex-using-the-w ebservice-class/
Regards,
Oana -
How to check error type in accessing web service?
Dear all,
I have created a form using WSDL connection to access web service in SOAP protocol.
But I have difficulties in error handling when acccessing web service.
I try to put a try catch block for the following statement :
ie. xfa.connectionSet.WebServiceDC.execute(false);
in case for any error, I can only catch message saying GeneralFault only.
Is there any extra object in the script that I can catch to handle for different error type?
e.g checking SOAP.? and where should I put the codes in?
Actualy I want to detect if network connection is not ok or if it fails to find ecert which is required under https connection
Rgds.Have you tried the try catch block ?
See the error codes it responds with.
Then look through the properties of the Exception
try
doInit();
} catch(err)
var vDebug = "";
for (var prop in err)
vDebug += "property: "+ prop+ " value: ["+ err[prop]+ "]\n";
vDebug += "toString(): " + " value: [" + err.toString() + "]";
status.rawValue = vDebug;
function doInit()
doWebServiceCallThatFails();
Have fun with these articles
http://blogs.adobe.com/formfeed/2009/06/collected_form_development_and.html
http://blogs.adobe.com/formfeed/2009/03/handling_javascript_exceptions.html -
How to use Axis to access a web service through Authentication proxy
Using axis access internat web service is success,but access a web service through Authentication proxy is failure.But other java classes connect through a proxy to the internet which works very well:
please help me ,thank you!!!
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import javax.xml.namespace.QName;
//this is my access webservice faliure codes
public class TestClient
public static void main(String [] args) {
try {
System.getProperties().setProperty("http.proxySet", "true");
System.getProperties().setProperty("http.proxyHost","proxy.com");
System.getProperties().setProperty("http.proxyPort", "8080");
System.getProperties().setProperty("http.proxyUser", "username");
System.getProperties().setProperty("http.proxyPassword","password");
String endpoint =
"http://nagoya.apache.org:5049/axis/services/echo";
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperationName(new QName("http://soapinterop.org/", "echoString") );
String ret = (String) call.invoke( new Object[] { "Hello!" } );
System.out.println("Sent 'Hello!', got '" + ret + "'");
} catch (Exception e) {
System.err.println(e.toString());
}I get an "(407)Proxy authorization required" error?I am also looking for a solution. Does any one know how to do through code instead of jvm settings?
Thanks in advance! -
Soap / WS Receiver unable to call web service.
Dear All,
We are using PI 7.1 without EHP1
I am unable to call a web service from SOAP/WS adapter. The scenario is HTTP to SOAP/WS.
The web service is hosted on a decentral adapter engine(JPR) put on seperate logical system. The web service hosted on the decentral adapter engine needs to be called by Integration server. This web service call is required to execute a java call(RMI) for third party system.
Http post----
>Integration Server -
>JPR(decenteral adapter engine)
Following are the steps to configure web service.
1. Import service interface from Enterprise service repository in NWDS
2. Generate bean skeleton
3. Deploy the service on JPR
4. Configure End point from Web service Administrator
Following is the Soap configuration that i have done
1. Transport protocol - HTTP
2. Soap protocol- Soap 1.1
3. Target URL--http://<host>:<port>/sapws/com.sap/WmsItemEAR_WmsItem_EJB_WmsItemImplBean/WmsItem/WmsItem_Port?wsdl&mode=ws_policy
when I try the WSDL Url in the browser I get an xml file.
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://test/nitin/service" xmlns:b0="http://test/nitin/service/WmsItem_PortBindingNS"><import namespace="http://test/nitin/service/WmsItem_PortBindingNS" location="http:/<host>:50000/sapws/com.sap/WmsItemEAR_WmsItem_EJB_WmsItemImplBean/WmsItem/WmsItem_Port?wsdl=binding&mode=ws_policy"/><service name="WmsItem"><port name="WmsItem_Port" binding="b0:WmsItem_WmsItem_PortBinding"><address xmlns="http://schemas.xmlsoap.org/wsdl/soap/" location="http://<host>:50000/sapws/com.sap/WmsItemEAR_WmsItem_EJB_WmsItemImplBean/WmsItem/WmsItem_Port"/></port></service></definitions>
Please let me know what may be going wrong or missing to complete the configuration.
Warm regards
NitinMike,
I updated the 3 xml files with the name and password and I get a different error now ...
WARNING: Unable to connect to URL: https://dssd001.ca.boeing.com:443/bartinterface/SOAP/resSetup.cgi due to java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: javax.net.ssl.SSLException: SSL handshake failed: X509CertChainIncompleteErr
java.rmi.RemoteException: ; nested exception is:
HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: javax.net.ssl.SSLException: SSL handshake failed: X509CertChainIncompleteErr
I am using the simple text based username auth, but jdev for some reason still goes and looks for the x509 cert? How did you get yours to work?
Thanks
Sriram -
Calling a web service through SSL via a stand alone java class
HI,
I am trying to call a web service through SSL via a simple stand alone java client.
I have imported the SSL certificate in my keystore by using the keytool -import command.
Basically I want to add a user to a group on the server. Say I add a user user 1 to group group 1 using an admin userid and password. All these values are set in an xml file which I send to the server while calling the server. I pass the web service URL, the soap action name and the xml to post as the command line arguments to the java client.
My xml file(Add.xml) that is posted looks like :
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:xsi = "http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENC = "http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV = "http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd = "http://www.w3.org/1999/XMLSchema"
SOAP-ENV:encodingStyle = "http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<namesp1:modifyGroupOperation xmlns:namesp1 = "/services/modifyGroup/modifyGroupOp">
<auth>
<user>adminUser</user>
<password>adminPassword</password>
</auth>
<operationType>ADD</operationType>
<groupName>group1</groupName>
<users>
<userName>user1</userName>
</users>
</namesp1:modifyGroupOperation>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
I call the client as:
java PostXML https://com.webservice.com/services/modifyGroup "/services/modifyGroup/modifyGroupOp" Add.xml
I my client, I have set the following:
System.setProperty("javax.net.ssl.keyStore", "C:\\Program Files\\Java\\jre1.5.0_12\\lib\\security\\cacerts");
System.setProperty("javax.net.ssl.keyStorePassword", "password");
System.setProperty("javax.net.ssl.trustStore", "C:\\Program Files\\Java\\jre1.5.0_12\\lib\\security\\cacerts");
System.setProperty("javax.net.ssl.trustStorePassword", "password");
But when I try to execute the java client, I get the following error:
setting up default SSLSocketFactory
use default SunJSSE impl class: com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl
class com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl is loaded
keyStore is : C:\Program Files\Java\jre1.5.0_12\lib\security\cacerts
keyStore type is : jks
keyStore provider is :
init keystore
init keymanager of type SunX509
trustStore is: C:\Program Files\Java\jre1.5.0_12\lib\security\cacerts
trustStore type is : jks
trustStore provider is :
init truststore
adding as trusted cert:
init context
trigger seeding of SecureRandom
done seeding SecureRandom
instantiated an instance of class com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl
main, setSoTimeout(0) called
main, setSoTimeout(0) called
%% No cached client session
*** ClientHello, TLSv1
RandomCookie: GMT: .....
Compression Methods: { 0 }
[write] MD5 and SHA1 hashes: len = 73
main, WRITE: TLSv1 Handshake, length = 73
[write] MD5 and SHA1 hashes: len = 98
main, WRITE: SSLv2 client hello message, length = 98
[Raw write]: length = 100
[Raw read]: length = 5
[Raw read]: length = 58
main, READ: TLSv1 Handshake, length = 58
*** ServerHello, TLSv1
%% Created: [Session-1, SSL_RSA_WITH_RC4_128_MD5]
** SSL_RSA_WITH_RC4_128_MD5
[read] MD5 and SHA1 hashes: len = 58
[Raw read]: length = 5
[Raw read]: length = 5530
main, READ: TLSv1 Handshake, length = 5530
*** Certificate chain
chain [0] = ...
chain [1] = ...
chain [2] = ...
chain [3] = ...
main, SEND TLSv1 ALERT: fatal, description = certificate_unknown
main, WRITE: TLSv1 Alert, length = 2
[Raw write]: length = 7
0000: 15 03 01 00 02 02 2E .......
main, called closeSocket()
main, handling exception: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
main, called close()
main, called closeInternal(true)
main, called close()
main, called closeInternal(true)
main, called close()
main, called closeInternal(true)
Exception in thread "main" javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.c
ertpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(Unknown Source)
at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
at java.io.BufferedOutputStream.flush(Unknown Source)
at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:506)
at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2110)
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1088)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
at PostXML.main(PostXML.java:111)
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find v
alid certification path to requested target
at sun.security.validator.PKIXValidator.doBuild(Unknown Source)
at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
at sun.security.validator.Validator.validate(Unknown Source)
at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(Unknown Source)
... 18 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)
at java.security.cert.CertPathBuilder.build(Unknown Source)
... 23 more
I do not know where I have gone wrong. Could someone point out my mistake.
Thanks In advance!Hi jazz123,
There's an example in the [*Java Web Services Tutorial*|http://java.sun.com/webservices/docs/2.0/tutorial/doc/] : see Chapter 1: Building Web Services with JAX-WS - A Simple JAX-WS Client. -
How to access web service from Oracle ?
Database version: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0
I am trying to make a call to a web service through a procedure/function...
I tried to use
CREATE OR REPLACE PROCEDURE Call_Rest_Webservice
AS
t_Http_Req Utl_Http.Req;
t_Http_Resp Utl_Http.Resp;
t_Request_Body VARCHAR2(30000);
t_Respond VARCHAR2(30000);
t_Start_Pos INTEGER := 1;
t_Output VARCHAR2(2000);
BEGIN
/*Construct the information you want to send to the webservice.
Normally this would be in a xml structure. But for a REST-
webservice this is not mandatory. The webservice i needed to
call excepts plain test.*/
t_Request_Body := 'the data you want to send to the webservice';
/*Telling Oracle where the webservice can be found, what kind of request is made
and the version of the HTTP*/
t_Http_Req := Utl_Http.Begin_Request('**webservice address**',
'GET',
'HTTP/1.1');
/*In my case the webservice used authentication with a username an password
that was provided to me. You can skip this line if it's a public webservice.*/
--Utl_Http.Set_Authentication(t_Http_Req, 'username', 'password');
/*Describe in the request-header what kind of data is send*/
Utl_Http.Set_Header(t_Http_Req, 'Content-Type', 'text/xml charset=UTF-8');
/*Describe in the request-header the lengt of the data*/
Utl_Http.Set_Header(t_Http_Req, 'Content-Length', Length(t_Request_Body));
/*Put the data in de body of the request*/
Utl_Http.Write_Text(t_Http_Req, t_Request_Body);
/*make the actual request to the webservice en catch the responce in a
variable*/
t_Http_Resp := Utl_Http.Get_Response(t_Http_Req);
/*Read the body of the response, so you can find out if the information was
received ok by the webservice.
Go to the documentation of the webservice for what kind of responce you
should expect. In my case it was:
<responce>
<status>ok</status>
</responce>
Utl_Http.Read_Text(t_Http_Resp, t_Respond);
/*Some closing?1 Releasing some memory, i think....*/
Utl_Http.End_Response(t_Http_Resp);
END;But it gave me ORA-29272: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1029
ORA-12545: Connect failed because target host or object does not exist
But I can link to the web server by going to **webservice address** through my browser.
Is there any ACL should be open in order to have this capability? I asked my DBA but she asked me I will need to give her username/password/ip in order to open an ACL...
however there is no username/password required while visiting the web service...
Any help would be highly appreciated..
Thanks,
Edited by: 986006 on Mar 4, 2013 8:38 AMY.L wrote:
That is because the database was unable to connect to the specified server. Wrong hostname or IP specified. Failure to resolve the hostname into an IP. Firewall blocking. Etc.The hostname I put there can be visit through my browser. I think it should not be the host server's issue... So it could be a firewall on my database side that needs to be open in order to visit the hostserver?The "web browser" code (your PL/SQL code using UTL_HTTP) runs on the Oracle database server. It needs the same type of network access that your browser on your PC enjoys. (firewalls opened, proxy authentication if required, etc).
On 11g. Not on 10g.I saw the example code you post through the link you provided... will those only work on 11g?
If it can work on 10g, what package or what steps I need to follow in order to have that working on me?The code I've posted will work on both versions. My comment was regards to ACLs. No ACLs existed on 10g. So you only need execute privs on the relevant packages (e.g. UTL_HTTP, etc).
ACLs were introduced with 11g - so on 11g you also need the DBA to create an ACL for you that will allow UTL_HTTP access to the network. -
Error in Calling Oracle Web Service through Eclipse-indigo
Hi All,
I'm getting an below error when trying to call my oracle web service through Eclipse-indigo.
Error:-
IWAB0135E An unexpected error has occurred.
502
Bad Gateway
Steps followed to create oracle web service and invoke WS :-
Followed link
http://docs.oracle.com/cd/B28359_01/appdev.111/b28369/xdb_web_services.htm
which explans how to create oracle web service.
1. Configure HTTP Access
2. Configure the ORAWSV Servlet
3. created user 'test' and wrote simple procedure getdescription which will return name for request id.
4. granted all privilages to user.
5. The orawsv servlet automatically generates a WSDL file.
6. trying to call WS through Eclipse-indigo, but i get error.Trying to test via PL/SQL first via (see the following url for more info: Re: Using utl_dbws to call web service ) for example something like the following:
SQL> set serveroutput on
SQL> --
SQL> def USERNAME=DBNWS
SQL> --
SQL> DECLARE
2 V_SOAP_REQUEST XMLTYPE := XMLTYPE(
3 '<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/
encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
4 <SOAP-ENV:Body>
5 <m:SNUMBER-GET_SQRTInput xmlns:m="http://xmlns.oracle.com/orawsv/&USERNAME/GET_SQRT">
6 <m:INPUT_VALUE-NUMBER-IN>2</m:INPUT_VALUE-NUMBER-IN>
7 </m:SNUMBER-GET_SQRTInput>
8 </SOAP-ENV:Body>
9 </SOAP-ENV:Envelope>');
10 V_SOAP_REQUEST_TEXT CLOB := V_SOAP_REQUEST.getClobVal();
11 V_REQUEST UTL_HTTP.REQ;
12 V_RESPONSE UTL_HTTP.RESP;
13 V_BUFFER VARCHAR2(1024);
14 BEGIN
15
16 V_REQUEST := UTL_HTTP.BEGIN_REQUEST(URL => :URL, METHOD => 'POST');
17 UTL_HTTP.SET_HEADER(V_REQUEST, 'User-Agent', 'Mozilla/4.0');
18 V_REQUEST.METHOD := 'POST';
19 UTL_HTTP.SET_HEADER (R => V_REQUEST, NAME => 'Content-Length', VALUE => DBMS_LOB.GETLENGTH(V_SOAP_REQUEST_TEXT));
20 UTL_HTTP.WRITE_TEXT (R => V_REQUEST, DATA => V_SOAP_REQUEST_TEXT);
21
22 V_RESPONSE := UTL_HTTP.GET_RESPONSE(V_REQUEST);
23 LOOP
24 UTL_HTTP.READ_LINE(V_RESPONSE, V_BUFFER, TRUE);
25 DBMS_OUTPUT.PUT_LINE(V_BUFFER);
26 END LOOP;
27 UTL_HTTP.END_RESPONSE(V_RESPONSE);
28 EXCEPTION
29 WHEN UTL_HTTP.END_OF_BODY THEN
30 UTL_HTTP.END_RESPONSE(V_RESPONSE);
31 END;
32 /
old 5: <m:SNUMBER-GET_SQRTInput xmlns:m="http://xmlns.oracle.com/orawsv/&USERNAME/GET_SQRT">
new 5: <m:SNUMBER-GET_SQRTInput xmlns:m="http://xmlns.oracle.com/orawsv/DBNWS/GET_SQRT">
<?xml version="1.0" ?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GET_SQRTOutput xmlns="http://xmlns.oracle.com/orawsv/DBNWS/GET_SQRT">
<RETURN>1.41421356237309504880168872420969807857</RETURN>
</GET_SQRTOutput>
</soap:Body>
</soap:Envelope>
PL/SQL procedure successfully completed.
SQL> set serveroutput on
SQL> --In the example give above the WSDL info should be seen via http://xmlns.oracle.com/orawsv/DBNWS/GET_SQRT?wsdl -
Confirming method to secure web services through oracle web service manager
Hi All,
I am just wondering about the method to secure web service through oracle web service manager.
I have a unsecure web service "helloworld" which is deployed on JWSDP1.6 toolkit.I want to secure it through oracle web service manager.
Inorder to secure this unsecure web service,I use gateway(web service manager for securing web service using message level security through certificate).
So when client want to access the helloworld service,it contacts the gateway securely and gateway intern connect to original web service after decrypting and verification of the signature.When gateway gets response from the web service,it signs the response message and then encrypt and passs on to the client.
So my question is,is it the right way to secure web service?
As I am getting the following fault exception :
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode "http://schemas.oblix.com/ws/2003/08/Faults">c</faultcode>
<faultstring>Step execution failed with an exception
</faultstring>
<detail></detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
I checked the log at :
C:\coresv_install_home\external\oc4j-10.1.2.0.0\j2ee\home\log\http-web-access
but there is no helpful information available.Thanks for any help.
KashHi Rajesh,
Thanks for your reply.I am using the following policy steps:
1)for Request (Decrypt and Verify signature).
2)for Response(Sign Message and Encrypt).
The configuration for Request is shown below:
Pipeline "Request"
Pipeline Steps:
Start Pipeline
Log
Decrypt and Verify Signature
Basic Properties Type Default Value
Enabled (*) boolean true true
XML Decryption Properties Type Default Value
Decryptor''s keystore location (*) string C:\Sun\jwsdp-2.0\xws-security\etc\server-keystore.jks
Decrypt Keystore Type (*) string jks jks
Decryptor''s keystore password string *******
Decryptor''s private-key alias (*) string s1as
Decryptor''s private-key password string *******
Enforce Encryption (*) boolean true true
XML Signature Verification Properties Type Default Value
Verifying Keystore location (*) string C:\Sun\jwsdp-2.0\xws-security\etc\server-truststore.jks
Verifying Keystore type (*) string jks jks
Verifying Keystore password string *******
Signer''s public-key alias (*) string xws-security-client
Enforce Signing (*) boolean true true
End Pipeline
And the configuration for Response is shown below:
Pipeline "Response"
Pipeline Steps:
Start Pipeline
Log
Sign Message and Encrypt
Basic Properties Type Default Value
Enabled (*) boolean true true
Signing Properties Type Default Value
Signing Keystore location (*) string C:\Sun\jwsdp-2.0\xws-security\etc\server-keystore.jks
Signing Keystore Type (*) string jks jks
Signing Keystore password string *******
Signer''s private-key alias (*) string s1as
Signer''s private-key password string *******
Signed Content (*) string BODY BODY
Sign XPATH Expression string
Sign XML Namespace string[]
Encryption Properties Type Default Value
Encryption Keystore location (*) string C:\Sun\jwsdp-2.0\xws-security\etc\server-truststore.jks
Encrypt Keystore Type (*) string jks jks
Encryption Keystore password string *******
Decryptor''s public-key alias (*) string xws-security-client
Encrypted Content (*) string BODY BODY
Encrypt XPATH Expression string
Encrypt XML Namespace string[]
End Pipeline
I checked the log again but nothing useful there,it is just giving the following values:
2006-08-14 16:32:50,372 INFO [Thread-21] mstore.OLiteMStore - SELECT MEASUREMENT_STR FROM MEASUREMENT_PERSISTED_STORE WHERE ID=? FOR UPDATE
2006-08-14 16:34:50,364 INFO [Thread-16] mstore.OLiteMStore - INSERT INTO MEASUREMENT_PERSISTED_STORE (ID,DEF_ID,CONTEXT_ID,PARENT_CONTEXT_ID,TIME,STORETIME,KEY0,KEY1,KEY2,KEY3,KEY4,KEY5,KEY6,KEY7,KEY8,KEY9,KEY10,KEY11,KEY12,KEY13,KEY14,KEY15,KEY16,KEY17,KEY18,KEY19,KEY20,KEY21,KEY22,KEY23,KEY24,KEY25,KEY26,KEY27,KEY28,KEY29,KEY30,KEY31,KEY32,KEY33,KEY34,KEY35,KEY36,KEY37,KEY38,KEY39,DBM0,MEASUREMENT_STR) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,'R',empty_clob())
2006-08-14 16:34:50,364 INFO [Thread-16] mstore.OLiteMStore - SELECT MEASUREMENT_STR FROM MEASUREMENT_PERSISTED_STORE WHERE ID=? FOR UPDATE
Any help would be appreciated.Thanks.
Kash -
Calling a WSSE Enabled Web Service Through a Java Proxy Class
I am trying to create a client that can access a WSSE enabled web service through
the generated java proxy. For now all I am asking for in the .wsse file is the
username and password with the line <token tokenType="username"/>. In the client
I am setting the username and password token exactly as the BEA documentation
describes:
UserInfo ui = new UserInfo("myuser", "mypassword");
session.setAttribute(WSSEClientHandler.REQUEST_USERINFO, ui);
Yet I am getting the following error message when I try to run the client:
java.rmi.RemoteException: SOAP Fault:javax.xml.rpc.soap.SOAPFaultException:
EJB Exception: ; nested exception is:
com.bea.wlw.runtime.jws.wssecurity.exception.WLWWSSEException: Policy
requires Message to contain UsernameToken, UsernameToken not found in the Message.
Can anyone tell me what I am missing?
Thanks,
JohnHi John,
In your standalone client, use the following two properties to send a
user name and password to the service so that the client can
authenticate itself: javax.xml.rpc.security.auth.username
javax.xml.rpc.security.auth.password
See the docs [1]
Hope this helps,
Bruce
[1]
http://edocs.bea.com/wls/docs81/webserv/security.html#1073863
John H wrote:
>
I am trying to create a client that can access a WSSE enabled web service through
the generated java proxy. For now all I am asking for in the .wsse file is the
username and password with the line <token tokenType="username"/>. In the client
I am setting the username and password token exactly as the BEA documentation
describes:
UserInfo ui = new UserInfo("myuser", "mypassword");
session.setAttribute(WSSEClientHandler.REQUEST_USERINFO, ui);
Yet I am getting the following error message when I try to run the client:
java.rmi.RemoteException: SOAP Fault:javax.xml.rpc.soap.SOAPFaultException:
EJB Exception: ; nested exception is:
com.bea.wlw.runtime.jws.wssecurity.exception.WLWWSSEException: Policy
requires Message to contain UsernameToken, UsernameToken not found in the Message.
Can anyone tell me what I am missing?
Thanks,
John -
Invoke web services through ODI
Hi,
i need to invoke web services through ODi. am usin the ODIInvokewebService tool. in that my url is : http://iflexlap-hga95:7700/XAIApp/xaiserver/CmAccountInboundService?WSDL
Operation is Add and for request file i have given the path of the xml of my request in the SOAP format. wen i try to execute am gettin an error:
com.sunopsis.wsinvocation.SnpsWSInvocationException: Cant find operation {0} for port type {1}.
at com.sunopsis.wsinvocation.client.impl.AbstractJWSDLParserImpl.getWebServiceRequestByOperation(AbstractJWSDLParserImpl.java:220)
at com.sunopsis.dwg.tools.common.WebserviceUtils.invoke(WebserviceUtils.java:141)
code generated was:
OdiInvokeWebService "-URL=http://iflexlap-hga95:7700/XAIApp/xaiserver/CmAccountInboundService?WSDL" "-PORT_TYPE=CmAccountInboundServicePortType" "-OPERATION=ADD" "-REQUEST_FILE=D:/Bijal/RJ_Work/Soap UI/AddAccount.xml"
am stuck an unable to move ahead. Would appreciate any guidance for the same. Thanks in advance
Bijaldeclare
req_envelop VARCHAR2(4000) ;
req utl_http.req;
res utl_http.resp;
res_envelop VARCHAR2(32767) ;
BEGIN
req_envelop :=
'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:odi="xmlns.oracle.com/odi/OdiInvoke/">
<soapenv:Header/>
<soapenv:Body>
<odi:OdiStartScenRequest>
<Credentials>
<OdiUser>SUPERVISOR</OdiUser>
<OdiPassword>SUNOPSIS</OdiPassword>
<WorkRepository>ODIWORK</WorkRepository>
</Credentials>
<Request>
<ScenarioName>Package_NAME</ScenarioName>
<ScenarioVersion>001</ScenarioVersion>
<Context>DEVELOPMENT</Context>
<Variables>
<Name>SFPARK.Variable1</Name>
<Value>abc</Value>
</Variables>
<Variables>
<Name>SFPARK.Variable2</Name>
<Value>123</Value>
</Variables>
</Request>
</odi:OdiStartScenRequest>
</soapenv:Body>
</soapenv:Envelope>' ;
req := utl_http.begin_request('http://'127.0.0.1:20950/oraclediagent/OdiInvoke?wsdl','POST','HTTP/1.1') ;
utl_http.set_header(req,'Content-Type','text/xml') ;
utl_http.set_header(req,'Content-Length',LENGTH(req_envelop)) ;
utl_http.set_header(req,'SOAPAction','invokeStartScen') ;
utl_http.write_text(req,req_envelop) ;
res := utl_http.get_response(req) ;
utl_http.read_text(res,res_envelop) ;
utl_http.end_response(res) ;
END; -
Error While Consuming Public Web Service through Stand Alone Proxy
Hi,
I am getting the below error when I am consuming a public web service through Stand Alone Proxy.
java.rmi.RemoteException: Service call exception; nested exception is:
com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (407) Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. ).
at com.mindtree.examples.GlobalWeatherSoapStub.getCitiesByCountry(GlobalWeatherSoapStub.java:159)
at com.mindtree.examples.GlobalWeatherSoapStub.getCitiesByCountry(GlobalWeatherSoapStub.java:168)
at com.mindtree.examples.WebServiceClient.main(WebServiceClient.java:18)
Caused by: com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (407) Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. ).
at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.handleResponseMessage(MimeHttpBinding.java:903)
at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.call(MimeHttpBinding.java:1346)
at com.mindtree.examples.GlobalWeatherSoapStub.getCitiesByCountry(GlobalWeatherSoapStub.java:152)
... 2 more
Regards,
VenkateshHi,
I am still facing the same issue.
Regards,
Venkatesh -
Not able to access web service with axis and tomcat
Dear all
i am trying to access web service using axis in tomcat.
i downloaded axis-bin-1_4.zip, unzipped it and installed it properly in tomcat.
i had tested axis, its working fine.
i had created a simple java class(a sample class from book) and deployed it in axis. i also created a client(a java consol class) for accessing that web service. but its giving error. i have no idea why this is comming.
plz point me in right direction.
thanks in advance
The error is:
Exception in thread "main" AxisFault
faultCode: {http://xml.apache.org/axis/}HTTP
faultSubcode:
faultString: (404)/axis/ArithmeticProcessor.jws
faultActor:
faultNode:
faultDetail:
{}:return code: 404
<html><head><title>Apache Tomcat/6.0.14 - Error report</tit
le><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;ba
ckground-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;
color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Ari
al,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-f
amily:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-famil
y:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:
Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color :
black;}A.name {color : black;}HR {color : #525D76;}--></style> </hea
d><body><h1>HTTP Status 404 - /axis/ArithmeticProcessor.jws</h
1><HR size="1" noshade="noshade"><p><b>
type</b> Status report</p><p><b>message</b> <u&
gt;/axis/ArithmeticProcessor.jws</u></p><p><b>descriptio
n</b> <u>The requested resource (/axis/ArithmeticProcessor.jws) is n
ot available.</u></p><HR size="1" noshade="noshade
"><h3>Apache Tomcat/6.0.14</h3></body></html>
{http://xml.apache.org/axis/}HttpErrorCode:404
(404)/axis/ArithmeticProcessor.jws
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.j
ava:744)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrateg
y.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:165)
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 ArithmeticClient.main(ArithmeticClient.java:50)Hi ,
Please go through this link and check in this way only you created the webservice correctly or not. If not follow and do it definitely will get you the webservice access by iphone or any application.
www.scribd.com/doc/19255987/Web-Services-in-Abap -
Error at run time When Access Web Service in web dynpro java
Hi
I am used web service created on other machine.I am used wsdl file created in web service.
is there any setting on J2EE Engine server for accessing web service? after run web dynpro application it gives following error.
The initial exception that caused the request to fail, was:
java.io.IOException: Unable to open connection to host "128.9.125.6:8000". Connection timed out:could be due to invalid address.
at com.tssap.dtr.client.lib.protocol.Connection.openSocket(Connection.java:2117)
at com.tssap.dtr.client.lib.protocol.Connection.open(Connection.java:1380)
at com.tssap.dtr.client.lib.protocol.Connection.sendInternal(Connection.java:1534)
at com.tssap.dtr.client.lib.protocol.Connection.send(Connection.java:1427)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
... 50 more
please help me.
thank in advanceHi,
java.io.IOException: Unable to open connection to host "128.9.125.6:8000". Connection timed out: could be due to invalid address. first check it are you able to connect the WSNavigator. I think you are not able to connect the WSNavigator and are you able to see the WebService in WSNavigator?
Procedure
To import a Web service model, proceed as follows:
1. Choose the context menu entry -
Create Model on the -
Models node of the relevant component.
2. In the model wizard, choose Import Web Service Model followed by Next.
3. In the second wizard window, enter a model name and specify the package and source code directory. The name of the proxy package is created automatically when you specify the model package.
4. Select whether your Web service source is from a local server, is addressed using a URL, or whether it is a UDDI service.
5. If you select Local File System or URL, choosing Next will take you to the following window in which you enter a local WSDL URL or select one by choosing Browse.
6. If you selected the option UDDI or URL, choosing Next will take you to the following wizard window in which you either enter a WSDL URL of a UDDI service directly or select one by choosing UDDIu2026
Enter the WSDL description of the Web service in the Wsdl field u2013 for example, http://webservices.matlus.com/scripts/emailwebservice.dll/wsdl/IemailService for an e-mail service.
You do not need to make any entries in the next step, Proxy Definition / URI Package Mappings. Choose Finish to close the window.
7. Switch to the Package Explorer view, select the file lport1.lp in the directory \src\packages\<myPackage>\, and check the port entries.
Hope this helps!!
Regards
Vijay
Maybe you are looking for
-
Please help with this...
-
Problem displaying PDF in Firefox 4 browser
Since installing Firefox, I cannot download a PDF file larger than 5MB and get it to display in the browser. A file of 4.9MB works OK. If I disable the Adobe Reader plug-in, I can download the larger file and it will display in Adobe. Same issue with
-
I NEED HELP! Making a flash email form using php.
Hi, my name is Sean, I'm making a flash contact form using php for a website. I'm having a hard time with the php. Can some one help? Click here to download my source.
-
I've read through the previous posts on this subject, but none of the solutions seem to work in my case. In Safari, some of the webpages or parts of the webpages come up with garbage text. I've taken a screen shot of one particular site, but I'm not
-
Hello, I am unable to see my discussion posted today with the following subject; "How to restrict MIGO (GR) and Reservation (MB21-221 Q) if WBS element is technically closed" Please help in finding the reason / solution. thanks