LSX-00310: local element or attribute should be namespace qualified
I am getting the following error
ORA-31154: invalid XML document
ORA-19202: Fout in XML-verwerking (
LSX-00310: local element or attribute should be namespace qualified)
I am doing
declare
l_xmldoc XMLType;
BEGIN
l_xmldoc := xdburiType('/home/1.xml').getXML();
l_xmldoc.schemavalidate;
END;
the schema and xml file are valid , I checked them
with xmlspy
does this error mean
thanx Edwin
Will need your schema and document to debug this. Sometimes we catch things SPY doesn't and sometime they catch things we miss...
Similar Messages
-
XMLType.schemavalidate() results in LSX-00310
I have the following problem: I want to insert schemabased XML documents into a XMLType column. Since XMLType offers the schemavalidate() method, I want it to check the document if it is correct.
However, the check always ends in a LSX-00310 Error (local element or attribute should be namespace qualified), although other tools like XMLSPY tell me that the document is fine.
I can't figure out if there is something wrong in the way I registered the schema since it appears to me that the parser can't resolve the namespace for my schema. The script for the schema registration looks like this:
Register schema
declare
doc varchar2(5000) := '
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xdb="http://xmlns.oracle.com/xdb">
<xs:element name="MeisterSklaveSzenario" xdb:defaultTable="MeisterSklaveSzenario">
<!-- list of all existing objects for the MeisterSklaveSzenario -->
<xs:complexType>
<xs:sequence>
<xs:element name="Meister" type="MeisterType" maxOccurs="unbounded"/>
<xs:element name="Sklave" type="SklaveType" maxOccurs="unbounded"/>
<xs:element name="MeisterProfil" type="MeisterProfilType" maxOccurs="unbounded"/>
<xs:element name="SklaveProfil" type="SklaveProfilType" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="id" type="xs:positiveInteger" use="required"/>
</xs:complexType>
<!-- key definitions within the range of root-element MeisterSklaveSzenario -->
<xs:key name="MeisterKey">
<xs:selector xpath=".//Meister"/>
<xs:field xpath="@id"/>
</xs:key>
<xs:key name="MeisterProfilKey">
<xs:selector xpath=".//MeisterProfil"/>
<xs:field xpath="@id"/>
</xs:key>
<xs:key name="SklaveKey">
<xs:selector xpath=".//Sklave"/>
<xs:field xpath="@id"/>
</xs:key>
<xs:key name="SklaveProfilKey">
<xs:selector xpath=".//SklaveProfil"/>
<xs:field xpath="@id"/>
</xs:key>
<!-- key reference definitions within the range of root-element MeisterSklaveSzenario -->
<xs:keyref name="besitztRef" refer="SklaveKey">
<xs:selector xpath=".//Meister/besitzt"/>
<xs:field xpath="@idref"/>
</xs:keyref>
<xs:keyref name="hatMeisterProfilRef" refer="MeisterProfilKey">
<xs:selector xpath=".//Meister/hatMeisterProfil"/>
<xs:field xpath="@idref"/>
</xs:keyref>
<xs:keyref name="hatSklaveProfilRef" refer="SklaveProfilKey">
<xs:selector xpath=".//Sklave/hatSklaveProfil"/>
<xs:field xpath="@idref"/>
</xs:keyref>
</xs:element>
<!-- definitions of the used complexTypes -->
<xs:complexType name="MeisterType">
<xs:sequence>
<xs:element name="Name" type="xs:string"/>
<xs:element name="Vermoegen" type="xs:integer"/>
<xs:element name="besitzt" maxOccurs="4">
<xs:complexType>
<xs:attribute name="idref" type="xs:positiveInteger" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="hatMeisterProfil">
<xs:complexType>
<xs:attribute name="idref" type="xs:positiveInteger" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:positiveInteger" use="required"/>
</xs:complexType>
<xs:complexType name="SklaveType">
<xs:sequence>
<xs:element name="Name" type="xs:string"/>
<xs:element name="Alter" type="xs:positiveInteger"/>
<xs:element name="hatSklaveProfil">
<xs:complexType>
<xs:attribute name="idref" type="xs:positiveInteger" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:positiveInteger" use="required"/>
</xs:complexType>
<xs:complexType name="MeisterProfilType">
<xs:sequence>
<xs:element name="Gemeinheit">
<xs:simpleType>
<xs:restriction base="xs:short"> <xs:minInclusive value="1"/>
<xs:maxInclusive value="10"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Wahnsinnigkeit">
<xs:simpleType>
<xs:restriction base="xs:short"> <xs:minInclusive value="1"/>
<xs:maxInclusive value="10"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:positiveInteger" use="required"/>
</xs:complexType>
<xs:complexType name="SklaveProfilType">
<xs:sequence>
<xs:element name="Aufgabe" type="xs:string" maxOccurs="unbounded"/>
<xs:element name="Wert" type="xs:positiveInteger"/>
</xs:sequence>
<xs:attribute name="id" type="xs:positiveInteger" use="required"/>
</xs:complexType>
</xs:schema>
begin
dbms_xmlschema.registerSchema('http://www.chrisch.org/MeisterSklaveSzenario', doc);
end;
The script file I want to insert a sample file with looks like this:
Sample File
insert into Szenario2 values ('Klogg',XMLType(
'<?xml version="1.0" encoding="UTF-8"?>
<MeisterSklaveSzenario
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.chrisch.org/MeisterSklaveSzenario"
id="1">
<Meister id="1">
<Name>Zarniwoop</Name>
<Vermoegen>500000</Vermoegen>
<besitzt idref="1"/>
<hatMeisterProfil idref="2"/>
</Meister>
<Sklave id="1">
<Name>Quosl</Name>
<Alter>31</Alter>
<hatSklaveProfil idref="1"/>
</Sklave>
<MeisterProfil id="1">
<Gemeinheit>7</Gemeinheit>
<Wahnsinnigkeit>3</Wahnsinnigkeit>
</MeisterProfil>
<SklaveProfil id="1">
<Aufgabe>Rumrennen</Aufgabe>
<Aufgabe>Saubermachen</Aufgabe>
<Wert>341</Wert>
</SklaveProfil>
</MeisterSklaveSzenario>
'));Will need your schema and document to debug this. Sometimes we catch things SPY doesn't and sometime they catch things we miss...
-
Hi all,
I just got a copy of the book "Pro SQL Server 2008 XML" written by Michael Coles (published by Apress) and try to learn the XML Schema Collection in my SQL Server 2012 Management Studio (SSMS2012). I studied Chapter 4 XML Collection of the book
and executed the following code of Listing 4-8 Complex Schema with Attribute:
-- Pro SQL Server 2008 XML by Michael Coles (Apress)
-- Listing04-08.sql Complex XML Schema with Attribute
-- shcColes04-08.sql saved in C:\\Documents\XML_SQL_Server2008_code_Coles_Apress
-- 6 April 2015 8:00 PM
CREATE XML SCHEMA COLLECTION dbo.ComplexTestSchemaCollection_attribute
AS
N'<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="item">
<xs:complexType>
<xs:sequence>
<xs:element name="name" />
<xs:element name="color" />
<xs:group ref="id-price" />
<xs:group ref="size-group" />
</xs:sequence>
<xs:attribute name="id" />
<xs:attribute name="number" />
</xs:complexType>
</xs:element>
<xs:group name="id-price">
<xs:choice>
<xs:element name="list-price" />
<xs:element name="standard-cost" />
</xs:choice>
</xs:group>
<xs:group name="size-group">
<xs:sequence>
<xs:element name="size" />
<xs:element name="unit-of-measure" />
</xs:sequence>
</xs:group>
</xs:schema>';
GO
DECLARE @x XML (dbo.ComplexTestSchemaCollection_attribute);
SET @x = N'<?xml version="1.0"?>
<item id="749" number="BK-R93R-62">
<name>Road-150 Red, 62</name>
<color>Red</color>
<list-price>3578.27</list-price>
<size>62</size>
<unit-of-measure>CM</unit-of-measure>
</item>';
SELECT @x;
GO
DROP XML SCHEMA COLLECTION dbo.ComplexTestSchemaCollection_attribute;
It worked nicely. But, I just found out the coding that was downloaded from the website of Apress and I just executed was different from the coding of Listing 4-8 listed in the book: all the <xs: ....> and </xs: ..> in my SSMS2012 are
listed as <xsd:...> and </xsd:...> respectively in the book!!?? The same thing happens in the Listing 4-3 Simple XML Schema, Listing 4-5 XML Schema and Valid XML Document with Comple Type Definition, Listion 4-6 XML Schema and XML
Document Document with Complex Type Using <sequence> and <choice>, and Listing 4-7 Complex XML Schema and XML Document with Model Group Definition (I executed last week) too. I wonder: should xs or xsd be used in the XML
Schema Collection of SSMS2012? Please kindly help, clarify this matter and explain the diffirence of using xs and xsd for me.
Thanks in advance,
Scott ChangHi Scott,
Using xs or xsd depends on how you declare the namespace prefix.
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="item">
I've posted a very good link in your last question, just in case you might have missed it, please see the below link.
Understanding XML Namespaces
In an XML document we use a namespace prefix to qualify the local names of both elements and attributes . A prefix is really just an abbreviation for the namespace identifier (URI), which is typically quite long. The prefix is first mapped to a namespace
identifier through a namespace declaration. The syntax for a namespace declaration is:
xmlns:<prefix>='<namespace identifier>'
If you have any question, feel free to let me know.
Eric Zhang
TechNet Community Support -
Xquery: Element to Attribute Mapping - remove empty attribute tags
Hi,
I have a requirement to map source schema xml elements to target schema xml element attributes
i have done it like below
<Spd minimumvalue = "{ xs:decimal(data($Test/*:A)) }"
maximumvalue = "{ xs:decimal(data($Test/*:B)) }"
averagevalue = "{ xs:decimal(data($Test/*:C)) }">
Where A,B,C are the source schema elements.
So once the transformation is done the output looks like this
<Spd mimimumvalue="1" maxmiumvalue="" averagevalue="3"/>
Now i got to remove the attribute which has null value.
the output should look like this
<Spd mimimumvalue="1" averagevalue="3"/>
I tried using exists function and implemented it. But then if i have more than 2/3 attributes in the outout xsd then i need to have many if conditions.
Is there any other alternative for this.
Please suggest. Appreciate your help.Hi,
Is there any other alternative for this. I'm not aware of any.
Using exists() is a good solution though, and it's easy to implement with element and attribute constructors :
return
element Spd
if (fn:exists($Test/*:A/text())) then attribute minimumvalue { xs:decimal($Test/*:A) } else (),
if (fn:exists($Test/*:B/text())) then attribute maximumvalue { xs:decimal($Test/*:B) } else (),
if (fn:exists($Test/*:C/text())) then attribute averagevalue { xs:decimal($Test/*:C) } else ()
}Is that what you've tried? -
Error? on Example 16-7 XMLFOREST: Generating Elements with Attribute and Ch
Error in example on page http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14259/xdb13gen.htm#i1028612
Example 16-7 XMLFOREST: Generating Elements with Attribute and Child Elements
Example appears as
SELECT XMLElement("Emp",
XMLAttributes(e.first_name ||' '|| e.last_name AS "name"),
XMLForest(e.hire_date, e.department AS "department"))
AS "RESULT"
FROM employees e WHERE e.department_id = 20;
1. employees table not qualified as hr.employees
2. e.department as "department" should be e.department_id as "department"
corrected would be
SELECT XMLElement("Emp",
XMLAttributes(e.first_name ||' '|| e.last_name AS "name"),
XMLForest(e.hire_date, e.department_id AS "department"))
AS "RESULT"
FROM hr.employees e WHERE e.department_id = 20;albertIt was subreport-related, though I still do not know the exact root cause.
I was having trouble with both the built-in export as well as a custom process.
Removing the subreports as suggested, I isolated the failure to one of the three subs and rebuilt this subreport from scratch (it was only three fields) and now the report has no trouble with the pdf export. I am not sure if it had a resolvable technical issue or if it was just corrupted, as it is now working, I am not going to expend much energy on finding out.
Thanks for the suggestion. -
Issue with working on a webservice that has xml elements with attributes
This is a branchout of Thread: Some more complex sample of invokin WS needed_
We are working on a project that involves a outbound SALT Web service call that includes complex elements with attributes..We are looking for options of how to use FML API's to pass these attribute values from the application code.
We opened a ticket with oracle where we were suggested to frame the entire xml and pass the xml using the FML32 of the complex element. But when we framed the xml for Service and put the entire XML which includes the attributes using the FML ID of Service.
Please find a sample Schema and XML similar to the one we are working on...its associated code
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="Service" type="Service_Type" nillable="true">
<xs:annotation>
<xs:documentation>Comment describing your root element</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="Service_Type">
<xs:sequence>
<xs:element name="DateTime" type="xs:dateTime" nillable="true">
</xs:element>
<xs:element name="UUID" nillable="true">
</xs:element>
<xs:element name="Status" type="xs:string" nillable="true" minOccurs="0" maxOccurs="unbounded">
</xs:element>
</xs:sequence>
<xs:attribute name="Version" type="xs:string" use="required">
</xs:attribute>
<xs:attribute name="Name" type="xs:string" use="required">
</xs:attribute>
</xs:complexType>
</xs:schema>
The sample XML is :
___<?xml version="1.0" encoding="UTF-8"?>___
___<!--Sample XML file generated by XMLSpy v2010 rel. 2 (http://www.altova.com)-->___
___<Service Name="TestService" Version="1.1" xsi:noNamespaceSchemaLocation="Untitled6.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">___
___ <DateTime>2001-12-17T09:30:47Z</DateTime>___
___ <UUID>text</UUID>___
___</Service>___
wsdlcvt generated the mif file with Service as a FML32 type and all its child elements as "mbstring". We tried to leave as it is and we also tried to replace all the child elements and just had a mif entry for "Service" as a mbstring neither produced a different output...Tried to dump using Ferror32 which did not dump any..._
The sample C/C++ code as per suggestions were to do the following...
_1) Have a string with the entire XML for Service_
xmldata="<Service Name=\"TestService"\ Version="1.1\"_ xsi:noNamespaceSchemaLocation=\"Untitled6.xsd\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">_
_ <DateTime>2001-12-17T09:30:47Z</DateTime>_
_ <UUID>text</UUID>_
_</Service>";_
_2) Use Fmbpack32 to create a mbstring data_
_memcpy(reqmbptr, (char*)xmldata.data(),xmldata.length());_
_len=xmldata.length();_
_Fmbpack32(mbcodeName,reqmbptr,len, packdata,(FLDLEN32 *)&packedlen,0);_
userlog("Size of packedlen is %d",packedlen);
3) Add the packed data to the output buffer
Fadd32(fmlbuffer,Service, packdata,packedlen );
But we do not see the Service tag populated in the GWWS outbound request.Everything else makes it....any help on how to move ahead would be appreciated...It seems you switch to the 10gR3 GA and now the whole XML data is mapped to FLD_MBSTRING.
I will forward my sample to you by mail, but this sample is not offical sample, it is just QA test case. You can refere it and check what's the difference.
Please let me know your mail address.
Regards,
Xu he -
Using an external web service and local element declarations
I am attempting to use (call) an external web service from workshop
8.1. It seems that if the web service's schema contains local element
declarations with the same name then workshop will generate incorrect
JCX code because it doesn't scope the generated classes.
I think the following simple example will do a better job explaining
than that last paragraph ;). In the following WSDL, the element
"testLocalDec" is used inside two different element types. In XML
Schema this is not a problem because each one is "scoped" by the
element types its included in. However, the generated JCX (listed
second) simply contains the testLocalDec structure twice which causes
problems in Java.
Is there some workaround for this? Note that making this element
declaration in the WSDL will not work because they are different
structures (with different names).
Also see my next email around using XMLBeans with external services
(since that could be a workaround if I knew how to do it).
thanks,
dave
*** sample WSDL ***
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:tns="urn:tutorial/hello"
targetNamespace="urn:tutorial/hello"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<s:schema targetNamespace="urn:tutorial/hello">
<s:element name="sayHelloResponse" >
<s:complexType>
<s:sequence>
<s:element name="sayHelloReturn" type="s:string" />
<s:element name="testLocalDec" >
<s:complexType />
</s:element>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="sayHello" >
<s:complexType>
<s:sequence>
<s:element name="caller" type="s:string" />
<s:element name="testLocalDec" >
<s:complexType >
<s:sequence>
<s:element name="different" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
<wsdl:message name="sayHelloRequestMsg">
<wsdl:part name="message" element="tns:sayHello"/>
</wsdl:message>
<wsdl:message name="sayHelloResponseMsg">
<wsdl:part name="sayHelloReturn" element="tns:sayHelloResponse"/>
</wsdl:message>
<wsdl:portType name="HelloWorld">
<wsdl:operation name="sayHello" >
<wsdl:input message="tns:sayHelloRequestMsg" />
<wsdl:output message="tns:sayHelloResponseMsg" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="HelloWorldServiceSoapBinding"
type="tns:HelloWorld">
<wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="sayHello">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="sayHelloRequestMsg">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="sayHelloResponseMsg">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="HelloWorldService">
<wsdl:port binding="tns:HelloWorldServiceSoapBinding"
name="HelloWorldService">
<wsdlsoap:address
location="http://localhost:18080/tutorial/HelloWorldService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
*** generated JCX ***
package helloTest;
* @jc:location
http-url="http://localhost:18080/tutorial/HelloWorldService"
* @jc:wsdl file="#HelloWorldServiceWsdl"
* @editor-info:link source="HelloWorldService.wsdl" autogen="true"
public interface HelloWorldServiceControl extends
com.bea.control.ControlExtension, com.bea.control.ServiceControl
public static class testLocalDec
implements java.io.Serializable
public static class sayHelloResponse
implements java.io.Serializable
public java.lang.String sayHelloReturn;
public testLocalDec testLocalDec;
public static class testLocalDec
implements java.io.Serializable
public java.lang.String different;
* @jc:protocol form-post="false" form-get="false"
public sayHelloResponse sayHello (java.lang.String caller,
testLocalDec testLocalDec);
static final long serialVersionUID = 1L;
/** @common:define name="HelloWorldServiceWsdl" value::
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:tns="urn:tutorial/hello"
targetNamespace="urn:tutorial/hello"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<s:schema targetNamespace="urn:tutorial/hello">
<s:element name="sayHelloResponse" >
<s:complexType>
<s:sequence>
<s:element name="sayHelloReturn" type="s:string" />
<s:element name="testLocalDec" >
<s:complexType />
</s:element>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="sayHello" >
<s:complexType>
<s:sequence>
<s:element name="caller" type="s:string" />
<s:element name="testLocalDec" >
<s:complexType >
<s:sequence>
<s:element name="different" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
<wsdl:message name="sayHelloRequestMsg">
<wsdl:part name="message" element="tns:sayHello"/>
</wsdl:message>
<wsdl:message name="sayHelloResponseMsg">
<wsdl:part name="sayHelloReturn"
element="tns:sayHelloResponse"/>
</wsdl:message>
<wsdl:portType name="HelloWorld">
<wsdl:operation name="sayHello" >
<wsdl:input message="tns:sayHelloRequestMsg" />
<wsdl:output message="tns:sayHelloResponseMsg" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="HelloWorldServiceSoapBinding"
type="tns:HelloWorld">
<wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="sayHello">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="sayHelloRequestMsg">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="sayHelloResponseMsg">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="HelloWorldService">
<wsdl:port binding="tns:HelloWorldServiceSoapBinding"
name="HelloWorldService">
<wsdlsoap:address
location="http://localhost:18080/tutorial/HelloWorldService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>Hi David,
The folks in the workshop newgroup may have a suggestion, if you could
try your post there:
http://newsgroups.bea.com/cgi-bin/dnewsweb?cmd=xover&group=weblogic.developer.interest.workshop
Thanks,
Bruce
David Rees wrote:
>
I am attempting to use (call) an external web service from workshop
8.1. It seems that if the web service's schema contains local element
declarations with the same name then workshop will generate incorrect
JCX code because it doesn't scope the generated classes.
I think the following simple example will do a better job explaining
than that last paragraph ;). In the following WSDL, the element
"testLocalDec" is used inside two different element types. In XML
Schema this is not a problem because each one is "scoped" by the
element types its included in. However, the generated JCX (listed
second) simply contains the testLocalDec structure twice which causes
problems in Java.
Is there some workaround for this? Note that making this element
declaration in the WSDL will not work because they are different
structures (with different names).
Also see my next email around using XMLBeans with external services
(since that could be a workaround if I knew how to do it).
thanks,
dave
*** sample WSDL ***
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:tns="urn:tutorial/hello"
targetNamespace="urn:tutorial/hello"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<s:schema targetNamespace="urn:tutorial/hello">
<s:element name="sayHelloResponse" >
<s:complexType>
<s:sequence>
<s:element name="sayHelloReturn" type="s:string" />
<s:element name="testLocalDec" >
<s:complexType />
</s:element>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="sayHello" >
<s:complexType>
<s:sequence>
<s:element name="caller" type="s:string" />
<s:element name="testLocalDec" >
<s:complexType >
<s:sequence>
<s:element name="different" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
<wsdl:message name="sayHelloRequestMsg">
<wsdl:part name="message" element="tns:sayHello"/>
</wsdl:message>
<wsdl:message name="sayHelloResponseMsg">
<wsdl:part name="sayHelloReturn" element="tns:sayHelloResponse"/>
</wsdl:message>
<wsdl:portType name="HelloWorld">
<wsdl:operation name="sayHello" >
<wsdl:input message="tns:sayHelloRequestMsg" />
<wsdl:output message="tns:sayHelloResponseMsg" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="HelloWorldServiceSoapBinding"
type="tns:HelloWorld">
<wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="sayHello">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="sayHelloRequestMsg">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="sayHelloResponseMsg">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="HelloWorldService">
<wsdl:port binding="tns:HelloWorldServiceSoapBinding"
name="HelloWorldService">
<wsdlsoap:address
location="http://localhost:18080/tutorial/HelloWorldService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
*** generated JCX ***
package helloTest;
* @jc:location
http-url="http://localhost:18080/tutorial/HelloWorldService"
* @jc:wsdl file="#HelloWorldServiceWsdl"
* @editor-info:link source="HelloWorldService.wsdl" autogen="true"
public interface HelloWorldServiceControl extends
com.bea.control.ControlExtension, com.bea.control.ServiceControl
public static class testLocalDec
implements java.io.Serializable
public static class sayHelloResponse
implements java.io.Serializable
public java.lang.String sayHelloReturn;
public testLocalDec testLocalDec;
public static class testLocalDec
implements java.io.Serializable
public java.lang.String different;
* @jc:protocol form-post="false" form-get="false"
public sayHelloResponse sayHello (java.lang.String caller,
testLocalDec testLocalDec);
static final long serialVersionUID = 1L;
/** @common:define name="HelloWorldServiceWsdl" value::
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:tns="urn:tutorial/hello"
targetNamespace="urn:tutorial/hello"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<s:schema targetNamespace="urn:tutorial/hello">
<s:element name="sayHelloResponse" >
<s:complexType>
<s:sequence>
<s:element name="sayHelloReturn" type="s:string" />
<s:element name="testLocalDec" >
<s:complexType />
</s:element>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="sayHello" >
<s:complexType>
<s:sequence>
<s:element name="caller" type="s:string" />
<s:element name="testLocalDec" >
<s:complexType >
<s:sequence>
<s:element name="different" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
<wsdl:message name="sayHelloRequestMsg">
<wsdl:part name="message" element="tns:sayHello"/>
</wsdl:message>
<wsdl:message name="sayHelloResponseMsg">
<wsdl:part name="sayHelloReturn"
element="tns:sayHelloResponse"/>
</wsdl:message>
<wsdl:portType name="HelloWorld">
<wsdl:operation name="sayHello" >
<wsdl:input message="tns:sayHelloRequestMsg" />
<wsdl:output message="tns:sayHelloResponseMsg" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="HelloWorldServiceSoapBinding"
type="tns:HelloWorld">
<wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="sayHello">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="sayHelloRequestMsg">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="sayHelloResponseMsg">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="HelloWorldService">
<wsdl:port binding="tns:HelloWorldServiceSoapBinding"
name="HelloWorldService">
<wsdlsoap:address
location="http://localhost:18080/tutorial/HelloWorldService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions> -
Hi All,
I am trying to load the XML Files into a Table using the SQL Loader and i am getting the Error
Record 1: Rejected - Error on table COMMONASSETCATALOG.
ORA-30951: Element or attribute at Xpath /AC/T[1]/T[1]/T[1]/T[1]/T[1]/Doc[@] exceeds maximum length
The <Doc> Element which is child of the <T> contains an XML Schema inside it..
The Doc Element is declared in Schema as
<xs:complexType name="AsDocType">
<xs:annotation>
<xs:documentation>A (Doc)ument, a container for any type of file</xs:documentation>
</xs:annotation>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:any namespace="##any" processContents="lax"/>
</xs:sequence>
<xs:attributeGroup ref="AsDocAtts"/>
</xs:complexType>
The Size of the XML Content that <Doc> Node has is around 34Kb.
Could you pls let me know how to resolve this..
Thanks
SateeshHi All,
I am trying to load the XML Files into a Table using the SQL Loader and i am getting the Error
Record 1: Rejected - Error on table COMMONASSETCATALOG.
ORA-30951: Element or attribute at Xpath /AC/T[1]/T[1]/T[1]/T[1]/T[1]/Doc[@] exceeds maximum length
The <Doc> Element which is child of the <T> contains an XML Schema inside it..
The Doc Element is declared in Schema as
<xs:complexType name="AsDocType">
<xs:annotation>
<xs:documentation>A (Doc)ument, a container for any type of file</xs:documentation>
</xs:annotation>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:any namespace="##any" processContents="lax"/>
</xs:sequence>
<xs:attributeGroup ref="AsDocAtts"/>
</xs:complexType>
The Size of the XML Content that <Doc> Node has is around 34Kb.
Could you pls let me know how to resolve this..
Thanks
Sateesh -
Check Required Elements and Attributes in JAXB
Hi
I need check required elements and attributes in JAXB java classes , if there are any value for them place it , otherwise place default value in xml file , because of it I upgrade JAXB2.0 to JAXB 2.1 to support "required" in "XmlElement" , I read in "JavaWS(JAXB)Tutorial.pdf" that JAXB itself check required elements and attributes , if there are any value for them place it , otherwise place default value in xml file , the exact part of document is :
<< A property is said to have a set value if that value was assigned to it during unmarshalling or by invoking its mutation method. The value of a property is
its set value, if defined; otherwise, it is the propertys schema specified default value, if any; otherwise, it is the default initial value for the propertys base type as it would be assigned for an uninitialized field within a Java class. >>
I want to know , dose JAXB do this task ? (now I work with JAXB2.1 but it doesnt do this task.Maybe I must set some configuration)
and if JAXB doesnt do it , how I can check required elements and attributes in JAXB ?
Please help me.
Shariatits all on Apple's Developer site
http://developer.apple.com/DOCUMENTATION/AppleApplications/Reference/FinalCutPro _XML/index.html -
Element VS attribute in IR when we create data type.
hi guruz,
when we make data type in IR ,and while creating node ,according node we give type(Element ,attribue etc).
what is diff between element and attribute.
please help me
warm regards.Hi,
You create complex data types using elements and attributes in the XSD editor
Element
Create structured data types. Elements that have a type cannot contain subelements.
Example Instance
<myElem>
<f1> Value of f1 </f1>
<f2> Value of f2 </f2>
</myElem>
Attribute
Add attributes to elements. Attributes cannot usually have subnodes.
Example Instance
<myElem myAttr="AttributeValue">
Element Value
</myElem>
You can flag an attribute as optional or required in the Occurrence column. These values mean the same for elements with an occurrence of 0..1 or 1. The only difference between elements and attributes is that attributes cannot have subnodes and that the same attribute cannot be used more than once in an element.
Hope this will clarify you.
Regards
Aashish Sinha
PS : reward points if helpful -
Web service wrapper in FB4 ignores Element when Attribute exists
I created a web service wrapper in Flash Builder 4 using the "Data --> Connect to Data/Service... ".
The WSDL contains a type like this:
<xs:complexType name="Description">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="languageCode" type="xs:string"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
In the response XML this type looks like this:
<ns2:Description languageCode="en_US">My Description</ns2:Description>
In this case the code generator ignores the element value ("My Description") and just creates a property for the attribute (languageCode="en_US").
BTW: Not mixing elements and attributes in one type would be a possible solutions, but I usually deal with web services I did not implement and I therefore can't change.
Has anyone had this problem and hopefully solved it?
Regards,
MartinThanks for sharing your tips on this forum, as it will be useful for other users, that run into this issue.
Feedback like this will also help us improve error reporting in the next release, as missing class files in the packaged application is a common issue when developers are moving from the embeded oc4j instance packaged with JDewveloper to standalone instances.
-Eric -
Parsing (COunting Elements and Attributes)
Can anyone point me to the method sfor counting elements and attributes in a parsed XML document. For example, I have a XML document that contains a number of 'word' files, I need to produce a printout that gives the total number. The files have a size attribute and I need to calculate and printout the total size of all the files together
ChuckBing,
Thanks for the pointers. I now have the following method:
} public void startElement(String elementName, AttributeList al) throws SAXException
String attributeValue;
if (elementName.equals("PRICE"))
if(al.getLength()>0)
for(int j = 0;j<al.getLength();j++)
attributeValue = al.getValue(j);
System.out.println("Total Attribute value is " + attributeValue);
}This obviously allows me to extract the detail from "PRICE" but "PRICE" actually has two attributes. I can't find another method that allows me to extract out the detail for a specific attribute.
Can you suggest anything? -
Which cluster attribute should you modify to ensure that load balancing and
An EJB is targeted to a cluster. Remote EJB clients can therefore take advantage of WebLogic Server’s load balancing and failover capabilities.
However, a proxy server exists between the clients and cluster, which performs IP address transaction.
Which cluster attribute should you modify to ensure that load balancing and failover work correctly?
A. Multicast Address
B. Persistent Store
C. Cluster Address
D. Migration Basis
E. Replication Channelhttp://docs.oracle.com/cd/E13222_01/wls/docs81/config_xml/Cluster.html
Cluster address -
I have been using Elements 8. Should I unstall 8 before installing elements 12 ?
I have been using Elements 8. Should I unstall 8 before installing elements 12 ?
Thank you for responding. Nothing actually worked! After reading the posts online, I called Apple. They indicated they have seen problems with some software after their upgrades. The technician was able to fix the problem on my computer remotely, but I have no clue what he did! But, it was definitely related to their recent upgrade to my computer.
-
I just purchased Elements 12. Should i uninstall Elements 6 before installing Elements 12?
Hi Dm606,
You don't need to uninstall Photoshop Element 6 before installing
Photoshop Element12.
However, it is totally your decission to uninstall PSE6 but it won't give you any
problem if both version co-exist.
Hope this helps.
Please let me know if you have any other question.
Regards,
Sumit Singh
Maybe you are looking for
-
Web Dynpro Application 'Explorer' has expires,
Hi, In one of EP system is giviing below error while using. If I refresh page is loading fine. But very frequently we are getting this errro, can anyone help on this problem. error message is showing as below: 500 Internal Server Error SAP J2EE
-
Hi Everyone! This is Vijay.I'm new baby to Indesign Script.In my office i took one task for indesign, that's i link one image to picture box that image jump from original position.so i copy that picture box and paste in place to new layer a
-
Officejet 4620 All in one Not printing even with new cartridge
My printer has suddenly stopped printing. There are no error messages. My ink level is full. It slowly started "running" out of ink as I was printing. New cartridge. Cleaned printer heads twice. Ran print quality report and it acted like it was print
-
Hi All, We are using the AFS SAP ECC 5.0 system. My requirement is to add the LAENG (Length), BREIT (Width) and HOEHE (Height) fields to the table control in AFS Weights & Volumes TabStrip in Additional Data of MM01/MM02/MM03 Transactions and we need
-
Hello, sorry if you've seen this type of thread a hundred times before but I searched through the forum and couldn't find a soloution. My problem is that the alpha channel on my sprites isn't working, I've checked the colour model of the loaded image