Solved

ASP.NET (VB) getting XML doc from WebService as large string object

Posted on 2009-05-04
10
497 Views
Last Modified: 2013-11-27
Hi,

I am making a call from my ASP.NET (with VB) to a WebService (not writte7n in any Microsoft related app). This WebService returns an XML document, but in what the owner of the WebService calls a LARGE CHARACTER OBJECT - basically just a string object that can handle a pretty big file.

I can not define an XML file object type for this WS' output type in VB as it tells me they are not the same type. If I use a STRING type it accepts it, but as soon as the data that comes in hits the string limit the program fails.

What data type can I use that will allow me to get this XML data from this WebService that I can then convert back into an XML document?

Thanks in advance.
0
Comment
Question by:SantoshPursad
  • 5
  • 5
10 Comments
 

Expert Comment

by:metta0_3
ID: 24293721
Do you mean once it is passed to client and collected in Javascript? Are you using Linq?
0
 

Author Comment

by:SantoshPursad
ID: 24293747
Not to sure I understand you question...

I'm using ASP.NET with VB. I make the WebService call and one of the returning/output parameters of this WebService call is a STRING data type, but the string data returned is in fact an XML file, but is not typed as XML but STRING.

Does that help, clarify my question?
0
 

Expert Comment

by:metta0_3
ID: 24293778
Ok. So you are getting results in a string variable the contents of which is XML data. Do you not want it to be of XML type. On the server side write the result to an XML Object then pass the XML Object as a parameter. No need for string object whatsoevver. Linq -> XML is possibly one of the simpler .NET features on offer.

Or do you not have control of the web service output format?
0
 

Author Comment

by:SantoshPursad
ID: 24294100
But can I do this if the WebService I'm calling is sending it as a string variable? I would love to have it as XML, but I can't seem to call it that way, or is there a way to convert that somehow?
0
 

Expert Comment

by:metta0_3
ID: 24294230
using System.Linq;
using System.Xml;
using System.Xml.XPath;
using System.Xml.Linq;


private void WriteXElement()
    {
        myXElement= new XElement("myTester");
      myXElement.Add(myStringValue);
    }

Linq -> XML is what you want to use. Above is just a little example. All it will do is pass the complete string into one XElement called myTester in this case. You might need to do some sort of data matching technique to filter out the data.

So you probably need to break up the string into as many XElement objects that you wish and keep adding them. Constructing an XML document object.

http://www.hookedonlinq.com/LINQtoXML5MinuteOverview.ashx

The above link will help you with a Linq to XML introduction.

Can I have a look at the string object data that you receive from the Web Service. Web Service can only pass data in XML, JSon and text format seems strange that it is a text string.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:SantoshPursad
ID: 24294305
Okay, I had a closer look at the WSDL and the XML being returned looks like a dataset, even though the WebService doesn't indicate that it is of that type. The WS developer also confirmed that he is returning a dataset and this explains the XML doc.

Defining a return type of dataset throws an error:
Unable to cast object of type 'System.Xml.XmlNode[]' to type 'System.Data.DataSet'.

I then tried to define a variable that is the same as the WS' return type, as follows:
Dim ds1 As New ServiceReference1.fwaspnetpResponse

and then call it as follows:
ds1.pdDataSet = myweb.fwaspnetp(TextBox1.Text)

where phDataSet is the name of the return variable.
This allows the call to run without error, but how do I now get this back into either a DataSet or XML doc?

I ran a test with SOAP.UO and this is the call and response:

CALL
*************************************************************************
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:aspnet:ASPNet">
   <soapenv:Body>
      <urn:fwaspnetp soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <pcNum xsi:type="xsd:string">100</pcNum>
      </urn:fwaspnetp>
   </soapenv:Body>
</soapenv:Envelope>


RESPONSE
***********************************
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <SOAP-ENV:Body>
      <ns1:fwaspnetpResponse SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:aspnet:ASPNet">
         <pdDataSet>
            <xsd:schema xmlns:prodata="urn:schemas-progress-com:xml-prodata:0001">
               <xsd:element name="dsDocumentCache" prodata:proDataSet="true">
                  <xsd:complexType>
                     <xsd:sequence>
                        <xsd:element maxOccurs="unbounded" minOccurs="0" name="ttWaybill">
                           <xsd:complexType>
                              <xsd:sequence>
                                 <xsd:element name="waybill_obj" nillable="true" prodata:columnLabel="Waybill obj" prodata:decimals="9" prodata:format=">>>>>>>>>>>>>>>>>9.999999999" prodata:help="Waybill obj" prodata:label="Waybill obj" type="xsd:decimal"/>
                                 <xsd:element name="relates_to_waybill_obj" nillable="true" prodata:columnLabel="Relates to waybill obj" prodata:decimals="9" prodata:format=">>>>>>>>>>>>>>>>>9.999999999" prodata:help="Relates to waybill obj" prodata:label="Relates to waybill obj" type="xsd:decimal"/>
                                 <xsd:element name="station_obj" nillable="true" prodata:columnLabel="Station obj" prodata:decimals="9" prodata:format=">>>>>>>>>>>>>>>>>9.999999999" prodata:help="Station obj" prodata:label="Station obj" type="xsd:decimal"/>
                                 <xsd:element name="invoiced_station_obj" nillable="true" prodata:columnLabel="Invoiced station obj" prodata:decimals="9" prodata:format=">>>>>>>>>>>>>>>>>9.999999999" prodata:help="Invoiced station obj" prodata:label="Invoiced station obj" type="xsd:decimal"/>
                                 <xsd:element name="organisation_obj" nillable="true" prodata:columnLabel="Organisation obj" prodata:decimals="9" prodata:format=">>>>>>>>>>>>>>>>>9.999999999" prodata:help="Organisation obj" prodata:label="Organisation obj" type="xsd:decimal"/>
                                 <xsd:element name="from_station_obj" nillable="true" prodata:columnLabel="From station obj" prodata:decimals="9" prodata:format=">>>>>>>>>>>>>>>>>9.999999999" prodata:help="From station obj" prodata:label="From station obj" type="xsd:decimal"/>
                                 <xsd:element name="to_station_obj" nillable="true" prodata:columnLabel="To station obj" prodata:decimals="9" prodata:format=">>>>>>>>>>>>>>>>>9.999999999" prodata:help="To station obj" prodata:label="To station obj" type="xsd:decimal"/>
                                 <xsd:element name="waybill_number" nillable="true" prodata:columnLabel="Waybill number" prodata:format="X(35)" prodata:help="Waybill number" prodata:label="Waybill number" type="xsd:string"/>
                                 <xsd:element name="waybill_date" nillable="true" prodata:columnLabel="Waybill date" prodata:format="99/99/9999" prodata:help="Waybill date" prodata:initial="prodata:today" prodata:label="Waybill date" type="xsd:date"/>
                                 <xsd:element name="account_name" nillable="true" prodata:columnLabel="Account name" prodata:format="X(70)" prodata:help="Account name" prodata:label="Account name" type="xsd:string"/>
                                 <xsd:element name="shipper_reference" nillable="true" prodata:columnLabel="Shipper reference" prodata:format="X(35)" prodata:help="Shipper reference" prodata:label="Shipper reference" type="xsd:string"/>
                                 <xsd:element name="station_account_obj" nillable="true" prodata:columnLabel="Station account obj" prodata:decimals="9" prodata:format=">>>>>>>>>>>>>>>>>9.999999999" prodata:help="Station account obj" prodata:label="Station account obj" type="xsd:decimal"/>
                                 <xsd:element name="station_contractor_obj" nillable="true" prodata:columnLabel="Station contractor obj" prodata:decimals="9" prodata:format=">>>>>>>>>>>>>>>>>9.999999999" prodata:help="Station contractor obj" prodata:label="Station contractor obj" type="xsd:decimal"/>
                                 <xsd:element name="contractor_reference" nillable="true" prodata:columnLabel="Contractor reference" prodata:format="X(15)" prodata:help="Contractor reference" prodata:label="Contractor reference" type="xsd:string"/>
                                 <xsd:element name="contractor_name" nillable="true" prodata:columnLabel="Contractor name" prodata:format="X(35)" prodata:help="Contractor name" prodata:label="Contractor name" type="xsd:string"/>
                                 <xsd:element name="consignment_type_obj" nillable="true" prodata:columnLabel="Consignment type obj" prodata:decimals="9" prodata:format=">>>>>>>>>>>>>>>>>9.999999999" prodata:help="Consignment type obj" prodata:label="Consignment type obj" type="xsd:decimal"/>
                                 <xsd:element name="service_type_obj" nillable="true" prodata:columnLabel="Service type obj" prodata:decimals="9" prodata:format=">>>>>>>>>>>>>>>>>9.999999999" prodata:help="Service type obj" prodata:label="Service type obj" type="xsd:decimal"/>
                                 <xsd:element name="waybill_contents" nillable="true" prodata:columnLabel="Waybill contents" prodata:format="X(3000)" prodata:help="Waybill contents" prodata:label="Waybill contents" type="xsd:string"/>
                                 <xsd:element name="consignment_value" nillable="true" prodata:columnLabel="Consignment value" prodata:decimals="10" prodata:format="->>>,>>>,>>>,>>>,>>9.99" prodata:help="Consignment value" prodata:label="Consignment value" type="xsd:decimal"/>
                                 <xsd:element name="number_of_items" nillable="true" prodata:columnLabel="Number of items" prodata:format="->>>>>9" prodata:help="Number of items" prodata:label="Number of items" type="xsd:int"/>
                                 <xsd:element name="waybill_weight" nillable="true" prodata:columnLabel="Waybill weight" prodata:decimals="10" prodata:format="->>>,>>>,>>>,>>9.99" prodata:help="Waybill weight" prodata:label="Waybill weight" type="xsd:decimal"/>
                                 <xsd:element name="volumetric_weight" nillable="true" prodata:columnLabel="Volumetric weight" prodata:decimals="10" prodata:format="->>>,>>>,>>>,>>9.99" prodata:help="Volumetric weight" prodata:label="Volumetric weight" type="xsd:decimal"/>
                                 <xsd:element name="request_track" nillable="true" prodata:columnLabel="Request track" prodata:help="Request track" prodata:label="Request track" type="xsd:boolean"/>
                                 <xsd:element name="site_name" nillable="true" prodata:columnLabel="Site name" prodata:format="X(70)" prodata:help="Site name" prodata:label="Site name" type="xsd:string"/>
                                 <xsd:element name="station_site_obj" nillable="true" prodata:columnLabel="Station site obj" prodata:decimals="9" prodata:format=">>>>>>>>>>>>>>>>>9.999999999" prodata:help="Station site obj" prodata:label="Station site obj" type="xsd:decimal"/>
                                 <xsd:element name="from_station_site_obj" nillable="true" prodata:columnLabel="From station site obj" prodata:decimals="9" prodata:format=">>>>>>>>>>>>>>>>>9.999999999" prodata:help="From station site obj" prodata:label="From station site obj" type="xsd:decimal"/>
                                 <xsd:element name="at_station_obj" nillable="true" prodata:columnLabel="At station obj" prodata:decimals="9" prodata:format=">>>>>>>>>>>>>>>>>9.999999999" prodata:help="At station obj" prodata:label="At station obj" type="xsd:decimal"/>
                                 <xsd:element name="status_obj" nillable="true" prodata:columnLabel="Status obj" prodata:decimals="9" prodata:format=">>>>>>>>>>>>>>>>>9.999999999" prodata:help="Status obj" prodata:label="Status obj" type="xsd:decimal"/>
                                 <xsd:element name="financial_status_obj" nillable="true" prodata:columnLabel="Financial status obj" prodata:decimals="9" prodata:format=">>>>>>>>>>>>>>>>>9.999999999" prodata:help="Financial status obj" prodata:label="Financial status obj" type="xsd:decimal"/>
                                 <xsd:element name="transmission_status_obj" nillable="true" prodata:columnLabel="Transmission status obj" prodata:decimals="9" prodata:format=">>>>>>>>>>>>>>>>>9.999999999" prodata:help="Transmission status obj" prodata:label="Transmission status obj" type="xsd:decimal"/>
                                 <xsd:element name="collection_obj" nillable="true" prodata:columnLabel="Collection obj" prodata:decimals="9" prodata:format=">>>>>>>>>>>>>>>>>9.999999999" prodata:help="Collection obj" prodata:label="Collection obj" type="xsd:decimal"/>
                                 <xsd:element name="declared_insurance_value" nillable="true" prodata:columnLabel="Declared insurance value" prodata:decimals="10" prodata:format="->>>,>>>,>>>,>>>,>>9.99" prodata:help="Declared insurance value" prodata:label="Declared insurance value" type="xsd:decimal"/>
                                 <xsd:element name="currency_obj" nillable="true" prodata:columnLabel="Currency obj" prodata:decimals="9" prodata:format=">>>>>>>>>>>>>>>>>9.999999999" prodata:help="Currency obj" prodata:label="Currency obj" type="xsd:decimal"/>
                                 <xsd:element name="destination_obj" nillable="true" prodata:columnLabel="Destination obj" prodata:decimals="9" prodata:format=">>>>>>>>>>>>>>>>>9.999999999" prodata:help="Destination obj" prodata:label="Destination obj" type="xsd:decimal"/>
                                 <xsd:element name="lookup_station_obj" nillable="true" prodata:columnLabel="Lookup station obj" prodata:decimals="9" prodata:format=">>>>>>>>>>>>>>>>>9.999999999" prodata:help="Lookup station obj" prodata:label="Lookup station obj" type="xsd:decimal"/>
                                 <xsd:element name="previous_declared_weight" nillable="true" prodata:columnLabel="Previous declared weight" prodata:decimals="2" prodata:format="->>>,>>>,>>>,>>9.99" prodata:help="Previous declared weight" prodata:label="Previous declared weight" type="xsd:decimal"/>
                                 <xsd:element name="country_obj" nillable="true" prodata:columnLabel="Country obj" prodata:decimals="9" prodata:format=">>>>>>>>>>>>>>>>>9.999999999" prodata:help="Country obj" prodata:label="Country obj" type="xsd:decimal"/>
                                 <xsd:element name="delivery_date" nillable="true" prodata:columnLabel="Delivery date" prodata:format="99/99/9999" prodata:help="Delivery date" prodata:label="Delivery date" type="xsd:date"/>
                                 <xsd:element name="earliest_appointed_time" nillable="true" prodata:columnLabel="Earliest appointed time" prodata:format=">>>>9" prodata:help="Earliest appointed time" prodata:label="Earliest appointed time" type="xsd:int"/>
                                 <xsd:element name="latest_appointed_time" nillable="true" prodata:columnLabel="Latest appointed time" prodata:format=">>>>9" prodata:help="Latest appointed time" prodata:label="Latest appointed time" type="xsd:int"/>
                                 <xsd:element name="line_number" nillable="true" prodata:columnLabel="Line number" prodata:format="->9" prodata:help="Line number" prodata:label="Line number" type="xsd:int"/>
                                 <xsd:element name="waybill_batch_obj" nillable="true" prodata:columnLabel="Waybill batch obj" prodata:decimals="9" prodata:format=">>>>>>>>>>>>>>>>>9.999999999" prodata:help="Waybill batch obj" prodata:label="Waybill batch obj" type="xsd:decimal"/>
                                 <xsd:element name="insurance_percentage" nillable="true" prodata:columnLabel="Insurance percentage" prodata:decimals="10" prodata:format="->>>,>>>,>>>,>>9.99" prodata:help="Insurance percentage" prodata:label="Insurance percentage" type="xsd:decimal"/>
                                 <xsd:element name="value_declared_for_insurance" nillable="true" prodata:columnLabel="Value declared for insurance" prodata:decimals="10" prodata:format="->>>,>>>,>>>,>>9.99" prodata:help="Value declared for insurance" prodata:label="Value declared for insurance" type="xsd:decimal"/>
                                 <xsd:element name="volumetric_conversion_factor" nillable="true" prodata:columnLabel="Volumetric conversion factor" prodata:decimals="10" prodata:format="->>>,>>>,>>>,>>9.99" prodata:help="Volumetric conversion factor" prodata:label="Volumetric conversion factor" type="xsd:decimal"/>
                                 <xsd:element default="true" name="track_by_parcel" nillable="true" prodata:columnLabel="Track by parcel" prodata:help="Track by parcel" prodata:label="Track by parcel" type="xsd:boolean"/>
                                 <xsd:element default="true" name="auto_generate_parcel_number" nillable="true" prodata:columnLabel="Auto generate parcel number" prodata:help="Auto generate parcel number" prodata:label="Auto generate parcel number" type="xsd:boolean"/>
                                 <xsd:element default="true" name="cod_applies" nillable="true" prodata:columnLabel="Cod applies" prodata:help="Cod applies" prodata:label="Cod applies" type="xsd:boolean"/>
                                 <xsd:element name="post_code" nillable="true" prodata:columnLabel="Post code" prodata:format="X(10)" prodata:help="Post code" prodata:label="Post code" type="xsd:string"/>
                                 <xsd:element name="sending_instructions" nillable="true" prodata:columnLabel="Sending instructions" prodata:format="X(500)" prodata:help="Sending instructions" prodata:label="Sending instructions" type="xsd:string"/>
                                 <xsd:element name="receiving_instructions" nillable="true" prodata:columnLabel="Receiving instructions" prodata:format="X(500)" prodata:help="Receiving instructions" prodata:label="Receiving instructions" type="xsd:string"/>
                                 <xsd:element name="invoice_number" nillable="true" prodata:columnLabel="Invoice number" prodata:format="X(28)" prodata:help="Invoice number" prodata:label="Invoice number" type="xsd:string"/>
                                 <xsd:element name="invoice_date" nillable="true" prodata:columnLabel="Invoice date" prodata:format="99/99/9999" prodata:help="Invoice date" prodata:label="Invoice date" type="xsd:date"/>
                                 <xsd:element name="invoice_sequence_number" nillable="true" prodata:columnLabel="Invoice sequence number" prodata:decimals="10" prodata:format="->>>,>>>,>>>,>>9.99" prodata:help="Invoice sequence number" prodata:label="Invoice sequence number" type="xsd:decimal"/>
                                 <xsd:element name="tax_amount" nillable="true" prodata:columnLabel="Tax amount" prodata:decimals="2" prodata:format="->>>,>>>,>>>,>>9.99" prodata:help="Tax amount" prodata:label="Tax amount" type="xsd:decimal"/>
                                 <xsd:element name="tax_percentage" nillable="true" prodata:columnLabel="Tax percentage" prodata:decimals="2" prodata:format="->>9.99%" prodata:help="Tax percentage" prodata:label="Tax percentage" type="xsd:decimal"/>
                                 <xsd:element name="insurance_required" nillable="true" prodata:columnLabel="Insurance required" prodata:help="Insurance required" prodata:label="Insurance required" type="xsd:boolean"/>
                                 <xsd:element name="discount_applicable" nillable="true" prodata:columnLabel="Discount applicable" prodata:help="Discount applicable" prodata:label="Discount applicable" type="xsd:boolean"/>
                                 <xsd:element name="rate_area_from_code" nillable="true" prodata:columnLabel="Rate area from code" prodata:format="X(10)" prodata:help="Rate area from code" prodata:label="Rate area from code" type="xsd:string"/>
                                 <xsd:element name="rate_area_to_code" nillable="true" prodata:columnLabel="Rate area to code" prodata:format="X(10)" prodata:help="Rate area to code" prodata:label="Rate area to code" type="xsd:string"/>
                                 <xsd:element name="file_reference_number" nillable="true" prodata:columnLabel="File reference number" prodata:format="X(28)" prodata:help="File reference number" prodata:label="File reference number" type="xsd:string"/>
                                 <xsd:element name="insurance_charge_amount" nillable="true" prodata:columnLabel="Insurance charge amount" prodata:decimals="10" prodata:format="->>>,>>>,>>>,>>9.99" prodata:help="Insurance charge amount" prodata:label="Insurance charge amount" type="xsd:decimal"/>
                                 <xsd:element name="chargable_units" nillable="true" prodata:columnLabel="Chargable units" prodata:decimals="10" prodata:format="->>>,>>>,>>>,>>9.99" prodata:help="Chargable units" prodata:label="Chargable units" type="xsd:decimal"/>
                                 <xsd:element name="discount_amount" nillable="true" prodata:columnLabel="Discount amount" prodata:decimals="10" prodata:format="->>>,>>>,>>>,>>9.99" prodata:help="Discount amount" prodata:label="Discount amount" type="xsd:decimal"/>
                                 <xsd:element name="discount_percent" nillable="true" prodata:columnLabel="Discount percent" prodata:decimals="2" prodata:format="->>9.99%" prodata:help="Discount percent" prodata:label="Discount percent" type="xsd:decimal"/>
                                 <xsd:element name="total_cost" nillable="true" prodata:columnLabel="Total cost" prodata:decimals="10" prodata:format="->>>,>>>,>>>,>>>,>>9.99" prodata:help="Total cost" prodata:label="Total cost" type="xsd:decimal"/>
                                 <xsd:element name="amount_collected" nillable="true" prodata:columnLabel="Amount collected" prodata:decimals="10" prodata:format="->>>,>>>,>>>,>>>,>>9.99" prodata:help="Amount collected" prodata:label="Amount collected" type="xsd:decimal"/>
                                 <xsd:element name="payment_method_tla" nillable="true" prodata:columnLabel="Payment method tla" prodata:format="X(3)" prodata:help="Payment method tla" prodata:label="Payment method tla" type="xsd:string"/>
                                 <xsd:element name="fragile" nillable="true" prodata:columnLabel="Fragile" prodata:help="Fragile" prodata:label="Fragile" type="xsd:boolean"/>
                                 <xsd:element name="hazardous" nillable="true" prodata:columnLabel="Hazardous" prodata:help="Hazardous" prodata:label="Hazardous" type="xsd:boolean"/>
                                 <xsd:element name="job_detail_obj" nillable="true" prodata:columnLabel="Job detail obj" prodata:decimals="9" prodata:format=">>>>>>>>>>>>>>>>>9.999999999" prodata:help="Job detail obj" prodata:label="Job detail obj" type="xsd:decimal"/>
                                 <xsd:element name="exported" nillable="true" prodata:columnLabel="Exported" prodata:help="Exported" prodata:label="Exported" type="xsd:boolean"/>
                                 <xsd:element name="product_type_obj" nillable="true" prodata:columnLabel="Product type obj" prodata:decimals="9" prodata:format=">>>>>>>>>>>>>>>>>9.999999999" prodata:help="Product type obj" prodata:label="Product type obj" type="xsd:decimal"/>
                                 <xsd:element name="is_duplicate" nillable="true" prodata:columnLabel="Is duplicate" prodata:help="Is duplicate" prodata:label="Is duplicate" type="xsd:boolean"/>
                              </xsd:sequence>
                           </xsd:complexType>
                        </xsd:element>
                        <xsd:element maxOccurs="unbounded" minOccurs="0" name="ttWaybillItem">
                           <xsd:complexType>
                              <xsd:sequence>
                                 <xsd:element name="waybill_item_obj" nillable="true" prodata:columnLabel="Waybill item obj" prodata:decimals="9" prodata:format=">>>>>>>>>>>>>>>>>9.999999999" prodata:help="Waybill item obj" prodata:label="Waybill item obj" type="xsd:decimal"/>
                                 <xsd:element name="owning_entity_mnemonic" nillable="true" prodata:columnLabel="Owning entity mnemonic" prodata:help="Owning entity mnemonic" prodata:label="Owning entity mnemonic" type="xsd:string"/>
                                 <xsd:element name="owning_obj" nillable="true" prodata:columnLabel="Owning obj" prodata:decimals="9" prodata:format=">>>>>>>>>>>>>>>>>9.999999999" prodata:help="Owning obj" prodata:label="Owning obj" type="xsd:decimal"/>
                                 <xsd:element name="line_number" nillable="true" prodata:columnLabel="Line number" prodata:format="->>>>>9" prodata:help="Line number" prodata:label="Line number" type="xsd:int"/>
                                 <xsd:element name="item_quantity" nillable="true" prodata:columnLabel="Item quantity" prodata:format="->>>>>9" prodata:help="Item quantity" prodata:label="Item quantity" type="xsd:int"/>
                                 <xsd:element name="item_description" nillable="true" prodata:columnLabel="Item description" prodata:format="X(70)" prodata:help="Item description" prodata:label="Item description" type="xsd:string"/>
                                 <xsd:element name="item_weight" nillable="true" prodata:columnLabel="Item weight" prodata:decimals="10" prodata:format="->>>,>>>,>>>,>>9.99" prodata:help="Item weight" prodata:label="Item weight" type="xsd:decimal"/>
                                 <xsd:element name="item_length" nillable="true" prodata:columnLabel="Item length" prodata:decimals="9" prodata:format=">>>>>>>>>>>>>>>>>9.999999999" prodata:help="Item length" prodata:label="Item length" type="xsd:decimal"/>
                                 <xsd:element name="item_width" nillable="true" prodata:columnLabel="Item width" prodata:decimals="9" prodata:format=">>>>>>>>>>>>>>>>>9.999999999" prodata:help="Item width" prodata:label="Item width" type="xsd:decimal"/>
                                 <xsd:element name="item_height" nillable="true" prodata:columnLabel="Item height" prodata:decimals="9" prodata:format=">>>>>>>>>>>>>>>>>9.999999999" prodata:help="Item height" prodata:label="Item height" type="xsd:decimal"/>
                                 <xsd:element name="volumetric_weight" nillable="true" prodata:columnLabel="Volumetric weight" prodata:decimals="10" prodata:format="->>>,>>>,>>>,>>9.99" prodata:help="Volumetric weight" prodata:label="Volumetric weight" type="xsd:decimal"/>
                                 <xsd:element name="chargeable_unit" nillable="true" prodata:columnLabel="Chargeable unit" prodata:decimals="2" prodata:format="->>>,>>>,>>>,>>9.99" prodata:help="Chargeable unit" prodata:label="Chargeable unit" type="xsd:decimal"/>
                                 <xsd:element name="freight_charge" nillable="true" prodata:columnLabel="Freight charge" prodata:decimals="2" prodata:format="->>>,>>>,>>>,>>9.99" prodata:help="Freight charge" prodata:label="Freight charge" type="xsd:decimal"/>
                                 <xsd:element name="account_product_obj" nillable="true" prodata:columnLabel="Account product obj" prodata:decimals="9" prodata:format=">>>>>>>>>>>>>>>>>9.999999999" prodata:help="Account product obj" prodata:label="Account product obj" type="xsd:decimal"/>
                                 <xsd:element name="consignment_type_obj" nillable="true" prodata:columnLabel="Consignment type obj" prodata:decimals="9" prodata:format=">>>>>>>>>>>>>>>>>9.999999999" prodata:help="Consignment type obj" prodata:label="Consignment type obj" type="xsd:decimal"/>
                                 <xsd:element name="rate_type_obj" nillable="true" prodata:columnLabel="Rate type obj" prodata:decimals="9" prodata:format=">>>>>>>>>>>>>>>>>9.999999999" prodata:help="Rate type obj" prodata:label="Rate type obj" type="xsd:decimal"/>
                                 <xsd:element name="chargeable_weight" nillable="true" prodata:columnLabel="Chargeable weight" prodata:decimals="2" prodata:format="->>>,>>>,>>>,>>9.99" prodata:help="Chargeable weight" prodata:label="Chargeable weight" type="xsd:decimal"/>
                              </xsd:sequence>
                           </xsd:complexType>
                        </xsd:element>
                     </xsd:sequence>
                  </xsd:complexType>
                  <xsd:unique name="XAK1fwt_waybill">
                     <xsd:selector xpath=".//ttWaybill"/>
                     <xsd:field xpath="lookup_station_obj"/>
                     <xsd:field xpath="waybill_number"/>
                  </xsd:unique>
                  <xsd:unique name="XAK2fwt_waybill">
                     <xsd:selector xpath=".//ttWaybill"/>
                     <xsd:field xpath="organisation_obj"/>
                     <xsd:field xpath="waybill_number"/>
                  </xsd:unique>
                  <xsd:unique name="XPKfwt_waybill" prodata:primaryIndex="true">
                     <xsd:selector xpath=".//ttWaybill"/>
                     <xsd:field xpath="waybill_obj"/>
                  </xsd:unique>
                  <xsd:unique name="XAK1fwt_waybill_item">
                     <xsd:selector xpath=".//ttWaybillItem"/>
                     <xsd:field xpath="owning_entity_mnemonic"/>
                     <xsd:field xpath="owning_obj"/>
                     <xsd:field xpath="line_number"/>
                  </xsd:unique>
                  <xsd:unique name="XPKfwt_waybill_item" prodata:primaryIndex="true">
                     <xsd:selector xpath=".//ttWaybillItem"/>
                     <xsd:field xpath="waybill_item_obj"/>
                  </xsd:unique>
                  <xsd:keyref name="tableField" refer="XPKfwt_waybill">
                     <xsd:selector xpath=".//ttWaybillItem"/>
                     <xsd:field xpath="owning_obj"/>
                  </xsd:keyref>
               </xsd:element>
               <xsd:annotation>
                  <xsd:appinfo>
                     <prodata:index name="XIE10fwt_waybill">
                        <prodata:table name="ttWaybill"/>
                        <prodata:field name="account_name"/>
                     </prodata:index>
                     <prodata:index name="XIE11fwt_waybill">
                        <prodata:table name="ttWaybill"/>
                        <prodata:field name="site_name"/>
                     </prodata:index>
                     <prodata:index name="XIE12fwt_waybill">
                        <prodata:table name="ttWaybill"/>
                        <prodata:field name="station_site_obj"/>
                     </prodata:index>
                     <prodata:index name="XIE13fwt_waybill">
                        <prodata:table name="ttWaybill"/>
                        <prodata:field name="from_station_site_obj"/>
                     </prodata:index>
                     <prodata:index name="XIE14fwt_waybill">
                        <prodata:table name="ttWaybill"/>
                        <prodata:field name="status_obj"/>
                     </prodata:index>
                     <prodata:index name="XIE15fwt_waybill">
                        <prodata:table name="ttWaybill"/>
                        <prodata:field name="from_station_obj"/>
                     </prodata:index>
                     <prodata:index name="XIE16fwt_waybill">
                        <prodata:table name="ttWaybill"/>
                        <prodata:field name="lookup_station_obj"/>
                     </prodata:index>
                     <prodata:index name="XIE17fwt_waybill">
                        <prodata:table name="ttWaybill"/>
                        <prodata:field name="contractor_reference"/>
                     </prodata:index>
                     <prodata:index name="XIE18fwt_waybill">
                        <prodata:table name="ttWaybill"/>
                        <prodata:field name="station_contractor_obj"/>
                     </prodata:index>
                     <prodata:index name="XIE19fwt_waybill">
                        <prodata:table name="ttWaybill"/>
                        <prodata:field name="to_station_obj"/>
                     </prodata:index>
                     <prodata:index name="XIE1fwt_waybill">
                        <prodata:table name="ttWaybill"/>
                        <prodata:field name="waybill_number"/>
                     </prodata:index>
                     <prodata:index name="XIE20fwt_waybill">
                        <prodata:table name="ttWaybill"/>
                        <prodata:field name="destination_obj"/>
                     </prodata:index>
                     <prodata:index name="XIE21fwt_waybill">
                        <prodata:table name="ttWaybill"/>
                        <prodata:field name="station_account_obj"/>
                     </prodata:index>
                     <prodata:index name="XIE22fwt_waybill">
                        <prodata:table name="ttWaybill"/>
                        <prodata:field name="country_obj"/>
                     </prodata:index>
                     <prodata:index name="XIE23fwt_waybill">
                        <prodata:table name="ttWaybill"/>
                        <prodata:field name="waybill_batch_obj"/>
                     </prodata:index>
                     <prodata:index name="XIE24fwt_waybill">
                        <prodata:table name="ttWaybill"/>
                        <prodata:field name="waybill_date"/>
                     </prodata:index>
                     <prodata:index name="XIE25fwt_waybill">
                        <prodata:table name="ttWaybill"/>
                        <prodata:field name="post_code"/>
                     </prodata:index>
                     <prodata:index name="XIE26fwt_waybill">
                        <prodata:table name="ttWaybill"/>
                        <prodata:field name="at_station_obj"/>
                     </prodata:index>
                     <prodata:index name="XIE2fwt_waybill">
                        <prodata:table name="ttWaybill"/>
                        <prodata:field name="shipper_reference"/>
                     </prodata:index>
                     <prodata:index name="XIE30fwt_waybill">
                        <prodata:table name="ttWaybill"/>
                        <prodata:field name="consignment_type_obj"/>
                     </prodata:index>
                     <prodata:index name="XIE31fwt_waybill">
                        <prodata:table name="ttWaybill"/>
                        <prodata:field name="service_type_obj"/>
                     </prodata:index>
                     <prodata:index name="XIE32fwt_waybill">
                        <prodata:table name="ttWaybill"/>
                        <prodata:field name="financial_status_obj"/>
                     </prodata:index>
                     <prodata:index name="XIE33fwt_waybill">
                        <prodata:table name="ttWaybill"/>
                        <prodata:field name="transmission_status_obj"/>
                     </prodata:index>
                     <prodata:index name="XIE34fwt_waybill">
                        <prodata:table name="ttWaybill"/>
                        <prodata:field name="collection_obj"/>
                     </prodata:index>
                     <prodata:index name="XIE35fwt_waybill">
                        <prodata:table name="ttWaybill"/>
                        <prodata:field name="invoice_number"/>
                     </prodata:index>
                     <prodata:index name="XIE36fwt_waybill">
                        <prodata:table name="ttWaybill"/>
                        <prodata:field name="invoice_date"/>
                     </prodata:index>
                     <prodata:index name="XIE39fwt_waybill">
                        <prodata:table name="ttWaybill"/>
                        <prodata:field name="delivery_date"/>
                     </prodata:index>
                     <prodata:index name="XIE40fwt_waybill">
                        <prodata:table name="ttWaybill"/>
                        <prodata:field name="invoiced_station_obj"/>
                     </prodata:index>
                     <prodata:index name="XIE41fwt_waybill">
                        <prodata:table name="ttWaybill"/>
                        <prodata:field name="relates_to_waybill_obj"/>
                     </prodata:index>
                     <prodata:index name="XIE42fwt_waybill">
                        <prodata:table name="ttWaybill"/>
                        <prodata:field name="status_obj"/>
                        <prodata:field name="waybill_date"/>
                     </prodata:index>
                     <prodata:index name="XIE9fwt_waybill">
                        <prodata:table name="ttWaybill"/>
                        <prodata:field name="station_obj"/>
                     </prodata:index>
                     <prodata:index name="XIEfwtwb_Interface">
                        <prodata:table name="ttWaybill"/>
                        <prodata:field name="exported"/>
                        <prodata:field name="waybill_date"/>
                        <prodata:field name="station_account_obj"/>
                        <prodata:field name="waybill_weight"/>
                     </prodata:index>
                     <prodata:index name="XIEfwtwb_Preprint">
                        <prodata:table name="ttWaybill"/>
                        <prodata:field name="job_detail_obj"/>
                        <prodata:field name="waybill_number"/>
                     </prodata:index>
                     <prodata:index name="XIE1fwt_waybill_item">
                        <prodata:table name="ttWaybillItem"/>
                        <prodata:field name="owning_entity_mnemonic"/>
                        <prodata:field name="owning_obj"/>
                     </prodata:index>
                     <prodata:index name="XIE2fwt_waybill_item">
                        <prodata:table name="ttWaybillItem"/>
                        <prodata:field name="account_product_obj"/>
                     </prodata:index>
                  </xsd:appinfo>
               </xsd:annotation>
            </xsd:schema>
            <dsDocumentCache>
               <ttWaybill>
                  <waybill_obj>2002485290.999000000</waybill_obj>
                  <relates_to_waybill_obj>0.000000000</relates_to_waybill_obj>
                  <station_obj>2000219928.098000000</station_obj>
                  <invoiced_station_obj>0.000000000</invoiced_station_obj>
                  <organisation_obj>1000072669.100000000</organisation_obj>
                  <from_station_obj>2001854476.609310000</from_station_obj>
                  <to_station_obj>2001854476.609310000</to_station_obj>
                  <waybill_number>100</waybill_number>
                  <waybill_date>2007-07-25</waybill_date>
                  <account_name>My Test</account_name>
                  <shipper_reference/>
                  <station_account_obj>2001753277.609310000</station_account_obj>
                  <station_contractor_obj>0.000000000</station_contractor_obj>
                  <contractor_reference/>
                  <contractor_name/>
                  <consignment_type_obj>2000224374.098000000</consignment_type_obj>
                  <service_type_obj>0.000000000</service_type_obj>
                  <waybill_contents/>
                  <consignment_value>0.0000000000</consignment_value>
                  <number_of_items>0</number_of_items>
                  <waybill_weight>0.0000000000</waybill_weight>
                  <volumetric_weight>0.0000000000</volumetric_weight>
                  <request_track>false</request_track>
                  <site_name/>
                  <station_site_obj>0.000000000</station_site_obj>
                  <from_station_site_obj>0.000000000</from_station_site_obj>
                  <at_station_obj>2001854476.609310000</at_station_obj>
                  <status_obj>2001763505.609310000</status_obj>
                  <financial_status_obj>2001823389.609310000</financial_status_obj>
                  <transmission_status_obj>2000225422.098000000</transmission_status_obj>
                  <collection_obj>0.000000000</collection_obj>
                  <declared_insurance_value>0.0000000000</declared_insurance_value>
                  <currency_obj>870.000000000</currency_obj>
                  <destination_obj>0.000000000</destination_obj>
                  <lookup_station_obj>2001854476.609310000</lookup_station_obj>
                  <previous_declared_weight>0.00</previous_declared_weight>
                  <country_obj>0.000000000</country_obj>
                  <delivery_date xsi:nil="true"/>
                  <earliest_appointed_time>0</earliest_appointed_time>
                  <latest_appointed_time>0</latest_appointed_time>
                  <line_number>0</line_number>
                  <waybill_batch_obj>0.000000000</waybill_batch_obj>
                  <insurance_percentage>0.0000000000</insurance_percentage>
                  <value_declared_for_insurance>0.0000000000</value_declared_for_insurance>
                  <volumetric_conversion_factor>0.0000000000</volumetric_conversion_factor>
                  <track_by_parcel>true</track_by_parcel>
                  <auto_generate_parcel_number>true</auto_generate_parcel_number>
                  <cod_applies>false</cod_applies>
                  <post_code/>
                  <sending_instructions/>
                  <receiving_instructions/>
                  <invoice_number/>
                  <invoice_date xsi:nil="true"/>
                  <invoice_sequence_number>0.0000000000</invoice_sequence_number>
                  <tax_amount>0.00</tax_amount>
                  <tax_percentage>14.00</tax_percentage>
                  <insurance_required>false</insurance_required>
                  <discount_applicable>false</discount_applicable>
                  <rate_area_from_code/>
                  <rate_area_to_code/>
                  <file_reference_number/>
                  <insurance_charge_amount>0.0000000000</insurance_charge_amount>
                  <chargable_units>0.0000000000</chargable_units>
                  <discount_amount>0.0000000000</discount_amount>
                  <discount_percent>0.00</discount_percent>
                  <total_cost>0.0000000000</total_cost>
                  <amount_collected>0.0000000000</amount_collected>
                  <payment_method_tla/>
                  <fragile>false</fragile>
                  <hazardous>false</hazardous>
                  <job_detail_obj>2007538734.999000000</job_detail_obj>
                  <exported>false</exported>
                  <product_type_obj>0.000000000</product_type_obj>
                  <is_duplicate>false</is_duplicate>
               </ttWaybill>
            </dsDocumentCache>
         </pdDataSet>
      </ns1:fwaspnetpResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
0
 

Author Comment

by:SantoshPursad
ID: 24294416
Just maybe another note on the output type - the method just indicates that the return type is of Object - hope that means something to someone, I have no idea. Hope you can help.
0
 

Expert Comment

by:metta0_3
ID: 24296450
XDocument myXDoc = (XDocument)sender

Try this, this should unbox the object and place it into XDocument type.

0
 

Accepted Solution

by:
metta0_3 earned 50 total points
ID: 24297044
Maybe that was not very clear. However you get the object from the web service call. It arrives as type object, you then unbox this and place into XDocument type. it is part of Linq -> XML

using System.Linq;
using System.Xml;
using System.Xml.XPath;
using System.Xml.Linq;

private void WriteXElement()
    {
        XDocument myXDoc = (XDocument)phDataSet
    }
0
 

Author Comment

by:SantoshPursad
ID: 24301925
Hi,

I found another solution to this problem. I increased  the readerQuota of my service object in my web.config file and now I can read the whole XML doc into my Object variable and then convert that to proper XML and then to a DataSet.

Thanks for your help though, appreciated it.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now