Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > .NET Consumer sending SOAP request to a Web Serivce on Axis/Apache returns only the first tag

Reply
Thread Tools

.NET Consumer sending SOAP request to a Web Serivce on Axis/Apache returns only the first tag

 
 
Daniel Lee
Guest
Posts: n/a
 
      06-29-2004
If I hit the web service hosted on Axis/Apache server from .NET by the
usual route; get WSDL, create proxy, call from a ASP.NET.

A method of the WS is supposed to return a XML with data, however, the
string the Web Method is returning is only the value of first element
<HRMErrorText> in the SOAP response.

However, if I hit the WS using a standalone tool that can send SOAP
request, it returns all the data correctly.

What is going on? Please help. I am getting frustrated~~

Thanks in advance!
================================================== ====
WSDL of WS:
================================================== ====
<?xml version="1.0" ?>

<definitions
targetNamespace="urnegaRULES:SOAP:ToolkitWebServ ices:TestMethods"
xmlns:tns="urnegaRULES:SOAP:ToolkitWebServices:T estMethods"
xmlnssd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns="http://schemas.xmlsoap.org/wsdl/">

<message name="GetPartyAdditionalInfo">
<part name="usrName" type="xsd:string"/>
<part name="usrPass" type="xsd:string"/>
<part name="clientID1" type="xsd:string"/>
<part name="clientID2" type="xsd:string"/>
<part name="firstName" type="xsd:string"/>
<part name="lastName" type="xsd:string"/>
<part name="partyRoleCat" type="xsd:string"/>
<part name="returnPrefs" type="xsd:string"/>
</message>

<message name="GetPartyAdditionalInfoResponse">
<part name="TestResult" type="xsdage"/>
</message>

<message name="SearchEBOB">
<part name="usrName" type="xsd:string"/>
<part name="usrPass" type="xsd:string"/>
<part name="clientID1" type="xsd:string"/>
<part name="clientID2" type="xsd:string"/>
<part name="firstName" type="xsd:string"/>
<part name="lastName" type="xsd:string"/>
<part name="partyRoleCat" type="xsd:string"/>
<part name="returnPrefs" type="xsd:string"/>
</message>

<message name="SearchEBOBResponse">
<part name="TestResult" type="xsdage"/>
</message>

<portType name="TestMethodsType">
<operation name="GetPartyAdditionalInfo">
<input message="tns:GetPartyAdditionalInfo"/>
<output message="tns:GetPartyAdditionalInfoResponse"/>
</operation>
<operation name="SearchEBOB">
<input message="tns:SearchEBOB"/>
<output message="tns:SearchEBOBResponse"/>
</operation>
</portType>

<binding name="TestMethodsBinding" type="tns:TestMethodsType">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="GetPartyAdditionalInfo">
<soapperation style="rpc"
soapAction="urnegaRULES:SOAP:ToolkitWebServices: TestMethods#GetPartyAd
ditionalInfo"/>
<input>
<soap:body use="encoded"
namespace="urnegaRULES:SOAP:ToolkitWebServices:T estMethods"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body use="encoded"
namespace="urnegaRULES:SOAP:ToolkitWebServices:T estMethods"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
<operation name="SearchEBOB">
<soapperation style="rpc"
soapAction="urnegaRULES:SOAP:ToolkitWebServices: TestMethods#SearchEBOB
"/>
<input>
<soap:body use="encoded"
namespace="urnegaRULES:SOAP:ToolkitWebServices:T estMethods"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body use="encoded"
namespace="urnegaRULES:SOAP:ToolkitWebServices:T estMethods"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
</binding>

<service name="TestMethodsService">
<port name="TestMethodsPort" binding="tns:TestMethodsBinding">
<soap:address
location="http://z0001-app0379-s:8080/prweb/PRSOAPServlet"/>
</port>
</service>

</definitions>

================================================== ========
THIS IS WHAT WS IS RETUNING WHEN USING XMLSPY TO SEND SOAP REQUET
================================================== ========

<?xml version="1.0"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
xmlnssd="http://www.w3.org/2001/XMLSchema"
xmlns:ns="urnegaRULES:SOAP:ToolkitWebServices:Te stMethods">
<SOAP-ENV:Body>
<ns:SearchEBOBResponse
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<TestResult>
<HRMErrorText>
</HRMErrorText>
<eBOBSearchResults>
<rowdata>
<ClientID2>88</ClientID2>
<Gender>M</Gender>
<State>MO </State>
<FirstName>ALLEN</FirstName>
<CityName>O FALLON </CityName>
<ClientID1>1234567</ClientID1>
<Zip>633661944 </Zip>
<Role>1</Role>
<LastName>TEST</LastName>
<Birthdate>1977-05-21</Birthdate>
</rowdata>
</eBOBSearchResults>
<HRMReturnCode> </HRMReturnCode>
</TestResult>
</ns:SearchEBOBResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
 
Dino Chiesa [Microsoft]
Guest
Posts: n/a
 
      06-30-2004
you did not show us what is being sent in either case, and you did not show
us what is being returned in the case where you use "the usual route".

Can you get a wire trace of the request and response, in both cases?

For this you can try Simon Fell's proxytrace - a free d/l from
http://www.pocketsoap.com/tcptrace/pt.aspx ; to use this you will have to
set the Proxy property on your webservice client-side stub. Set it to
http://localhost:3128 or whatever port you run proxytrace on. You may
also have to set the Url of the client-side stub, too, so that it is not
"localhost" (localhost requests will not pass through the proxy)
eg
ws.Proxy = new System.Net.WebProxy("http://localhost:3128/");
ws.Url = "http://z0001-app0379-s:8080/prweb/PRSOAPServlet" ;


There is also a new tool called Fiddler which works similarly.
http://www.bayden.com/Fiddler/version.asp


-D


"Daniel Lee" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> If I hit the web service hosted on Axis/Apache server from .NET by the
> usual route; get WSDL, create proxy, call from a ASP.NET.
>
> A method of the WS is supposed to return a XML with data, however, the
> string the Web Method is returning is only the value of first element
> <HRMErrorText> in the SOAP response.
>
> However, if I hit the WS using a standalone tool that can send SOAP
> request, it returns all the data correctly.
>
> What is going on? Please help. I am getting frustrated~~
>
> Thanks in advance!
> ================================================== ====
> WSDL of WS:
> ================================================== ====
> <?xml version="1.0" ?>
>
> <definitions
> targetNamespace="urnegaRULES:SOAP:ToolkitWebServ ices:TestMethods"
> xmlns:tns="urnegaRULES:SOAP:ToolkitWebServices:T estMethods"
> xmlnssd="http://www.w3.org/2001/XMLSchema"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns="http://schemas.xmlsoap.org/wsdl/">
>
> <message name="GetPartyAdditionalInfo">
> <part name="usrName" type="xsd:string"/>
> <part name="usrPass" type="xsd:string"/>
> <part name="clientID1" type="xsd:string"/>
> <part name="clientID2" type="xsd:string"/>
> <part name="firstName" type="xsd:string"/>
> <part name="lastName" type="xsd:string"/>
> <part name="partyRoleCat" type="xsd:string"/>
> <part name="returnPrefs" type="xsd:string"/>
> </message>
>
> <message name="GetPartyAdditionalInfoResponse">
> <part name="TestResult" type="xsdage"/>
> </message>
>
> <message name="SearchEBOB">
> <part name="usrName" type="xsd:string"/>
> <part name="usrPass" type="xsd:string"/>
> <part name="clientID1" type="xsd:string"/>
> <part name="clientID2" type="xsd:string"/>
> <part name="firstName" type="xsd:string"/>
> <part name="lastName" type="xsd:string"/>
> <part name="partyRoleCat" type="xsd:string"/>
> <part name="returnPrefs" type="xsd:string"/>
> </message>
>
> <message name="SearchEBOBResponse">
> <part name="TestResult" type="xsdage"/>
> </message>
>
> <portType name="TestMethodsType">
> <operation name="GetPartyAdditionalInfo">
> <input message="tns:GetPartyAdditionalInfo"/>
> <output message="tns:GetPartyAdditionalInfoResponse"/>
> </operation>
> <operation name="SearchEBOB">
> <input message="tns:SearchEBOB"/>
> <output message="tns:SearchEBOBResponse"/>
> </operation>
> </portType>
>
> <binding name="TestMethodsBinding" type="tns:TestMethodsType">
> <soap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http"/>
> <operation name="GetPartyAdditionalInfo">
> <soapperation style="rpc"
> soapAction="urnegaRULES:SOAP:ToolkitWebServices: TestMethods#GetPartyAd
> ditionalInfo"/>
> <input>
> <soap:body use="encoded"
> namespace="urnegaRULES:SOAP:ToolkitWebServices:T estMethods"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> </input>
> <output>
> <soap:body use="encoded"
> namespace="urnegaRULES:SOAP:ToolkitWebServices:T estMethods"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> </output>
> </operation>
> <operation name="SearchEBOB">
> <soapperation style="rpc"
> soapAction="urnegaRULES:SOAP:ToolkitWebServices: TestMethods#SearchEBOB
> "/>
> <input>
> <soap:body use="encoded"
> namespace="urnegaRULES:SOAP:ToolkitWebServices:T estMethods"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> </input>
> <output>
> <soap:body use="encoded"
> namespace="urnegaRULES:SOAP:ToolkitWebServices:T estMethods"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> </output>
> </operation>
> </binding>
>
> <service name="TestMethodsService">
> <port name="TestMethodsPort" binding="tns:TestMethodsBinding">
> <soap:address
> location="http://z0001-app0379-s:8080/prweb/PRSOAPServlet"/>
> </port>
> </service>
>
> </definitions>
>
> ================================================== ========
> THIS IS WHAT WS IS RETUNING WHEN USING XMLSPY TO SEND SOAP REQUET
> ================================================== ========
>
> <?xml version="1.0"?>
> <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
> xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
> xmlnssd="http://www.w3.org/2001/XMLSchema"
> xmlns:ns="urnegaRULES:SOAP:ToolkitWebServices:Te stMethods">
> <SOAP-ENV:Body>
> <ns:SearchEBOBResponse
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> <TestResult>
> <HRMErrorText>
> </HRMErrorText>
> <eBOBSearchResults>
> <rowdata>
> <ClientID2>88</ClientID2>
> <Gender>M</Gender>
> <State>MO </State>
> <FirstName>ALLEN</FirstName>
> <CityName>O FALLON </CityName>
> <ClientID1>1234567</ClientID1>
> <Zip>633661944 </Zip>
> <Role>1</Role>
> <LastName>TEST</LastName>
> <Birthdate>1977-05-21</Birthdate>
> </rowdata>
> </eBOBSearchResults>
> <HRMReturnCode> </HRMReturnCode>
> </TestResult>
> </ns:SearchEBOBResponse>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
>
> *** Sent via Devdex http://www.devdex.com ***
> Don't just participate in USENET...get rewarded for it!



 
Reply With Quote
 
 
 
 
D. Lee
Guest
Posts: n/a
 
      06-30-2004
Thanks for introducing me the ProxyTrace!

Ok, this is what I have found. Per ProxyTrace, I can see the
SOAPRequest and also the SOAPResponse which contains data (in XML) I
want. Both SOAP messages are below. Now, it's .NET part somehow XML
data is not being relayed back to the code. I am suspecting I must be
doing something wrong handling or deserializing the returned data.

(!!!!) Another thing I noticed was that the text of SOAPResponse I
copied from the ProxtTrace's window and pasted to Notepad (or XMLSPY),
contains abnormal space character. This actually causes XMLSPY to error
out while validating the XML format. I manually have to replace them
with space. Might that be causing the problem in .NET???

Anyways, as u can see below, <HRMErrorText> is the first tag under
<TestResult>. The string returned from the WebMethod call (searchEBOB)
only returns the VALUE of the element. Since the tag is supposed to be
blank, I get only blank string displayed. This is confirmed by the
error message displayed if I pass wrong ID or value in one of the
parameters.

Please~ please take a look the code and SOAP messages down here.

THANKS IN ADVANCE

==============================
SOAP REQUEST MESSAGE
==============================
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="urnegaRULES:SOAP:ToolkitWebServices:T estMethods"
xmlns:types="urnegaRULES:SOAP:ToolkitWebServices :TestMethods/encodedTy
pes" xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
xmlnssd="http://www.w3.org/2001/XMLSchema">
<soap:Body
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<tns:SearchEBOB>
<usrName xsi:type="xsd:string">(E-Mail Removed)</usrName>
<usrPass xsi:type="xsd:string">geneva</usrPass>
<clientID1 xsi:type="xsd:string">1234567</clientID1>
<clientID2 xsi:type="xsd:string">50</clientID2>
<firstName xsi:type="xsd:string"/>
<lastName xsi:type="xsd:string">B*</lastName>
<partyRoleCat xsi:type="xsd:string">C</partyRoleCat>
<returnPrefs xsi:type="xsd:string">Y</returnPrefs>
</tns:SearchEBOB>
</soap:Body>
</soap:Envelope>

==============================
SOAP RESPONSE MESSAGE
==============================
HTTP/1.1 200 OK
Set-Cookie: Pega-RULES=AF5A3C013623; Path=/
Content-Type: text/xml;charset=UTF-8
Content-Length: 5502
Date: Wed, 30 Jun 2004 13:41:47 GMT
Server: Apache Coyote/1.0

<?xml version="1.0"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
xmlnssd="http://www.w3.org/2001/XMLSchema"
xmlns:ns="urnegaRULES:SOAP:ToolkitWebServices:Te stMethods">
<SOAP-ENV:Body>
<ns:SearchEBOBResponse
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<TestResult>
<HRMErrorText>
</HRMErrorText>
<eBOBSearchResults>
<rowdata>
<ClientID2>88</ClientID2>
<Gender>M</Gender>
<State>MO </State>
<FirstName>ALLEN</FirstName>
<CityName>O FALLON </CityName>
<ClientID1>6436w</ClientID1>
<Zip>63360 </Zip>
<Role>1</Role>
<LastName>BACHER</LastName>
<Birthdate>1966-05-21</Birthdate>
</rowdata>
</eBOBSearchResults>
<HRMReturnCode> </HRMReturnCode>
</TestResult>
</ns:SearchEBOBResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

=======================================
.NET CODE - PROXY CODE
=======================================
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("c ode")]
[System.Web.Services.WebServiceBindingAttribute(Nam e="TestMethodsBinding
", Namespace="urnegaRULES:SOAP:ToolkitWebServices:T estMethods")]
public class TestMethodsService :
System.Web.Services.Protocols.SoapHttpClientProtoc ol {

/// <remarks/>
public TestMethodsService() {
this.Proxy = new System.Net.WebProxy("http://localhost:3128/");
this.Url = "http://z0001-app0379-s:8080/prweb/PRSOAPServlet";
}

/// <remarks/>

[System.Web.Services.Protocols.SoapRpcMethodAttribu te("urnegaRULES:SOA
P:ToolkitWebServices:TestMethods#GetPartyAdditiona lInfo",
RequestNamespace="urnegaRULES:SOAP:ToolkitWebSer vices:TestMethods",
ResponseNamespace="urnegaRULES:SOAP:ToolkitWebSe rvices:TestMethods")]
[return:
System.Xml.Serialization.SoapElementAttribute("Tes tResult")]
public string GetPartyAdditionalInfo(string usrName, string usrPass,
string clientID1, string clientID2, string firstName, string lastName,
string partyRoleCat, string returnPrefs) {
object[] results = this.Invoke("GetPartyAdditionalInfo", new
object[] {
usrName,
usrPass,
clientID1,
clientID2,
firstName,
lastName,
partyRoleCat,
returnPrefs});
return ((string)(results[0]));
}

//--- THIS IS WHAT WSDL.EXE CREATED.


=======================================
.NET CODE - DISPLAYING
=======================================
sTmp = oWS.SearchEBOB
("(E-Mail Removed)","geneva","1234567","50","","B*" ,"C","Y");

txReturn.Text =sTmp;

//--- THIS DISPLAYS THE CONTENT OF THE FIRST TAG <HRMErrorText> OF
RETURNED XML SOAPRESPONSE. FOR NORMAL CASE, THE TAG IS ALWAYS BLANK
STRING. THEREFORE ALL I SEE ON THE TEXT BOX ON WEBFORM IS BLANK STRING.

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
Dino Chiesa [Microsoft]
Guest
Posts: n/a
 
      07-01-2004

"D. Lee" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Thanks for introducing me the ProxyTrace!
>
> Ok, this is what I have found. Per ProxyTrace, I can see the
> SOAPRequest and also the SOAPResponse which contains data (in XML) I
> want. Both SOAP messages are below. Now, it's .NET part somehow XML
> data is not being relayed back to the code. I am suspecting I must be
> doing something wrong handling or deserializing the returned data.
>


Yes, something is not right.

1.
The WSDL says you are returning a string, when in fact the return data
contains valid (not escaped) XML.

The response contains
<HRMErrorText>
</HRMErrorText>
<eBOBSearchResults>
lots of other stuff
</eBOBSearchResults>

(including the newlines).

But the WSDL says "it's a string". So the WSDL does not agree with the
actual implementation. You have something broken there.

2.
I don't know what you mean by "abnormal space character". You didn't say
where this occurs, exactly.

3.
You have said that the return string apparently contains the Text value of
the <HRMErrorText> element. Are you sure about this?
Can you double check this for me? Run it through a debugger and examine
sTmp before dumping it into a textbox?
In both the error case and the normal case?

-D



> (!!!!) Another thing I noticed was that the text of SOAPResponse I
> copied from the ProxtTrace's window and pasted to Notepad (or XMLSPY),
> contains abnormal space character. This actually causes XMLSPY to error
> out while validating the XML format. I manually have to replace them
> with space. Might that be causing the problem in .NET???
>
> Anyways, as u can see below, <HRMErrorText> is the first tag under
> <TestResult>. The string returned from the WebMethod call (searchEBOB)
> only returns the VALUE of the element. Since the tag is supposed to be
> blank, I get only blank string displayed. This is confirmed by the
> error message displayed if I pass wrong ID or value in one of the
> parameters.
>
> Please~ please take a look the code and SOAP messages down here.
>
> THANKS IN ADVANCE
>
> ==============================
> SOAP REQUEST MESSAGE
> ==============================
> <?xml version="1.0" encoding="utf-8"?>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:tns="urnegaRULES:SOAP:ToolkitWebServices:T estMethods"
> xmlns:types="urnegaRULES:SOAP:ToolkitWebServices :TestMethods/encodedTy
> pes" xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
> xmlnssd="http://www.w3.org/2001/XMLSchema">
> <soap:Body
> soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> <tns:SearchEBOB>
> <usrName xsi:type="xsd:string">(E-Mail Removed)</usrName>
> <usrPass xsi:type="xsd:string">geneva</usrPass>
> <clientID1 xsi:type="xsd:string">1234567</clientID1>
> <clientID2 xsi:type="xsd:string">50</clientID2>
> <firstName xsi:type="xsd:string"/>
> <lastName xsi:type="xsd:string">B*</lastName>
> <partyRoleCat xsi:type="xsd:string">C</partyRoleCat>
> <returnPrefs xsi:type="xsd:string">Y</returnPrefs>
> </tns:SearchEBOB>
> </soap:Body>
> </soap:Envelope>
>
> ==============================
> SOAP RESPONSE MESSAGE
> ==============================
> HTTP/1.1 200 OK
> Set-Cookie: Pega-RULES=AF5A3C013623; Path=/
> Content-Type: text/xml;charset=UTF-8
> Content-Length: 5502
> Date: Wed, 30 Jun 2004 13:41:47 GMT
> Server: Apache Coyote/1.0
>
> <?xml version="1.0"?>
> <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
> xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
> xmlnssd="http://www.w3.org/2001/XMLSchema"
> xmlns:ns="urnegaRULES:SOAP:ToolkitWebServices:Te stMethods">
> <SOAP-ENV:Body>
> <ns:SearchEBOBResponse
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> <TestResult>
> <HRMErrorText>
> </HRMErrorText>
> <eBOBSearchResults>
> <rowdata>
> <ClientID2>88</ClientID2>
> <Gender>M</Gender>
> <State>MO </State>
> <FirstName>ALLEN</FirstName>
> <CityName>O FALLON </CityName>
> <ClientID1>6436w</ClientID1>
> <Zip>63360 </Zip>
> <Role>1</Role>
> <LastName>BACHER</LastName>
> <Birthdate>1966-05-21</Birthdate>
> </rowdata>
> </eBOBSearchResults>
> <HRMReturnCode> </HRMReturnCode>
> </TestResult>
> </ns:SearchEBOBResponse>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
> =======================================
> NET CODE - PROXY CODE
> =======================================
> [System.Diagnostics.DebuggerStepThroughAttribute()]
> [System.ComponentModel.DesignerCategoryAttribute("c ode")]
> [System.Web.Services.WebServiceBindingAttribute(Nam e="TestMethodsBinding
> ", Namespace="urnegaRULES:SOAP:ToolkitWebServices:T estMethods")]
> public class TestMethodsService :
> System.Web.Services.Protocols.SoapHttpClientProtoc ol {
>
> /// <remarks/>
> public TestMethodsService() {
> this.Proxy = new System.Net.WebProxy("http://localhost:3128/");
> this.Url = "http://z0001-app0379-s:8080/prweb/PRSOAPServlet";
> }
>
> /// <remarks/>
>
> [System.Web.Services.Protocols.SoapRpcMethodAttribu te("urnegaRULES:SOA
> P:ToolkitWebServices:TestMethods#GetPartyAdditiona lInfo",
> RequestNamespace="urnegaRULES:SOAP:ToolkitWebSer vices:TestMethods",
> ResponseNamespace="urnegaRULES:SOAP:ToolkitWebSe rvices:TestMethods")]
> [return:
> System.Xml.Serialization.SoapElementAttribute("Tes tResult")]
> public string GetPartyAdditionalInfo(string usrName, string usrPass,
> string clientID1, string clientID2, string firstName, string lastName,
> string partyRoleCat, string returnPrefs) {
> object[] results = this.Invoke("GetPartyAdditionalInfo", new
> object[] {
> usrName,
> usrPass,
> clientID1,
> clientID2,
> firstName,
> lastName,
> partyRoleCat,
> returnPrefs});
> return ((string)(results[0]));
> }
>
> //--- THIS IS WHAT WSDL.EXE CREATED.
>
>
> =======================================
> NET CODE - DISPLAYING
> =======================================
> sTmp = oWS.SearchEBOB
> ("(E-Mail Removed)","geneva","1234567","50","","B*" ,"C","Y");
>
> txReturn.Text =sTmp;
>
> //--- THIS DISPLAYS THE CONTENT OF THE FIRST TAG <HRMErrorText> OF
> RETURNED XML SOAPRESPONSE. FOR NORMAL CASE, THE TAG IS ALWAYS BLANK
> STRING. THEREFORE ALL I SEE ON THE TEXT BOX ON WEBFORM IS BLANK STRING.
>
> *** Sent via Devdex http://www.devdex.com ***
> Don't just participate in USENET...get rewarded for it!



 
Reply With Quote
 
D. Lee
Guest
Posts: n/a
 
      07-02-2004
Ok, let me ask you this way.

The .NET client is successfully displaying if the returned XML from the
SOAP call looks like this.
=================================================
SOAP Response
=================================================
<?xml version="1.0"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
xmlnssd="http://www.w3.org/2001/XMLSchema"
xmlns:ns="urnegaRULES:dotNet:TestDotNet:TestSear ch">
<SOAP-ENV:Body>
<ns:SearchDotNetResponse
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<DotNetResults>
<HRMErrorText>WKFSU14 0120-EDIT-PARMS INTRNT USER ID
OR PARTY-ID REQUIRED </HRMErrorText>
</DotNetResults>
</ns:SearchDotNetResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
================================================== =

With this coming back from the web service, the .NET client is picking
the TEXT of <HRMErrorText> element and display to a text box on a web
form.

However, now, if the returning SOAP looks like this, the .NET client
errors out. This time there is meaningful data returning in a new tag
<GetPartyResults> and <HRMErrorText> is pushed to bottom.

What does this mean? Is there something SOAP response to cause the .NET
client to error out while deserializing or parsing the SOAP envelope?
Some sort of name space or schema related issue????

Please~~ Help me ~~~ !!!

================================================== =
SOAP Response that errors .NET client out
================================================== =
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
xmlnssd="http://www.w3.org/2001/XMLSchema"
xmlns:ns="urnegaRULES:dotNet:TestDotNet:TestSear ch">
<SOAP-ENV:Body>
<ns:SearchDotNetResponse
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<DotNetResults>
<GetPartyResults>
<EmailAddress>(E-Mail Removed)
</EmailAddress>
<Gender>M</Gender>
<State>UT</State>
<Zip>843329434</Zip>
<ProductList>Personal Umbrella, Homeowners, Auto,
Life</ProductList>
<ClientStatusType>Customer</ClientStatusType>
<PhoneNumber>4444433</PhoneNumber>
<CityName>PROVIDENCE</CityName>
<FirstName>GERALD</FirstName>
<AddressLine1>545 SPRING CREEK RD</AddressLine1>
<PhoneAreaCode>435 </PhoneAreaCode>
<LastName>DAY</LastName>
</GetPartyResults>
<HRMErrorText>
</HRMErrorText>
</DotNetResults>
</ns:SearchDotNetResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


================================================== ==
..NET Client Error Message
================================================== ==
Server Error in '/WS_Test' Application.
------------------------------------------------------------------------
--------

'Text' is an invalid node type. Line 10, position 47.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Xml.XmlException: 'Text' is an invalid node
type. Line 10, position 47.

Source Error:


Line 36: [return:
System.Xml.Serialization.SoapElementAttribute("Dot NetResults")]
Line 37: public string SearchDotNet(string usrName, string usrPass,
string clientID1, string clientID2) {
Line 38: object[] results = this.Invoke("SearchDotNet", new
object[] {
Line 39: usrName,
Line 40: usrPass,


Source File: c:\inetpub\wwwroot\ws_test\newdotnet.cs Line: 38

Stack Trace:


[XmlException: 'Text' is an invalid node type. Line 10, position 47.]
System.Xml.XmlReader.ReadEndElement()
System.Xml.Serialization.XmlSerializationReader.Re adEndElement()
System.Xml.Serialization.XmlSerializationReader.Re adStringValue()

System.Xml.Serialization.XmlSerializationReader.Re adTypedPrimitive(XmlQu
alifiedName type, Boolean elementCanBeType)

System.Xml.Serialization.XmlSerializationReader.Re adReferencingElement(S
tring name, String ns, Boolean elementCanBeType, String& fixupReference)

System.Xml.Serialization.XmlSerializationReader.Re adReferencingElement(S
tring name, String ns, String& fixupReference)

Microsoft.Xml.Serialization.GeneratedAssembly.XmlS erializationReader1.Re
ad3_SearchDotNetResponse()

[InvalidOperationException: There is an error in XML document (10, 47).]
System.Xml.Serialization.XmlSerializer.Deserialize (XmlReader
xmlReader, String encodingStyle)
System.Xml.Serialization.XmlSerializer.Deserialize (XmlReader
xmlReader)

System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(SoapCl
ientMessage message, WebResponse response, Stream responseStream,
Boolean asyncCall)
System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)
TestSearchService.SearchDotNet(String usrName, String usrPass, String
clientID1, String clientID2) in
c:\inetpub\wwwroot\ws_test\newdotnet.cs:38
WS_Test.WebForm1.Button1_Click(Object sender, EventArgs e) in
c:\inetpub\wwwroot\ws_test\webform1.aspx.cs:60
System.Web.UI.WebControls.Button.OnClick(EventArgs e)

System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.Rai
sePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
System.Web.UI.Page.ProcessRequestMain()


*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
D. Lee
Guest
Posts: n/a
 
      07-02-2004
Hi Dino,

Thanks so much for your response!

Ok, I wanted to add answers to your questions here on top of the posting
I just made.

To answer your question,

#1. Yes... something is not right with the WSDL, right? In wsdl, the
response type is "xsdage". This is not how it is supposed to be if
the returning data is a well-formed XML, right? So with this, can I
assume the WSDL generated by the Web Service is the cause of this?
<message name="SearchEBOBResponse">
<part name="EBOBResults" type="xsdage" />
</message>

#2. Well, plz ignore about this for now.

#3. Yes I am 100% positive on this. And this is explained further with
response samples in the posting I just made right before this.

If you could help me on this, I would greatly greatly appreciate. Once
this is resolved, I'd study deep in WSDL and Schema...

LOTS LOTS OF THANKS IN ADVANCE
-D.Lee

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 
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
WCF: why both <serivce> and <client> tag defines endpoint? Ryan Liu ASP .Net 1 08-01-2010 06:08 AM
TV listing XML serivce Carmen Sei XML 4 03-17-2008 01:18 PM
how do u invoke Tag b's Tag Handler from within Tag a's tag Handler? shruds Java 1 01-27-2006 03:00 AM
What is a simple way to get the raw SOAP Request/Envelope that I am sending to a web service Chris Hayes ASP .Net Web Services 1 05-31-2005 11:00 PM
MS has outsourced their customer serivce? TBone MCSE 42 09-10-2004 07:56 PM



Advertisments