Click here to Skip to main content
15,911,707 members
Home / Discussions / XML / XSL
   

XML / XSL

 
QuestionCannot traverse RDLC file using Xpath Pin
Krugger40418-Jul-08 1:31
Krugger40418-Jul-08 1:31 
AnswerABUSE: Massive amount of XML posted Pin
led mike18-Jul-08 5:20
led mike18-Jul-08 5:20 
GeneralRe: ABUSE: Massive amount of XML posted Pin
Krugger40418-Jul-08 6:20
Krugger40418-Jul-08 6:20 
GeneralRe: ABUSE: Massive amount of XML posted Pin
led mike18-Jul-08 6:28
led mike18-Jul-08 6:28 
GeneralRe: ABUSE: Massive amount of XML posted Pin
Paul Conrad26-Jul-08 14:47
professionalPaul Conrad26-Jul-08 14:47 
Questionproblem loading xml+xsl in IE Pin
Member 466072415-Jul-08 19:48
Member 466072415-Jul-08 19:48 
AnswerRe: problem loading xml+xsl in IE Pin
led mike17-Jul-08 7:00
led mike17-Jul-08 7:00 
QuestionWeb Method Returning a complex Custom data type. Pin
nagankota15-Jul-08 1:56
nagankota15-Jul-08 1:56 
Hi,
I am facing a problem in capturing and retreving data from a webmethod response.I am calling web methods on remote server.So I have included the web reference of the webservice in my Vs2005 solution.But the main problem is the webmethods are returning custom Array datatypes.The coustom data types are the other class types.I am facing problem in accessing the returned data.I think my client side code is creating the main problem.Please find the Below code(Auto generated code).and Please help me.


The Defination webmethod which I am calling.which is a part of a class called.

public partial class hbcontent : System.Web.Services.Protocols.SoapHttpClientProtocol
{

-----Many other Parametrs/methods Below one is the sample---

[System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace="http://remote.api", ResponseNamespace="http://remote.api")]
[return: System.Xml.Serialization.SoapElementAttribute("getCountryDataReturn")]
public Map getCountryData(string key, string language, string country) {
object[] results = this.Invoke("getCountryData", new object[] {
key,
language,
country});
return ((Map)(results[0]));
}
}

----Definition of the other classes :----

[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.2344")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.SoapTypeAttribute(Namespace="http://xml.apache.org/xml-soap")]
public partial class Map {

private mapItem[] itemField;

/// <remarks/>
public mapItem[] item {
get {
return this.itemField;
}
set {
this.itemField = value;
}
}
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.2344")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.SoapTypeAttribute(Namespace="http://xml.apache.org/xml-soap")]
public partial class mapItem {

private object keyField;

private object valueField;

/// <remarks/>
[System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
public object key {
get {
return this.keyField;
}
set {
this.keyField = value;
}
}

/// <remarks/>
[System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
public object value {
get {
return this.valueField;
}
set {
this.valueField = value;
}
}
}

WSDL file for the corresponding section:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://remote.api" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://remote.api" xmlns:intf="http://remote.api" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns1="http://rpc.xml.coldfusion" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Macromedia ColdFusion MX version-->
<wsdl:types>
<schema targetNamespace="http://rpc.xml.coldfusion" xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://remote.api"/>
<import namespace="http://xml.apache.org/xml-soap"/>
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="CFCInvocationException">
<sequence/>
</complexType>
<complexType name="QueryBean">
<sequence>
<element name="columnList" nillable="true" type="impl:ArrayOf_xsd_string"/>
<element name="data" nillable="true" type="impl:ArrayOfArrayOf_xsd_anyType"/>
</sequence>
</complexType>
</schema>
<schema targetNamespace="http://xml.apache.org/xml-soap" xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://remote.api"/>
<import namespace="http://rpc.xml.coldfusion"/>
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="mapItem">
<sequence>
<element name="key" nillable="true" type="xsd:anyType"/>
<element name="value" nillable="true" type="xsd:anyType"/>
</sequence>
</complexType>
<complexType name="Map">
<sequence>
<element maxOccurs="unbounded" minOccurs="0" name="item" type="apachesoap:mapItem"/>
</sequence>
</complexType>
</schema>

My client Code:

static void Main(string[] args)
{

hbcontent hbc = new hbcontent();

Map map2 = new Map();

map2 = (Map)hbc.getCountryData("Key12345", "en", "new-zealand");

}

When run the above code nothing is returned to the map2.But the web method is returning the data,which I can see using some Http tools like Wfecth and fiddler.

The sample data captured in fiddler is:

<?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:getCountryDataResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://remote.api">
<getCountryDataReturn xsi:type="ns2:Map" xmlns:ns2="http://xml.apache.org/xml-soap">
<item xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<key xsi:type="soapenc:string">RESPONSE</key>
<value xsi:type="ns2:Map">
<item>
<key xsi:type="soapenc:string">LOCATIONS</key>
<value soapenc:arrayType="xsd:anyType[10]" xsi:type="soapenc:Array">
<value xsi:type="ns2:Map">
<item>
<key xsi:type="soapenc:string">LNAME</key>
<value xsi:type="soapenc:string">Abel Tasman</value>
</item>
<item>
<key xsi:type="soapenc:string">INTRO</key>
<value xsi:type="soapenc:string"></value>
</item>
<item>
<key xsi:type="soapenc:string">IMG</key>
<value xsi:type="soapenc:string"></value>
</item>
<item>
<key xsi:type="soapenc:string">NAME</key>
<value xsi:type="soapenc:string">abel-tasman</value>
</item>
<item>
<key xsi:type="soapenc:string">LANGUAGE</key>
<value xsi:type="soapenc:string">en</value>
</item>
<item>
<key xsi:type="soapenc:string">ID</key>
<value xsi:type="soapenc:int">9862</value>
</item>
</value>
<value xsi:type="ns2:Map">
<item>
<key xsi:type="soapenc:string">LNAME</key>
<value xsi:type="soapenc:string">Ahipara</value>
</item>
<item>
<key xsi:type="soapenc:string">INTRO</key>
<value xsi:type="soapenc:string"></value>
</item>
<item>
<key xsi:type="soapenc:string">IMG</key>
<value xsi:type="soapenc:string"></value>
</item>
<item>
<key xsi:type="soapenc:string">NAME</key>
<value xsi:type="soapenc:string">ahipara</value>
</item>
<item>
<key xsi:type="soapenc:string">LANGUAGE</key>
<value xsi:type="soapenc:string">en</value>
</item>
<item>
<key xsi:type="soapenc:string">ID</key>
<value xsi:type="soapenc:int">9646</value>
</item>
</value>
</value>
</item>
<item>
<key xsi:type="soapenc:string">CONTENT</key>
<value xsi:type="ns2:Map">
<item>
<key xsi:type="soapenc:string">LNAME</key>
<value xsi:type="soapenc:string">New Zealand</value>
</item>
<item>
<key xsi:type="soapenc:string">EXCHRATE</key>
<value xsi:type="soapenc:decimal">1.3170</value>
</item>
<item>
<key xsi:type="soapenc:string">INTRO</key>
<value xsi:type="soapenc:string"></value>
</item>
<item>
<key xsi:type="soapenc:string">CURRENCY</key>
<value xsi:type="soapenc:string">New Zealand Dollars</value>
</item>
<item>
<key xsi:type="soapenc:string">IMG</key>
<value xsi:type="soapenc:string"></value>
</item>
<item>
<key xsi:type="soapenc:string">CONTINENT</key>
<value xsi:type="soapenc:string">au</value>
</item>
<item>
<key xsi:type="soapenc:string">NAME</key>
<value xsi:type="soapenc:string">new-zealand</value>
</item>
<item>
<key xsi:type="soapenc:string">LANGUAGE</key>
<value xsi:type="soapenc:string">en</value>
</item>
<item>
<key xsi:type="soapenc:string">ID</key>
<value xsi:type="soapenc:int">212</value>
</item>
</value>
</item>
</value>
</item>
<item>
<key xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">METHOD</key>
<value xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">getCountryData(KEY=******,LANGUAGE=en,COUNTRY=new-zealand)</value>
</item>
</getCountryDataReturn>
</ns1:getCountryDataResponse>
</soapenv:Body>
</soapenv:Envelope>


I need to retreve the above data and use it on my presentation layer.please help me with this.it would be a great help for me.

Thanks in advance.
QuestionSub-query with XmlNodeList Pin
Atropus14-Jul-08 2:38
Atropus14-Jul-08 2:38 
AnswerRe: Sub-query with XmlNodeList Pin
led mike14-Jul-08 5:59
led mike14-Jul-08 5:59 
Questionwriting to XML Pin
kadkir13-Jul-08 20:01
kadkir13-Jul-08 20:01 
AnswerRe: writing to XML Pin
Mike Ellison14-Jul-08 3:18
Mike Ellison14-Jul-08 3:18 
Questionwrong element in transformed xml Pin
AndrusM11-Jul-08 21:45
AndrusM11-Jul-08 21:45 
AnswerRe: wrong element in transformed xml Pin
Gideon Engelberth12-Jul-08 2:28
Gideon Engelberth12-Jul-08 2:28 
QuestionUse external Xml File in My external File (Import) Pin
hamedmot11-Jul-08 21:05
hamedmot11-Jul-08 21:05 
AnswerRe: Use external Xml File in My external File (Import) Pin
led mike14-Jul-08 5:57
led mike14-Jul-08 5:57 
QuestionXSLT for displaying generic XML-files Pin
Daniel Jansson10-Jul-08 20:22
Daniel Jansson10-Jul-08 20:22 
AnswerRe: XSLT for displaying generic XML-files Pin
led mike11-Jul-08 5:36
led mike11-Jul-08 5:36 
QuestionXSD Validation - Allowed characters Pin
Erik Westermann9-Jul-08 12:06
professionalErik Westermann9-Jul-08 12:06 
AnswerRe: XSD Validation - Allowed characters Pin
Erik Westermann10-Sep-08 4:13
professionalErik Westermann10-Sep-08 4:13 
Questionxml reading using C# Pin
Ekjon7-Jul-08 11:03
Ekjon7-Jul-08 11:03 
Questionneed to return xml by using query string in vb.net Pin
subbu.sk6-Jul-08 21:46
subbu.sk6-Jul-08 21:46 
QuestionIn &lt;xsl:for-each/&gt; href should create automatically links with worksheet Pin
Pushpa Setty6-Jul-08 19:17
Pushpa Setty6-Jul-08 19:17 
QuestionIXMLDOMNodePtr & IXMLDOMNode *?? Any difference?? Pin
SimplySane6-Jul-08 6:56
SimplySane6-Jul-08 6:56 
AnswerRe: IXMLDOMNodePtr & IXMLDOMNode *?? Any difference?? Pin
Christian Graus6-Jul-08 9:57
protectorChristian Graus6-Jul-08 9:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.