Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > XML Deserializing issue

Reply
Thread Tools

XML Deserializing issue

 
 
VGE
Guest
Posts: n/a
 
      04-10-2008
We are consuming a web service and we receive the following response soap:

ResponseCode: 200 (OK)
X-SOAP-Server:NuSOAP/0.7.2 (1.6)
Keep-Alive:timeout=15, max=100
Connection:Keep-Alive
Content-Length:1540
Content-Type:text/xml; charset=ISO-8859-1
Date:Thu, 10 Apr 2008 01:29:51 GMT
Server:Apache
X-Powered-ByHP/5.2.5

<?xml version="1.0" encoding="utf-16"?>
<SOAP-ENV:Envelope
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlnssd="http://www.w3.org/2001/XMLSchema"
xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<getQuoteResponse xmlns="urnngwsdl">
<quoteResponse>
<pngRequestId>VGE0409200813976API674700055047</pngRequestId>
<site>
<street>2520 Whitehall Park Dr</street>
<city>Charlotte</city>
<state>NC</state>
<zip>28273</zip>
<npa>704</npa>
<nxx>555</nxx>
</site>
<quotes>
<item>
<quoteId>VGETB00409200813977API021200129473</quoteId>
<carrier>Broadwing</carrier>
<term>12</term>
<expirationDate>2008-05-09</expirationDate>
<loopMRC>308</loopMRC>
<loopNRC>0</loopNRC>
<portMRC>358</portMRC>
<portNRC>0</portNRC>
</item>
<item>
<quoteId>VGETB00409200813983API023600182299</quoteId>
<carrier>Broadwing</carrier>
<term>36</term>
<expirationDate>2008-05-09</expirationDate>
<loopMRC>272</loopMRC>
<loopNRC>0</loopNRC>
<portMRC>287</portMRC>
<portNRC>0</portNRC>
</item>
<item>
<quoteId>VGETB00409200813982API022400121435</quoteId>
<carrier>Broadwing</carrier>
<term>24</term>
<expirationDate>2008-05-09</expirationDate>
<loopMRC>281</loopMRC>
<loopNRC>0</loopNRC>
<portMRC>310</portMRC>
<portNRC>0</portNRC>
</item>
</quotes>
<message>Verizon, Paetec, XO, Qwest failed to return valid
pricing or support the service type and bandwidth of this request.</message>
</quoteResponse>
</getQuoteResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


However the object as created by the Framework contains all nulls and
has the following hierarchy:

getQuote
Headers
Body
quoteResponse
pngResultId = null
site = null
siteZ = null
quotes = null
message = null

If I manually deserialize the soap response it creates the object with
the above structure except with the appropriate data. How do I fix this
so that the object generated by the framework will populate correctly
with the data when the response is received?

I hope that explains the question.

Thanks,

Neville Kelly
VGE
 
Reply With Quote
 
 
 
 
Steven Cheng [MSFT]
Guest
Posts: n/a
 
      04-11-2008
Hi Neville,

From your description, when consuming one webservice, you found that your
client proxy doesn't correctly populate the properties of the response
object, correct?

As for the webservice, is it an ASP.NET webservice or generated upon other
platform? Since the SOAP message does carry the XML data, it does be likely
a XML deserialization issue. is it possible that you provide a publich
accessible url , I'd like to perform some test on my side to have a further
look.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
http://www.velocityreviews.com/forums/(E-Mail Removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
>Date: Thu, 10 Apr 2008 16:06:29 -0400
>From: VGE <(E-Mail Removed)>
>User-Agent: Thunderbird 2.0.0.12 (Windows/20080213)
>MIME-Version: 1.0
>Subject: XML Deserializing issue


>
>We are consuming a web service and we receive the following response soap:
>
>ResponseCode: 200 (OK)
>X-SOAP-Server:NuSOAP/0.7.2 (1.6)
>Keep-Alive:timeout=15, max=100
>Connection:Keep-Alive
>Content-Length:1540
>Content-Type:text/xml; charset=ISO-8859-1
>Date:Thu, 10 Apr 2008 01:29:51 GMT
>Server:Apache
>X-Powered-ByHP/5.2.5
>
><?xml version="1.0" encoding="utf-16"?>
><SOAP-ENV:Envelope
>SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
>xmlnssd="http://www.w3.org/2001/XMLSchema"
>xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
>xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
> <SOAP-ENV:Body>
> <getQuoteResponse xmlns="urnngwsdl">
> <quoteResponse>
> <pngRequestId>VGE0409200813976API674700055047</pngRequestId>
> <site>
> <street>2520 Whitehall Park Dr</street>
> <city>Charlotte</city>
> <state>NC</state>
> <zip>28273</zip>
> <npa>704</npa>
> <nxx>555</nxx>
> </site>
> <quotes>
> <item>
> <quoteId>VGETB00409200813977API021200129473</quoteId>
> <carrier>Broadwing</carrier>
> <term>12</term>
> <expirationDate>2008-05-09</expirationDate>
> <loopMRC>308</loopMRC>
> <loopNRC>0</loopNRC>
> <portMRC>358</portMRC>
> <portNRC>0</portNRC>
> </item>
> <item>
> <quoteId>VGETB00409200813983API023600182299</quoteId>
> <carrier>Broadwing</carrier>
> <term>36</term>
> <expirationDate>2008-05-09</expirationDate>
> <loopMRC>272</loopMRC>
> <loopNRC>0</loopNRC>
> <portMRC>287</portMRC>
> <portNRC>0</portNRC>
> </item>
> <item>
> <quoteId>VGETB00409200813982API022400121435</quoteId>
> <carrier>Broadwing</carrier>
> <term>24</term>
> <expirationDate>2008-05-09</expirationDate>
> <loopMRC>281</loopMRC>
> <loopNRC>0</loopNRC>
> <portMRC>310</portMRC>
> <portNRC>0</portNRC>
> </item>
> </quotes>
> <message>Verizon, Paetec, XO, Qwest failed to return valid
>pricing or support the service type and bandwidth of this

request.</message>
> </quoteResponse>
> </getQuoteResponse>
> </SOAP-ENV:Body>
></SOAP-ENV:Envelope>
>
>
>However the object as created by the Framework contains all nulls and
>has the following hierarchy:
>
>getQuote
> Headers
> Body
> quoteResponse
> pngResultId = null
> site = null
> siteZ = null
> quotes = null
> message = null
>
>If I manually deserialize the soap response it creates the object with
>the above structure except with the appropriate data. How do I fix this
>so that the object generated by the framework will populate correctly
>with the data when the response is received?
>
>I hope that explains the question.
>
>Thanks,
>
>Neville Kelly
>VGE
>


 
Reply With Quote
 
 
 
 
VGE
Guest
Posts: n/a
 
      04-11-2008
Here is the url to the web service. And the request input. When adding
the web service you have to add it as a 2.0 service since 3.0/3.5 will
not consume it correctly. It was created using NuSoap, that is all I
know about it since it is not ours we are just trying to consume it.

Url:
http://ecare.pngcom.com/agentportal2...Quote.php?WSDL

Request Input:
<?xml version="1.0" encoding="utf-16"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
xmlnssd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<getQuote xmlns="urnngwsdl">
<quoteRequest user="VGE" password="plops" xmlns="">
<site>
<street>2520 Whitehall Park Dr</street>
<city>Charlotte</city>
<state>NC</state>
<zip>28273</zip>
<npa>704</npa>
<nxx>555</nxx>
</site>
<siteZ>
<street />
<city />
<state />
<zip>0</zip>
<npa>0</npa>
<nxx>0</nxx>
</siteZ>
<serviceType>Data</serviceType>
<customId />
<bandwidth>DS-1</bandwidth>
</quoteRequest>
</getQuote>
</soap:Body>
</soap:Envelope>

Thanks,

Neville Kelly
VGE

Steven Cheng [MSFT] wrote:
> Hi Neville,
>
> From your description, when consuming one webservice, you found that your
> client proxy doesn't correctly populate the properties of the response
> object, correct?
>
> As for the webservice, is it an ASP.NET webservice or generated upon other
> platform? Since the SOAP message does carry the XML data, it does be likely
> a XML deserialization issue. is it possible that you provide a publich
> accessible url , I'd like to perform some test on my side to have a further
> look.
>
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
>
> Delighting our customers is our #1 priority. We welcome your comments and
> suggestions about how we can improve the support we provide to you. Please
> feel free to let my manager know what you think of the level of service
> provided. You can send feedback directly to my manager at:
> (E-Mail Removed).
>
> ==================================================
> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/subscripti...ult.aspx#notif
> ications.
>
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> http://msdn.microsoft.com/subscripti...t/default.aspx.
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> --------------------
>> Date: Thu, 10 Apr 2008 16:06:29 -0400
>> From: VGE <(E-Mail Removed)>
>> User-Agent: Thunderbird 2.0.0.12 (Windows/20080213)
>> MIME-Version: 1.0
>> Subject: XML Deserializing issue

>
>> We are consuming a web service and we receive the following response soap:
>>
>> ResponseCode: 200 (OK)
>> X-SOAP-Server:NuSOAP/0.7.2 (1.6)
>> Keep-Alive:timeout=15, max=100
>> Connection:Keep-Alive
>> Content-Length:1540
>> Content-Type:text/xml; charset=ISO-8859-1
>> Date:Thu, 10 Apr 2008 01:29:51 GMT
>> Server:Apache
>> X-Powered-ByHP/5.2.5
>>
>> <?xml version="1.0" encoding="utf-16"?>
>> <SOAP-ENV:Envelope
>> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
>> xmlnssd="http://www.w3.org/2001/XMLSchema"
>> xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
>> <SOAP-ENV:Body>
>> <getQuoteResponse xmlns="urnngwsdl">
>> <quoteResponse>
>> <pngRequestId>VGE0409200813976API674700055047</pngRequestId>
>> <site>
>> <street>2520 Whitehall Park Dr</street>
>> <city>Charlotte</city>
>> <state>NC</state>
>> <zip>28273</zip>
>> <npa>704</npa>
>> <nxx>555</nxx>
>> </site>
>> <quotes>
>> <item>
>> <quoteId>VGETB00409200813977API021200129473</quoteId>
>> <carrier>Broadwing</carrier>
>> <term>12</term>
>> <expirationDate>2008-05-09</expirationDate>
>> <loopMRC>308</loopMRC>
>> <loopNRC>0</loopNRC>
>> <portMRC>358</portMRC>
>> <portNRC>0</portNRC>
>> </item>
>> <item>
>> <quoteId>VGETB00409200813983API023600182299</quoteId>
>> <carrier>Broadwing</carrier>
>> <term>36</term>
>> <expirationDate>2008-05-09</expirationDate>
>> <loopMRC>272</loopMRC>
>> <loopNRC>0</loopNRC>
>> <portMRC>287</portMRC>
>> <portNRC>0</portNRC>
>> </item>
>> <item>
>> <quoteId>VGETB00409200813982API022400121435</quoteId>
>> <carrier>Broadwing</carrier>
>> <term>24</term>
>> <expirationDate>2008-05-09</expirationDate>
>> <loopMRC>281</loopMRC>
>> <loopNRC>0</loopNRC>
>> <portMRC>310</portMRC>
>> <portNRC>0</portNRC>
>> </item>
>> </quotes>
>> <message>Verizon, Paetec, XO, Qwest failed to return valid
>> pricing or support the service type and bandwidth of this

> request.</message>
>> </quoteResponse>
>> </getQuoteResponse>
>> </SOAP-ENV:Body>
>> </SOAP-ENV:Envelope>
>>
>>
>> However the object as created by the Framework contains all nulls and
>> has the following hierarchy:
>>
>> getQuote
>> Headers
>> Body
>> quoteResponse
>> pngResultId = null
>> site = null
>> siteZ = null
>> quotes = null
>> message = null
>>
>> If I manually deserialize the soap response it creates the object with
>> the above structure except with the appropriate data. How do I fix this
>> so that the object generated by the framework will populate correctly
>> with the data when the response is received?
>>
>> I hope that explains the question.
>>
>> Thanks,
>>
>> Neville Kelly
>> VGE
>>

>

 
Reply With Quote
 
Steven Cheng [MSFT]
Guest
Posts: n/a
 
      04-15-2008
Hi VGE,

Regarding on the the test url you provided. I've visited it and try
generating proxy and consume it. I've used the request sample you provided
and the webservice call did reach the server. However, it report an
authentication error, indicate that I need to supply username/password.

Is there a test account you can provide me for test? If its not that
confidential, you can send it to me offline by the following email:

"stcheng" +"@" + "microsoft.com"

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(E-Mail Removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
>Date: Fri, 11 Apr 2008 15:27:36 -0400
>From: VGE <(E-Mail Removed)>
>User-Agent: Thunderbird 2.0.0.12 (Windows/20080213)
>MIME-Version: 1.0
>Subject: Re: XML Deserializing issue


>
>Here is the url to the web service. And the request input. When adding
>the web service you have to add it as a 2.0 service since 3.0/3.5 will
>not consume it correctly. It was created using NuSoap, that is all I
>know about it since it is not ours we are just trying to consume it.
>
>Url:
>http://ecare.pngcom.com/agentportal2...Quote.php?WSDL
>
>Request Input:
><?xml version="1.0" encoding="utf-16"?>
><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
>xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
>xmlnssd="http://www.w3.org/2001/XMLSchema">
> <soap:Body>
> <getQuote xmlns="urnngwsdl">
> <quoteRequest user="VGE" password="plops" xmlns="">
> <site>
> <street>2520 Whitehall Park Dr</street>
> <city>Charlotte</city>
> <state>NC</state>
> <zip>28273</zip>
> <npa>704</npa>
> <nxx>555</nxx>
> </site>
> <siteZ>
> <street />
> <city />
> <state />
> <zip>0</zip>
> <npa>0</npa>
> <nxx>0</nxx>
> </siteZ>
> <serviceType>Data</serviceType>
> <customId />
> <bandwidth>DS-1</bandwidth>
> </quoteRequest>
> </getQuote>
> </soap:Body>
></soap:Envelope>
>
>Thanks,
>
>Neville Kelly
>VGE
>
>Steven Cheng [MSFT] wrote:
>> Hi Neville,
>>
>> From your description, when consuming one webservice, you found that

your
>> client proxy doesn't correctly populate the properties of the response
>> object, correct?
>>
>> As for the webservice, is it an ASP.NET webservice or generated upon

other
>> platform? Since the SOAP message does carry the XML data, it does be

likely
>> a XML deserialization issue. is it possible that you provide a publich
>> accessible url , I'd like to perform some test on my side to have a

further
>> look.
>>
>> Sincerely,
>>
>> Steven Cheng
>>
>> Microsoft MSDN Online Support Lead
>>
>>
>> Delighting our customers is our #1 priority. We welcome your comments

and
>> suggestions about how we can improve the support we provide to you.

Please
>> feel free to let my manager know what you think of the level of service
>> provided. You can send feedback directly to my manager at:
>> (E-Mail Removed).
>>
>> ==================================================
>> Get notification to my posts through email? Please refer to
>>

http://msdn.microsoft.com/subscripti...ult.aspx#notif
>> ications.
>>
>> Note: The MSDN Managed Newsgroup support offering is for non-urgent

issues
>> where an initial response from the community or a Microsoft Support
>> Engineer within 1 business day is acceptable. Please note that each

follow
>> up response may take approximately 2 business days as the support
>> professional working with you may need further investigation to reach

the
>> most efficient resolution. The offering is not appropriate for

situations
>> that require urgent, real-time or phone-based interactions or complex
>> project analysis and dump analysis issues. Issues of this nature are

best
>> handled working with a dedicated Microsoft Support Engineer by

contacting
>> Microsoft Customer Support Services (CSS) at
>> http://msdn.microsoft.com/subscripti...t/default.aspx.
>> ==================================================
>> This posting is provided "AS IS" with no warranties, and confers no

rights.
>>
>> --------------------
>>> Date: Thu, 10 Apr 2008 16:06:29 -0400
>>> From: VGE <(E-Mail Removed)>
>>> User-Agent: Thunderbird 2.0.0.12 (Windows/20080213)
>>> MIME-Version: 1.0
>>> Subject: XML Deserializing issue

>>
>>> We are consuming a web service and we receive the following response

soap:
>>>
>>> ResponseCode: 200 (OK)
>>> X-SOAP-Server:NuSOAP/0.7.2 (1.6)
>>> Keep-Alive:timeout=15, max=100
>>> Connection:Keep-Alive
>>> Content-Length:1540
>>> Content-Type:text/xml; charset=ISO-8859-1
>>> Date:Thu, 10 Apr 2008 01:29:51 GMT
>>> Server:Apache
>>> X-Powered-ByHP/5.2.5
>>>
>>> <?xml version="1.0" encoding="utf-16"?>
>>> <SOAP-ENV:Envelope
>>> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>>> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
>>> xmlnssd="http://www.w3.org/2001/XMLSchema"
>>> xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
>>> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
>>> <SOAP-ENV:Body>
>>> <getQuoteResponse xmlns="urnngwsdl">
>>> <quoteResponse>
>>> <pngRequestId>VGE0409200813976API674700055047</pngRequestId>
>>> <site>
>>> <street>2520 Whitehall Park Dr</street>
>>> <city>Charlotte</city>
>>> <state>NC</state>
>>> <zip>28273</zip>
>>> <npa>704</npa>
>>> <nxx>555</nxx>
>>> </site>
>>> <quotes>
>>> <item>
>>> <quoteId>VGETB00409200813977API021200129473</quoteId>
>>> <carrier>Broadwing</carrier>
>>> <term>12</term>
>>> <expirationDate>2008-05-09</expirationDate>
>>> <loopMRC>308</loopMRC>
>>> <loopNRC>0</loopNRC>
>>> <portMRC>358</portMRC>
>>> <portNRC>0</portNRC>
>>> </item>
>>> <item>
>>> <quoteId>VGETB00409200813983API023600182299</quoteId>
>>> <carrier>Broadwing</carrier>
>>> <term>36</term>
>>> <expirationDate>2008-05-09</expirationDate>
>>> <loopMRC>272</loopMRC>
>>> <loopNRC>0</loopNRC>
>>> <portMRC>287</portMRC>
>>> <portNRC>0</portNRC>
>>> </item>
>>> <item>
>>> <quoteId>VGETB00409200813982API022400121435</quoteId>
>>> <carrier>Broadwing</carrier>
>>> <term>24</term>
>>> <expirationDate>2008-05-09</expirationDate>
>>> <loopMRC>281</loopMRC>
>>> <loopNRC>0</loopNRC>
>>> <portMRC>310</portMRC>
>>> <portNRC>0</portNRC>
>>> </item>
>>> </quotes>
>>> <message>Verizon, Paetec, XO, Qwest failed to return valid
>>> pricing or support the service type and bandwidth of this

>> request.</message>
>>> </quoteResponse>
>>> </getQuoteResponse>
>>> </SOAP-ENV:Body>
>>> </SOAP-ENV:Envelope>
>>>
>>>
>>> However the object as created by the Framework contains all nulls and
>>> has the following hierarchy:
>>>
>>> getQuote
>>> Headers
>>> Body
>>> quoteResponse
>>> pngResultId = null
>>> site = null
>>> siteZ = null
>>> quotes = null
>>> message = null
>>>
>>> If I manually deserialize the soap response it creates the object with
>>> the above structure except with the appropriate data. How do I fix this
>>> so that the object generated by the framework will populate correctly
>>> with the data when the response is received?
>>>
>>> I hope that explains the question.
>>>
>>> Thanks,
>>>
>>> Neville Kelly
>>> VGE
>>>

>>

>


 
Reply With Quote
 
Steven Cheng [MSFT]
Guest
Posts: n/a
 
      04-16-2008
Hi VGE,

I've got the credentials and have performed some further tests.

Based on more tests(I save the response content into xml file and manually
use Xmlserialzier to deserialize them), I found that the problem is due to
the namespace setting for the classes defined in the auto-generated proxy
file. The response content is as below:

===============
<getQuoteResponse xmlns="urnngwsdl">
<quoteResponse>
<pngRequestId>VGE0416200827251API168700006528</pngRequestId><site><street>25
20 Whitehall Park
.........
============

that means the <quoteResponse> element and its children are all under
"urnngwsdl". However, in the auto-generated proxy classes, it use the
following attributes to decorate the nested child elements of
"quoteResponse" element:

=================
.....................
public partial class quoteResponse {

private string pngRequestIdField;

private site siteField;

private site siteZField;

private quoteArray quotesField;

private string messageField;

/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form =
System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string pngRequestId {
get {
return this.pngRequestIdField;
}
set {
this.pngRequestIdField = value;
}
}

....................
=========================

the [System.Xml.Serialization.XmlElementAttribute(Form =
System.Xml.Schema.XmlSchemaForm.Unqualified)] result the .NET
xmlserializer look for elements that doesn't have a namespace associated
and then fail to deserlize those properties in the children of
"quoteResponse" element.

Currently a quick way to resolve the problem is customize the types in the
generated proxy code. Here is a complete list of the modified properties:

=========================
System.CodeDom.Compiler.GeneratedCodeAttribute("Sy stem.Xml",
"2.0.50727.1433")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("c ode")]
[System.Xml.Serialization.XmlTypeAttribute(Namespac e="urnngwsdl")]
public partial class quoteResponse {

private string pngRequestIdField;

private site siteField;

private site siteZField;

private quoteArray quotesField;

private string messageField;

/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form =
System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "urnngwsdl")]
public string pngRequestId {
get {
return this.pngRequestIdField;
}
set {
this.pngRequestIdField = value;
}
}

/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form =
System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "urnngwsdl")]
public site site {
get {
return this.siteField;
}
set {
this.siteField = value;
}
}

/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form =
System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "urnngwsdl")]
public site siteZ {
get {
return this.siteZField;
}
set {
this.siteZField = value;
}
}

/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form =
System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "urnngwsdl")]
public quoteArray quotes {
get {
return this.quotesField;
}
set {
this.quotesField = value;
}
}

/// <remarks/>

[System.Xml.Serialization.XmlElementAttribute(Form= System.Xml.Schema.XmlSche
maForm.Qualified, Namespace="urnngwsdl")]
public string message {
get {
return this.messageField;
}
set {
this.messageField = value;
}
}
}
===========================

I've tested it and it worked correctly on my side. You can test it to see
whether it works also.

Hope this helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(E-Mail Removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.



--------------------
>From: (E-Mail Removed) (Steven Cheng [MSFT])
>Organization: Microsoft
>Date: Tue, 15 Apr 2008 06:37:09 GMT
>Subject: Re: XML Deserializing issue


>
>Hi VGE,
>
>Regarding on the the test url you provided. I've visited it and try
>generating proxy and consume it. I've used the request sample you provided
>and the webservice call did reach the server. However, it report an
>authentication error, indicate that I need to supply username/password.
>
>Is there a test account you can provide me for test? If its not that
>confidential, you can send it to me offline by the following email:
>
>"stcheng" +"@" + "microsoft.com"
>
>Sincerely,
>
>Steven Cheng
>
>Microsoft MSDN Online Support Lead
>


 
Reply With Quote
 
VGE
Guest
Posts: n/a
 
      04-16-2008
Thank you for the huge help. I was wondering if I wanted to go back to
the vendor in this case and tell them to fix their web service what
would be the best thing to say?

Thanks

Neville Kelly
VGE

Steven Cheng [MSFT] wrote:
> Hi VGE,
>
> I've got the credentials and have performed some further tests.
>
> Based on more tests(I save the response content into xml file and manually
> use Xmlserialzier to deserialize them), I found that the problem is due to
> the namespace setting for the classes defined in the auto-generated proxy
> file. The response content is as below:
>
> ===============
> <getQuoteResponse xmlns="urnngwsdl">
> <quoteResponse>
> <pngRequestId>VGE0416200827251API168700006528</pngRequestId><site><street>25
> 20 Whitehall Park
> ........
> ============
>
> that means the <quoteResponse> element and its children are all under
> "urnngwsdl". However, in the auto-generated proxy classes, it use the
> following attributes to decorate the nested child elements of
> "quoteResponse" element:
>
> =================
> ....................
> public partial class quoteResponse {
>
> private string pngRequestIdField;
>
> private site siteField;
>
> private site siteZField;
>
> private quoteArray quotesField;
>
> private string messageField;
>
> /// <remarks/>
> [System.Xml.Serialization.XmlElementAttribute(Form =
> System.Xml.Schema.XmlSchemaForm.Unqualified)]
> public string pngRequestId {
> get {
> return this.pngRequestIdField;
> }
> set {
> this.pngRequestIdField = value;
> }
> }
>
> ...................
> =========================
>
> the [System.Xml.Serialization.XmlElementAttribute(Form =
> System.Xml.Schema.XmlSchemaForm.Unqualified)] result the .NET
> xmlserializer look for elements that doesn't have a namespace associated
> and then fail to deserlize those properties in the children of
> "quoteResponse" element.
>
> Currently a quick way to resolve the problem is customize the types in the
> generated proxy code. Here is a complete list of the modified properties:
>
> =========================
> System.CodeDom.Compiler.GeneratedCodeAttribute("Sy stem.Xml",
> "2.0.50727.1433")]
> [System.SerializableAttribute()]
> [System.Diagnostics.DebuggerStepThroughAttribute()]
> [System.ComponentModel.DesignerCategoryAttribute("c ode")]
> [System.Xml.Serialization.XmlTypeAttribute(Namespac e="urnngwsdl")]
> public partial class quoteResponse {
>
> private string pngRequestIdField;
>
> private site siteField;
>
> private site siteZField;
>
> private quoteArray quotesField;
>
> private string messageField;
>
> /// <remarks/>
> [System.Xml.Serialization.XmlElementAttribute(Form =
> System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "urnngwsdl")]
> public string pngRequestId {
> get {
> return this.pngRequestIdField;
> }
> set {
> this.pngRequestIdField = value;
> }
> }
>
> /// <remarks/>
> [System.Xml.Serialization.XmlElementAttribute(Form =
> System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "urnngwsdl")]
> public site site {
> get {
> return this.siteField;
> }
> set {
> this.siteField = value;
> }
> }
>
> /// <remarks/>
> [System.Xml.Serialization.XmlElementAttribute(Form =
> System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "urnngwsdl")]
> public site siteZ {
> get {
> return this.siteZField;
> }
> set {
> this.siteZField = value;
> }
> }
>
> /// <remarks/>
> [System.Xml.Serialization.XmlElementAttribute(Form =
> System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "urnngwsdl")]
> public quoteArray quotes {
> get {
> return this.quotesField;
> }
> set {
> this.quotesField = value;
> }
> }
>
> /// <remarks/>
>
> [System.Xml.Serialization.XmlElementAttribute(Form= System.Xml.Schema.XmlSche
> maForm.Qualified, Namespace="urnngwsdl")]
> public string message {
> get {
> return this.messageField;
> }
> set {
> this.messageField = value;
> }
> }
> }
> ===========================
>
> I've tested it and it worked correctly on my side. You can test it to see
> whether it works also.
>
> Hope this helps.
>
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
>
> Delighting our customers is our #1 priority. We welcome your comments and
> suggestions about how we can improve the support we provide to you. Please
> feel free to let my manager know what you think of the level of service
> provided. You can send feedback directly to my manager at:
> (E-Mail Removed).
>
> ==================================================
> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/subscripti...ult.aspx#notif
> ications.
>
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
>
> --------------------
>> From: (E-Mail Removed) (Steven Cheng [MSFT])
>> Organization: Microsoft
>> Date: Tue, 15 Apr 2008 06:37:09 GMT
>> Subject: Re: XML Deserializing issue

>
>> Hi VGE,
>>
>> Regarding on the the test url you provided. I've visited it and try
>> generating proxy and consume it. I've used the request sample you provided
>> and the webservice call did reach the server. However, it report an
>> authentication error, indicate that I need to supply username/password.
>>
>> Is there a test account you can provide me for test? If its not that
>> confidential, you can send it to me offline by the following email:
>>
>> "stcheng" +"@" + "microsoft.com"
>>
>> Sincerely,
>>
>> Steven Cheng
>>
>> Microsoft MSDN Online Support Lead
>>

>

 
Reply With Quote
 
Steven Cheng [MSFT]
Guest
Posts: n/a
 
      04-17-2008
Hi Neville,

Thanks for your reply.

So far I think you do not need to modify the WSDL since the problem here is
also related to the wsdl.exe's code generation. This maybe a particular
case in which the WSDL's type definiation(schema) make the code generation
misunderstand the type's namespace. And it would be time consuming to find
a new scheme style that will make the generation work correctly.
Therefore, I think you can use the workaround mentioned earlier if you need
a quick fix.

Regards,

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(E-Mail Removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
>Date: Wed, 16 Apr 2008 10:54:02 -0400
>From: VGE <(E-Mail Removed)>
>User-Agent: Thunderbird 2.0.0.12 (Windows/20080213)
>MIME-Version: 1.0
>Subject: Re: XML Deserializing issue
>References: <(E-Mail Removed)>

<(E-Mail Removed)> <Ony6ZoAnIHA.5692
>
>Thank you for the huge help. I was wondering if I wanted to go back to
>the vendor in this case and tell them to fix their web service what
>would be the best thing to say?
>
>Thanks
>
>Neville Kelly
>VGE
>
>Steven Cheng [MSFT] wrote:
>> Hi VGE,
>>
>> I've got the credentials and have performed some further tests.
>>
>> Based on more tests(I save the response content into xml file and

manually
>> use Xmlserialzier to deserialize them), I found that the problem is due

to
>> the namespace setting for the classes defined in the auto-generated

proxy
>> file. The response content is as below:
>>
>> ===============
>> <getQuoteResponse xmlns="urnngwsdl">
>> <quoteResponse>
>>

<pngRequestId>VGE0416200827251API168700006528</pngRequestId><site><street>25
>> 20 Whitehall Park
>> ........
>> ============
>>
>> that means the <quoteResponse> element and its children are all under
>> "urnngwsdl". However, in the auto-generated proxy classes, it use the
>> following attributes to decorate the nested child elements of
>> "quoteResponse" element:
>>
>> =================
>> ....................
>> public partial class quoteResponse {
>>
>> private string pngRequestIdField;
>>
>> private site siteField;
>>
>> private site siteZField;
>>
>> private quoteArray quotesField;
>>
>> private string messageField;
>>
>> /// <remarks/>
>> [System.Xml.Serialization.XmlElementAttribute(Form =
>> System.Xml.Schema.XmlSchemaForm.Unqualified)]
>> public string pngRequestId {
>> get {
>> return this.pngRequestIdField;
>> }
>> set {
>> this.pngRequestIdField = value;
>> }
>> }
>>
>> ...................
>> =========================
>>
>> the [System.Xml.Serialization.XmlElementAttribute(Form =
>> System.Xml.Schema.XmlSchemaForm.Unqualified)] result the .NET
>> xmlserializer look for elements that doesn't have a namespace associated
>> and then fail to deserlize those properties in the children of
>> "quoteResponse" element.
>>
>> Currently a quick way to resolve the problem is customize the types in

the
>> generated proxy code. Here is a complete list of the modified properties:
>>
>> =========================
>> System.CodeDom.Compiler.GeneratedCodeAttribute("Sy stem.Xml",
>> "2.0.50727.1433")]
>> [System.SerializableAttribute()]
>> [System.Diagnostics.DebuggerStepThroughAttribute()]
>> [System.ComponentModel.DesignerCategoryAttribute("c ode")]
>> [System.Xml.Serialization.XmlTypeAttribute(Namespac e="urnngwsdl")]
>> public partial class quoteResponse {
>>
>> private string pngRequestIdField;
>>
>> private site siteField;
>>
>> private site siteZField;
>>
>> private quoteArray quotesField;
>>
>> private string messageField;
>>
>> /// <remarks/>
>> [System.Xml.Serialization.XmlElementAttribute(Form =
>> System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "urnngwsdl")]
>> public string pngRequestId {
>> get {
>> return this.pngRequestIdField;
>> }
>> set {
>> this.pngRequestIdField = value;
>> }
>> }
>>
>> /// <remarks/>
>> [System.Xml.Serialization.XmlElementAttribute(Form =
>> System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "urnngwsdl")]
>> public site site {
>> get {
>> return this.siteField;
>> }
>> set {
>> this.siteField = value;
>> }
>> }
>>
>> /// <remarks/>
>> [System.Xml.Serialization.XmlElementAttribute(Form =
>> System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "urnngwsdl")]
>> public site siteZ {
>> get {
>> return this.siteZField;
>> }
>> set {
>> this.siteZField = value;
>> }
>> }
>>
>> /// <remarks/>
>> [System.Xml.Serialization.XmlElementAttribute(Form =
>> System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "urnngwsdl")]
>> public quoteArray quotes {
>> get {
>> return this.quotesField;
>> }
>> set {
>> this.quotesField = value;
>> }
>> }
>>
>> /// <remarks/>
>>
>>

[System.Xml.Serialization.XmlElementAttribute(Form= System.Xml.Schema.XmlSche
>> maForm.Qualified, Namespace="urnngwsdl")]
>> public string message {
>> get {
>> return this.messageField;
>> }
>> set {
>> this.messageField = value;
>> }
>> }
>> }
>> ===========================
>>
>> I've tested it and it worked correctly on my side. You can test it to

see
>> whether it works also.
>>
>> Hope this helps.
>>
>> Sincerely,
>>
>> Steven Cheng
>>
>> Microsoft MSDN Online Support Lead
>>
>>
>> Delighting our customers is our #1 priority. We welcome your comments

and
>> suggestions about how we can improve the support we provide to you.

Please
>> feel free to let my manager know what you think of the level of service
>> provided. You can send feedback directly to my manager at:
>> (E-Mail Removed).
>>
>> ==================================================
>> Get notification to my posts through email? Please refer to
>>

http://msdn.microsoft.com/subscripti...ult.aspx#notif
>> ications.
>>
>> ==================================================
>> This posting is provided "AS IS" with no warranties, and confers no

rights.
>>
>>
>>
>> --------------------
>>> From: (E-Mail Removed) (Steven Cheng [MSFT])
>>> Organization: Microsoft
>>> Date: Tue, 15 Apr 2008 06:37:09 GMT
>>> Subject: Re: XML Deserializing issue

>>
>>> Hi VGE,
>>>
>>> Regarding on the the test url you provided. I've visited it and try
>>> generating proxy and consume it. I've used the request sample you

provided
>>> and the webservice call did reach the server. However, it report an
>>> authentication error, indicate that I need to supply username/password.
>>>
>>> Is there a test account you can provide me for test? If its not that
>>> confidential, you can send it to me offline by the following email:
>>>
>>> "stcheng" +"@" + "microsoft.com"
>>>
>>> Sincerely,
>>>
>>> Steven Cheng
>>>
>>> Microsoft MSDN Online Support Lead
>>>

>>

>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XML Deserializing issue VGE ASP .Net Web Services 1 04-11-2008 04:18 AM
Deserializing AXIS classes from XML files acolomitchi@gmail.com Java 0 06-06-2007 01:55 PM
Problem deserializing XML (I think) from remote SOAP service googlegroups@wirespring.com ASP .Net Web Services 5 12-15-2006 01:25 AM
Problems with deserializing XML Sjaakie ASP .Net 1 07-07-2006 07:54 AM
Re: Deserializing custom ArrayList type from ViewState... help.. PJ ASP .Net 1 06-25-2003 02:39 PM



Advertisments