Sending Infopath content to a database or web service
Hi,
I have a sharepoint 2010 where I have 2 infopath forms used to enter data (each form has 5 por 6 fields). I need, once the data entered and validated, at the same time sent to a sql database or web service.
Can you please let me know the best route to follow. I read in this forum and on google that it can be done as importing to excel but I do not want any intermediary.
Thanks in advance
Hello,
In this video, i don't see any info about SQL OR ORACLE connector. It is simply about rest web service which can be used anywhere (with infopath, external list etc). As per my knowledge, by default there is no rest web service available in SP to connect
with ORACLE directly. Either you have to ask third party to provide you rest API OR you can create your own as i said earlier.
This thread will give you more idea:
https://social.msdn.microsoft.com/Forums/sharepoint/en-US/0ce0a4cd-40f8-4bbf-b963-38e3f59ede73/getting-data-from-oracle-database-to-sharepoint-list?forum=sharepointdevelopment
Hemendra:Yesterday is just a memory,Tomorrow we may never see<br/> Please remember to mark the replies as answers if they help and unmark them if they provide no help
Similar Messages
-
OutofMemory Error while sending file to database using Web services
I have a file of 30MB to be written to the MySQL database. I am doing this in Axis web services and it gives me the following error:
(I am using Tomcat as the application server and Apache as the web server, Axis 1.3 and MySQL standard 5.0.21 version. I have set the minimum and maximum heap size and it works well without using the web service (just uploading and downloading from the database using a simple java program). Another thing to notice is that I can send a file of almost 10MB size to the database using web service without any problem. But it doesn't work with the 30 MB .)
java.lang.OutOfMemoryError: Java heap space; nested exception is:
java.lang.OutOfMemoryError: Java heap space
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString: java.lang.OutOfMemoryError: Java heap space; nested exception is:
java.lang.OutOfMemoryError: Java heap space
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:dbr221d.dbr.louisville.edu
java.lang.OutOfMemoryError: Java heap space; nested exception is:
java.lang.OutOfMemoryError: Java heap space
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:633)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(XMLNSDocumentScannerImpl.java:719)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
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 edu.louisville.bcc_ma.ws.lab.LabServiceSoapBindingStub.storeGZIPFile(LabServiceSoapBindingStub.java:472)
at edu.louisville.bcc_ma.lims.labclient.container.SendGZIPFile.sendFile(SendGZIPFile.java:69)
at edu.louisville.bcc_ma.lims.labclient.container.LoginContainer.login(LoginContainer.java:58)
at edu.louisville.bcc_ma.lims.labclient.container.LoginContainer.main(LoginContainer.java:44)Sorry for the delayed response here, forget to add it to my watchlist. I didn't catch if you were using Java 1.5 or not. Prior to 1.5 the default maximum heap space was 64MB which with the overhead of the appserver might be your problem.
Take a look at http://java.sun.com/j2se/1.5.0/docs/guide/vm/gc-ergonomics.html and the java -Xmx <size> command line option to change the default (I believe the size argument is in bytes, but don't hold me to that). I think you can pass that as a command line option to the startup script, but you should check the doco to see if it needs to be wrapped in some other arg etc.,
I seem to recall running into this same problem a few years back when I had a servlet doing some intense graphics processing on the fly and setting this option fixed the problem. -
How to send JSON data in HTTPService to PHP web service question
I'm using Flex 4 and a mx:HTTPService to send a JSON request to a php web service. I'm not sure if I'm sending the request correctly. Could someone look at the code below to see what I'm doing wrong?
thanks
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:s="library://ns.adobe.com/flex/spark"
width="100%" height="100%">
<fx:Declarations>
<mx:HTTPService id="service" url="https://my web service url/"
method="POST" resultFormat="text" result="onResult(event)" fault="onFault(event)">
</mx:HTTPService>
</fx:Declarations>
<fx:Script>
<![CDATA[
import com.adobe.serialization.json.JSON;
import mx.collections.ArrayCollection;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
import mx.utils.Base64Encoder;
[Bindable]private var username:String = "[email protected]";
[Bindable]private var password:String = "the password";
[Bindable]private var accountNumber:String = "49055";
[Bindable]private var anticipatedDeliveryDate:Number = 20101115;
[Bindable]private var purchaseOrder:String = "#123 for retailer";
[Bindable]private var detailRecords:Array = new Array();
[Bindable]private var key:String = "abc123";
private function populateService():void {
populateProducts();
setRequestHeader();
setRequestData();
service.send();
private function setRequestHeader():void {
var encoder:Base64Encoder = new Base64Encoder();
encoder.insertNewLines = false;
encoder.encode(key);
service.headers["Authorization"] = "VIP " + key;
service.headers["Content-Type"] = "application/json";
private function setRequestData():void {
service.request.username = username;
service.request.password = password;
service.request.accountNumber = accountNumber;
service.request.anticipatedDeliveryDate = anticipatedDeliveryDate;
service.request.purchaseOrder = purchaseOrder;
service.request.detailRecords = detailRecords;
// caching test
var rnd : Number = Math.round(Math.random()*1000);
service.request.cacheOff = rnd;
private function populateProducts():void {
var prod1:Object = new Object();
prod1.itemCodeOrUPC = "00241";
prod1.itemDescription = "Budweiser Keg 1/2 BBL";
prod1.quantityOrdered = 2;
prod1.orderUOM = "Keg";
var prod2:Object = new Object();
prod2.itemCodeOrUPC = "00219";
prod2.itemDescription = "Budweiser 24/12 OZ CAN";
prod2.quantityOrdered = 4;
prod2.orderUOM = "Case";
detailRecords.push(prod1);
detailRecords.push(prod2);
private function onResult(event:ResultEvent):void
var json:Object = JSON.decode(event.result as String);
private function onFault(event:FaultEvent):void
trace("Fault: " + event.fault.faultString);
]]>
</fx:Script>
<mx:Panel width="95%" height="100%" color="#000000">
<mx:HBox width="100%">
<mx:Button label="Submit" click="{populateService()}"/>
</mx:HBox>
</mx:Panel>
</s:Application>Have you think abut using ActionScript in your Flex application? Or, you can write javascript to be proxy between your flash app and backend PHP web service?
Also, it seems that you will allow every customer's flash player to have a copy of secret code. I think it is dangerous design because an flv file can be easity decompiled. Therefore, you secret code can be found if it is not input by your end user and it is populated on your serverside script. -
How to connect to database in web service??
Hi all,
How to connect to database in web service ? Can anyone give some advice what kind of database should i use? thanksNo difference. Just connect as usual!
Let me give you an example:
Code to connect to postgresql db ...
public Connection connectPostgresql(String servername, String dbname, String username, String password)
Connection conn = null;
try
// Load the JDBC driver
String driverName = "org.postgresql.Driver";
Class.forName(driverName);
// Create a connection to the database
String url = "jdbc:postgresql://" + servername + "/" + dbname;
conn = DriverManager.getConnection(url, username, password);
return conn;
catch (ClassNotFoundException e)
// Could not find the database driver
return conn;
catch (SQLException e)
// Could not connect to the database
return conn;
}Code for an axis web service ...
public Element[] updateProfile(Element[] params)
String message = "";
// get str 1
Node node1 = params[0].getFirstChild();
String str1= node1.getNodeValue();
// get str 2
Node node2 = params[1].getFirstChild();
String str2= node2.getNodeValue();
Connection conn = connectPostgresql ("localhost","myDatabase","myUsername","myPassword");
// there is a method to insert these params to db
boolean isInserted = insertParams(conn, str1, str2);
if(isInserted )
message = "OK";
else
message = "Not OK";
// constructs an array of DOM Elements for message to send back to client
SOAPBodyElement[] response = new SOAPBodyElement[1];
response[0] = new SOAPBodyElement(XMLUtils.StringToElement("urn:foo", "e1", message));
return response;
}Gokce. -
How to connect a PDF form to SQL server database through web service?
Hi,
I'm new to LiveCycle designer. I have designed a PDF form in LC designer ES2, which suppose to take a personnel number and retrieve the personnel information from a SQL server database. Currently its working fine with XML data and a search button, but I need to securly connect to a database through web service. I know how to connect to a wsdl file through designer. What I need is a wsdl file to connect the form to database. For this purpose, is there any WSDL code to use as the web service?
I really appreciate your help and advice.Hi,
I'm new to LiveCycle designer. I have designed a PDF form in LC designer ES2, which suppose to take a personnel number and retrieve the personnel information from a SQL server database. Currently its working fine with XML data and a search button, but I need to securly connect to a database through web service. I know how to connect to a wsdl file through designer. What I need is a wsdl file to connect the form to database. For this purpose, is there any WSDL code to use as the web service?
I really appreciate your help and advice. -
Sending WSSE security headers to non-weblogic web service
I have been trying to send wsse headers to a non-weblogic web service. I am looking for a way to do this using the control file I generated from the wsdl or the page flow where I implement the control, or the message handler file. I have username and password parameters but I cannot get this to function.
Here is the signature I need:
<?xml version="1.0" encoding="UTF-8" ?>
- <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <env:Header>
- <wsse:Security env:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
- <wsse:UsernameToken wsu:Id="Id-dFQDZm_34ewPYtaARIJ_4BfI" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>weblogic</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">weblogic</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</env:Header>
- <env:Body>
<n1:hello xmlns:n1="http://workshop.bea.com/WebServiceB" />
</env:Body>
</env:Envelope>
Of course the Body is different, but this is the security signature that I need to get into the header. After looking at all the examples, I only see the option of using a java proxy class to call the web service, which would be a little difficult to use as my whole page flow application so far is calling the web service from a generated control. There are also lots of coplex datatypes that are being sent to the web service so a jave proxy would be a little difficult. I have tried to take the code from the java proxy class example and put it in my handler class, but the handler seems to only use MessageContext, not WebServiceContext and will not let me add the username password tokens. When I have tried to case a WebServiceContext out of a MessageContext, it gives me a runtime error "Class Cast Exception" even though workshop lets me do it.
This is extremely urgent. Please help me! I am using the sample handler class called MessageHandler.java and the sample WSSE java proxy class called WebServiceBClient.java that generated the above signature.More information:
Here is the first part of my Java Control where I am calling the web service and the message handler:
package controls;
* @jc:location http-url="http://localhost:7001/Checking.jws"
* @jc:wsdl file="#CheckingWsdl"
* @jc:handler callback="MessageHandler" operation="MessageHandler"
public interface CheckingService extends com.bea.control.ControlExtension, com.bea.control.ServiceControl
public static class CustomerInfo
implements java.io.Serializable
public java.lang.String FirstName;
public java.lang.String LastName;
public java.lang.String MiddleName;
public int SSN;
public int CustomerNumber;
public java.util.Calendar CreationDate;
public java.util.Calendar LastModifiedDate;
public static class FundingInfo
implements java.io.Serializable
public float Amount;
public java.util.Calendar CurrentDate;
public int AccountNumber;
public static class anyType
implements java.io.Serializable
public com.bea.xml.XmlObject[] t;
public static class AccountInfo
implements java.io.Serializable
public int AccountNumber;
public float Balance;
public int CustomerNumber;
public java.util.Calendar LastModifiedDate;
* @jc:protocol form-post="false" form-get="false"
public AccountInfo CreateAccountChecking (CustomerInfo CustomerInfo, FundingInfo FundingInfo, anyType CommonHeader);
static final long serialVersionUID = 1L;
Here is the section of the MessageHandler class where I am attempting to add security token to the header:
protected void addSecurityHeader (MessageContext mc)
* Registers a handler for the SOAP message traffic.
HandlerRegistry registry = mc.getHandlerRegistry();
List list = new ArrayList();
list.add(new HandlerInfo(WSSEClientHandler.class, null, null));
registry.setHandlerChain(new QName("hello"), list);
try
WebServiceContext context = (WebServiceContext)WebServiceContext.currentContext().getLastMessageContext();
//(WebServiceContext)mc;
WebServiceSession session = context.getSession();
* Set the username and password token for SOAP message sent from the client, through
* the proxy, to the web service.
UserInfo ui = new UserInfo("weblogic", "weblogic");
session.setAttribute(WSSEClientHandler.REQUEST_USERINFO, ui);
//mc.setProperty(WSSEClientHandler.REQUEST_USERINFO, ui);
* Adds the username / password token to the SOAP header.
SecurityElementFactory factory = SecurityElementFactory.getDefaultFactory();
Security security = factory.createSecurity(null);
security.addToken(ui);
session.setAttribute(WSSEClientHandler.REQUEST_SECURITY, security);
//mc.setProperty(WSSEClientHandler.REQUEST_SECURITY, security);
} catch (Exception ex) {System.out.println("EXCEPTION CAUGHT DOING SECURITY STUFF " + ex.getMessage());}
I tried to use the MessageContext to do this but it came out null. I tried to cast the MessageContext to WebServiceContext and it gave me a Class Cast Exception. I tried to add the HandlerRegistry section to this but of course the assignment mc.getHandlerRegistry is improper and is not compiling so don't let that confuse you. -
Database Native web services - load balancing, Instrumentation , security
Hello –
I’m proposing use of Database Native web service in our company. Our architects are asking following questions so appreciate your help
a. How do you load balance across the DB WS (is there a way to use the F5 to detect downtime and balance the load across the DB servers)? We will be using RAC configuration with 3 nodes.
b. Our architect have security concern as user id/password information are in the web service URL, which may prove to be an issue. Is there a way to mitigate this risk?
c. Instrumentation in this approach (db native services) is questionable due to development/auto gen of the service logic from the DB itself. We may investigate wrapping the services with OSB to give us an additional instrumentation, policy enforcement, endpoint mediation and security proxy. Thoughts??
d. Architect are curious regarding any potential performance issues this may have on the DB server.
ThanksHi
We've recently begun using Native Web Services, intending to roll out this approach across the enterprise, but we've encountered 2 significant problems so far, which you may want to consider before proceeding ...
1. NWS returns an exception if the underlying PL/SQL returns a null value - even if the PL/SQL has completed successfully, and null is a legitimate return value (see SR 3-6201969101 - it contains simple instructions to recreate the problem)
(I raised it in this forum but there were no replies - SOAP Fault when returning null from a Native Web Service Stored Procedure
2. The sequence of values returned in the NWS response message is the opposite to the sequence declared in the auto-generated wsdl - i.e. schema validation will fail (see SR 3-6209016991 - it also contains simple instructions to replicate)
We have coded a workaround for problem 1. where we return <EMPTY> in place of null, and check for it in the client, but without proper resolution we're not prepared to use NWS elsewhere
As a workaround for problem 2. we removed schema validation, again not ideal
Both SRs were escalated 9 days ago, but are still outstanding
Incidentally our database is 11.2.0.1, but I've tested on 11.2.0.3 and both problems are still present
We also wrap the NWS services using an OSB Proxy Service, and came across the same security issue that you describe (b) - to provide the credentials required for the NWS, simply create a Service Account (containing the credentials) inside OSB and attach it to the Business Service which invokes the NWS (http://docs.oracle.com/cd/E17904_01/doc.1111/e15867/service_accounts.htm)
HTH -
Database native web services and RAC
The Readme in the database documentation library says :
Database native web services used in an Oracle RAC configuration are not supported.
Is this restriction still there for the latest release (the one which was just announced for windows)?
Why does this restriction exist? Any plans to change this in future releases?
What does "not supported" means? It simply doesn't work at all, or you can make it work, but Oracle Support won't help you if there are problems with it?Yes, unsupported means use at your own risk. Oracle hasn't "approved" what you are doing, so if you run into problems they will not be able to help you.
-
Database as Web Services Provider?
Hello!
Would you please forgive me my silly question but...
My customer has purchased and is using Oracle RDBMS 10g.
Now the customer wants the database to be accessible by web services clients.
The customer thinks that this can be done with already purchased RDBMS (without Oracle's Application Server). The customer cites Oracle: "Database as Web Services Provider: Database operations and data retrieval are executed through Web Services mechanisms" (http://www.oracle.com/technology/tech/webservices/database.html).
However, in my honest opinion the customer MUST install some web server. if the customer is especially insterested in Oracle's solutions, then it has to (additionally to already purchased RDBMS) buy either Oracle Application Server or WebLogic.
Who is right?
Sincerely Yours,
MichailMichail,
For DB 10g, you are right - the solution is to use PL/SQL Web Services for which an OracleAS/OC4J server is essential.
For DB 11g, both you & your customer are right. In addition to the above like 10g, there is a new feature in 11g called Native XML DB Web Services within the DB which does not require any Web Server or AS. See http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28369/xdb_web_services.htm
HTH,
Yogesh -
Recently added to DCI's Corporate and e-Business Portals
Conference:
Databases, Portals, Web Services, and XML Integration Magic
When: July 29, 2001, 9:00 AM - 5:00 PM
Where: Hynes Convention Center, Boston
http://www.dci.com/brochure/porbos/seminars.aspRecently added to DCI's Corporate and e-Business Portals
Conference:
Databases, Portals, Web Services, and XML Integration Magic
When: July 29, 2001, 9:00 AM - 5:00 PM
Where: Hynes Convention Center, Boston
http://www.dci.com/brochure/porbos/seminars.asp -
ORA-31050:Access denied when trying enabling the database-native Web servic
Dear all,
I'm trying to follow the instruction of OBE about "Using Oracle XML DB Web Services for Service-Oriented Architecture " as this url http://st-curriculum.oracle.com/obe/db/11g/r1/prod/datamgmt/xmldb2_b/xmldb2_b.htm#http .
I would like to enable the database-native Web service end point in Oracle XML DB and I already execute the script to create Web Service Endpoint.
Anyway, I got the following error.
ORA-31050: Access denied
ORA-06512: at "XDB.DBMS_XDB", line 528
ORA-06512: at "SYSTEM.ADDSERVLETMAPPING", line 91
I found that this procedure was created on system schema but the problem occur when I tried to call ADDSERVLETMAPPING procedure.
This is a code that I used to enable.
set pagesize 100
set linesize 132
set long 20000
set echo on
-- conn sys/oracle as sysdba
create or replace procedure addServletMapping (pattern varchar2,
servletname varchar2,
dispname varchar2,
servletclass varchar2,
servletschema varchar2,
language varchar2,
description varchar2,
securityRole xmltype) as
xdbconfig xmltype;
begin
xdbconfig := dbms_xdb.cfg_get();
select deleteXML
xdbconfig,
'/xdbconfig/sysconfig/protocolconfig/httpconfig/webappconfig/servletconfig/servlet-list/servlet[servlet-name="' || servletname || '"]'
into xdbconfig
from dual;
if (language = 'C') then
select insertChildXML
xdbconfig,
'/xdbconfig/sysconfig/protocolconfig/httpconfig/webappconfig/servletconfig/servlet-list',
'servlet',
xmlElement
"servlet",
xmlAttributes('http://xmlns.oracle.com/xdb/xdbconfig.xsd' as "xmlns"),
xmlForest
servletname as "servlet-name",
language as "servlet-language",
dispname as "display-name",
description as "description"
securityRole
into xdbconfig
from dual;
else
select insertChildXML
xdbconfig,
'/xdbconfig/sysconfig/protocolconfig/httpconfig/webappconfig/servletconfig/servlet-list',
'servlet',
xmlElement
"servlet",
xmlAttributes('http://xmlns.oracle.com/xdb/xdbconfig.xsd' as "xmlns"),
xmlForest
servletname as "servlet-name",
language as "servlet-language",
dispname as "display-name",
description as "description",
servletclass as "servlet-class",
servletschema as "servlet-schema"
into xdbconfig
from dual;
end if;
select deleteXML
xdbconfig,
'/xdbconfig/sysconfig/protocolconfig/httpconfig/webappconfig/servletconfig/servlet-mappings/servlet-mapping[servlet-name="' || servletname || '"]'
into xdbconfig
from dual;
select insertChildXML
xdbconfig,
'/xdbconfig/sysconfig/protocolconfig/httpconfig/webappconfig/servletconfig/servlet-mappings',
'servlet-mapping',
xmltype
'<servlet-mapping xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd">
<servlet-pattern>'||pattern||'</servlet-pattern>
<servlet-name>'||servletname||'</servlet-name>
</servlet-mapping>'
into xdbconfig
from dual;
xdb.dbms_xdb.cfg_update(xdbconfig);
end;
call addServletMapping(
'/orawsv/*',
'orawsv',
'Oracle Query Web Service',
null,
null,
'C',
'Web Services Servlet',
xmltype(
'<security-role-ref>
<role-name>XDB_WEBSERVICES</role-name>
<role-link>XDB_WEBSERVICES</role-link>
</security-role-ref>'
call addServletMapping(
'/orawsdl/*',
'orawsdl',
'Oracle WSDLs',
null,
null,
'C',
'WSDL Servlet',
xmltype(
'<security-role-ref>
<role-name>XDB_WEBSERVICES</role-name>
<role-link>XDB_WEBSERVICES</role-link>
</security-role-ref>'
--grant XDB_WEBSERVICES to oe
grant XDB_WEBSERVICES to TESTDB
-- For 11g only
--grant XDB_WEBSERVICES_OVER_HTTP to oe
grant XDB_WEBSERVICES_OVER_HTTP to TESTDB
--grant XDB_WEBSERVICES_WITH_PUBLIC to oe
grant XDB_WEBSERVICES_WITH_PUBLIC to TESTDB
-- Clean up afterward
drop procedure addServletMapping
Regards,
Zenoni
Edited by: zenoni on Jan 28, 2011 10:18 AMTest if you can access the generic WSDL using a browser
http://server:port/orawsv?wsdlYou should get prompted for a username and password. If you provide the username and password of a database user who was been granted the Web Services Roles you should see the query service WSDL
<definitions name="orawsv" targetNamespace="http://xmlns.oracle.com/orawsv"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://xmlns.oracle.com/orawsv"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://schemas.xmlsoap.org/wsdl/ http://schemas.xmlsoap.org/wsdl/">
<types>
<xsd:schema
targetNamespace="http://xmlns.oracle.com/orawsv"
elementFormDefault="qualified">
<xsd:element name="query">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="DDL_text" type="xsd:string"
minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="query_text">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="type">
<xsd:simpleType>
<xsd:restriction base="xsd:NMTOKEN">
<xsd:enumeration value="SQL" />
<xsd:enumeration value="XQUERY" />
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="bind">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="name" type="xsd:string" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="bindXML">
<xsd:complexType>
<xsd:sequence>
<xsd:any/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:choice>
<xsd:element name="null_handling" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:NMTOKEN">
<xsd:enumeration value="DROP_NULLS" />
<xsd:enumeration value="NULL_ATTR" />
<xsd:enumeration value="EMPTY_TAG" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="max_rows" type="xsd:positiveInteger" minOccurs="0"/>
<xsd:element name="skip_rows" type="xsd:positiveInteger" minOccurs="0"/>
<xsd:element name="pretty_print" type="xsd:boolean" minOccurs="0"/>
<xsd:element name="indentation_width" type="xsd:positiveInteger" minOccurs="0"/>
<xsd:element name="rowset_tag" type="xsd:string" minOccurs="0"/>
<xsd:element name="row_tag" type="xsd:string" minOccurs="0"/>
<xsd:element name="item_tags_for_coll" type="xsd:boolean" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="queryOut">
<xsd:complexType>
<xsd:sequence>
<xsd:any/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</types>
<message name="QueryInput">
<part name="body" element="tns:query"/>
</message>
<message name="XMLOutput">
<part name="body" element="tns:queryOut"/>
</message>
<portType name="ORAWSVPortType">
<operation name="XMLFromQuery">
<input message="tns:QueryInput"/>
<output message="tns:XMLOutput"/>
</operation>
</portType>
<binding name="ORAWSVBinding" type="tns:ORAWSVPortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="XMLFromQuery">
<soap:operation soapAction="http://localhost/orawsv"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="ORAWSVService">
<documentation>Oracle Web Service</documentation>
<port name="ORAWSVPort" binding="tns:ORAWSVBinding">
<soap:address location="http://localhost/orawsv"/>
</port>
</service>
</definitions>Edited by: mdrake on Jan 27, 2011 8:42 PM -
How could I synchronize databases via web services
I have two web sites. The first has been build in jsp. The second has been build in php. Each of these sites has database mysql.
I have managed to communicate these two web sites via web services.
I would like someone to tell me how could I syncronize these two databases via web services. There is something specific procedure?
Thanks in advance, sorry for my bad EnglishIf you can explain us what you actually looking for, then I can extend my help.As we are also using websites in jsp which is having DB connections.
Cheers
Rajesh R -
Update/insert/delete data from xcelsius to Database via web service
Hi,
I need to create dashboard that go function can <b>update/insert/delete</b> data send to <u>Database</u> thru <u>web services</u>, as i know got 2 xcelsius add-on software which support those of function <b>InfoBurst</b> and <b>flynet </b>
<b>InfoBurst</b>
http://www.infosol.com/azbocug/minutes/4-Writeback%20to%20a%20Database%20with%20Xcelsius.pdf
<b>flynet </b>
http://www.flynetviewer.com/public/community/Blogs/FlynetXcelsiusServerUser/default.aspx
Except this 2 purchase add-on xcelsius, any other solution ?
Maybe need to write some in MSSQL or C# programming which enable insert, update, delete ...etc ?
*note: i not use Xcelsius Engage Server , i use Xcelsius Engage only
thanks,
regards
s1
Edited by: Leong Pui Kee on Mar 1, 2011 6:06 AMHi,
As of now in Xcelsius/Dashboard Design there is no feature or functionality to insert/update/delete data from database.
Solution:
Create a Web service in let’s say C# or Java, which will perform insert/update/delete operation.
In Xcelsius add Web Service connection and user above web service.
Xcelsius Web Service connection provides option to pass input values to a Web Service (Input Pane) and get the result (Output values pane).
We can pass values to be written to the database as a input to Web Service via Web Service connection from Xcelsius and write data to the database.
Note:
Performing delete operation from Xcelsius Dashboard could be risky and may delete important data from database. I would not prefer giving delete option/functionality in Xcelsius dashboard.
Hope this helps!
Thank you.
Regards,
Vinay Mhaske -
Database Native Web Services : XMLTYPE parameter in PL/SQL with XMLSCHEMA?
Hi,
I would like to build a function with a XMLTYPE parameter which is schema based, something like this:
CREATE FUNCTION xy (p_xml XMLTYPE XMLSCHEMA 'http://myschema.com') ...
At the moment I do the following inside the code:
l_xml := p_xml.createSchemaBasedXML('http://myschema.com');
l_xml.schemavalidate();
/* validate XML against XSD */
l_nbr := l_xml.isschemavalidated();
The purpose why I would like to directly put the schema in the declaration is that I would like to use this function as a Oracle Native Web Service. The web service doesn't know the structure of the xml parameter as the schema is not knows in the declaration.
Thanks and kind regards,
Andreas
Edited by: mdrake on Nov 8, 2009 9:55 PMJust for kicks here's the best I can come up with..
SQL> connect &USERNAME/&PASSWORD
Connected.
SQL> --
SQL> --
SQL> --
SQL> declare
2 XMLSCHEMA XMLTYPE := XMLTYPE(
3 '<!-- edited with XML Spy v4.0 U (http://www.xmlspy.com) by Mark (Drake) -->
4 <xs:schema targetNamespace="http://xmlns.example.com/xsd/purchaseOrder"
5 xmlns="http://xmlns.example.com/xsd/purchaseOrder"
6 xmlns:xs="http://www.w3.org/2001/XMLSchema"
7 xmlns:xdb="http://xmlns.oracle.com/xdb" version="1.0" xdb:storeVarrayAsTable="true">
8 <xs:element name="PurchaseOrder" type="PurchaseOrderType" xdb:defaultTable="PURCHASEORDER"/>
9 <xs:complexType name="PurchaseOrderType" xdb:SQLType="PURCHASEORDER_T">
10 <xs:sequence>
11 <xs:element name="Reference" type="ReferenceType" xdb:SQLName="REFERENCE"/>
12 <xs:element name="Actions" type="ActionsType" xdb:SQLName="ACTIONS"/>
13 <xs:element name="Reject" type="RejectionType" minOccurs="0" xdb:SQLName="REJECTION"/>
14 <xs:element name="Requestor" type="RequestorType" xdb:SQLName="REQUESTOR"/>
15 <xs:element name="User" type="UserType" xdb:SQLName="USERID"/>
16 <xs:element name="CostCenter" type="CostCenterType" xdb:SQLName="COST_CENTER"/>
17 <xs:element name="ShippingInstructions" type="ShippingInstructionsType" xdb:SQLName="SHIPPING_INSTRUCTIONS"/>
18 <xs:element name="SpecialInstructions" type="SpecialInstructionsType" xdb:SQLName="SPECIAL_INSTRUCTIONS"/>
19 <xs:element name="LineItems" type="LineItemsType" xdb:SQLName="LINEITEMS"/>
20 </xs:sequence>
21 </xs:complexType>
22 <xs:complexType name="LineItemsType" xdb:SQLType="LINEITEMS_T">
23 <xs:sequence>
24 <xs:element name="LineItem" type="LineItemType" maxOccurs="unbounded" xdb:SQLName="LINEITEM" xdb:SQLCollType="LINEITEM_V"/>
25 </xs:sequence>
26 </xs:complexType>
27 <xs:complexType name="LineItemType" xdb:SQLType="LINEITEM_T">
28 <xs:sequence>
29 <xs:element name="Description" type="DescriptionType" xdb:SQLName="DESCRIPTION"/>
30 <xs:element name="Part" type="PartType" xdb:SQLName="PART"/>
31 </xs:sequence>
32 <xs:attribute name="ItemNumber" type="xs:integer" xdb:SQLName="ITEMNUMBER" xdb:SQLType="NUMBER"/>
33 </xs:complexType>
34 <xs:complexType name="PartType" xdb:SQLType="PART_T">
35 <xs:attribute name="Id" xdb:SQLName="PART_NUMBER" xdb:SQLType="VARCHAR2">
36 <xs:simpleType>
37 <xs:restriction base="xs:string">
38 <xs:minLength value="10"/>
39 <xs:maxLength value="14"/>
40 </xs:restriction>
41 </xs:simpleType>
42 </xs:attribute>
43 <xs:attribute name="Quantity" type="moneyType" xdb:SQLName="QUANTITY"/>
44 <xs:attribute name="UnitPrice" type="quantityType" xdb:SQLName="UNITPRICE"/>
45 </xs:complexType>
46 <xs:simpleType name="ReferenceType">
47 <xs:restriction base="xs:string">
48 <xs:minLength value="18"/>
49 <xs:maxLength value="30"/>
50 </xs:restriction>
51 </xs:simpleType>
52 <xs:complexType name="ActionsType" xdb:SQLType="ACTIONS_T">
53 <xs:sequence>
54 <xs:element name="Action" maxOccurs="4" xdb:SQLName="ACTION" xdb:SQLCollType="ACTION_V">
55 <xs:complexType xdb:SQLType="ACTION_T">
56 <xs:sequence>
57 <xs:element name="User" type="UserType" xdb:SQLName="ACTIONED_BY"/>
58 <xs:element name="Date" type="DateType" minOccurs="0" xdb:SQLName="DATE_ACTIONED"/>
59 </xs:sequence>
60 </xs:complexType>
61 </xs:element>
62 </xs:sequence>
63 </xs:complexType>
64 <xs:complexType name="RejectionType" xdb:SQLType="REJECTION_T">
65 <xs:all>
66 <xs:element name="User" type="UserType" minOccurs="0" xdb:SQLName="REJECTED_BY"/>
67 <xs:element name="Date" type="DateType" minOccurs="0" xdb:SQLName="DATE_REJECTED"/>
68 <xs:element name="Comments" type="CommentsType" minOccurs="0" xdb:SQLName="REASON_REJECTED"/>
69 </xs:all>
70 </xs:complexType>
71 <xs:complexType name="ShippingInstructionsType" xdb:SQLType="SHIPPING_INSTRUCTIONS_T">
72 <xs:sequence>
73 <xs:element name="name" type="NameType" minOccurs="0" xdb:SQLName="SHIP_TO_NAME"/>
74 <xs:element name="address" type="AddressType" minOccurs="0" xdb:SQLName="SHIP_TO_ADDRESS"/>
75 <xs:element name="telephone" type="TelephoneType" minOccurs="0" xdb:SQLName="SHIP_TO_PHONE"/>
76 </xs:sequence>
77 </xs:complexType>
78 <xs:simpleType name="moneyType">
79 <xs:restriction base="xs:decimal">
80 <xs:fractionDigits value="2"/>
81 <xs:totalDigits value="12"/>
82 </xs:restriction>
83 </xs:simpleType>
84 <xs:simpleType name="quantityType">
85 <xs:restriction base="xs:decimal">
86 <xs:fractionDigits value="4"/>
87 <xs:totalDigits value="8"/>
88 </xs:restriction>
89 </xs:simpleType>
90 <xs:simpleType name="UserType">
91 <xs:restriction base="xs:string">
92 <xs:minLength value="1"/>
93 <xs:maxLength value="10"/>
94 </xs:restriction>
95 </xs:simpleType>
96 <xs:simpleType name="RequestorType">
97 <xs:restriction base="xs:string">
98 <xs:minLength value="0"/>
99 <xs:maxLength value="128"/>
100 </xs:restriction>
101 </xs:simpleType>
102 <xs:simpleType name="CostCenterType">
103 <xs:restriction base="xs:string">
104 <xs:minLength value="1"/>
105 <xs:maxLength value="4"/>
106 </xs:restriction>
107 </xs:simpleType>
108 <xs:simpleType name="VendorType">
109 <xs:restriction base="xs:string">
110 <xs:minLength value="0"/>
111 <xs:maxLength value="20"/>
112 </xs:restriction>
113 </xs:simpleType>
114 <xs:simpleType name="PurchaseOrderNumberType">
115 <xs:restriction base="xs:integer"/>
116 </xs:simpleType>
117 <xs:simpleType name="SpecialInstructionsType">
118 <xs:restriction base="xs:string">
119 <xs:minLength value="0"/>
120 <xs:maxLength value="2048"/>
121 </xs:restriction>
122 </xs:simpleType>
123 <xs:simpleType name="NameType">
124 <xs:restriction base="xs:string">
125 <xs:minLength value="1"/>
126 <xs:maxLength value="20"/>
127 </xs:restriction>
128 </xs:simpleType>
129 <xs:simpleType name="AddressType">
130 <xs:restriction base="xs:string">
131 <xs:minLength value="1"/>
132 <xs:maxLength value="256"/>
133 </xs:restriction>
134 </xs:simpleType>
135 <xs:simpleType name="TelephoneType">
136 <xs:restriction base="xs:string">
137 <xs:minLength value="1"/>
138 <xs:maxLength value="24"/>
139 </xs:restriction>
140 </xs:simpleType>
141 <xs:simpleType name="DateType">
142 <xs:restriction base="xs:date"/>
143 </xs:simpleType>
144 <xs:simpleType name="CommentsType">
145 <xs:restriction base="xs:string">
146 <xs:minLength value="1"/>
147 <xs:maxLength value="2048"/>
148 </xs:restriction>
149 </xs:simpleType>
150 <xs:simpleType name="DescriptionType">
151 <xs:restriction base="xs:string">
152 <xs:minLength value="1"/>
153 <xs:maxLength value="256"/>
154 </xs:restriction>
155 </xs:simpleType>
156 </xs:schema>');
157 begin
158 dbms_xmlschema.registerSchema( SCHEMAURL => '/xsd/purchaseOrder.xsd', SCHEMADOC => XMLSCHEMA);
159 end;
160 /
PL/SQL procedure successfully completed.
Elapsed: 00:00:01.94
SQL> VAR URL VARCHAR2(1024)
SQL> VAR RESULT CLOB;
SQL> --
SQL> create or replace package TESTPROC
2 as
3 function getPurchaseOrder(P_REFERENCE VARCHAR2) return XMLTYPE;
4 function expandWSDL return XMLTYPE;
5 end;
6 /
Package created.
Elapsed: 00:00:00.02
SQL> --
SQL> create or replace package body TESTPROC
2 as
3 --
4 function getPurchaseOrder(P_REFERENCE VARCHAR2)
5 return XMLType
6 as
7 V_RESULT XMLTYPE;
8 begin
9 select object_value
10 into V_RESULT
11 from PURCHASEORDER
12 where XMLEXISTS('$p/PurchaseOrder[Reference=$ref]' passing P_REFERENCE as "ref");
13 return V_RESULT;
14 end;
15 --
16 function getWSDL
17 return XMLType
18 as
19 V_WSDL_URL VARCHAR2(700) := 'http://&USERNAME:&PASSWORD@localhost:' || dbms_xdb.getHttpPort() || '/orawsv/&USERNAME/TESTPROC/GETPURCHASEORDER';
20 V_WSDL XMLTYPE;
21 begin
22 select httpuritype( V_WSDL_URL || '?wsdl' ).getXML()
23 into V_WSDL
24 from dual;
25 return V_WSDL;
26 end;
27 --
28 function expandWSDL
29 return XMLTYPE
30 as
31 V_INTERNAL_URL VARCHAR2(700);
32 V_EXTERNAL_URL VARCHAR2(700);
33 V_NAMESPACE VARCHAR2(4000);
34 V_WSDL XMLTYPE := getWSDL();
35 V_XSD XMLTYPE;
36 begin
37 -- Need to provide real logic to determine which XSD goes with which parameter...
38
39 -- get the TARGETNAMESPACE for the import element (Not sure how this would work with a noNamespace Schema since we'd be in Chamelian Land)
40 select SCHEMA_URL,
41 XMLCAST
42 (
43 XMLQUERY
44 (
45 'declare namespace xsd = "http://www.w3.org/2001/XMLSchema"; (::)
46 $xsd/xsd:schema/@targetNamespace'
47 passing SCHEMA as "xsd" returning content
48 )
49 as VARCHAR2(4000)
50 )
51 into V_INTERNAL_URL, V_NAMESPACE
52 from USER_XML_SCHEMAS
53 where SCHEMA_URL = '/xsd/purchaseOrder.xsd';
54
55 V_EXTERNAL_URL := '/sys/schemas/&USERNAME' || V_INTERNAL_URL;
56
57 -- Add <xsd:import namespace="http://xmlns.example.com/xsd/purchaseOrder" schemaLocation="http://localhost:80/sys/schemas/WSDLTEST/xsd/purchaseOrder.xsd
"/>
58
59 select insertXMLBefore
60 (
61 V_WSDL,
62 '//xsd:schema/child::*[1]',
63 xmlElement("xsd:import",xmlAttributes('http://www.w3.org/2001/XMLSchema' as "xmlns:xsd",V_NAMESPACE as "namespace",V_EXTERNAL_URL as "schemaLoc
ation")),
64 'xmlns:xsd="http://www.w3.org/2001/XMLSchema"'
65 )
66 into V_WSDL
67 from dual;
68
69 select updateXML
70 (
71 V_WSDL,
72 '//xsd:schema/xsd:element[@name="GETPURCHASEORDEROutput"]/xsd:complexType/xsd:sequence/xsd:element[@name="RETURN"]/xsd:complexType',
73 XMLElement
74 (
75 "xsd:complexType",
76 XMLAttributes('http://www.w3.org/2001/XMLSchema' as "xmlns:xsd"),
77 XMLElement
78 (
79 "xsd:sequence",
80 XMLElement
81 (
82 "xsd:element",
83 xmlAttributes('http://xmlns.example.com/xsd/purchaseOrder' as "xmlns:po",'po:PurchaseOrder' as "ref")
84 )
85 )
86 ),
87 'xmlns:xsd="http://www.w3.org/2001/XMLSchema"'
88 )
89 into V_WSDL
90 from dual;
91
92 return V_WSDL;
93 end;
94 --
95 end;
96 /
old 19: V_WSDL_URL VARCHAR2(700) := 'http://&USERNAME:&PASSWORD@localhost:' || dbms_xdb.getHttpPort() || '/orawsv/&USERNAME/TESTPROC/GETPURCHASEORDER';
new 19: V_WSDL_URL VARCHAR2(700) := 'http://WSDLTEST:WSDLTEST@localhost:' || dbms_xdb.getHttpPort() || '/orawsv/WSDLTEST/TESTPROC/GETPURCHASEORDER';
old 55: V_EXTERNAL_URL := '/sys/schemas/&USERNAME' || V_INTERNAL_URL;
new 55: V_EXTERNAL_URL := '/sys/schemas/WSDLTEST' || V_INTERNAL_URL;
Package body created.
Elapsed: 00:00:00.05
SQL> show errors
No errors.
SQL> --
SQL> BEGIN
2 :URL := 'http://&USERNAME:&PASSWORD@localhost:' || dbms_xdb.getHttpPort() || '/orawsv/&USERNAME/TESTPROC';
3 end;
4 /
old 2: :URL := 'http://&USERNAME:&PASSWORD@localhost:' || dbms_xdb.getHttpPort() || '/orawsv/&USERNAME/TESTPROC';
new 2: :URL := 'http://WSDLTEST:WSDLTEST@localhost:' || dbms_xdb.getHttpPort() || '/orawsv/WSDLTEST/TESTPROC';
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.00
SQL> print url
URL
http://WSDLTEST:WSDLTEST@localhost:80/orawsv/WSDLTEST/TESTPROC
SQL> --
SQL> set long 10000000 pages 0 lines 160
SQL> --
SQL> select httpuritype( :URL || '?wsdl' ).getXML()
2 from dual
3 /
<definitions name="TESTPROC" targetNamespace="http://xmlns.oracle.com/orawsv/WSDLTEST/TESTPROC" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://xmlns
.oracle.com/orawsv/WSDLTEST/TESTPROC" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<types>
<xsd:schema targetNamespace="http://xmlns.oracle.com/orawsv/WSDLTEST/TESTPROC" elementFormDefault="qualified">
<xsd:element name="CXMLTYPE-GETPURCHASEORDERInput">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="P_REFERENCE-VARCHAR2-IN" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="GETPURCHASEORDEROutput">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="RETURN">
<xsd:complexType>
<xsd:sequence>
<xsd:any/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="CXMLTYPE-EXPANDWSDLInput">
<xsd:complexType>
<xsd:sequence>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="EXPANDWSDLOutput">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="RETURN">
<xsd:complexType>
<xsd:sequence>
<xsd:any/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</types>
<message name="GETPURCHASEORDERInputMessage">
<part name="parameters" element="tns:CXMLTYPE-GETPURCHASEORDERInput"/>
</message>
<message name="GETPURCHASEORDEROutputMessage">
<part name="parameters" element="tns:GETPURCHASEORDEROutput"/>
</message>
<message name="EXPANDWSDLInputMessage">
<part name="parameters" element="tns:CXMLTYPE-EXPANDWSDLInput"/>
</message>
<message name="EXPANDWSDLOutputMessage">
<part name="parameters" element="tns:EXPANDWSDLOutput"/>
</message>
<portType name="TESTPROCPortType">
<operation name="GETPURCHASEORDER">
<input message="tns:GETPURCHASEORDERInputMessage"/>
<output message="tns:GETPURCHASEORDEROutputMessage"/>
</operation>
<operation name="EXPANDWSDL">
<input message="tns:EXPANDWSDLInputMessage"/>
<output message="tns:EXPANDWSDLOutputMessage"/>
</operation>
</portType>
<binding name="TESTPROCBinding" type="tns:TESTPROCPortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="GETPURCHASEORDER">
<soap:operation soapAction="GETPURCHASEORDER"/>
<input>
<soap:body parts="parameters" use="literal"/>
</input>
<output>
<soap:body parts="parameters" use="literal"/>
</output>
</operation>
<operation name="EXPANDWSDL">
<soap:operation soapAction="EXPANDWSDL"/>
<input>
<soap:body parts="parameters" use="literal"/>
</input>
<output>
<soap:body parts="parameters" use="literal"/>
</output>
</operation>
</binding>
<service name="TESTPROCService">
<documentation>Oracle Web Service</documentation>
<port name="TESTPROCPort" binding="tns:TESTPROCBinding">
<soap:address location="http://localhost:80/orawsv/WSDLTEST/TESTPROC"/>
</port>
</service>
</definitions>
Elapsed: 00:00:00.33
SQL> select TESTPROC.expandWSDL()
2 from dual
3 /
<definitions name="GETPURCHASEORDER" targetNamespace="http://xmlns.oracle.com/orawsv/WSDLTEST/TESTPROC/GETPURCHASEORDER" xmlns="http://schemas.xmlsoap.org/wsdl/
" xmlns:tns="http://xmlns.oracle.com/orawsv/WSDLTEST/TESTPROC/GETPURCHASEORDER" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.
org/wsdl/soap/">
<types>
<xsd:schema targetNamespace="http://xmlns.oracle.com/orawsv/WSDLTEST/TESTPROC/GETPURCHASEORDER" elementFormDefault="qualified">
<xsd:import xmlns:xsd="http://www.w3.org/2001/XMLSchema" namespace="http://xmlns.example.com/xsd/purchaseOrder" schemaLocation="/sys/schemas/WSDLTEST/xsd/
purchaseOrder.xsd"/>
<xsd:element name="CXMLTYPE-GETPURCHASEORDERInput">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="P_REFERENCE-VARCHAR2-IN" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="GETPURCHASEORDEROutput">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="RETURN">
<xsd:complexType xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:sequence>
<xsd:element xmlns:po="http://xmlns.example.com/xsd/purchaseOrder" ref="po:PurchaseOrder"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</types>
<message name="GETPURCHASEORDERInputMessage">
<part name="parameters" element="tns:CXMLTYPE-GETPURCHASEORDERInput"/>
</message>
<message name="GETPURCHASEORDEROutputMessage">
<part name="parameters" element="tns:GETPURCHASEORDEROutput"/>
</message>
<portType name="GETPURCHASEORDERPortType">
<operation name="GETPURCHASEORDER">
<input message="tns:GETPURCHASEORDERInputMessage"/>
<output message="tns:GETPURCHASEORDEROutputMessage"/>
</operation>
</portType>
<binding name="GETPURCHASEORDERBinding" type="tns:GETPURCHASEORDERPortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="GETPURCHASEORDER">
<soap:operation soapAction="GETPURCHASEORDER"/>
<input>
<soap:body parts="parameters" use="literal"/>
</input>
<output>
<soap:body parts="parameters" use="literal"/>
</output>
</operation>
</binding>
<service name="GETPURCHASEORDERService">
<documentation>Oracle Web Service</documentation>
<port name="GETPURCHASEORDERPort" binding="tns:GETPURCHASEORDERBinding">
<soap:address location="http://localhost:80/orawsv/WSDLTEST/TESTPROC/GETPURCHASEORDER"/>
</port>
</service>
</definitions>
Elapsed: 00:00:00.11
SQL> BEGIN
2 :URL := 'http://&USERNAME:&PASSWORD@localhost:' || dbms_xdb.getHttpPort() || '/orawsv/&USERNAME/TESTPROC/EXPANDWSDL';
3 end;
4 /
old 2: :URL := 'http://&USERNAME:&PASSWORD@localhost:' || dbms_xdb.getHttpPort() || '/orawsv/&USERNAME/TESTPROC/EXPANDWSDL';
new 2: :URL := 'http://WSDLTEST:WSDLTEST@localhost:' || dbms_xdb.getHttpPort() || '/orawsv/WSDLTEST/TESTPROC/EXPANDWSDL';
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.00
SQL> print url
http://WSDLTEST:WSDLTEST@localhost:80/orawsv/WSDLTEST/TESTPROC/EXPANDWSDL
SQL> --
SQL> set serveroutput on
SQL> --
SQL> VAR WSDL_TEXT CLOB
SQL> --
SQL> DECLARE
2 V_SOAP_REQUEST XMLTYPE := XMLTYPE(
3 '<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
4 xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
5 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6 xmlns:xsd="http://www.w3.org/2001/XMLSchema">
7 <SOAP-ENV:Body>
8 <m:CXMLTYPE-EXPANDWSDLInput xmlns:m="http://xmlns.oracle.com/orawsv/WSDLTEST/TESTPROC"/>
9 </SOAP-ENV:Body>
10 </SOAP-ENV:Envelope>');
11 V_SOAP_REQUEST_TEXT CLOB := V_SOAP_REQUEST.getClobVal();
12 V_REQUEST UTL_HTTP.REQ;
13 V_RESPONSE UTL_HTTP.RESP;
14 V_BUFFER VARCHAR2(1024);
15 V_RESPONSE_TEXT CLOB;
16 V_RESPONSE_XML XMLTYPE;
17 V_WSDL XMLTYPE;
18 BEGIN
19 DBMS_LOB.CREATETEMPORARY(V_RESPONSE_TEXT, TRUE);
20
21 begin
22 V_REQUEST := UTL_HTTP.BEGIN_REQUEST(URL => :URL, METHOD => 'POST');
23 UTL_HTTP.SET_HEADER(V_REQUEST, 'User-Agent', 'Mozilla/4.0');
24 V_REQUEST.METHOD := 'POST';
25 UTL_HTTP.SET_HEADER (R => V_REQUEST, NAME => 'Content-Length', VALUE => DBMS_LOB.GETLENGTH(V_SOAP_REQUEST_TEXT));
26 UTL_HTTP.WRITE_TEXT (R => V_REQUEST, DATA => V_SOAP_REQUEST_TEXT);
27 V_RESPONSE := UTL_HTTP.GET_RESPONSE(V_REQUEST);
28 LOOP
29 UTL_HTTP.READ_LINE(V_RESPONSE, V_BUFFER, TRUE);
30 DBMS_LOB.WRITEAPPEND(V_RESPONSE_TEXT,LENGTH(V_BUFFER),V_BUFFER);
31 END LOOP;
32 UTL_HTTP.END_RESPONSE(V_RESPONSE);
33 EXCEPTION
34 WHEN UTL_HTTP.END_OF_BODY THEN
35 UTL_HTTP.END_RESPONSE(V_RESPONSE);
36 END;
37
38 V_RESPONSE_XML := XMLTYPE(V_RESPONSE_TEXT);
39
40 select XMLQUERY
41 (
42 'declare namespace SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; (::)
43 declare namespace SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"; (::)
44 declare namespace xsi="http://www.w3.org/2001/XMLSchema-instance"; (::)
45 declare namespace xsd="http://www.w3.org/2001/XMLSchema"; (::)
46 declare namespace m="http://xmlns.oracle.com/orawsv/WSDLTEST/TESTPROC"; (::)
47 $resp/SOAP-ENV:Envelope/SOAP-ENV:Body/m:EXPANDWSDLOutput/m:RETURN/*'
48 passing V_RESPONSE_XML as "resp" returning content
49 )
50 into V_WSDL
51 from DUAL;
52
53 select V_WSDL.getClobVal()
54 into :WSDL_TEXT
55 from dual;
56
57 DBMS_LOB.FREETEMPORARY(V_RESPONSE_TEXT);
58
59 END;
60 /
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.10
SQL> --
SQL> set pages 0 lines 160 long 10000
SQL> column WSDL format A160
SQL> --
SQL> select xmlserialize(document XMLTYPE(:WSDL_TEXT) as CLOB indent size=2) WSDL
2 from dual
3 /
<definitions name="GETPURCHASEORDER" targetNamespace="http://xmlns.oracle.com/orawsv/WSDLTEST/TESTPROC/GETPURCHASEORDER" xmlns="http://schemas.xmlsoap.org/wsdl/
" xmlns:tns="http://xmlns.oracle.com/orawsv/WSDLTEST/TESTPROC/GETPURCHASEORDER" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.
org/wsdl/soap/">
<types>
<xsd:schema targetNamespace="http://xmlns.oracle.com/orawsv/WSDLTEST/TESTPROC/GETPURCHASEORDER" elementFormDefault="qualified">
<xsd:import xmlns:xsd="http://www.w3.org/2001/XMLSchema" namespace="http://xmlns.example.com/xsd/purchaseOrder" schemaLocation="/sys/schemas/WSDLTEST/xsd/
purchaseOrder.xsd"/>
<xsd:element name="CXMLTYPE-GETPURCHASEORDERInput">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="P_REFERENCE-VARCHAR2-IN" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="GETPURCHASEORDEROutput">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="RETURN">
<xsd:complexType xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:sequence>
<xsd:element xmlns:po="http://xmlns.example.com/xsd/purchaseOrder" ref="po:PurchaseOrder"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</types>
<message name="GETPURCHASEORDERInputMessage">
<part name="parameters" element="tns:CXMLTYPE-GETPURCHASEORDERInput"/>
</message>
<message name="GETPURCHASEORDEROutputMessage">
<part name="parameters" element="tns:GETPURCHASEORDEROutput"/>
</message>
<portType name="GETPURCHASEORDERPortType">
<operation name="GETPURCHASEORDER">
<input message="tns:GETPURCHASEORDERInputMessage"/>
<output message="tns:GETPURCHASEORDEROutputMessage"/>
</operation>
</portType>
<binding name="GETPURCHASEORDERBinding" type="tns:GETPURCHASEORDERPortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="GETPURCHASEORDER">
<soap:operation soapAction="GETPURCHASEORDER"/>
<input>
<soap:body parts="parameters" use="literal"/>
</input>
<output>
<soap:body parts="parameters" use="literal"/>
</output>
</operation>
</binding>
<service name="GETPURCHASEORDERService">
<documentation>Oracle Web Service</documentation>
<port name="GETPURCHASEORDERPort" binding="tns:GETPURCHASEORDERBinding">
<soap:address location="http://localhost:80/orawsv/WSDLTEST/TESTPROC/GETPURCHASEORDER"/>
</port>
</service>
</definitions>
Elapsed: 00:00:00.03
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
C:\xdb\examples\DBNWS> -
Problems sending xml data as string to a web service
Hello!
I need to develop a client in order to invoke a web service. I have the WSDL of the web service, so I generate a web service proxy, from that WSDL, using JDeveloper 10.1.3.0.
Among other things, that web service receive RPC request (binding style is RPC) and the request has only one parameter, which consists of a string. That string must be an XML document (that is, the web service receives one parameter which is a XML document as a String). I generate that parameter, and it looks like the following:
<?xml version = '1.0' encoding = 'UTF-8'?>
<inputMessage xmlns="http://ws/validacion" xmlns:xsi="http://www.w3.o
rg/2001/XMLSchema-instance" xsi:SchemaLocation="http://localhost/ws/xsd/mservic/ws.xsd">
<request>ServiceRequest</request>
<versionMsg>1.0</versionMsg>
<data>AAAAAAAAAAAAAA</data>
</inputMessage>
However, when I send the request and capture it through HTTPAnalyzer, I get the following:
<?xml version="1.0" encoding="UTF-8"?><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:Body><MyWebService xmlns="http://soapinterop.org/"><myWebServiceRequest xsi:type="xsd:string" xmlns=""><?xml version = '1.0' encoding = 'UTF-8'?>
<inputMessage xmlns="http://ws/validacion" xmlns:xsi="http://www.w3.o
rg/2001/XMLSchema-instance" xsi:SchemaLocation="http://localhost/ws/xsd/mservic/ws.xsd">
<request>ServiceRequest</request>
<versionMsg>1.0</versionMsg>
<data>AAAAAAAAAAAAAA</data>
</inputMessage></myWebServiceRequest></MyWebService></soapenv:Body></soapenv:Envelope>
As you can see, the symbol '<' y replaced with '<'.
Why does it happen? Is there a way of avoiding that?
Could anybody be so kind to help me, please?
Thank you very much in advance.Hello!
I need to develop a client in order to invoke a web
service. I have the WSDL of the web service, so I
generate a web service proxy, from that WSDL, using
JDeveloper 10.1.3.0.
Among other things, that web service receive RPC
request (binding style is RPC) and the request has
only one parameter, which consists of a string. That
string must be an XML document (that is, the web
service receives one parameter which is a XML
document as a String). I generate that parameter, and
it looks like the following:
<?xml version = '1.0' encoding = 'UTF-8'?>
<inputMessage xmlns="http://ws/validacion"
xmlns:xsi="http://www.w3.o
rg/2001/XMLSchema-instance"
xsi:SchemaLocation="http://localhost/ws/xsd/mservic/ws
.xsd">
<request>ServiceRequest</request>
<versionMsg>1.0</versionMsg>
<data>AAAAAAAAAAAAAA</data>
nputMessage>
However, when I send the request and capture it
through HTTPAnalyzer, I get the following:
<?xml version="1.0"
encoding="UTF-8"?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelop
e/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body><MyWebService
xmlns="http://soapinterop.org/"><myWebServiceRequest
xsi:type="xsd:string" xmlns=""><?xml version =
'1.0' encoding = 'UTF-8'?>
<inputMessage xmlns="http://ws/validacion"
xmlns:xsi="http://www.w3.o
rg/2001/XMLSchema-instance"
xsi:SchemaLocation="http://localhost/ws/xsd/mservic/ws
.xsd">
<request>ServiceRequest</request>
<versionMsg>1.0</versionMsg>
<data>AAAAAAAAAAAAAA</data>
;/inputMessage></myWebServiceRequest></MyWebService></
soapenv:Body></soapenv:Envelope>
As you can see, the symbol '<' y replaced with
'<'. (I hope you can see it now)
The symbol '<' is replace with '& l t ;' (with no whitespaces)
>
Why does it happen? Is there a way of avoiding that?
Could anybody be so kind to help me, please?
Thank you very much in advance.
Maybe you are looking for
-
Gaps in-between livepaint shapes when saving to PDF
Im using CS6 and when saving to PDF my live paint objects have a slight gap inbetween the shapes in the live paint object. They do not appeare in the illustrator file or when saved as jpeg, png, etc only PDFs. I have been using Illustrator for a coup
-
How to add the distribution rule at AR Invoice in SAP 2007B PL10
Hi All, I want to add the default distribution rules of each item at marketing documents via DI API when item's warehouse changed? Now, I'm using the SAP 2007B PL 10. Any ideas? Thanks and regards, Lei
-
[Share]Cooling down 970 Gaming!
From MSI TW Forum link:https://forum-tc.msi.com/index.php?topic=113191.0 The story happened in a frigid night few weeks ago. I turned on my computer since I want to play Watch Dog, which is a very popular game recently. Huh? No response? I tried seve
-
Acrobat X Pro für Outlook 2013?
Guten Tag, vielleicht kann hier jemand helfen: Unter Outlook 2013 lässt sich bei mir Acrobat X Pro nicht einbinden. Ich möchte die Mails gerne direkt als PDF konvertieren, so wie es auch unter Outlook 2007 möglich war. Ich nutze als Betriebssystem Wi
-
Problems with enabling commenting toolbar on Reader 7
I have extended the commenting rights for a pdf with extensions server. I am running the evaluation version of extensions server. When I open the reader extended pdf inside the browser, it doesn't show up the commenting toolbar only in Reader 7. But