|
hi,
I am trying to access the webservice by sending the SOAP request.That webservice actually allows only the valid user so it validates with the data base.I got the folloing message
<soap:body>
<soap:fault>
<soap:faultcode xmlns="urn:verizon:security:soap:authorize:code">DENIED<s
oap:faultstring>DENIED
when I tried to pass an invalid user.
If the user on my application enters the valid "id" and "password" which i will be sending to the webservice then I get the Xml which I will be parsing but if the user enters the invalid id or password then I get the error as above How do I take care of this.
What I am thinking is when I get the SOAP I will parse the SOAP response with the XMLDOCUMENT as bellow
XmlDocument xd=new XmlDocument();
xd.LoadXml(strOutputXML);
XmlNodeList JobIDNodeList=xd.GetElementsByTagName("soap:Faultcode");
but is throwing an error.
questions:
1)IS my Approach wrong
2)IF correct How can I get the data of Xml tag with attributes in it
3)Does this problem get solved if I use proxy class instead of directly parsing the SOAP,If so how.
Thanking you in advace.
Satish.
|
|
|
|
|
I writen a application on Microsoft Mobile5.0 Pocket PC.
Parts of my code as below.
I create my own ISAXXMLContentHandler implementation class, and it used to handle my XML file ("\ori.xml").
<IMG src="http://home.pchome.com.tw/funny/alger_lin/Codes/code1.JPG">
I initiate XML reader as below.
<img src="http://home.pchome.com.tw/funny/alger_lin/Codes/code2.JPG">
And my XML content handler class's constructor and destructor as below.
<img src="http://home.pchome.com.tw/funny/alger_lin/Codes/code3.JPG">
However, when I call XML reader's parseURL() function in first picture, I got an error message as below.
<img src="http://home.pchome.com.tw/funny/alger_lin/Codes/err1.JPG">
The error message's detail as below.
<img src="http://home.pchome.com.tw/funny/alger_lin/Codes/err2.JPG">
I don't know what happen? and I don't know how to solve it? Does anyone can help me to solve it?
Alger, Lin
|
|
|
|
|
you need to show us the exception information - scroll err2.jpg down a bit...
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
|
can you not copy the error text to the clipboard?
we need the text from:
Exception Information
=====================
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
Thanks for your attention, I found the reason of this problem yesterday. It's not a technical issue, it just because I made a stupid mistake
As the code below, I invoke InitReader() function to create and initiate my XML reader. I pass a pointer of ISAXXMLReader into this function, this variable is xReader_Ori.
http://home.pchome.com.tw/funny/alger_lin/Codes/code1.JPG[^]
And in the InitReader(), I pass the inputed ISAXXMLReader pointer into CoCreateInstance() to receive the instance of ISAXXMLReader. However, the xReader parameter is a copy of xReader_Ori, the xReader was represented the ISAXXMLReader's instance after invoke CoCreateInstance(), but the xReader_Ori was not be modified at the same time. So, it cause some error when I called xReader_Ori's parseURL() function, because it's nothing
http://home.pchome.com.tw/funny/alger_lin/Codes/code2.JPG[^]
Now, I modified my InitReader()'s definition, I define it as HRESULE InitReader(ISAXXMLReader*& xReader) . And it work smoothly now
|
|
|
|
|
Hi,
i was wondering if anyone can help. i am looking to find out how i place data
from a query into my table. However this is being done via xml and xslt. The
data file arrives as xml. the xslt should then take the data and place it into
a table. if there are 6 rows it should draw 6 rows only in the table etc.
does anyone know how this can be done in xslt? and if so how?.
Thanks
Jagdish
Thanks
J
|
|
|
|
|
|
Hi all,
I'm having a problem with my XSL converting to HTML. I can view all content fine, except the white space is not preserved! I thought whitespace was preserved by default?
For example in my XML:
<catalog>
<content>
lines and lines of text
more text
</content>
</catalog>
When transforming I get:
lines and lines of text more text
It's all bunched up...where did the newline characters go?
my XSL contains this:
<xsl:value-of select="content"/>
Any ideas? Thanks.
|
|
|
|
|
|
Thanks for the reply, but I have read that tutorial prior to posting here. I still have an issue with the whitespaces.
Plus W3Schools mentions the following:
Note: Preserving white space is the default setting, so using the <xsl:preserve-space> element is only necessary if the <xsl:strip-space> element is used.
So, by default, I shouldn't have to use the xsl:preserve-space. Although, I have tried either way...and the same result occurred. White-space was not preserved
|
|
|
|
|
hi, did you resolve this problem, i have the same problem with you , if you've solved, plz tell me~
|
|
|
|
|
Guys,
Hope I am in the right forum.
What is the difference between the webservice and DLL? Which one is fater? It seems that both of them are the same it depends on how you will use it.
Just a clear explanation since I am new to WEBSERVICE.
I am C# programmer.
|
|
|
|
|
hi,
dabuskol wrote:
What is the difference between the webservice and DLL? Which one is fater? It seems that both of them are the same it depends on how you will use it.
well, when you use webservice, you actually call some methods from dll that is somewhere on the web. Communication (transfer of arguments and return value) is done via SOAP - it is XML based format, so you are close to the right forum
Dll on the other hand, is usualy on the same computer as caller. So obviously it is faster... but advantage of Web Service (WS) is that it is platform independent (all you need is to have implementation of SOAP) since communication is basicaly done via XML. And it is web service - it allows you to execute code on distant servers and get results from them.
I hope I said it understandably.
However, there is some study material:
http://msdn.microsoft.com/webservices/[^]
David
|
|
|
|
|
Hello,
I read my xml file into a dataset and set the datasource of a datagrid to access one of the datatables. Problem is that when new rows are added to the datagrid, and I call the WriteXml method, the new rows are added at the root.
Following is an example:
<?xml version="1.0" standalone="yes"?>
<root xmlns="http://tempuri.org/Database.xsd">
<Database>
<Positions>
<Position PositionCode="1" PositionName="Operations Supervisor" Salary="0" />
</Positions>
</Database>
</root>
Then I set the DataSource to of a datagrid to "Position" table and after adding a couple of rows, the saved file looks like:
<?xml version="1.0" standalone="yes"?>
<root xmlns="http://tempuri.org/Database.xsd">
<Database>
<Positions>
<Position PositionCode="1" PositionName="Operations Supervisor" Salary="0" />
</Positions>
</Database>
<Position PositionCode="2" PositionName="Secretary" Salary="0"/>
<Position PositionCode="3" PositionName="LazyGuy" Salary="0"/>
</root>
Note that the new rows were added in "/root" instead of in "root/Database/positions"
|
|
|
|
|
Hi all,
I want to know the name of the file which contains the specification of default namespace(www.w3.org/2001/XMLSchema) in XML.
Plz help..
Suman Singh
|
|
|
|
|
Hello,
I have a xml file:
<akis xmlns:sql="urn:schemas-microsoft-com:xml-sql">
<element><sql:query>SELECT @Element</sql:query></element>
<rows><sql:query>EXEC sp_ForXML @Element,'XML'</sql:query></rows>
</akis>
and I need to get the results of that.Is there any way to get them not by running the stored procedure but from the xml itself?
thaks in advance,
akis
|
|
|
|
|
Hi, i'm trying to load an xml document from C++ with:
MSXML::IXMLDOMDocumentPtr pXMLDocument (__uuidof (MSXML:OMDocument)); // main document parsed
hr = pXMLDocument->loadXML (BSTRTemp); /* trying parse string, if success, we have doc object*/
this method uses offensive memory. i have xml files that are about 100MB size.
i feel the function does not clear the memory. anyone an idea?
if i load 3 times the same file, my memory is full.
suggestion? is there a free method or something?
thank you,
lutz
|
|
|
|
|
|
hi, thx for your answers. after several tests i think i will have to do this.
|
|
|
|
|
Hi guys,
I've tried some stuff with XML and XSLT in Java. I had to develop an application that would transform various standards (XML and text) into one overall standard (XML) and then into some other formats (again XML and text). I did it by using Xerces for the text->xml and xml->xml stuff, but it couldn't do the transformations from XML to text.
I know want to do the same thing with "C#" and again I don't know how to transform xml to text.
Does anyone know if it is possible with XSLT? And if yes, how can it be done?
greetz
Stampede
PS: An example of the transformation I need to do would be the following:
<myDoc>
<firstNode>asdf1</firstNode>
<secondNode>asdf2</secondNode>
<thirdNode>
<fourthNode>asdf3</fourthNode>
</thirdNode>
</myDoc>
this would be transformed into something like the following:
firstNode:'asdf1'
secondNode:'asdf2'
thirdNode#fourthNode:'asdf3'
Of course this is only an example, but I think it shows what I want to do.
|
|
|
|
|
|
Hi,
We are making use of SourceGenerator of Castor to generate Java class file from a given schema file and based on the class files we are calling the set functions of the respective classes to populate the corresponding tags in the XML file. We use the marshall function to generate the XML.
We might change the schema file in future, i.e. move some child tags in some different parent tags. for e.g.
excerpt of a schema file.
<empaddress>
<street> Street1
<pincode> 111111
<companyaddress>
<city> XYZ
New schema file:
<empaddress>
<pincode> 111111
<companyaddress>
<street> Street1
<city> XYZ
As it is visible, that <street> tag is moved under <companyaddress> tag. This change triggers change in the names of get/set functions for the corresponding classes and thus generates error during marshalling. Could you please suggest some steps, wherein no code change is required apart from class generation, to accomodate this change in schema file.
Thanks and Regards,
Abdul Qadir
Thanks and Regards,
Abdul Qadir
|
|
|
|
|
I have an xslt file that I use to transform an XML document to a html page. Can I use that same xslt file to change the html back to the original XML?
/\ |_ E X E GG
|
|
|
|
|
I don't see how. Plus your HTML would have to be well formed XML (but that's ok because you surely have XHTML, right?) If the transformation is "1:1", it should be easy to write transfromation (X)HTML->XML based on original one. Maybe it could be even automatized.
David
|
|
|
|