chow_cheska
asked on
vb.net webservice soap consumer- print response xml
Hello - Well,
I've written a vb.net web service producer and a test consumer.
vs 2005
from the consumer side I have
myResponse = myService.RetrieveInquiryC reateReque st(myReque st)
I would like to - basically - print the response xml string ...
(actually fill a textbox with the xml string)
I can see the values in intellisense - i just want to grab the response's entire outerxml as a string ..?
I've really looked quite a bit out there and can't find much in reference to doing just this ...
I've written a vb.net web service producer and a test consumer.
vs 2005
from the consumer side I have
myResponse = myService.RetrieveInquiryC
I would like to - basically - print the response xml string ...
(actually fill a textbox with the xml string)
I can see the values in intellisense - i just want to grab the response's entire outerxml as a string ..?
I've really looked quite a bit out there and can't find much in reference to doing just this ...
ASKER
ok -
the method:
the method:
<WebMethod()> _
<Description("create a new inquiry investigation instance")> _
Public Function RetrieveInquiryCreateRequest(ByVal request As InquiryCreateRequest) As InquiryCreateResponse
Dim auth As New Authorize
Dim granted As String = auth.check(request.RequestRecordAttributes.qts_service_key, request.RequestRecordAttributes.submitting_app_qtsid)
If granted = "yes" Then
Dim manager As New BusinessProcessManager()
Return manager.RetrieveInquiryCreateRequest(request)
Else
Dim response As New InquiryCreateResponse()
Dim responseattributes As New ResponseRecordAttributes
responseattributes.systype = "fail"
responseattributes.sysmessage = "Submitter Unauthorized"
responseattributes.responseAction = request.ToString
response.ResponseRecordAttributes = responseattributes
Return response
End If
End Function
ASKER
and excerpt from the class
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.3082"), _
System.SerializableAttribute(), _
System.Diagnostics.DebuggerStepThroughAttribute(), _
System.ComponentModel.DesignerCategoryAttribute("code"), _
System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true, [Namespace]:="http://qts.sebank.se/services/")> _
Partial Public Class RetrieveInquiryCreateRequestResponseRetrieveInquiryCreateRequestResult
Private responseRecordAttributesField As RetrieveInquiryCreateRequestResponseRetrieveInquiryCreateRequestResultResponseRecordAttributes
Private inquiryCreateResponseRecordField As RetrieveInquiryCreateRequestResponseRetrieveInquiryCreateRequestResultInquiryCreateResponseRecord
'''<remarks/>
Public Property ResponseRecordAttributes() As RetrieveInquiryCreateRequestResponseRetrieveInquiryCreateRequestResultResponseRecordAttributes
Get
Return Me.responseRecordAttributesField
End Get
Set
Me.responseRecordAttributesField = value
End Set
End Property
YOur response is a InquiryCreateResponse type.
Can I have excerpt from InquiryCreateResponse class?
And also what part of this class you want to recover as string.
Can I have excerpt from InquiryCreateResponse class?
And also what part of this class you want to recover as string.
ASKER
and the class itself:
Reference.vb
Reference.vb
ASKER
didn't notice you had replied before mine ...
in essence there are 4 requests and 4 responses
i want to string out all the responses ...
each response has an attribures object and a record object (except ~list which has an item instead of record)
xml examples from the webservice:
in essence there are 4 requests and 4 responses
i want to string out all the responses ...
each response has an attribures object and a record object (except ~list which has an item instead of record)
xml examples from the webservice:
SOAP 1.1
The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.
POST /QTS/services/QtsService.asmx HTTP/1.1
Host: localhost
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://qts.sebank.se/services/RetrieveInquiryCreateRequest"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<RetrieveInquiryCreateRequest xmlns="http://qts.sebank.se/services/">
<request>
<RequestRecordAttributes qts_service_key="string" submitting_app_qtsid="string" requestAction="string" send_date="string" policy="string" config="string" />
<InquiryCreateRecord>
<country>bytes</country>
<category>string</category>
<type>string</type>
<title>string</title>
<comments>string</comments>
<ext_clientpty_id>string</ext_clientpty_id>
<ext_clientpty_name>string</ext_clientpty_name>
<ext_user_id>string</ext_user_id>
<ext_user_name>string</ext_user_name>
<email>string</email>
<phone_nr>string</phone_nr>
<int_user_id>string</int_user_id>
</InquiryCreateRecord>
</request>
</RetrieveInquiryCreateRequest>
</soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<RetrieveInquiryCreateRequestResponse xmlns="http://qts.sebank.se/services/">
<RetrieveInquiryCreateRequestResult>
<ResponseRecordAttributes systype="string" sysmessage="string" responseAction="string" />
<InquiryCreateResponseRecord>
<qts_incident_id>string</qts_incident_id>
<acknowledge>bytes</acknowledge>
</InquiryCreateResponseRecord>
</RetrieveInquiryCreateRequestResult>
</RetrieveInquiryCreateRequestResponse>
</soap:Body>
</soap:Envelope>
SOAP 1.2
The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.
POST /QTS/services/QtsService.asmx HTTP/1.1
Host: localhost
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<RetrieveInquiryCreateRequest xmlns="http://qts.sebank.se/services/">
<request>
<RequestRecordAttributes qts_service_key="string" submitting_app_qtsid="string" requestAction="string" send_date="string" policy="string" config="string" />
<InquiryCreateRecord>
<country>bytes</country>
<category>string</category>
<type>string</type>
<title>string</title>
<comments>string</comments>
<ext_clientpty_id>string</ext_clientpty_id>
<ext_clientpty_name>string</ext_clientpty_name>
<ext_user_id>string</ext_user_id>
<ext_user_name>string</ext_user_name>
<email>string</email>
<phone_nr>string</phone_nr>
<int_user_id>string</int_user_id>
</InquiryCreateRecord>
</request>
</RetrieveInquiryCreateRequest>
</soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<RetrieveInquiryCreateRequestResponse xmlns="http://qts.sebank.se/services/">
<RetrieveInquiryCreateRequestResult>
<ResponseRecordAttributes systype="string" sysmessage="string" responseAction="string" />
<InquiryCreateResponseRecord>
<qts_incident_id>string</qts_incident_id>
<acknowledge>bytes</acknowledge>
</InquiryCreateResponseRecord>
</RetrieveInquiryCreateRequestResult>
</RetrieveInquiryCreateRequestResponse>
</soap12:Body>
</soap12:Envelope>
ASKER
the 'most complex' of the responses:
(~item has minoccur=0 and maxoccur=unbounded)
(~item has minoccur=0 and maxoccur=unbounded)
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<RetrieveIndividualUpdateListResponse xmlns="http://qts.sebank.se/services/">
<RetrieveIndividualUpdateListResult>
<ResponseRecordAttributes systype="string" sysmessage="string" responseAction="string" />
<IndividualUpdateListResponseItem>
<qts_incident_id>string</qts_incident_id>
<qts_message_id>string</qts_message_id>
<title>string</title>
<log_date>string</log_date>
<isOriginal>bytes</isOriginal>
<direction>bytes</direction>
</IndividualUpdateListResponseItem>
<IndividualUpdateListResponseItem>
<qts_incident_id>string</qts_incident_id>
<qts_message_id>string</qts_message_id>
<title>string</title>
<log_date>string</log_date>
<isOriginal>bytes</isOriginal>
<direction>bytes</direction>
</IndividualUpdateListResponseItem>
</RetrieveIndividualUpdateListResult>
</RetrieveIndividualUpdateListResponse>
</soap:Body>
</soap:Envelope>
ASKER
i can't seem to screen capture the intellisense ... you have a trick to do that?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanx LearnedOne!
I do very much appreciate it!
it makes it so much easier to trace and debug with the consumer team when you can see what the result actually is ...
/Nick
I do very much appreciate it!
it makes it so much easier to trace and debug with the consumer team when you can see what the result actually is ...
/Nick
ASKER
thanx!
Is it an XmlElement object?
and if you can post a screen shot of the intellisense values and what values are expecting on the string will be great