XML Namespace in DataGrid
Hi,
I am having troubles with a XML document. I have a xmlns tag,
that screws up the datagrid. As soon as I take it out, it works,
however my webservice responds with the xmlns tag... What's the
best way to make flex ignore this namespace and display the data in
the datagrid?
Thanks,
Florian
Search the list for "default namespace" I posted an example
recently.
Tracy
Similar Messages
-
Can't use XML namespaces in datagrid?
I'm using Flex 3 beta 2. When try to bind a datagrid column
to an XML element with a namespace, it doesn't display any value.
if I try the same XML without a namepace, it works fine. For
example, in the simple code below, binding a column with a
no-namespace XML document as :
<mx:DataGridColumn headerText="First"
dataField="firstname"/>
work fine but for the XML case with namespace:
<mx:DataGridColumn headerText="First"
dataField="ex::firstname"/>
does not display the value.
The "ex" namespace is declared earlier in the code and I have
no problem accessing the values with other controls like text or
list box. I actually reported this as a bug but was wondering is
anyone has a work around or a similar cse that is working.
many thanks
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute" width="600" height="244">
<mx:Script>
<![CDATA[
import flash.events.*;
import flash.net.URLLoader;
import flash.net.URLRequest;
public var ex:Namespace = new Namespace("
http://www.example.org/dummy");
[Bindable]
public var testXML:XML =
<root>
<person id="1" initials="JD">
<firstname>John</firstname>
<lastname>Doe</lastname>
</person>
<person id="2" initials="AB">
<firstname>Andy</firstname>
<lastname>Baldwin</lastname>
</person>
<person id="3" initials="CD">
<firstname>Charles</firstname>
<lastname>Darwin</lastname>
</person>
</root>
[Bindable]
public var testXMLNS:XML =
<root xmlns="
http://www.example.org/dummy">
<person id="1" initials="JD">
<firstname>John</firstname>
<lastname>Doe</lastname>
</person>
<person id="2" initials="AB">
<firstname>Andy</firstname>
<lastname>Baldwin</lastname>
</person>
<person id="3" initials="CD">
<firstname>Charles</firstname>
<lastname>Darwin</lastname>
</person>
</root>
]]>
</mx:Script>
<!-- Without a namespace, the column correctly display
the element values -->
<mx:DataGrid x="10" y="10" width="580" height="106"
dataProvider="{testXML.person}">
<mx:columns>
<mx:DataGridColumn headerText="ID" dataField="@id"/>
<mx:DataGridColumn headerText="First"
dataField="firstname"/>
<mx:DataGridColumn headerText="Last"
dataField="lastname"/>
</mx:columns>
</mx:DataGrid>
<!-- With a namespace, the column do not display the
element values -->
<mx:DataGrid x="10" y="124" width="580" height="106"
dataProvider="{testXMLNS.ex::person}">
<mx:columns>
<mx:DataGridColumn headerText="ID" dataField="@id"/>
<mx:DataGridColumn headerText="First"
dataField="ex::firstname"/>
<mx:DataGridColumn headerText="Last"
dataField="ex::lastname"/>
</mx:columns>
</mx:DataGrid>
</mx:Application>The strange thing is that we have datadrids all over this app that are formatted exactly the same way and this behavior never happens:
Here's another example:
<code>
<mx:DataGrid
id="contactDataGrid"
change="onItemSelected()"
styleName="patientlist"
width="50%"
height="100%"
editable="false"
draggableColumns="false"
resizableColumns="false" >
<mx:columns>
<mx:DataGridColumn headerText="Name" dataField="FirstName" />
<mx:DataGridColumn headerText="Relationship" dataField="RelationshipToPatientTypeId"/>
</mx:columns>
</mx:DataGrid>
</code> -
Dear all,
First of all sorry, if this is not the right place for my question.
I am facing some problem with the XFire Webservices. When i am trying to access the WSDL through the url. server is throwing the following exception :
javax.servlet.ServletException: The name "" is not legal for JDOM/XML namespaces: Namespace URIs must be non-null and non-empty Strings.
org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:143)
org.codehaus.xfire.transport.http.XFireServlet.doGet(XFireServlet.java:107)
javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
root cause
org.jdom.IllegalNameException: The name "" is not legal for JDOM/XML namespaces: Namespace URIs must be non-null and non-empty Strings.
org.jdom.Namespace.getNamespace(Namespace.java:164)
org.codehaus.xfire.util.NamespaceHelper.getUniquePrefix(NamespaceHelper.java:58)
org.codehaus.xfire.aegis.type.basic.BeanType.writeSchema(BeanType.java:560)
org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:224)
org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:233)
org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createDocLitPart(WSDLBuilder.java:403)
org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createPart(WSDLBuilder.java:355)
org.codehaus.xfire.wsdl11.builder.WSDLBuilder.writeParameters(WSDLBuilder.java:509)
cont.......
I am not able to figure out the root cause for this. The service.xml file looks like below:
<?xml version="1.0" encoding="UTF-8"?>
<!-- START Service.xml -->
<beans xmlns="http://xfire.codehaus.org/config/1.0">
<!-- Construct the castor service factory by Spring -->
<bean id="castorTypeRegistry" class="org.codehaus.xfire.castor.CastorTypeMappingRegistry"/>
<bean id="bindingProvider" class="org.codehaus.xfire.aegis.AegisBindingProvider">
<constructor-arg ref="castorTypeRegistry"/>
</bean>
<bean id="castorServiceFactory" class="org.codehaus.xfire.service.binding.ObjectServiceFactory">
<constructor-arg index="0" ref="xfire.transportManager"/>
<constructor-arg index="1" ref="bindingProvider"/>
</bean>
<service>
<name>ReleaseManager</name>
<namespace>ReleaseManager</namespace>
<serviceClass>com.pinkroccade.jfoundation.calculation.releases.ReleaseManager</serviceClass>
<implementationClass>com.pinkroccade.jfoundation.calculation.releases.ReleaseManagerImpl</implementationClass>
<schemas>
<schema>META-INF/schema/release-impact-worksheet-3.2.0.xsd</schema>
</schemas>
<style>document</style>
<serviceFactory>#castorServiceFactory</serviceFactory>
</service>
</beans>
<!-- END Service.xml-->
The issue which i am facing is it due to the problem with the service.xml (Which i dont think so..), Or is it any thing to do with the XSD file which i am using.
Can any body give me some guide lines for this ????
Thanks in advance.
Thanks and Regards,
Manjunath.Any one any thoughts..
I need to find out the solution for this as soon as possible; Not able to proceed further...
Thanks and Regards,
Manjunath. -
Issue with XML namespace and Message structure
Hi All,
I am using Oracle SOA Suite 11.1.1.4. I have SOA web service application one-way messaging wherein I keep receiving messages from the third party. The issue I am facing is with the XML namespaces which conflicts with the third party's message structure. The details are as below.
Our Web-service WSDL*
<schema attributeFormDefault="unqualified" elementFormDefault="qualified"
targetNamespace="http://amb.com/cad/RealTimeService"
xmlns:cad="http://amb.com/cad/RealTimeService"
xmlns:avl="http://schemas.com/asiapac/cad/datamodel/avl/1.0.0"
xmlns:evn="http://schemas.com/asiapac/cad/datamodel/event/1.0.0"
xmlns:uni="http://schemas.com/asiapac/cad/datamodel/unit/1.0.0"
xmlns:dvt="http://schemas.com/asiapac/cad/datamodel/divert/1.0.0"
xmlns:sui="http://schemas.com/asiapac/cad/datamodel/suppinfo/1.0.0"
xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://schemas.com/cad/datamodel/avl/1.0.0"
schemaLocation="AvlCadSchema.xsd"/>
<import namespace="http://schemas.com/cad/datamodel/unit/1.0.0"
schemaLocation="UnitCadSchema.xsd"/>
<import namespace="http://schemas.com/cad/datamodel/event/1.0.0"
schemaLocation="EventCadSchema.xsd"/>
<import namespace="http://schemas.com/cad/datamodel/divert/1.0.0"
schemaLocation="HewsCadSchema.xsd"/>
<import namespace="http://schemas.com/cad/datamodel/suppinfo/1.0.0"
schemaLocation="SupplementalInformationCadSchema.xsd"/>
<element name="AvlAuxData" type="avl:AvlAuxData" nillable="true"/>
<element name="AgencyEvent" type="evn:AgencyEvent"/>
<element name="Diversion" type="dvt:HospitalDiversionMessage"/>
<element name="SupplementalInformation" type="sui:SupplementalInformation"/>
<element name="UnitDetail" type="uni:UnitDetail"/>
</schema>
Using SOAP UI tool a HospitalDiversionMessage Request for the above WSDL will look like*
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:real="http://amb.com/cad/RealTimeService" xmlns:ns="http://schemas.com/cad/datamodel/divert/1.0.0">
<soapenv:Header/>
<soapenv:Body>
<*real*:Diversion>
<ns:Action>?</ns:Action>
<ns:Open>?</ns:Open>
<!--Optional:-->
<ns:Location>?</ns:Location>
<ns:Type>?</ns:Type>
<ns:SubType>?</ns:SubType>
<!--Optional:-->
<ns:ExpiryTimestamp>?</ns:ExpiryTimestamp>
<!--Optional:-->
<ns:Comment>?</ns:Comment>
<!--Optional:-->
<ns:ItemNumber>?</ns:ItemNumber>
<!--Optional:-->
<ns:Notifications>?</ns:Notifications>
<ns:CreatedTerminal>?</ns:CreatedTerminal>
<ns:CreatedTimestamp>?</ns:CreatedTimestamp>
<!--Optional:-->
<ns:ClosedBy>?</ns:ClosedBy>
<!--Optional:-->
<ns:ClosedComments>?</ns:ClosedComments>
<!--Optional:-->
<ns:ClosedTerminal>?</ns:ClosedTerminal>
<!--Optional:-->
<ns:ClosedTimestamp>?</ns:ClosedTimestamp>
</real:Diversion>
</soapenv:Body>
</soapenv:Envelope>
Now the third party sends a HospitalDiversionMessage in this format_
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns0="http://amb.com/cad/RealTimeService" xmlns:ns="http://schemas.com/cad/datamodel/divert/1.0.0">
<soapenv:Header/>
<soapenv:Body>
<ns0:Diversion>
<ns0:Action>?</ns0:Action>
<ns0:Open>?</ns0:Open>
<!--Optional:-->
<ns0:Location>?</ns0:Location>
<ns0:Type>?</ns0:Type>
<ns0:SubType>?</ns0:SubType>
<!--Optional:-->
<ns0:ExpiryTimestamp>?</ns0:ExpiryTimestamp>
<!--Optional:-->
<ns0:Comment>?</ns0:Comment>
<!--Optional:-->
<ns0:ItemNumber>?</ns0:ItemNumber>
<!--Optional:-->
<ns0:Notifications>?</ns0:Notifications>
<ns0:CreatedTerminal>?</ns0:CreatedTerminal>
<ns0:CreatedTimestamp>?</ns0:CreatedTimestamp>
<!--Optional:-->
<ns0:ClosedBy>?</ns0:ClosedBy>
<!--Optional:-->
<ns0:ClosedComments>?</ns0:ClosedComments>
<!--Optional:-->
<ns0:ClosedTerminal>?</ns0:ClosedTerminal>
<!--Optional:-->
<ns0:ClosedTimestamp>?</ns0:ClosedTimestamp>
</ns0:Diversion>
</soapenv:Body>
</soapenv:Envelope>
Questions*
1) I cannot figure out how the SOAPUI tool or SOA substitutes "real" as the namespace prefix for the WSDL based HospitalDiversionMessage and what I need to do at my end to match the message structure as per what the third party needs.
2) I need ns0 namespace prefix to whole of Diversion xml element. Currently it is "real" at top Diversion element and "ns" for its children
Please suggest, I can attach the other imported XSD if need be.
Thanks
Edited by: user5108636 on Jun 13, 2011 6:55 PM
Edited by: user5108636 on Jun 13, 2011 6:57 PM
Edited by: user5108636 on Jun 13, 2011 7:02 PMQuestions
1) I cannot figure out how the SOAPUI tool or SOA substitutes "real" as the namespace prefix for the WSDL based HospitalDiversionMessage and what I need to do at my end to match the message structure as per what the third party needs.The xml namespace suffixes like real and ns0 are just references used by the XML Parsers. For that matter the "real" can be xyz as well.
You dont need to make any changes as long as the xml namespace suffixes refer to the same namespace.
If you see the first soapUI xml and the third party xml have the same namespace references and hence it is not a problem:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:real="*http://amb.com/cad/RealTimeService*" xmlns:ns="http://schemas.com/cad/datamodel/divert/1.0.0">
<soapenv:Header/>
<soapenv:Body>
<*real*:Diversion>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns0="*http://amb.com/cad/RealTimeService*" xmlns:ns="http://schemas.com/cad/datamodel/divert/1.0.0">
<soapenv:Header/>
<soapenv:Body>
<*ns0*:Diversion>
2) I need ns0 namespace prefix to whole of Diversion xml element. Currently it is "real" at top Diversion element and "ns" for its childrenBased on this, logically both the xmls represent the same xml message. And hence you dont need to make any changes.
Please refer to the basics of xml namespaces using the following links:
http://en.wikipedia.org/wiki/XML_namespace
http://zvon.org/comp/r/tut-Namespace.html#Pages~Introduction
Let us know if you still need clarification.
Hope this helps.
Thanks,
Patrick -
XML namespace in xml converted pdf
Hello everyone
I have a problem when converting pdf's in xml. Everytime when I convert a PDF(either with Acrobat or with mailing the file as XML) in XML the date fields always in middle shows the xml namespace xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" . We are using these xml's to transfer data to an accounting software but the software recognizes the xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" as an error and because of that the data couldn't be uploaded. We created the PDF using a xsd scheme made in the accounting software. Is there a way to get rid of xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" showing in the date fields.
I appreciate every possible helpHi,
It sounds like you have the nillable="true" attribute in you XSD for the date field.
If you XSD looks like;
<xs:element name="Date1" type="xs:date" nillable="true"/>
Then you will get the following when the field Date1 is bound to is left blank.
<Date1 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
This is the correct behaviour, so I am either not understanding the problem or there is a bug in the accounting software you are using.
Maybe you could try replacing the nullable="true" with a minOccurs="0". This will mean the element will not appear in the XML at all.
Regards
Bruce -
Idoc to XML, namespace is not getting created in output XML
Hi All
My interface is idoc to XML.
I am using graphical message mapping.
In output xml , namespace is not formed
Can any one tell why namespace is not created in the XML and
How to add the namespace to the output XML .
Kindly help
Regards,
SheelaHi,
You can change your external definition to achieve it. just compare the structure of your xsd with some other normal data type xsd and change accordingly.
Inder -
VerifyError #1025 - default xml namespace and getter function
I have narrowed the problem down to a a few lines. I have
created a simple example of the problem...
// TestClass.as
package {
import flash.events.EventDispatcher;
public class TestClass extends EventDispatcher {
private var _testVar:String;
public function TestClass() {
var testXML:XML = <node1 xmlns="
http://www.testurl.com/"><node2><node3>some
words of wisdom</node3></node2></node1>;
default xml namespace = testXML.namespace("");
_testVar = testXML.node2.node3;
public function get testVar():String {
return _testVar;
// Test.fla - frame 1
import TestClass;
var myTestClass:TestClass = new TestClass();
var someVar:String = myTestClass.testVar;
trace(someVar);
I get the following error...
verify TestClass/get testVar()
stack:
scope: [global Object$ flash.events::EventDispatcher$
TestClass$]
locals: TestClass
0:getlocal0
stack: TestClass
scope: [global Object$ flash.events::EventDispatcher$
TestClass$]
locals: TestClass
1:pushscope
stack:
scope: [global Object$ flash.events::EventDispatcher$
TestClass$] TestClass
locals: TestClass
2:getlocal1
VerifyError: Error #1025: An invalid register 1 was accessed.
at TestClass/get testVar()
at Test_fla::MainTimeline/Test_fla::frame1()
However if I take out the default xml namespace line, and
create a new namespace it will work.
var testNS:Namespace = new Namespace(testXML.namespace(""));
_testVar = testXML.testNS::node2.testNS::node3;
Thoughts??? It's driving me crazy. Thanks in advance...
leviThe attribute should be in the element's namespace. If I run this snippet on the timeline, it outputs the correct values.
var xml:XML =
<xml>
<animal type="sheep" xmlns="http://blabla">
<name>josh</name>
<age>2</age>
</animal>
<animal type="cow" xmlns="http://blabla">
<name>jim</name>
<age>2</age>
</animal>
</xml>
var ns:Namespace = new Namespace("http://blabla");
default xml namespace = ns;
trace( xml.animal.@type ); // OUTPUT: sheepcow -
Default xml namespace = v hangs app
This is probably due to my relative inexperience with Flex (using FlashBuilder 4.5 and Flex SDK 3.6) but I've got an app that is acting strangely and I'd like to find out what's wrong.
Briefly, I'm trying to parse some XML (returned from a REST service) and, within a private function, am creating a namespace (call it v). I then use the directive default xml namespace = v. However, upon trying to launch and debug the app it hangs at application startup. The default directive is in a private function (actually a function called only when my HTTP service completes) of a component. Regardless, if I comment out the default directive the application works normally.
Again, this function isn't even CALLED unless I essentially click a button to access the service, so I have absolutely no idea why it appears to be affecting the loading of my app.
I have used Google to search for "Flex default xml namespace hangs app" but have found only one reference (in passing, with no solution offered).
Thanks for any pointers.I will try at some point but I can't cut down my current app to do it, it's just too large.
However, I did debug the app and I saw what the problem is. My view component, located in (for example) com.xyz.myapp.view, loads several other components, all located in com.xyz.myapp.components. As a result, the Panel component in the View contains (among other directives) xmlns:components="com.xyz.myapp.components.*". Both the namespace variable v and the default xml namespace directive are in a private function in one of the components the main view loads. When I ran the app under the debugger it terminated almost immediately with "Error 1065: variable com.xyz.mypp.components::v is not defined".
That's all I can tell you for now.
Thanks for the reply. -
Default xml namespace and attributes
Hi,
I was trying to use default xml namespaces, but came upon something strange.
I got the following piece of xml:
<animal type="sheep" xmlns="http://blabla">
<name>josh</name>
<age>2</age>
</animal>
and the following code
public static var ns:Namespace = new Namespace("http://blabla");
var xml:XML; // xml will be read into this var, not going into details here
public function myfunc():void {
default xml namespace = ns;
trace( xml.animal.@type );
now for some reason, the elements are correctly traversed using the default namespace. But the attribute isn't found. After a bit of debugging, I found that I could only retrieve the attribute when using xml.animal.attribute(new QName("", "type")). Am I doing something wrong here? Why isn't the attribute in the same default namespace as the element?
Kind regards,
JanThe attribute should be in the element's namespace. If I run this snippet on the timeline, it outputs the correct values.
var xml:XML =
<xml>
<animal type="sheep" xmlns="http://blabla">
<name>josh</name>
<age>2</age>
</animal>
<animal type="cow" xmlns="http://blabla">
<name>jim</name>
<age>2</age>
</animal>
</xml>
var ns:Namespace = new Namespace("http://blabla");
default xml namespace = ns;
trace( xml.animal.@type ); // OUTPUT: sheepcow -
Hi,
This is a pure xml question. Let me know if there are good forums better suited for this kind of problem.
I receive an xml message with the following format:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<staticMessage xmlns="Static/nme" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="Static/nme ./StaticMessage.xsd">
</staticMessage>I fail to apply transformation when using a stylesheet like:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:value-of select="staticMessage/body/data"/>
</xsl:template>
</xsl:stylesheet>However if I remove the xmlns attribute in the incoming message (xmlns="Static/nme" ) the transformation works correctly.
I do not have a great understanding of namespaces.
Does anyone know if any special declaration needs to be made for the xsl file to work correctly?
Tx,
Mik.Noticed that declaring a prefix in xsl (xmlns:pre="Static/nme") allows to access nodes or values ( pre:staticData/pre:.../)
But does a prefix need to reference the xml namespace or is it possible to define it as default?
Tx,
Mik. -
XML Namespace in WebService Request/Response
Hi all,
I have a question regarding xml namespace usage in wsdl and the corresponding request/response messages.
I have already browsed quite some articles about xml namespaces as well as some forum threads, but I am still not sure.
I have the following part of a wsdl document (generated by Integration Directory), defining a targetnamespace.
u2026
<wsdl:types>
<xsd:schema targetNamespace="http://www.dorma.com/sap/xi/finance"
xmlns="http://www.dorma.com/sap/xi/finance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="DebtorGetDetailResponse" type="Z_BAPI_DEBTOR_GETDETAIL_Response"></xsd:element>
u2026
<xsd:complexType name="Z_BAPI_DEBTOR_GETDETAIL_Response">
<xsd:sequence>
<xsd:element name="DEBITOR_COMPANY_DETAIL" type="BAPI1007_5" minOccurs="0">
</xsd:element> u2026
</xsd:sequence>
</xsd:complexType>
u2026
</xsd:schema>
u2026
</wsdl:types>
u2026
In my understanding, all types defined in the schema section of a wsdl document will be in the targetnamespace, if defined.
Therefore the element DEBITOR_COMPANY_DETAIL would be in the namesapce
http://www.dorma.com/sap/xi/finance
However, the ABAP proxy generates a response message like follows,
where only the root element is in this namespace and the child elements are in the global namespace:
<?xml version="1.0" encoding="utf-8"?>
<ns1:DebtorGetDetailResponse xmlns:ns1="http://www.dorma.com/sap/xi/finance"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<DEBITOR_COMPANY_DETAIL>
u2026
</DEBITOR_COMPANY_DETAIL>
u2026
</ns1:DebtorGetDetailResponse>
Do I have a wrong understand of the wsdl (xml schema) or is this an erroneous behavior?
The problem is that some 3rd-party software web service module does not accept
the response message as not complient with the respective wsdl document.
Any input is appreciated.
Thanks
Hans
Edited by: Hans-Jürgen Schwippert on Oct 1, 2008 12:02 PMI have the same problem. I am trying to connect to a webservice running on IBM websphere but it doesn't accept the xml in my request. It appears to be the same namespace issue.
Did you ever find a solution for this?
Is it a valid webservice call if you omit the namespace for an element or is this a bug in the Adaptive WS implementation?
Web Dynpro web service model generated request:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header>
<sapsess:Session xmlns:sapsess="http://www.sap.com/webas/630/soap/features/session/">
<enableSession>true</enableSession>
</sapsess:Session>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
look between these lines -
<ns1:tamKontrolleraKontoLastAnrop xmlns:ns1="http://schemas.fora.se/modell/tam/1.0/TAM_Data">
<AnvandarNamn>30039647</AnvandarNamn>
</ns1:tamKontrolleraKontoLastAnrop>
look between these lines -
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
As you can see the tag
<AnvandarNamn>30039647</AnvandarNamn>
is missing a namespace.
It should be
<ns1:AnvandarNamn>30039647</ns1:AnvandarNamn>
Using a third part tool called Soapui i generate this request that works:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tam="http://schemas.fora.se/modell/tam/1.0/TAM_Data">
<soapenv:Header/>
<soapenv:Body>
<tam:tamKontrolleraKontoLastAnrop>
<tam:AnvandarNamn>30039647</tam:AnvandarNamn>
</tam:tamKontrolleraKontoLastAnrop>
</soapenv:Body>
</soapenv:Envelope> -
XML Namespaces in XI (URL s. URN)
Our company is considering a global XML Namespace standard that will be URN based instead of URL based. It looks liek all the examples for XI 3 use URL, but XI 2 used URNs. Does it matter to XI / WAS? Will we have any side-effects by using the URN form?
Hi,
U can either use a URI or URN in your namespace.
URI : http://sap.com/xi/demo ( URI is similar to URL but nexessarily point to a web-resource).
URN : urn:sap-com:xi:demo is a URI but withour a protocol assignment.
U can use any one of them in your namming conventions...
Regards,
Siva Maranani. -
XML namespace to be changed in the outgoing xml message
HI
in my scenario I am sending data to a web service .
The xml namespace that is being sent in t he data is the namespace under which the the object is created.
while sending the data to the webservice i do not want the ns0: to be attached to the message type and the xml namespace to go as the xml namespace of the vendor.
Thanks
NikhilHi,
As everyone said you need to remove the namespace in the Message Type screen. If it is a imported XSD you need to remove the attribute targetNamespace.
After doing this do the mapping once again by selecting the modified message type.
The above should work... if you are not able to solve it still you can use the following XSLT in the interface mapping after the massage mapping. This is will remove the namespaces and ns0: etc.
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="no"/>
<xsl:template match="/|comment()|processing-instruction()">
<xsl:copy>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
<xsl:template match="*">
<xsl:element name="{local-name()}">
<xsl:apply-templates select="@*|node()"/>
</xsl:element>
</xsl:template>
<xsl:template match="@*">
<xsl:attribute name="{local-name()}">
<xsl:value-of select="."/>
</xsl:attribute>
</xsl:template>
</xsl:stylesheet> -
XML Namespace problem in XMLType
Hi,
I am getting this error, if anyone has any information about it please let me know.
extract() returns the following error when a reserverd xml namespace 'xml:lang' is used in the xml document. if the namespace is removed it dosent give error.
If this is not an error, please let me know how to workaround it.
Thanks,
Divakar.
ERROR at line 1:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00233: namespace prefixes starting with "xml" are reserved
Error at line 71
ORA-06512: at "XDB.DBMS_XMLDOM", line 3508
ORA-06512: at "XDB.DBMS_XMLDOM", line 3551
ORA-06512: at "OPS$DTANJORE.CDR_CDISC_TOPIC3", line 44
ORA-06512: at line 1Hi Vijaykumar,
Thanks for your reply.
But it is standard proxy structure, Is it fine to modify this ?
& it is proxy, so we have to regenerate it in SRM also.
is it fine ?
Study SAP -
HI, I am attempting to parse some weather information from the Yahoo weather RSS feed.
This is a typical XML node;
<description>Yahoo! Weather for Palm Springs, CA</description>
I used the typical XML parsing code in as2;
var text1 = this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue;
txt1.text = text1;
I was doing pretty good until I reached a node that was formatted thus;
<yweather:forecast day="Mon" date="28 Sep 2009" low="74" high="103" text="Sunny" code="32" />
This text traced a value of undefined.
I have tried to research this and so far all I have been able to find out, is that this is a XML namespace and is very easily handled in as3. Unfortunately I have to use as2.
How do I parse out this information into a dyamic text fields?
Or failing that, where in the literature does adobe expalin how this is done?
ForrestHi,
Try this code:
var xmlname:XML = new XML();
xmlname.ignoreWhite = true;
xmlname.load("sample.xml");
xmlname.onLoad = function(sucess:Boolean){
var xNode = xmlname.firstChild;
var tday = xNode.childNodes[0].attributes.day;
var tdate = xNode.childNodes[0].attributes.date;
trace(tdate);
Maybe you are looking for
-
Is there a downloadable version of microsoft word for mac book pro
-
Can't open iPhoto says it is locked
Here is what comes on the screen: The iPhoto Library is locked, on a locked disk, or you do not have permission to make changes to it. I haven't done anythiong except earlier I plugged in my iPhone. The iphoto screen showed up and I quit it.
-
Count number of rows from oracle and sql database and generate a report
Hi All, Can someone help me in writing a java program for the following scenario? 1. Read the number of rows available from oracle table and print the total row count in a Report.txt text file. 2. Read the number of rows inserted in a sql database (a
-
Installing APEX on a website hosted by an external hosting service provider
I have an external hosting service provider who provide hosting service based on LAMP stack. Has anyone on this forum installed APEX on the servers of these hosting service providers.. Would appreciate inputs. Thanks
-
I want to know how to stop iTunes from creating a New Playlist everytime I put an MP3 file on my desktop. I mix a lot of music and no matter what Audio Format (I prefer MP3) I change it to, it always does the same. How can I stop it?