500 Error code while consuming web service using HTTPURLConnection
Hi,
I am getting an HTTP response code 500 and an IOException when I run a web service client to invoke a BMC Remedy web service (document based). I am using XML over HTTP to hit the web service as follows:
// For Remedy
soapAddress = "http://www.test-sislhelpdesk.siemens.co.in/arsys/services/ARService?server=bomw041a&webService=WebService_Test";
soapEnvelope = "<SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><SOAP-ENV:Header><AuthenticationInfo><userName>webservice</userName><password>*******</password></AuthenticationInfo></SOAP-ENV:Header><SOAP-ENV:Body><Q1:OpGetList xmlns:Q1=\"urn:WebService_Test\"><Q1:Qualification></Q1:Qualification></Q1:OpGetList></SOAP-ENV:Body></SOAP-ENV:Envelope>";
soapAction = "urn:WebService_Test/OpGetList";
URL url = new URL(soapAddress);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
System.out.println ("Connection got");
connection.setDoOutput(true);
connection.setRequestProperty("Content-Type","text/xml");
connection.setRequestProperty ("soapAction", "\"" + soapAction + "\"");
OutputStreamWriter outputStream = new OutputStreamWriter(connection.getOutputStream());
System.out.println ("outputstream got");
outputStream.write(soapEnvelope);
outputStream.flush();
BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String line = null;
while ((line = reader.readLine()) != null)
writer.write(line);
writer.write("\n");
System.out.println (writer);
catch(Exception e){
e.printStackTrace();
I have created a .NET client proxy which seems to work well.
I am not able to figure out as to why this code is not working. May be something wrong with the SOAP message request I am sending? But I have created this SOAP request message from the log generated for a successful hit. Any help in this regard will be highly appreciated.
The web service is on the internet and hance is accessible to all :)
Regards
Vaibhav
Tried "POST" request method, did not work.
Actually when i hit other web services (created by me) , the code works.
But when I hit a third party web service, it fails returning 500 error code.
How can I extract the SOAP message returned, if any and see thinggs for myself.
I guess there is something wrong with the request SOAP message which I am sending.
Similar Messages
-
Authorization error while consuming web service in SOAP UI
Hi,
I am an ABAPer and do not have much knowledge about SOAMANAGER configuration.
I have created a Web service and configured it using SOAMANAGER. I am trying to consume same web service using SOAP UI.
But, I am getting an error HTTP-401 unauthorized.
For authentication, I have selected "Transport level -User ID/Password" checkbox.
What else, I have to configure, please let me know.
Error log:
Login failed
What happened?
calling the URL <URL>.
The application was running in the system <System> . Here, no credentials were provided.
What can you do?
If you still have a user ID , contact your system administrator.
HTTP 401 - Unauthorized
Your SAP Internet Communication Framework Team
Regards,
SnehaHi Sneha,
In SOAP UI, after importing WSDL, dig it till Request1, select it and go to Request property.
Set Below things
1. Authentication Type = Preemptive
2. give username
3 give password
and send message.
Regards,
Mastan
Message was edited by: mastan vali -
Code for consuming web services in ABAP
*& Report ZVM_GET_CITY_TIME
REPORT zvm_get_city_time.
PARAMETERS:
p_city TYPE zget_city_time_soap_in-city.
DATA:
cl_proxy TYPE REF TO zco_time_service_soap,
input TYPE zget_city_time_soap_in,
output TYPE zget_city_time_soap_out,
systerr TYPE REF TO cx_ai_system_fault,
w_error TYPE c.
TRY.
CREATE OBJECT cl_proxy
EXPORTING
logical_port_name = 'ZCO_TIME_SERVICE_SOAP'.
CATCH cx_ai_system_fault.
CREATE OBJECT systerr.
WRITE:/ 'Error in creating object - ', systerr->errortext.
ENDTRY.
TRY.
input-city = p_city.
CALL METHOD cl_proxy->get_city_time
EXPORTING
input = input
IMPORTING
output = output.
CATCH cx_ai_system_fault.
CREATE OBJECT systerr.
WRITE:/ 'Error in calling the method - ', systerr->errortext.
w_error = 'X'.
ENDTRY.
CHECK w_error NE 'X'.
SKIP.
WRITE:/ 'The current time in ', p_city, ' is ',
output-get_city_time_result.<i> is there any other way to consume web services in ABAP</i>
you can use cl_http_client class to make your program to act as http client and post the soap message too webservice. This way you dont need to generate proxy, but you should know the soap message format.
Regards
Raja -
Consuming Web Services using UTL_DBWS
Hi,
I am trying to call a web service using UTL_DBWS package.
But I am getting this error:
ORA-29532: Java call terminated by uncaught Java exception: [failed to localize] No Deserializer found!
It is failing at this point:
l_result := sys.UTL_DBWS.invoke (
call_handle => l_call,
input_params => l_input_params);
Is this a problem with database or Web Service? How to resolve this?No awnsers???
I'm having the same problem here.... -
Windows authentification while consuming web service from ABAP
Hi All,
We are consuming web service from ABAP, we have created client proxy in SE80 and configured logical port in LPCONFIG.
This one was working fine. Now we have added windows user authentification to access this service.
Now when I'm trying to regenerate this proxy in R/3 it is asking for user and password. When I enter these details this one is not working.
If I access this service direcly from internet explorer and I enter same user and password then I would able to access this service.
Could you please let me know how to handle this.
Regards
VikramThe dialog that is produced by HTTP Destination object of the logical port is designed only for use within Classic Dynpro applications. There is no prompt produced when running in Web Dynpro. If possible assign a generic user within the logical port definition and this will be used automatically by all users.
-
OC4J Shutting Down while Deploying Web Service using JDevloper
Hi..
I am developing Web Service using JDevloper. When ever I am deploying Web Services to OC4J server came with JDevloper bundle it automatically shutting down.
How to solve this ?
Regards,
Ajay SharamaHi..
This problem is solved now. By mistake when I am installing OC4J externally, I created environment variable "JAVA_HOME". As soon as I deleted this, problem is solved.
Regards,
Ajay -
Authentication error while consuming web service published in SR of CE 7.1
Hi,
I am having this error while trying to consume a web service published in local services registry. Authentication level is set as Basic in the web service and in end point. I am receiving this error in security log files.
Message:Authentication for web service ServicesRegistrySiService, configuration ServicesRegistrySiPort using security policy sap.com/tcesiuddisrws~earServicesRegistrySiServiceServicesRegistrySiPort*ws failed: Login failed.. (See SAP Note 880896 for further info).
Category: /System/Security/WS/Authentication
Location: com.sap.engine.services.wssec.authentication.authenticate
Application: sap.com/tcesiuddisrws~ear
Thread: HTTP Worker [1]
Data Source: j2ee\cluster\server0\log\system\security_00.log
Correlator ID: 33747500000034965
Argument Objects:
Arguments:
DSR Component:
DSR Transaction: 72b226c009ed11dd9a3e000c29c818ce
DSR User:
Message Code:
Session: 4196
Transaction:
User: Guest
Host: ########
System: ###
Instance: J00
Node: server0
following is the code in a C# .Net 2.0 from where the service is called.
CnarService srv = new CnarService();
NetworkCredential ic = new NetworkCredential("user", "password");
CredentialCache cache = new CredentialCache();
srv.UseDefaultCredentials = false;
srv.PreAuthenticate = true;
srv.Credentials = ic;
try
srv.Timeout = 600;
cnarobject cnObj = srv.GetObject("1");
fnameTextBox.Text = cnObj.firstname;
lnameTextBox.Text = cnObj.lastname;
mnameTextBox.Text = cnObj.middlename;
catch (WebException wex)
MessageBox.Show(wex.Message + wex.Response + wex.StackTrace);
I tried to find the SAP Note 880896 but note doesn't exists. I am receiving similar error while trying to connect Enterprise Services explorer for .Net
Please help.
Regards
MontyHi,
maybe you should see the settings for the ServicesRegistrySiService too. Under nwa->SOA.
I am not sure, but the error seems like not able to use the ServicesRegistrySiPort, which is to be authenticated against.
It is then used for retrieval of web services and publishing to the registry... i suppose.
I am not sure though.
Best regards,
Vera -
HELP: Error while consuming Web Service: ClassCastException
Hi,
I am trying to consume a web service that I deployed on Tomcat/Axis. Any guideline will be helpful. I generated stubs using WSDL2Java utility from Axis. The method I am trying to call is getFibo(), which returns an object FiboHolder. Unfortunately everytime it is throwing ClassCastException. I have couple of other methods in the service that returns int and int[] and both works fine. Could anyone please help why I am not able to consume the service when it is returning the object FiboHolder but works fine when I consume other methods of the service that returns int or int[]?
Following is my client code:
FibonacciService service = new FibonacciServiceLocator();
FibonacciSoapBindingStub stub = (FibonacciSoapBindingStub) service.getfibonacci(new URL("http://localhost:8080/axis/services/fibonacci"));
// Now use the service to get a stub to the service
FiboHolder fibHold = stub.getFibo(); //code errors out at runtime here
System.out.println(fibHold.getFibo1());Following is the error message I get:
org.apache.axis.AxisFault: java.lang.ClassCastException
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.lang.ClassCastException
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:
Thanks,Hi all,
Please throw some light into this issue i am getting the following exception.
com.sap.engine.services.webservices.jaxm.soap.accessor.NestedSOAPException: Problem in server response: Proxy Authentication Required.
I have given the proxy settings in the com.sap.portal.ivs.httpservice in the portal and also
defined a proxy server in the Visual Administrator under Services -> Webservice Container -> HTTP Proxy Server
I am calling service in the following manner.
IPortalRuntimeResources runtime = PortalRuntime.getRuntimeResources();
IService service = runtime.getService(IWS_P_Service.KEY);
IWS_P_Service ws_service = (IWS_P_Service)service;
Volumes from = new Volumes(Volumes.VOLUMES_KILOLITER_VALUE);
Volumes to = new Volumes(Volumes.VOLUMES_LITER_VALUE);
ChangeVolumeUnit cvu = new ChangeVolumeUnit(1200,from,to);
// working upto here
response.write("working");
ChangeVolumeUnitResponse cvu_res = ws_service.ChangeVolumeUnit(cvu);
double result = cvu_res.getChangeVolumeUnitResult();
response.write(result+"");
It is working upto "working".
If any body has any solutions please post.
Thanks -
Error 504 DNS look up failed while calling web services using XML
Hi, I am trying to call web service from Oracle using XML.
Everything seems to be in place but im getting an error "The webserver for <My End URL> reported that an error occurred while trying to access the website. Please click here to return to the previous page."
If I directly access the end url from my browser its accessible and seems to work fine.
The http response receiveed is mentioned below:
Status code: 403
Reason phrase: Forbidden
<html>
<head>
<title>504 DNS look up failed</title>
</head>
<body>
<font size=2><table width="100%"><tr><td bgcolor=#3300cc align="center" colspan=2>504 DNS look up failed</td></tr></table><br><br>The webserver for 'My End URL' reported that an error occurred while trying to access the website. Please click <u>here</u> to return to the previous page.<br><br><hr></font></body>
</html>
Im using Oracle 9i
Please help
Edited by: 927814 on Apr 15, 2012 11:41 PM
Edited by: 927814 on Apr 15, 2012 11:46 PMWithout far greater details as to what you are doing, what you have installed, and what you have tried, not much can be offered. All that I can gather from the information you provided is that the server name you are trying to contact either is not responding or is invalid. If you have Forms installed on your local machine (for example using Developer Suite), try using localhost rather than the hostname. For example, http://localhost:port/forms/frmservlet?form=yourform
http://www.checkupdown.com/status/E504.html -
Error while consuming web service in portal component
Hi All,
I am working on a portal application which uses web services in portal component via web service.
I have tested the web service and then creted a relevant portal service to it .When using this portal service in the portal component and running it Im getting the following run time error
Portal Runtime Error
An exception occurred while processing a request for :
iView : Test_portal_service_app.Test_portal_service_app
Component Name : Test_portal_service_app.Test_portal_service_app
com.sap.portal.ivs.global.ume.UMECLient.
Exception id: 11:17_03/07/08_0028_2739150
See the details for the exception ID in the log file
I did not use any ume attributes or ume api methods in the portal component .
I have also added sharingreference= portalserviceapplication name in deploymentdescriptor of the portal application which has the portal component.
Please provide any suggestion for the possible cause of error .
Urgent!!!!
Thanks.Hi all,
Please throw some light into this issue i am getting the following exception.
com.sap.engine.services.webservices.jaxm.soap.accessor.NestedSOAPException: Problem in server response: Proxy Authentication Required.
I have given the proxy settings in the com.sap.portal.ivs.httpservice in the portal and also
defined a proxy server in the Visual Administrator under Services -> Webservice Container -> HTTP Proxy Server
I am calling service in the following manner.
IPortalRuntimeResources runtime = PortalRuntime.getRuntimeResources();
IService service = runtime.getService(IWS_P_Service.KEY);
IWS_P_Service ws_service = (IWS_P_Service)service;
Volumes from = new Volumes(Volumes.VOLUMES_KILOLITER_VALUE);
Volumes to = new Volumes(Volumes.VOLUMES_LITER_VALUE);
ChangeVolumeUnit cvu = new ChangeVolumeUnit(1200,from,to);
// working upto here
response.write("working");
ChangeVolumeUnitResponse cvu_res = ws_service.ChangeVolumeUnit(cvu);
double result = cvu_res.getChangeVolumeUnitResult();
response.write(result+"");
It is working upto "working".
If any body has any solutions please post.
Thanks -
Error while consuming Web Service (returning XML ) in ABAP
Hi,
i am trying to consume a web service in ABAP. ( webservice which takes a request and return a XML string back).
I created a proxy class in SE80. and i tested it successfully.
When i tried to use the class in my program, it is giving dump.
i am not sure what is the problem. I guess it is not able to handle null values in XML.if that is the case. how to handle it..The dump says:
Runtime Errors OBJECTS_OBJREF_NOT_ASSIGNED
Except. CX_SY_REF_IS_INITIAL
Error analysis
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was not
caught and
therefore caused a runtime error.
The reason for the exception is:
You attempted to use a 'NULL' object reference (points to 'nothing')
access a component (variable: "LO_CLIENTPROXY").
An object reference must point to an object (an instance of a class)
before it can be used to access components.
Either the reference was never set or it was set to 'NULL' using the
CLEAR statement.
I think this dump is because of the default value ( space) in some elements. How to avoide that.
wheni catch CX_SY_REF_IS_INITIAL it is not giving any dump. But this is not my requirement. Because it is not getting anything into response string. -
Unknown site error while deploying web services using OC4J
Hi,
I have been testing the deploying webservices examples using demo.zip on OTN site.
I have trouble in binding the web application name to stand alone OC4J.
I am running stand alone OC4J server fine. I verified the website http://localhost:8888, which is running fine.
If I issue the command
java -jar admin.jar ormi://localhost:23791 admin password1 -bindwebapp demo_ejb_web_service HelloService_web http://localhost:8888/ sejb_webservices
I get error
oracle.oc4j.admin.internal.DeployerException: Unknown site: http://localhost:8888/
What is the http-web-site address that needs to be given for binding web app, if I am running local standalone OC4J with no default port changes?
Thanks,
MohanEric,
Thanks for the response. But, still I am not able to bind web-application to OC4J.
Here is how my server.xml has defined the web-site tag:
<web-site default="true" path="./http-web-site.xml" />
My http-web-site.xml has following web-site tag:
<web-site port="8888" display-name="OC4J 10g (10.0.2) HTTP Web Site">
<default-web-app application="default" name="defaultWebApp"/>
<web-app application="default" name="dms0" root="/dms0" access-log="false" />
<web-app application="default" name="dms0" root="/dmsoc4j" access-log="false" />
<web-app application="default" name="admin_web" root="/adminoc4j"/>
<access-log path="../log/http-web-access.log"/>
</web-site>
I used the following command to bind the example web service:
java -jar c:\XtendTools\oc4j\j2ee\home\admin.jar ormi://localhost admin password1 -bindWebApp demo_ejb_service HelloService_web default-web-site /sejb_services
I get "oracle.oc4j.admin.internal.DeployerException: Unknown site: default-web-site" error.
I tried to use following names as http-web-site, but nothing works.
"http://localhost:8888"
"dms0"
"adminoc4j"
I downloaded stand alone OC4J 10.1.2 from OTN and tried these samples.
Your help will be appreciated.
Thanks,
Mohan -
Error while calling web service using BPEL
I am trying to deploy my java program as webservice.
When I am running my web service it showing following exception.
can anybody help me out.
D:\OraBPELPM\jdk\bin\javaw.exe -jar D:\OraBPELPM\integration\bpelpm\designer\j2ee\home\admin.jar ormi://10.119.4.176:23891 admin **** -updateConfig
05/05/25 11:04:49 Error initializing data-source 'jdbc/DBConnectionOliteCoreDSCoreDS': DriverManagerDataSource driver 'oracle.lite.poljdbc.POLJDBCDriver' not found
05/05/25 11:04:49 ApplicationServer: appName = bc4j
05/05/25 11:04:49 ApplicationServer: appName = current-workspace-app
Ready message received from Oc4jNotifier.
05/05/25 11:04:49 Error initializing data-source 'jdbc/DBConnectionOliteCoreDSCoreDS': DriverManagerDataSource driver 'oracle.lite.poljdbc.POLJDBCDriver' not found
05/05/25 11:04:49 Error updating application current-workspace-app: Error initializing ejb-module; Exception Unable to find/read assembly info for D:\OraBPELPM\integration\bpelpm\designer\jdev\mywork\MyWorkspace\TestMail\output (META-INF/ejb-jar.xml)
05/05/25 11:04:50 Auto-deploying file:/D:/OraBPELPM/integration/bpelpm/designer/jdev/mywork/MyWorkspace/TestMail/public_html/ (New server version detected)...
05/05/25 11:04:50 Auto-deploying file:/D:/OraBPELPM/integration/bpelpm/designer/jdev/mywork/MyWorkspace/SyncHelloWorld/public_html/ (New server version detected)...
05/05/25 11:04:50 Auto-deploying file:/D:/OraBPELPM/integration/bpelpm/designer/jdev/mywork/MyWorkspace/JavaMail/public_html/ (New server version detected)...
Embedded OC4J startup time: 4547 ms.
The application can be accessed at location:
http://10.119.4.176:8988/MyWorkspace-JavaMail-context-root/MyWebService1
05/05/25 11:04:50 Web service MyWebService1 has been started on the embedded server
D:\OraBPELPM\integration\bpelpm\designer\jdev\system10.1.2.0.0.1811\oc4j-config\application-deployments\current-workspace-app\MyWorkspace-JavaMail-webapp\temp\__java_stateless_rpc\mypackage1\__EmailerStatelessWrapper.java:47: error #365: cannot compare mypackage1.Emailer with oracle.j2ee.ws.HeaderCallback
return (target instanceof HeaderCallback);
^
D:\OraBPELPM\integration\bpelpm\designer\jdev\system10.1.2.0.0.1811\oc4j-config\application-deployments\current-workspace-app\MyWorkspace-JavaMail-webapp\temp\__java_stateless_rpc\mypackage1\__EmailerStatelessWrapper.java:71: error #365: cannot compare mypackage1.Emailer with oracle.j2ee.ws.HeaderCallback
if ((hdrs != null) && (target instanceof HeaderCallback)) {
^
2 errors
05/05/25 11:05:18 javax.servlet.ServletException: Cannot generate Class:
05/05/25 11:05:18 at oracle.j2ee.ws.RpcWebService.generateWrapperClass(RpcWebService.java:493)
05/05/25 11:05:18 at oracle.j2ee.ws.RpcWebService.generate(RpcWebService.java:414)
05/05/25 11:05:18 at oracle.j2ee.ws.RpcWebService.getWrapper(RpcWebService.java:532)
05/05/25 11:05:18 at oracle.j2ee.ws.RpcWebService.doGetRequest(RpcWebService.java:631)
05/05/25 11:05:18 at oracle.j2ee.ws.BaseWebService.doGet(BaseWebService.java:1173)
05/05/25 11:05:18 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
05/05/25 11:05:18 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
05/05/25 11:05:18 at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
05/05/25 11:05:18 at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
05/05/25 11:05:18 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:649)
05/05/25 11:05:18 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)
05/05/25 11:05:18 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
05/05/25 11:05:18 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
05/05/25 11:05:18 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
05/05/25 11:05:18 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
05/05/25 11:05:18 at java.lang.Thread.run(Thread.java:534)Please post your query in forum "http://forums.oracle.com/forums/forum.jsp?forum=46"
-
ORA-29532 error when invoking SSL web services using UTL_DBWS
Web Service gurus,
The WSDL for web services is as follows -
<definitions name="Webservice" targetNamespace="http://webservice.airclic.com/">
−
<types>
−
<xs:schema targetNamespace="http://webservice.airclic.com/" version="1.0">
<xs:element name="Exception" type="tns:Exception"/>
<xs:element name="listenForEvents" type="tns:listenForEvents"/>
<xs:element name="listenForEventsResponse" type="tns:listenForEventsResponse"/>
<xs:element name="sendAuthenticationResponse" type="tns:sendAuthenticationResponse"/>
<xs:element name="sendAuthenticationResponseResponse" type="tns:sendAuthenticationResponseResponse"/>
<xs:element name="upsertTask" type="tns:upsertTask"/>
<xs:element name="upsertTaskResponse" type="tns:upsertTaskResponse"/>
−
<xs:complexType name="upsertTask">
−
<xs:sequence>
<xs:element minOccurs="0" name="task" type="tns:Task"/>
</xs:sequence>
</xs:complexType>
−
<xs:complexType name="Task">
−
<xs:complexContent>
−
<xs:extension base="tns:PlatformObject">
−
<xs:sequence>
<xs:element minOccurs="0" name="status" type="tns:status"/>
<xs:element minOccurs="0" name="assignee" type="xs:string"/>
<xs:element minOccurs="0" name="assigneeUserId" type="xs:string"/>
<xs:element minOccurs="0" name="name" type="xs:string"/>
<xs:element minOccurs="0" name="type" type="xs:string"/>
<xs:element minOccurs="0" name="creationTimestamp" type="xs:long"/>
<xs:element minOccurs="0" name="updateTimestamp" type="xs:long"/>
<xs:element minOccurs="0" name="startTimestamp" type="xs:long"/>
<xs:element minOccurs="0" name="endTimestamp" type="xs:long"/>
<xs:element minOccurs="0" name="source" type="tns:source"/>
<xs:element minOccurs="0" name="notes" type="xs:string"/>
<xs:element minOccurs="0" name="priority" type="xs:int"/>
<xs:element minOccurs="0" name="penalized" type="xs:boolean"/>
<xs:element minOccurs="0" name="hasSLA" type="xs:boolean"/>
<xs:element minOccurs="0" name="location" type="tns:Location"/>
<xs:element minOccurs="0" name="windowStartTimestamp" type="xs:long"/>
<xs:element minOccurs="0" name="windowEndTimestamp" type="xs:long"/>
<xs:element minOccurs="0" name="signee" type="xs:string"/>
<xs:element minOccurs="0" name="signature" type="xs:base64Binary"/>
<xs:element minOccurs="0" name="customerId" type="xs:string"/>
<xs:element minOccurs="0" name="travelTime" type="xs:int"/>
<xs:element minOccurs="0" name="expirationTimestamp" type="xs:long"/>
<xs:element minOccurs="0" name="parentId" type="xs:long"/>
<xs:element minOccurs="0" name="externalTimezone" type="xs:string"/>
<xs:element minOccurs="0" name="localTimeOffset" type="xs:long"/>
<xs:element minOccurs="0" name="consignee" type="xs:string"/>
<xs:element minOccurs="0" name="assignmentWindowStartTimestamp" type="xs:long"/>
<xs:element minOccurs="0" name="assignmentWindowEndTimestamp" type="xs:long"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
−
<xs:complexType name="PlatformObject">
−
<xs:sequence>
<xs:element name="id" type="xs:string"/>
<xs:element name="externalId" type="xs:string"/>
<xs:element name="revision" type="xs:long"/>
<xs:element name="platformDateCreated" type="xs:dateTime"/>
<xs:element name="platformDateUpdated" type="xs:dateTime"/>
<xs:element name="objectName" type="xs:string"/>
<xs:element maxOccurs="unbounded" name="extendedAttributes" type="tns:ExtendedAttribute"/>
</xs:sequence>
</xs:complexType>
−
<xs:complexType name="Location">
−
<xs:sequence>
<xs:element minOccurs="0" name="name" type="xs:string"/>
<xs:element minOccurs="0" name="description" type="xs:string"/>
<xs:element minOccurs="0" name="type" type="xs:string"/>
<xs:element minOccurs="0" name="address" type="tns:Address"/>
<xs:element minOccurs="0" name="position" type="tns:Position"/>
<xs:element minOccurs="0" name="geofenceId" type="xs:long"/>
<xs:element minOccurs="0" name="capcity" type="xs:int"/>
<xs:element minOccurs="0" name="contact" type="xs:string"/>
<xs:element minOccurs="0" name="email" type="xs:string"/>
</xs:sequence>
</xs:complexType>
−
<xs:complexType name="Address">
−
<xs:sequence>
<xs:element minOccurs="0" name="addressLine" type="xs:string"/>
<xs:element minOccurs="0" name="addressLine2" type="xs:string"/>
<xs:element minOccurs="0" name="city" type="xs:string"/>
<xs:element minOccurs="0" name="secondaryCity" type="xs:string"/>
<xs:element minOccurs="0" name="subdivision" type="xs:string"/>
<xs:element minOccurs="0" name="postalCode" type="xs:string"/>
<xs:element minOccurs="0" name="country" type="xs:string"/>
<xs:element minOccurs="0" name="phone" type="xs:string"/>
<xs:element minOccurs="0" name="freeform" type="xs:string"/>
</xs:sequence>
</xs:complexType>
−
<xs:complexType name="Position">
−
<xs:sequence>
<xs:element name="latitude" type="xs:double"/>
<xs:element name="longitude" type="xs:double"/>
</xs:sequence>
</xs:complexType>
−
<xs:complexType name="ExtendedAttribute">
−
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element name="value" type="xs:anyType"/>
</xs:sequence>
</xs:complexType>
−
<xs:complexType name="upsertTaskResponse">
−
<xs:sequence>
<xs:element minOccurs="0" name="task" type="tns:Task"/>
</xs:sequence>
</xs:complexType>
−
<xs:complexType name="Exception">
−
<xs:sequence>
<xs:element minOccurs="0" name="message" type="xs:string"/>
</xs:sequence>
</xs:complexType>
−
<xs:complexType name="listenForEvents">
−
<xs:sequence>
<xs:element minOccurs="0" name="listenParams" type="tns:ListenParams"/>
</xs:sequence>
</xs:complexType>
−
<xs:complexType name="ListenParams">
−
<xs:sequence>
<xs:element name="queueName" type="xs:string"/>
<xs:element name="resendLast" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
−
<xs:complexType name="listenForEventsResponse">
−
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="events" type="tns:Event"/>
</xs:sequence>
</xs:complexType>
−
<xs:complexType name="Event">
−
<xs:sequence>
<xs:element name="id" type="xs:string"/>
</xs:sequence>
</xs:complexType>
−
<xs:complexType name="AuthenticationRequestEvent">
−
<xs:complexContent>
−
<xs:extension base="tns:RequestEvent">
−
<xs:sequence>
<xs:element name="username" type="xs:string"/>
<xs:element minOccurs="0" name="password" type="xs:string"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
−
<xs:complexType name="RequestEvent">
−
<xs:complexContent>
−
<xs:extension base="tns:Event">
−
<xs:sequence>
<xs:element name="correlationId" type="xs:string"/>
<xs:element name="response" type="tns:Response"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
−
<xs:complexType name="Response">
−
<xs:sequence>
<xs:element name="correlationId" type="xs:string"/>
</xs:sequence>
</xs:complexType>
−
<xs:complexType name="AuthenticationResponse">
−
<xs:complexContent>
−
<xs:extension base="tns:Response">
−
<xs:sequence>
<xs:element name="success" type="xs:boolean"/>
<xs:element name="username" type="xs:string"/>
<xs:element minOccurs="0" name="password" type="xs:string"/>
<xs:element minOccurs="0" name="firstName" type="xs:string"/>
<xs:element minOccurs="0" name="lastName" type="xs:string"/>
<xs:element minOccurs="0" name="email" type="xs:string"/>
<xs:element minOccurs="0" name="active" type="xs:boolean"/>
<xs:element minOccurs="0" name="timeZone" type="xs:string"/>
<xs:element minOccurs="0" name="group" type="xs:string"/>
<xs:element minOccurs="0" name="role" type="xs:string"/>
<xs:element minOccurs="0" name="errorCode" type="xs:string"/>
<xs:element minOccurs="0" name="errorMessage" type="xs:string"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
−
<xs:complexType name="DispatchEvent">
−
<xs:complexContent>
−
<xs:extension base="tns:Event">
−
<xs:sequence>
<xs:element name="type" type="tns:eventType"/>
<xs:element minOccurs="0" name="previousTask" type="tns:Task"/>
<xs:element name="changeTask" type="tns:Task"/>
<xs:element minOccurs="0" name="newTask" type="tns:Task"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
−
<xs:complexType name="sendAuthenticationResponse">
−
<xs:sequence>
<xs:element minOccurs="0" name="authenticationResponse" type="tns:AuthenticationResponse"/>
</xs:sequence>
</xs:complexType>
−
<xs:complexType name="sendAuthenticationResponseResponse">
<xs:sequence/>
</xs:complexType>
−
<xs:simpleType name="status">
−
<xs:restriction base="xs:string">
<xs:enumeration value="NULL"/>
<xs:enumeration value="UNASSIGNED"/>
<xs:enumeration value="ASSIGNED"/>
<xs:enumeration value="RECEIVED"/>
<xs:enumeration value="ACCEPTED"/>
<xs:enumeration value="REJECTED"/>
<xs:enumeration value="IN_PROGRESS"/>
<xs:enumeration value="POSTPONED"/>
<xs:enumeration value="COMPLETED"/>
<xs:enumeration value="CANCELED"/>
<xs:enumeration value="CLEARED"/>
<xs:enumeration value="EXPIRED"/>
</xs:restriction>
</xs:simpleType>
−
<xs:simpleType name="source">
−
<xs:restriction base="xs:string">
<xs:enumeration value="NULL"/>
<xs:enumeration value="DISPATCH"/>
<xs:enumeration value="SYSTEM"/>
<xs:enumeration value="ENDUSER"/>
</xs:restriction>
</xs:simpleType>
−
<xs:simpleType name="eventType">
−
<xs:restriction base="xs:string">
<xs:enumeration value="TaskCreated"/>
<xs:enumeration value="TaskUpdated"/>
<xs:enumeration value="TaskAssigned"/>
<xs:enumeration value="TaskDeleted"/>
<xs:enumeration value="TaskStatusChanged"/>
<xs:enumeration value="TaskConflicted"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
</types>
−
<message name="Webservice_listenForEvents">
<part element="tns:listenForEvents" name="listenForEvents"/>
</message>
−
<message name="Webservice_sendAuthenticationResponseResponse">
<part element="tns:sendAuthenticationResponseResponse" name="sendAuthenticationResponseResponse"/>
</message>
−
<message name="Webservice_sendAuthenticationResponse">
<part element="tns:sendAuthenticationResponse" name="sendAuthenticationResponse"/>
</message>
−
<message name="Webservice_upsertTaskResponse">
<part element="tns:upsertTaskResponse" name="upsertTaskResponse"/>
</message>
−
<message name="Exception">
<part element="tns:Exception" name="Exception"/>
</message>
−
<message name="Webservice_upsertTask">
<part element="tns:upsertTask" name="upsertTask"/>
</message>
−
<message name="Webservice_listenForEventsResponse">
<part element="tns:listenForEventsResponse" name="listenForEventsResponse"/>
</message>
−
<portType name="Webservice">
−
<operation name="listenForEvents" parameterOrder="listenForEvents">
<input message="tns:Webservice_listenForEvents"/>
<output message="tns:Webservice_listenForEventsResponse"/>
<fault message="tns:Exception" name="Exception"/>
</operation>
−
<operation name="sendAuthenticationResponse" parameterOrder="sendAuthenticationResponse">
<input message="tns:Webservice_sendAuthenticationResponse"/>
<output message="tns:Webservice_sendAuthenticationResponseResponse"/>
<fault message="tns:Exception" name="Exception"/>
</operation>
−
<operation name="upsertTask" parameterOrder="upsertTask">
<input message="tns:Webservice_upsertTask"/>
<output message="tns:Webservice_upsertTaskResponse"/>
<fault message="tns:Exception" name="Exception"/>
</operation>
</portType>
−
<binding name="WebserviceBinding" type="tns:Webservice">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
−
<operation name="listenForEvents">
<soap:operation soapAction=""/>
−
<input>
<soap:body use="literal"/>
</input>
−
<output>
<soap:body use="literal"/>
</output>
−
<fault name="Exception">
<soap:fault name="Exception" use="literal"/>
</fault>
</operation>
−
<operation name="sendAuthenticationResponse">
<soap:operation soapAction=""/>
−
<input>
<soap:body use="literal"/>
</input>
−
<output>
<soap:body use="literal"/>
</output>
−
<fault name="Exception">
<soap:fault name="Exception" use="literal"/>
</fault>
</operation>
−
<operation name="upsertTask">
<soap:operation soapAction=""/>
−
<input>
<soap:body use="literal"/>
</input>
−
<output>
<soap:body use="literal"/>
</output>
−
<fault name="Exception">
<soap:fault name="Exception" use="literal"/>
</fault>
</operation>
</binding>
−
<service name="Webservice">
−
<port binding="tns:WebserviceBinding" name="WebservicePort">
<soap:address location="https://webservice.mp.b.airclic.com:443/webservice/product/fieldservice/v1/Webservice"/>
</port>
</service>
</definitions>
Following is the pl/sql code using UTL_DBWS
DECLARE
l_service UTL_DBWS.service;
l_call UTL_DBWS.call;
l_wsdl_url VARCHAR2(32767);
l_namespace VARCHAR2(32767);
l_service_qname UTL_DBWS.qname;
l_port_qname UTL_DBWS.qname;
l_operation_qname UTL_DBWS.qname;
l_input_params UTL_DBWS.anydata_list;
soap_request xmltype;
l_result xmltype;
result_output VARCHAR2(32767);
BEGIN
l_wsdl_url := 'https://webservice.mp.b.airclic.com/webservice/product/fieldservice/v1/Webservice?WSDL';
l_namespace := 'http://webservice.airclic.com/';
dbms_output.put_line ('1');
l_service_qname := UTL_DBWS.to_qname(l_namespace, 'Webservice');
dbms_output.put_line ('2');
l_port_qname := UTL_DBWS.to_qname(l_namespace, 'WebservicePort');
dbms_output.put_line ('3');
l_operation_qname := UTL_DBWS.to_qname(l_namespace, 'sendAuthenticationResponse');
dbms_output.put_line ('4');
l_service := UTL_DBWS.create_service (
wsdl_document_location => URIFACTORY.getURI(l_wsdl_url),
service_name => l_service_qname);
dbms_output.put_line ('5');
l_call := UTL_DBWS.create_call (
service_handle => l_service,
port_name => l_port_qname,
operation_name => l_operation_qname);
dbms_output.put_line ('6');
UTL_DBWS.SET_PROPERTY(l_call,'USERNAME',<username to access wsdl>);
dbms_output.put_line ('7');
UTL_DBWS.SET_PROPERTY(l_call,'PASSWORD',<password>);
dbms_output.put_line ('8');
utl_dbws.set_property(l_call,'OPERATION_STYLE', 'document');
dbms_output.put_line ('9');
soap_request := xmltype.createxml('<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:sendAuthenticationResponse xmlns:ns2="http://webservice.airclic.com/">
<authenticationResponse>
<correlationId>4646735802698040711:[email protected]</correlationId>
<success>true</success>
<username>changlanih</username>
<password>abcd1234</password>
<firstName>hero</firstName>
<lastName>changlani</lastName>
<email>[email protected]</email>
<active>true</active>
<timeZone>eastern</timeZone>
<group>Northeast</group>
<role>Service Manager</role>
</authenticationResponse>
</ns2:sendAuthenticationResponse>
</S:Body>
</S:Envelope>');
l_result := UTL_DBWS.invoke ( l_call,soap_request);
UTL_DBWS.release_call (call_handle => l_call);
UTL_DBWS.release_service (service_handle => l_service);
result_output := l_result.getstringval;
dbms_output.put_line('web svc output ===> ' || result_output);
END;
Following is the error from pl/sql code
1
2
3
4
DECLARE
ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception: java.lang.IllegalAccessException: error.build.wsdl.model: oracle.j2ee.ws.common.tools.api.WsdlValidationException:
Failed to read WSDL from https://webservice.mp.b.airclic.com/webservice/product/fieldservice/v1/Webservice?WSDL:
HTTP connection error code is 401
ORA-06512: at "SYS.UTL_DBWS", line 193
ORA-06512: at "SYS.UTL_DBWS", line 190
ORA-06512: at line 20
Notes
The program fails at following line of code -
l_service := UTL_DBWS.create_service (
wsdl_document_location => URIFACTORY.getURI(l_wsdl_url),
service_name => l_service_qname);
Web services are SSL.
The WSDL is at https location and needs username/password for access. The username/password to access WSDL are set using UTL_DBWS.SET_PROPERTY
To access the SSL site, I have imported the CA in Oracle Wallet, JVM home and JDK home.
Can anyone tell me what am I doing wrong here. I am not able to even establish connection to web service host.
This is very frustrating - Oracle has no examples on how to access a SSL Web Service (that needs authentication) from Database.
This is effecting our project deadlines ......... any help would be greatly appreciated.
Thanks.Hi,
I presume your Web Service needs HTTP (BASIC?) Authentication.
All this needs is setting the following 2 properties, which as can be seen, you are setting....
UTL_DBWS.set_property(l_call, 'USERNAME', '<username>');
UTL_DBWS.set_property(l_call, 'PASSWORD', '<pwd>');
This should work as long as your DBWS Callout Utility was downloaded from OTN after June 2008, and it's version is atleast 10.1.3.1.
Following is a sample code snippet that was tested successfully for this :
Declare
l_service UTL_DBWS.service;
l_call UTL_DBWS.call;
l_result sys.XMLTYPE;
l_request sys.XMLTYPE;
BEGIN
l_service := UTL_DBWS.create_service(null);
l_call := UTL_DBWS.create_call(l_service);
UTL_DBWS.set_target_endpoint_address(l_call, 'http://xxx.oracle.com:8888/basic/MyWebService1SoapHttpPort');
UTL_DBWS.set_property(l_call, 'USERNAME', 'username');
UTL_DBWS.set_property(l_call, 'PASSWORD', 'pwd');
UTL_DBWS.set_property(l_call, 'OPERATION_STYLE', 'document');
UTL_DBWS.set_property(l_call, 'SOAPACTION_USE', 'true');
UTL_DBWS.set_property(l_call, 'SOAPACTION_URI', 'http://xxx.oracle.com:8888/basic/MyWebService1SoapHttpPort');
l_request := XMLTYPE('<Z_CENTRICITY_GET_DOCLIST
xmlns:urn="urn:sap-com:document:sap:rfc:functions">' ||
'<I_INCLUDE_OLD_VERSIONS></I_INCLUDE_OLD_VERSIONS>' ||
'<I_INSTITUTION>0001</I_INSTITUTION>' ||
'<I_PATIENT_NR>0000000181</I_PATIENT_NR>' ||
'</Z_CENTRICITY_GET_DOCLIST>');
l_result := UTL_DBWS.invoke(l_call, l_request);
UTL_DBWS.release_call (call_handle => l_call);
UTL_DBWS.release_service (service_handle => l_service);
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line(sqlcode || ' ' || sqlerrm);
END;
Hope this helps,
Yogesh -
Error 403 while executing Web Service through Web Service Navigator
Hello All,
I am trying to execute "Create Sales Order" Web Service from WS Navigator. After filling all the input parameters and clicking on execute button, I get a error message
Failed Invalid Response code (403)
I know the execution is not reaching the back end proxy class. Any inputs on what could be causing this issue?
Regards,
AbhishekHi Abhishek,
Error code 403 means that the [access is forbidden.|http://en.wikipedia.org/wiki/HTTP_403]
This means that the user access that is being used to access the Web Service / Backend Proxy does not have enough authorizations to perform the action.
Check this user id, and its roles.
Regards,
Alka.
Maybe you are looking for
-
I brought my mother a second hand 4gig iPod Mini last Christmas and she has really enjoyed it. However, last week when she went to use it, the backlight came on but instead of the menu, faint lines could be seen. I've reset it, restored factory setti
-
Parameter passing in sql statement
hello.. i want to execute a value insertion query in jdbc..where the values are all parameterized string variables.but it failed to execute the query... and generating a sql exception "too few parameter.." but it succesfully executes with a direct st
-
Workbook Printing Issues???
Most of the clients work on Discoverer Plus so that they can develop & manage workbooks. But when it comes to printing Plus is missing a vital feature of Print Preview. I checked its available in Desktop version & Viewer but why its missing in Plus??
-
hi all i am new in obiee and i want a help from u all, i want to navigate from one page to another in obiee,that is working for me but if i have a null value in that specific cell and when i am clicking on that its showing error.Can anybody tel me ho
-
Hi My iPad is showing a connection with my computer and my computer is also showing a connection withmy iPad but Safari asys can't open page because it is not connected to the internet. And in general on the iPad it shows Network Not available of cor