Error publishing plsql webservice (xml schema mapping and/or serializer)
Hi guys,
I'm with a problem when publishing plsql webservices from JDeveloper 11.
The scenario is something like this:
1) I have a connection with a database 9i, and the objects (packages, object types, etc) are all in there.
2) In this case, i can publish the package spec using the option "Publish as JAX-RPC Web Service" normally.
3) A database 11g was created, and i compiled the objects in this environment.
4) Then i've created a new connection with a database 11g.
5) In this case, when i'll publish the webservice, the error occurs: "The following types used by the program unit do not have an XML Schema mapping and/or serializer specified: REC_DMP_REMESSA"
I have no idea in how to solve this case. Someone can help?
Thank in advance.
Best Regards,
Gustavo
Duplicate of https://forums.oracle.com/thread/2610823
Timo
Similar Messages
-
Error publishing plsql webservice - JDEV11
Hi guys,
I'm with a problem when publishing plsql webservices from JDeveloper 11.
The scenario is something like this:
1) I have a connection with a database 9i, and the objects (packages, object types, etc) are all in there.
2) In this case, i can publish the package spec using the option "Publish as JAX-RPC Web Service" normally.
3) A database 11g was created, and i compiled the objects in this environment.
4) Then i've created a new connection with a database 11g.
5) In this case, when i'll publish the webservice, the error occurs: "The following types used by the program unit do not have an XML Schema mapping and/or serializer specified: REC_DMP_REMESSA"
I have no idea in how to solve this case. Someone can help?
Thank in advance.
Best Regards,
GustavoGustavo,
Wrong forum. This is SQL PL/SQL forum. May be you want to move this to Java or FM forums...
Fusion Applications
Fusion Middleware
Java
vr,
Sudhakar -
Error publishing plsql webservice
Hi guys,
I'm with a problem when publishing plsql webservices from JDeveloper 11.
The scenario is something like this:
1) I have a connection with a database 9i, and the objects (packages, object types, etc) are all in there.
2) In this case, i can publish the package spec using the option "Publish as JAX-RPC Web Service" normally.
3) A database 11g was created, and i compiled the objects in this environment.
4) Then i've created a new connection with a database 11g.
5) In this case, when i'll publish the webservice, the error occurs: "The following types used by the program unit do not have an XML Schema mapping and/or serializer specified: REC_DMP_REMESSA"
I have no idea in how to solve this case. Someone can help?
Thank in advance.
Best Regards,
GustavoGustavo, you better ask this in a pl/sql forum.
Timo -
XML Schema mapping error when generating web service
I have created a method in java that returns an array of an object type (a user defined class). When tried to generate a web service JDeveloper did not allow me to select the method, giving the following "Why not.." explanation: "One or more parameters did not have an XML Schema mapping and/or serializer specified".
Can anyone help me in this?
Thanks
AlinaThanks Mike for your advice it did work when I changed the setters and getters names, and managed to create a web service with Apache Soap profile. I created the client stub and client application to run the web service but it keep coming with soap-env error messages.
Error message I get when running the client side:
F:\JDev9i-0-3\jdk\bin\javaw.exe -ojvm -classpath F:\JDev9i-0-3\jdev\mywork\OrbatListArray\OrbatClient\classes;F:\JDev9i-0-3\jdev\lib\jdev-rt.jar;F:\JDev9i-0-3\jdev\lib\jdev-rt.jar;F:\JDev9i-0-3\soap\lib\soap.jar;F:\JDev9i-0-3\lib\xmlparserv2.jar;F:\JDev9i-0-3\jlib\javax-ssl-1_2.jar;F:\JDev9i-0-3\jlib\jssl-1_2.jar;F:\JDev9i-0-3\j2ee\home\lib\activation.jar;F:\JDev9i-0-3\j2ee\home\lib\mail.jar;F:\JDev9i-0-3\j2ee\home\lib\http_client.jar orbatclientpackage.OrbatListArrayClient
[SOAPException: faultCode=SOAP-ENV:Server.BadTargetObjectURI; msg=Unable to resolve target object(orbatlistarraypackage.OrbatListArray): orbatlistarraypackage.OrbatListArray [java.lang.ClassNotFoundException]] orbatlistarraypackage.OrbatType[] orbatclientpackage.OrbatListArrayStub.getOrbatListArray() OrbatListArrayStub.java:63 void orbatclientpackage.OrbatListArrayClient.main(java.lang.String[]) OrbatListArrayClient.java:19Exception in thread main
Process exited with exit code 1.
My wsdl file is:
<?xml version = '1.0' encoding = 'windows-1252'?>
<!--Generated by the Oracle9i JDeveloper Web Services WSDL Generator-->
<!--Date Created: Wed Oct 23 11:16:29 BST 2002-->
<definitions
name="OrbatListArray"
targetNamespace="http://orbatlistarraypackage/OrbatListArray.wsdl"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://orbatlistarraypackage/OrbatListArray.wsdl"
xmlns:ns1="http://orbatlistarraypackage/IOrbatListArray.xsd">
<types>
<schema
targetNamespace="http://orbatlistarraypackage/IOrbatListArray.xsd"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<complexType name="ArrayOfOrbatType" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<complexContent>
<restriction base="SOAP-ENC:Array">
<attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="ns1:orbatlistarraypackage_OrbatType[]"/>
</restriction>
</complexContent>
</complexType>
<complexType name="orbatlistarraypackage_OrbatType" jdev:packageName="orbatlistarraypackage" xmlns:jdev="http://xmlns.oracle.com/jdeveloper/webservices">
<all>
<element name="OrbatName" type="string"/>
<element name="OrbatID" type="int"/>
</all>
</complexType>
</schema>
</types>
<message name="getOrbatListArray0Request"/>
<message name="getOrbatListArray0Response">
<part name="return" type="ns1:ArrayOfOrbatType"/>
</message>
<portType name="OrbatListArrayPortType">
<operation name="getOrbatListArray">
<input name="getOrbatListArray0Request" message="tns:getOrbatListArray0Request"/>
<output name="getOrbatListArray0Response" message="tns:getOrbatListArray0Response"/>
</operation>
</portType>
<binding name="OrbatListArrayBinding" type="tns:OrbatListArrayPortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="getOrbatListArray">
<soap:operation soapAction="" style="rpc"/>
<input name="getOrbatListArray0Request">
<soap:body use="encoded" namespace="orbatlistarraypackage.OrbatListArray" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output name="getOrbatListArray0Response">
<soap:body use="encoded" namespace="orbatlistarraypackage.OrbatListArray" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
</binding>
<service name="OrbatListArray">
<port name="OrbatListArrayPort" binding="tns:OrbatListArrayBinding">
<soap:address location="http://192.9.200.200:8888/soap/servlet/soaprouter"/>
</port>
</service>
</definitions>
My OrbatListArrayDescriptor.dd file:
<?xml version = '1.0' encoding = 'windows-1252'?>
<!--Generated by the Oracle9i JDeveloper Web Services Deployment Descriptor Generator-->
<!--This Deployment Descriptor file is for use with the Oracle9iAS Release 2 / Apache 2.2 SOAP Server SOAP Server-->
<!--Date Created: Wed Oct 23 11:16:29 BST 2002-->
<isd:service
id="orbatlistarraypackage.OrbatListArray"
xmlns:isd="http://xml.apache.org/xml-soap/deployment">
<isd:provider
type="java"
methods="getOrbatListArray"
scope="Request">
<isd:java class="orbatlistarraypackage.OrbatListArray" static="false"/>
</isd:provider>
<isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener>
</isd:service>
My Client Web Service Stub class file:
package orbatclientpackage;
import oracle.soap.transport.http.OracleSOAPHTTPConnection;
import org.apache.soap.encoding.soapenc.BeanSerializer;
import org.apache.soap.encoding.SOAPMappingRegistry;
import org.apache.soap.util.xml.QName;
import java.net.URL;
import org.apache.soap.Constants;
import org.apache.soap.Fault;
import org.apache.soap.SOAPException;
import org.apache.soap.rpc.Call;
import org.apache.soap.rpc.Parameter;
import org.apache.soap.rpc.Response;
import java.util.Vector;
import orbatlistarraypackage.OrbatType;
import java.util.Properties;
* Generated by the Oracle9i JDeveloper Web Services Stub/Skeleton Generator.
* Date Created: Wed Oct 23 11:19:42 BST 2002
* WSDL URL: file:/F:/JDev9i-0-3/jdev/mywork/OrbatListArray/OrbatListArrayProject/src/orbatlistarraypackage/OrbatListArray.wsdl
public class OrbatListArrayStub
public OrbatListArrayStub()
m_httpConnection = new OracleSOAPHTTPConnection();
m_smr = new SOAPMappingRegistry();
BeanSerializer beanSer = new BeanSerializer();
m_smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("http://orbatlistarraypackage/IOrbatListArray.xsd", "orbatlistarraypackage_OrbatType"), orbatlistarraypackage.OrbatType.class, beanSer, beanSer);
public String endpoint = "http://192.9.200.200:8888/soap/servlet/soaprouter";
private OracleSOAPHTTPConnection m_httpConnection = null;
private SOAPMappingRegistry m_smr = null;
public OrbatType[] getOrbatListArray() throws Exception
OrbatType[] returnVal = null;
URL endpointURL = new URL(endpoint);
Call call = new Call();
call.setSOAPTransport(m_httpConnection);
call.setTargetObjectURI("orbatlistarraypackage.OrbatListArray");
call.setMethodName("getOrbatListArray");
call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
Vector params = new Vector();
call.setParams(params);
call.setSOAPMappingRegistry(m_smr);
Response response = call.invoke(endpointURL, "");
if (!response.generatedFault())
Parameter result = response.getReturnValue();
returnVal = (OrbatType[])result.getValue();
else
Fault fault = response.getFault();
throw new SOAPException(fault.getFaultCode(), fault.getFaultString());
return returnVal;
public void setMaintainSession(boolean maintainSession)
m_httpConnection.setMaintainSession(maintainSession);
public boolean getMaintainSession()
return m_httpConnection.getMaintainSession();
public void setTransportProperties(Properties props)
m_httpConnection.setProperties(props);
public Properties getTransportProperties()
return m_httpConnection.getProperties();
My Client application main file:
package orbatclientpackage;
import java.io.*;
public class OrbatListArrayClient
public OrbatListArrayClient()
public static void main(String[] args) throws Exception
OrbatListArrayStub s = new OrbatListArrayStub();
// File xmlFile;
// BufferedWriter in;
// xmlFile = new File("f:\\OrbatSoap", "OrbatXMLList.xml");
// PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(xmlFile)));
// out.println(s.getOrbatListArray());
// out.flush();
System.out.println(s.getOrbatListArray());
When I deployed it to jar I copied the jar file in the following directory:
<jdevloper home>\soap\webapps\soap\soap\Web-inf\lib\
I then tried and created a client stub in the same package using JDeveloper 9.0.3 wizard for creating sample java client and added a line to call my getOrbatListArray method and print it to the screen. I get another soap error message, saying:
F:\JDev9i-0-3\jdk\bin\javaw.exe -ojvm -classpath F:\JDev9i-0-3\jdev\mywork\OrbatListArray\OrbatListArrayProject\classes;F:\JDev9i-0-3\jdev\lib\jdev-rt.jar;F:\JDev9i-0-3\jdbc\lib\classes12.jar;F:\JDev9i-0-3\jdbc\lib\nls_charset12.jar;F:\JDev9i-0-3\rdbms\jlib\xsu12.jar;F:\JDev9i-0-3\lib\xmlparserv2.jar;F:\JDev9i-0-3\lib\xmlcomp.jar;F:\JDev9i-0-3\jdev\lib\jdev-rt.jar;F:\JDev9i-0-3\soap\lib\soap.jar;F:\JDev9i-0-3\lib\xmlparserv2.jar;F:\JDev9i-0-3\jlib\javax-ssl-1_2.jar;F:\JDev9i-0-3\jlib\jssl-1_2.jar;F:\JDev9i-0-3\j2ee\home\lib\activation.jar;F:\JDev9i-0-3\j2ee\home\lib\mail.jar;F:\JDev9i-0-3\j2ee\home\lib\http_client.jar orbatlistarraypackage.EmbeddedOrbatListArrayStub
[SOAPException: faultCode=SOAP-ENV:IOException; msg=Connection refused: connect; targetException=java.net.ConnectException: Connection refused: connect] void org.apache.soap.SOAPException.<init>(java.lang.String, java.lang.String, java.lang.Throwable) SOAPException.java:77 void oracle.soap.transport.http.OracleSOAPHTTPConnection.send(java.net.URL, java.lang.String, java.util.Hashtable, org.apache.soap.Envelope, org.apache.soap.encoding.SOAPMappingRegistry, org.apache.soap.rpc.SOAPContext) OracleSOAPHTTPConnection.java:765 org.apache.soap.rpc.Response org.apache.soap.rpc.Call.invoke(java.net.URL, java.lang.String) Call.java:253 orbatlistarraypackage.OrbatType1[] orbatlistarraypackage.EmbeddedOrbatListArrayStub.getOrbatListArray() EmbeddedOrbatListArrayStub.java:70 void orbatlistarraypackage.EmbeddedOrbatListArrayStub.main(java.lang.String[]) EmbeddedOrbatListArrayStub.java:38Process exited with exit code 0.
Sorry for the length of this message, but I am getting desparate.
Thanks again for all you help
Alina -
WE60 - Error while generating the xml schema
Hi
Using the transaction WE60 I am trying to generate an XML schema for the BASIC type : DEBMDM06, Segment release - 7 and record type version - 3. Following error message is displayed. "Structure of segment E1T023W is unknown". Kindly let me know how to generate an XML schema successfully and what is the reason for this error to come up
Regards
ArunaHi Aruna,
It seems a dictionary error but it doesn't occurs to me. I can download the XML schema without problems in SAP ECC 6.0.
If you let me know your email I can send it zipped to you.
Reward points if helps.
Roger -
Error in jbosscmp-jdbc.xml : datasource-mapping Pointbase not found
Hi I'm having problems deploying my EJBs using the Pointbase Database.
This is what I'm working with:
standardjbosscmp-jdbc.xml:
<jbosscmp-jdbc>
<defaults>
<datasource>java:/PointbaseDS</datasource>
<datasource-mapping>Pointbase</datasource-mapping>pointbase-ds.xml:
<datasources>
<local-tx-datasource>
<jndi-name>PointbaseDS</jndi-name>
<connection-url>jdbc:pointbase:server://localhost:19092/sample</connection-url>
<driver-class>com.pointbase.jdbc.jdbcUniversalDriver</driver-class>
<user-name>jboss</user-name>
<password>password</password>
</local-tx-datasource>
</datasources>jbosscmp-jdbc.xml:
<jbosscmp-jdbc>
<defaults>
<datasource>java:/PointbaseDS</datasource>
<datasource-mapping>Pointbase</datasource-mapping>
</defaults>I keep getting the error message:
org.jboss.deployment.DeploymentException: Error in jbosscmp-jdbc.xml : datasource-mapping Pointbase not found
Any ideas why?
Thanks.By the way I'm using JBoss server.
-
Error of Validation of XML Schema in BEA WorkSpace Studio
When I validate my XML Schemas throught the BEA WorkSpace Studio Version: 1.1 Build id: 1090602 the follow error happens:
Referenced file contains errors (file:/MyPath/MyXMLSchema1.xsd).
For more information, right click on the message and select "Show Details..."
Show Details:
The errors below were detected when validating the file "MyXMLSchema1.xsd" via the file "MyXMLSchema2.xsd".
In most cases these errors can be detected by validating "MyXMLSchema1.xsd" directly.
However it is possible that errors will only occur when MyXMLSchema1.xsd is validated in the context of MyXMLSchema2.xsd.
src-resolve: Cannot resolve the name 'srv:Services' to a(n) 'type definition' component
When I validate my XML Schemas throught the oepe_11gR1PS4 (Eclipse Platform Version: 3.6.2 Build id: M20110210-1200) no errors were found.
My project is an OSB Project (ALSB Project).
What's happen?BEA WorkSpace Studio Version: 1.1 Build id: 1090602 use xerces bea\alsb3.0\tools\eclipse_pkgs\1.1\eclipse_3.2.2\eclipse\plugins\org.apache.xerces_2.8.0.v200606131651
oepe_11gR1PS4 (Eclipse Platform Version: 3.6.2 Build id: M20110210-1200) use xerces Oracle\Middleware_10.3.5\oepe_11gR1PS4\plugins\org.apache.xerces_2.9.0.v201005080400.jar
If you replace the follow files:
bea\alsb3.0\tools\eclipse_pkgs\1.1\eclipse_3.2.2\eclipse\plugins\org.apache.xerces_2.8.0.v200606131651\resolver.jar
bea\alsb3.0\tools\eclipse_pkgs\1.1\eclipse_3.2.2\eclipse\plugins\org.apache.xerces_2.8.0.v200606131651\xercesImpl.jar
bea\alsb3.0\tools\eclipse_pkgs\1.1\eclipse_3.2.2\eclipse\plugins\org.apache.xerces_2.8.0.v200606131651\xml-apis.jar
for:
Oracle\Middleware_10.3.5\oepe_11gR1PS4\plugins\org.apache.xerces_2.9.0.v201005080400.jar
BEA WorkSpace Studio Version: 1.1 Build id: 1090602 will validate without errors (the same oepe_11gR1PS4 behaviour) -
Hi All ,
I have a reqirement from customer , I need to map the customer XML schma with RDBMS table , can we do this ? . can anyone help me out.
Thanks
Sreenivasulu KHi,
What do you mean by Schema mapping to a table?
From what I understood.. do you want to create a table whose columns corresponds to the elements of the schema?
The following link
http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/appdev.920/a96620/xdb05obj.htm#1032016
specifies that Oracle does that for us. Then why do you want to do it again?
Correct me if Iam wrong.
Regards,
Anupama -
Add new nodes to IDoc in IDoc-XML Schema Mapping with Java
Hello everyone, I'm not very sure if this is the right forum but I have a problem and I haven't being able to find the answer, my scenario is as follows:
-First of all our system characteristics: SAP ECC 6.0, SAP BASIS 700, PI BASIS 2005-1-700 and SAP APPL 600
-We are in Mexico and we are creating our own billing documents with digital signature and a digital certificate in XML format according to SAP Note 1303712 and all derived notes.
-Our actual schema is working fine: We generate our IDocs (one for SD and one for FI) in SAP and we send them to PI XI to be parsed by a JAVA program and then converted to XML.
Now we have the requirement to add new nodes (I might be wrong in the term, feel free to correct me) to the IDoc, it sounds very simple but I have only experience with ABAP and no experience with PI, also it's working only on our production landscape, so if I don't do it right it could be very dangerous.
I have already read the following notes that might help me: 1321680 and 1318342 but their configuration is just in the aplication server and don't mention anything about PI or the Java program.
So, if any one could provide me some kind of guide or important aspects that I should take care (like mapping, structures, etc) to enhance IDocs for this schema i would be very grateful.
I hope this post were clear enough, if it is not also feel free to ask me to clarify or provide more information.
Kind Regards
OmarHi Omar,
Since the structure of the IDoc is changing (adding a new node), you would need to do the following in PI:
1) Reimport the IDoc in ESR/IR of PI.
2) Change the mapping/transformation logic in the mapping parser defined. If it is a Java code, you would need to reimport it in the ESR/IR. Use link below to understand more on jave mapping.
http://wiki.sdn.sap.com/wiki/display/XI/BeginnersguidetoJavamappingusingDOMparserinSAPXI
3) Delete the IDoc cache using transaction IDX2, after the IDoc is reimported.
Regards,
Sanjeev. -
Hi all,
I learmed the basic stuff of XML, DTD, DOM, etc. long time ago. Now, I came back to resume my XML journey and try to learn the XML Schemas, XPath and XQuery. I have Microsoft SQL Server 2012 Management Studio (SSMS2012) in our computer network. From
Page 221 of the old Book "Beginning XML 2nd Edition" written by David Hunter, et.al., (published by Wrox), I copied the name5.xsd and name5.xml :
<?xml version="1.0"?>
<schema xmlns=http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.wrox.com/name" xmlns:target="http://www.wrox.com/name"
elementFormDefault="qualified">
<element name="name">
<complexType>
<sequence>
<element name="first" type="string"/>
<element name="middle" type="string"/>
<element name="last" type="string"/>
</sequence>
</complexType>
</element>
</schema>
<?xml version="1.0"?>
<name
xmlns=http://www.wrox.com/name"
xmlns:xsi="http://www.wrox.org/2001XMLSchema-instance"
xsi:schemaLocation="http://www.wrox.com/name name5.xsd"
title="Mr.">
<first>John</first>
<middle>Frizgerald</middle>
<last>Doe</last>
</name>
How can I execute these two files in my SSMS2012 for doing my first XML Schema trial?
Please kindly help, advise and respond.
Thanks in advance,
Scott ChangHi Eric Zhang, Thanks for your nice response.
1) I saw the CREATE XML SCHEMA COLLECTION (Transact-SQL) and tried its first example "Create XML schema collection in the database" in my SQL Server 2012 Management Studio (SSMS2012):
-- Create a sample database in which to load the XML schema collection.
-- Copied this set of code stsments from Microsoft Library (ms176009)
-- ColesMS12_20a.sql (saved in C:/Documents/SQL Server Management Studio)
-- 19 March 2015 1145 AM
CREATE DATABASE SampleDB
GO
USE SampleDB
GO
CREATE XML SCHEMA COLLECTION ManuInstructionsSchemaCollection AS
N'<?xml version="1.0" encoding="UTF-16"?>
<xsd:schema targetNamespace="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelManuInstructions"
xmlns ="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelManuInstructions"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" >
<xsd:complexType name="StepType" mixed="true" >
<xsd:choice minOccurs="0" maxOccurs="unbounded" >
<xsd:element name="tool" type="xsd:string" />
<xsd:element name="material" type="xsd:string" />
<xsd:element name="blueprint" type="xsd:string" />
<xsd:element name="specs" type="xsd:string" />
<xsd:element name="diag" type="xsd:string" />
</xsd:choice>
</xsd:complexType>
<xsd:element name="root">
<xsd:complexType mixed="true">
<xsd:sequence>
<xsd:element name="Location" minOccurs="1" maxOccurs="unbounded">
<xsd:complexType mixed="true">
<xsd:sequence>
<xsd:element name="step" type="StepType" minOccurs="1" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="LocationID" type="xsd:integer" use="required"/>
<xsd:attribute name="SetupHours" type="xsd:decimal" use="optional"/>
<xsd:attribute name="MachineHours" type="xsd:decimal" use="optional"/>
<xsd:attribute name="LaborHours" type="xsd:decimal" use="optional"/>
<xsd:attribute name="LotSize" type="xsd:decimal" use="optional"/>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>' ;
GO
-- Verify - list of collections in the database.
select *
from sys.xml_schema_collections
-- Verify - list of namespaces in the database.
select name
from sys.xml_schema_namespaces
-- Use it. Create a typed xml variable. Note collection name specified.
DECLARE @x xml (ManuInstructionsSchemaCollection)
GO
--Or create a typed xml column.
CREATE TABLE T (
i int primary key,
x xml (ManuInstructionsSchemaCollection))
GO
-- ////The following code statements are not used in order to create SampleDB
-- Clean up
---DROP TABLE T
---GO
---DROP XML SCHEMA COLLECTION ManuInstructionsSchemaCollection
---Go
---USE Master
---GO
---DROP DATABASE SampleDB
It worked and I got the following results:
1 4 NULL sys 2009-04-13 12:59:13.390 2012-02-10 20:16:02.097
65536 1 NULL ManuInstructionsSchemaCollection 2015-03-19 11:47:17.660 2015-03-19 11:47:17.660
http://www.w3.org/2001/XMLSchema
http://schemas.microsoft.com/sqlserver/2004/sqltypes
http://www.w3.org/XML/1998/namespace
http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelManuInstructions
But, I don't undertand (i) what SCHEMA COECTION is, (ii) what <xsd:schema targetNamespace=.....</xsd:complexType> are, (iii) How I can specify my "project specific" schema in the Microsoft SCHEMA COLLECTION to check my xml file.
2) I dived in the XQuery programmimng in SSMS2012 in the last few weeks. I used the examles of Ad-Hoc XML File Query by Seth Delconte (in
httpS://www.simple-talk.com/content/print.aspx?article=1756) in my SSMS2012. They worked. But I don't understand the (i) Importing XML data using a function, (ii) Using the XQuery contans()
function to find substrings, (iii)Efficiency comparisons in the article.
Please kindly help me in enlightening me to resolve the difficulties listed in 1) and 2).
Thanks,
Scott Chang -
I'm having a brutal time working with this program, it doesn't even seem like it should be this hard. I won't get in to the situation yet, I keep tripping across other problems as I go. Here's the next one:
According to Eclipse, I'm not allowed to put an element with a type if it also has a restriction, because the restriction seems to (as far as I can tell) automatially attach an "anonymous type" to the element. That is to say:
<element name="foo" type="string">
<simpleType>
<restriction base="string">
[restriction tags]
</restriction>
</simpleType>
</element>doesn't work. It also doesn't work if I don't have a "base='x'" line, but that makes a bit more sense. On the other hand:
<element name="foo">
<simpleType>
<restriction base="string">
[restriction tags]
</restriction>
</simpleType>
</element>
does work, but causes a number of problems because "foo" no longer has a type to call its own. I'm sure I'm missing something here but I can't work out what.
Here's the exact error from Eclipse's XML Schema Validator, which places an error on foo's declaration line:
"Multiple Annotations found on this line:
- src-element.3: Element 'foo' has both a 'type' attribute and a 'anonymous type' child. Only one of these is allowed for an element.
- Element type "element" must either be followed by attribute types, '>' or '/>'."
Any help would be appreciated, thanks. :)As the message below indicates you are defining a new simple type but in line with the element definition (enclosed by element tags). As it is in-line it is classed as an anonymous type i.e. has no name. You therefore cannot give an element a type and then specify its type in line.
Athough essentially it is a string (hence requires base type) it is nontheless a new type i.e a string with restrictions. The other way to do this, which will allow you to reuse the type is is as follows
<xsd:element name="foo" type="myRestrictedString"/>
<xsd:element name="foo2" type="myRestrictedString"/>
<xsd:simpleType name="myRestrictedString">
<xsd:restriction base="xsd:string">
<xsd:pattern value="[0-9]{3}"/>
</xsd:restriction>
</xsd:simpleType>
>
"Multiple Annotations found on this line:
- src-element.3: Element 'foo' has both a 'type'
attribute and a 'anonymous type' child. Only one of
these is allowed for an element.
- Element type "element" must either be followed by
attribute types, '>' or '/>'." -
Invalid objects and ORA-00600 after deleting XML schema
I am running Oracle 10.2.0.3 on Solaris 10. I am new to XML DB but my developers requested it for a new application. Recently we have noticed the following issue:
My developers have attempted to re-register several schemas using:
DBMS_XMLSchema.deleteSchema(SchemaURL => l_strSchemaURL,
Delete_Option => DBMS_XMLSchema.Delete_Cascade_Force);
And then re-register.
DBMS_XMLSchema.RegisterURI( SchemaURL => l_strSchemaURL,
SchemaDocURI => l_strImportURL,
Local => True,
GenTypes => True,
GenBean => False,
GenTables => True,
Force => False,
EnableHierarchy => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_RESMETADATA);
Afterwards I have noticed several invalid objects:
OWNER OBJECT_NAME OBJECT_TYPE STATUS
ELSVC hsp_standard825_TAB$xd TRIGGER INVALID
ELSVC hsp_standard1145_TAB$xd TRIGGER INVALID
ELSVC hsp_standard_set827_TAB$xd TRIGGER INVALID
ELSVC hsp_standard_set827_TAB TABLE INVALID
ELSVC hsp_product822_TAB$xd TRIGGER INVALID
ELSVC hsp_product822_TAB TABLE INVALID
ELSVC hsp_planner_content833_TAB TABLE INVALID
ELSVC hsp_planner_content833_TAB$xd TRIGGER INVALID
ELSVC hsp_correlations839_TAB TABLE INVALID
ELSVC hsp_correlations839_TAB$xd TRIGGER INVALID
ELSVC hsp_standard825_TAB TABLE INVALID
ELSVC hsp_program819_TAB TABLE INVALID
ELSVC hsp_program819_TAB$xd TRIGGER INVALID
XDB XDLNKrHbGsLaHgRAAUTyLEhg== XML SCHEMA INVALID
XDB XDLNKrHbIULaHgRAAUTyLEhg== XML SCHEMA INVALID
XDB XDLNKrHbJZLaHgRAAUTyLEhg== XML SCHEMA INVALID
XDB XDLNKrHbGFLaHgRAAUTyLEhg== XML SCHEMA INVALID
XDB XDLNKrHbHdLaHgRAAUTyLEhg== XML SCHEMA INVALID and if I attempt to compile the triggers I receive an ORA-00600: internal error code, arguments: [diana for triggering table/view ], [], [], [], [], [], [], []. I opened a TAR with oracle but they have not made much headway. Are we attempting to de-register the schemas improperly? Has anyone seen this issue before?
Thanks,
BrianSR 6204906.993. Up to this point oracle was able to help me identify that the invalid objects were related to the ORA-00600 but it was just recently that it appeared the Issue was possibly related to the delete schema procedure. The informed me that they were not aware of any known issues with this procedure.
Thanks -
Can't import XML schema with ref to external namespace
In TopLink 10.1.3 Dev Preview 3 (build 041116), I have 2 simple schema files. One defines an element as a ref to an element in the other schema, so the ref points to an element in an external namespace. TopLink won't import this schema.
First schema, imports fine:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.oracle.com/employee"
xmlns="http://www.oracle.com/employee"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xs:element name="employee">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Second schema, fails import with "ERROR: null. Please check to ensure the document conforms to the XML Schema specification and try again":
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.oracle.com/department"
xmlns="http://www.oracle.com/department"
xmlns:employee="http://www.oracle.com/employee"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xs:import
namespace="http://www.oracle.com/employee"
schemaLocation="employee.xsd"/>
<xs:element name="department">
<xs:complexType>
<xs:sequence>
<xs:element ref="employee:employee" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Both schemas are valid according to the W3C schema validation checker at http://www.w3.org/2001/03/webdata/xsv.
I can work around the issue by putting the employee definitions into the department schema file so that all elements are in the same namespace. But I would like the schemas to be in separate files for better modularity and maintainability.
Am I doing something wrong? I would really like to be able to use references to external namespaces in my element definitions.
Thanks,
DaveHello David,
Apologies, but this is a bug in DP3 with respect to references to elements in imported namespaces. This has been fixed in current code, but until you get that, there are a couple ways to work around it:
==========================================================
1) Use an include rather than an import.
department.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
targetNamespace="http://www.oracle.com/department"
xmlns="http://www.oracle.com/department"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xs:include schemaLocation="employee.xsd"/>
<xs:element name="department">
<xs:complexType>
<xs:sequence>
<xs:element ref="employee" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>employee.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.oracle.com/department"
xmlns="http://www.oracle.com/department"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xs:element name="employee">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>You should only have to import the parent schema (i.e. department.xsd), as the included document will automatically be built in. Note that this works for imports as well, provided that there aren't nasty bugs blocking the process.
==========================================================
2. Build everything into the same document
department.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
targetNamespace="http://www.oracle.com/department"
xmlns="http://www.oracle.com/department"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xs:element name="department">
<xs:complexType>
<xs:sequence>
<xs:element ref="employee" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="employee">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>Obviously, this one won't work quite as well in some cases.
==========================================================
Until you can get to the latest code, I hope this helps some.
- Paul -
Enterprise SecMgr: Can't add Database Schema Mapping to OracleDefaultDomain
Hello,
I'm trying to configure Enterprise Users (using a shared schema) and within EntSecMgr, I select...
Realms / MyID realm / Enterprise Domains / OracleDefaultDomain / Enterprise Roles / OracleDefaultDomain / Database Schema Mapping
and from there, I try to add the Directory Entry and schema. I don't get any errors when I click "OK", but the Database Schema mapping does not "take".
I notice the little icon next to OracleDefaultDomain (in ESM) has a "lock", so perhaps it's read-only? How can I change that, or where should I be assigning the Database Schema mapping, if not in the OracleDefaultDomain?I never did figure out why I can't add the Database Schema Mapping to the OracleDefaultDomain, but I used ESM to add the schema mapping directly to the database itself, and now my Enterprise Users can login.
-
Problem with XML import MDM 7.1 - Can't generate Xml Schema
Hi All,
When I try to open an XML file using Import manager, I'm getting some errors, as detailed below. I mention that I'm using MDM 7.1.
The first error I received was the following:
"Can't open C:/Program files/SAP MDM 7.1/Import Manager/XSD.exe". I copied the file xsd.exe in the Import Manager folder, as suggest here:
Re: Import Manager Error.
Afterwards, I received a new error:
"Can't generate Xml Schema for: C:/Program files/SAP MDM 7.1/Import Manager/filename.xml"
If anyone has faced the same problem - and solved it -, could you please help me find the reason for this behaviour?
Regards,
LauraHi Laura,
The error message "Can't generate Xml Schema" might be related to DTD. the XML file has a directive for loading DTD.
MDM doesnot support DTDs.
Remove the DTD line and make sure there is only one root element in the XML file and try again.
Hope this helps,
Bes t Regards,
Silpa Chillakuru
Maybe you are looking for
-
My iPhone 3GS won't take a charge or turn on. How do I get my photos from it onto my laptop or another iPhone? I tried to put my sim card in another working 3GS but it didn't work.
-
Adobe connect seems to make our program crash periodically when we are sharing it
Hi, We have a program that we demo with clients over adobe connect. It is written in python and Qt and uses OpenGL. About 10 or 15 minutes into the demo the program will hard crash. This only happens about 30 - 40% of the time. We have spent several
-
Can anyone edit title fonts and sizes in iMovie 10?
Trying to edit title fonts and sizes in iMovie 10 but font drop down does not respond. Tried a couple of different style titles with same results. Anyone else have this problem?
-
Sorting a hierarchy ...
Hi Everyone, I have a table which is structured as a hierarchy thus ... id parent top -/- GB top London GB Bristol GB Manchester GB DE top Berlin DE Munich DE FR top Paris FR Lyon FR ... etc. ... which I need to output in the same format. However the
-
This is the package that generate the crash when I save a file: extra/libreoffice-kde4 4.1.4-3 (libreoffice) [installato] Once uninstalled the problem doesn't exist anymore. Only the save menu isn't a kde integrated menu.