Re: How to resolve SOAP differences
- From: "Stefan Misch" <stefan.misch@xxxxxxxxxxxxxxxxx>
- Date: Tue, 30 Aug 2005 09:34:32 +0200
If you start proxyTrace you must supply a port number, the default is 8080.
So the proxy on your PC is http://localhost:8080. This address must be set
to the "Proxy" property of HttpWebRequest. See
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemNetHttpWebRequestClassProxyTopic.asp
So you end up with something like:
....
WebProxy traceProxy = new WebProxy(http://localhost:8080);
httpRequest.Proxy = traceProxy;
....
"MR" <comconix@xxxxxxxxxxxxxxxx> schrieb im Newsbeitrag
news:eJz2L1SrFHA.460@xxxxxxxxxxxxxxxxxxxxxxx
>i am looking at PocketSoap's proxy trace. they have an instruction " Simply
>configure your SOAP client to use a HTTP proxy server, leave all the
>addresses as normal, and off you go."
> how do i configure my client to use an HTTP proxy server?
> thanks
>
>
>
> "Stefan Misch" <stefan.misch@xxxxxxxxxxxxxxxxx> wrote in message
> news:ec80v7BrFHA.2008@xxxxxxxxxxxxxxxxxxxxxxx
>> For tracing may be that http://www.pocketsoap.com/ helps you. There are a
>> number of free trace tools available (YATT (Yet Another Trace Tool),
>> PcapTrace, TcpTrace, ProxyTrace) but I guess they won't be able to trace
>> HTTPS.
>>
>> WinHttpCfg only traces traffic through the ServerXMLHTTP object which is
>> not
>> used by .NET. But WinHttpCfg is able to trace HTTPS.
>>
>> If you find any way to trace HTTPS using .NET WebRequest/WebResponse
>> please tell me, as I'm also looking for a way to do this (for others
>> reading this thread: with tracing I mean a reasonable way of representing
>> the data that goes over the wire, I'm not a network guru and don't think
>> that a network sniffer will help my in tracing SOAP messages over HTTPS).
>> A tool like WinHttpCfg for ServerXMLHTTP would be great for .NET's
>> WebRequest/WebResponse, but will do
>>
>> Stefan
>>
>>
>> "MR" <comconix@xxxxxxxxxxxxxxxx> schrieb im Newsbeitrag
>> news:uXFrAO5qFHA.240@xxxxxxxxxxxxxxxxxxxxxxx
>>> thanks for your help. i am hand coding it now.
>>> what tool can i use to trace the messages? the remote site uses https so
>>> i
>>> can't use a regular sniffer.
>>> i tried using winhttpcfg, but i don't see any data, it seems that it
>>> just
>>> logs the start of a session, but no data within the session
>>> thanks
>>> m
>>>
>>>
>>> "Stefan Misch" <stefan.misch@xxxxxxxxxxxxxxxxx> wrote in message
>>> news:eKvEi$YqFHA.208@xxxxxxxxxxxxxxxxxxxxxxx
>>>> Mhh.. I don't know if this will help you, as my code is generated code
>>>> from the WSDL and I don't know where it could fit in your code, but
>>>> here
>>>> I go:
>>>>
>>>> [System.Web.Services.WebServiceBindingAttribute(Name="SomeNameSoapBinding",
>>>> Namespace="SomeNS")]
>>>> public class KMURatingWsService :
>>>> System.Web.Services.Protocols.SoapHttpClientProtocol {
>>>> ...
>>>> [System.Web.Services.Protocols.SoapRpcMethodAttribute("SomeMethod",
>>>> RequestNamespace="SomeNS", ResponseNamespace="SomeNS")]
>>>> [return:
>>>> System.Xml.Serialization.SoapElementAttribute("SomeMethodReturn")]
>>>> public ResultType SomeMethod(ParamType1 param1, ParamType2 param2) {
>>>> ...
>>>> }
>>>> ... classes for ParamType1, ParamType2 and ResultType like
>>>> [System.Xml.Serialization.SoapTypeAttribute("Param1Type",
>>>> "SomeURL")]
>>>> public class Param1Type {
>>>> ... just a sequence of int's and string's
>>>> }
>>>> }
>>>> Again, I doubt that this will help you very much, as the WSDL defines
>>>> the
>>>> binding protcoll needed for accessing the WS. So the binding is
>>>> something
>>>> that is defined in the WSDL. If you don't have a WSDL what would the
>>>> binding be good for?
>>>>
>>>> Wouldn't it be better for you to construct your own XML, so that it
>>>> matches the XML SOAP envelope required by "their" web service and post
>>>> the request "by hand" using HttpWebRequest/HttpWebResponse. See
>>>> http://msdn.microsoft.com/msdnmag/issues/01/09/cweb/ as a first start.
>>>>
>>>>
>>>>
>>>> "MR" <comconix@xxxxxxxxxxxxxxxx> schrieb im Newsbeitrag
>>>> news:OZMUtCYqFHA.3108@xxxxxxxxxxxxxxxxxxxxxxx
>>>>> first i really appreciate your help, you cannot imagind how much time
>>>>> i
>>>>> have spent on this already.
>>>>>
>>>>> second, when i try to get the wsdl doc, i get the following error:
>>>>> SOAP RPC Router
>>>>> Sorry, I don't speak via HTTP GET- you have to use HTTP POST to talk
>>>>> to
>>>>> me.
>>>>> also i have asked them many times and they keep insisting that they
>>>>> don't have one
>>>>>
>>>>>
>>>>> third, the code you sent me was an improvement, i had gotten that far
>>>>> already. but what attributes do you have on the class?
>>>>> i have
>>>>> [WebService(Description = "Web Services Interoperability
>>>>> Test",Namespace
>>>>> =
>>>>> "urn:UserOperations")][SoapRpcService(RoutingStyle=SoapServiceRoutingStyle.SoapAction)]
>>>>> but it doens't work
>>>>> again thanks for your help so far
>>>>>
>>>>> "Stefan Misch" <stefan.misch@xxxxxxxxxxxxxxxxx> wrote in message
>>>>> news:ualZAMXqFHA.3540@xxxxxxxxxxxxxxxxxxxxxxx
>>>>>> The WS I'm talking to is hosted on an IBM Web application server and
>>>>>> the web server is an Apache server. So I guess my configuration is
>>>>>> comparable to yours.
>>>>>>
>>>>>> Again, I don't understand why you have no WSDL. I can access my WSDL
>>>>>> using IE and entering the web service's URL plus appending "?WSDL" at
>>>>>> the end, something like
>>>>>> "http://www.somedomain.xxx/Services/SomeService?WSDL". Please try
>>>>>> that
>>>>>> before you do anything else.
>>>>>>
>>>>>> I added this WSDL-URL as a web reference to a sample VS C# console
>>>>>> application. VS generated everything I need to call the web service.
>>>>>> Calling the WS was as easy as:
>>>>>>
>>>>>> // initialize parameters
>>>>>> wsParameter.param1 = SomeValue1;
>>>>>> ...
>>>>>> wsParameter.paramX = SomeValueX;
>>>>>> // call web service
>>>>>> wsResult = wsSomeService.SomeMethod(wsParameter);
>>>>>>
>>>>>> The classes for wsParameter, wsResult and wsSomeService where
>>>>>> generated
>>>>>> by VS based on the WSDL.
>>>>>>
>>>>>> BTW, looking into the generated classes I can see that the web method
>>>>>> I'm calling is RPC/encoded:
>>>>>> [System.Web.Services.Protocols.SoapRpcMethodAttribute("SomeMethod",
>>>>>> RequestNamespace="SomeURI", ResponseNamespace="SomeURI")]
>>>>>>
>>>>>>
>>>>>>
>>>>>> "MR" <comconix@xxxxxxxxxxxxxxxx> schrieb im Newsbeitrag
>>>>>> news:eNHoqROqFHA.1136@xxxxxxxxxxxxxxxxxxxxxxx
>>>>>>> someone mentioned to me that the explanation is that the .NET
>>>>>>> default
>>>>>>> is rpc/encoded while that of apache servers is document/literal (or
>>>>>>> visa versa). what attribute do i use when i define my web methods to
>>>>>>> specify which format i want.
>>>>>>>
>>>>>>> "Stefan Misch" <stefan.misch@xxxxxxxxxxxxxxxxx> wrote in message
>>>>>>> news:%231aL4XLqFHA.3520@xxxxxxxxxxxxxxxxxxxxxxx
>>>>>>>> How do you construct your SOAP request and how do you send it? Have
>>>>>>>> you tried to use no NS at all? It could work, if the
>>>>>>>> submitOrderBatch
>>>>>>>> nodes does not define any NS at all, but that depends on the WS
>>>>>>>> server. Some WS servers are a bit strict on the formal format of
>>>>>>>> the
>>>>>>>> SOAP message.
>>>>>>>>
>>>>>>>> I also don't understand why you have no WSDL. Normaly this is where
>>>>>>>> VS gets the information about the web service methods, types and
>>>>>>>> namespaces. Did you try to use the WS-address and append "?WSDL".
>>>>>>>> Some WS then offer the WSDL. Just try with your web browser and see
>>>>>>>> what happens.
>>>>>>>>
>>>>>>>>
>>>>>>>> "MR" <comconix@xxxxxxxxxxxxxxxx> schrieb im Newsbeitrag
>>>>>>>> news:%23Nzop$KqFHA.2696@xxxxxxxxxxxxxxxxxxxxxxx
>>>>>>>>> you are probably right!
>>>>>>>>> i got rid of the http://tempuri.or, but how do i set the xmlns:ns1
>>>>>>>>> in my webmethod? some attribute?
>>>>>>>>> i really appreciate your help on this. i have spent a lot of time
>>>>>>>>> and have gotten nowhere
>>>>>>>>> again thanks
>>>>>>>>> m
>>>>>>>>>
>>>>>>>>> "Stefan Misch" <stefan.misch@xxxxxxxxxxxxxxxxx> wrote in message
>>>>>>>>> news:%23fuk5PKqFHA.2952@xxxxxxxxxxxxxxxxxxxxxxx
>>>>>>>>>> Are you sure that it's the "soap" instead of the "SOAP-ENV" that
>>>>>>>>>> causes the problem? After all these are just local namespace
>>>>>>>>>> prefixes for "http://schemas.xmlsoap.org/soap/envelope/". As long
>>>>>>>>>> as this URI is the same for the prefixes defined it should make
>>>>>>>>>> no
>>>>>>>>>> difference.
>>>>>>>>>>
>>>>>>>>>> I expect the problem could be the "submitOrderBatch" node. As
>>>>>>>>>> "they" define a NS with xmlns:ns1="urn:OrderOperations" but you
>>>>>>>>>> define xmlns="http://tempuri.org/", which is another NS. So
>>>>>>>>>> "your"
>>>>>>>>>> node sumbitOrderBatch is not the submitOrderBatch they expect.
>>>>>>>>>>
>>>>>>>>>> Just a thought...
>>>>>>>>>> Stefan
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> "MR" <comconix@xxxxxxxxxxxxxxxx> schrieb im Newsbeitrag
>>>>>>>>>> news:%23kUl5iBqFHA.3404@xxxxxxxxxxxxxxxxxxxxxxx
>>>>>>>>>>> my soap messages to a remote site are failing. as far as i can
>>>>>>>>>>> tell the only differences between what my SOAP message looks
>>>>>>>>>>> liek
>>>>>>>>>>> and what they want are in the SOAP envelope
>>>>>>>>>>> SInce they don't have a wsdl doc i created a localhost site
>>>>>>>>>>> based
>>>>>>>>>>> on their DTD documetns.
>>>>>>>>>>>
>>>>>>>>>>> How do I configure my site (and client proxy) to match thier
>>>>>>>>>>> envelope?
>>>>>>>>>>>
>>>>>>>>>>> Any help would be greatly appreciated
>>>>>>>>>>> thanks
>>>>>>>>>>> mr
>>>>>>>>>>>
>>>>>>>>>>> WHAT THEY WANT
>>>>>>>>>>>
>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8" ?>
>>>>>>>>>>> - <SOAP-ENV:Envelope
>>>>>>>>>>> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
>>>>>>>>>>> xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
>>>>>>>>>>> xmlns:xsd="http://www.w3.org/1999/XMLSchema">
>>>>>>>>>>> - <SOAP-ENV:Body>
>>>>>>>>>>> - <ns1:submitOrderBatch xmlns:ns1="urn:OrderOperations"
>>>>>>>>>>> SOAP-ENV:encodingStyle="http://xml.apache.org/xml-soap/literalxml">
>>>>>>>>>>>
>>>>>>>>>>> WHAT I AM SENDING
>>>>>>>>>>> <?xml version="1.0" encoding="utf-8" ?>
>>>>>>>>>>> - <soap:Envelope
>>>>>>>>>>> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
>>>>>>>>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>>>>>>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>>>>>>>>>>> - <soap:Body>
>>>>>>>>>>> - <orderBatchElement xmlns="http://tempuri.org/">
>>>>>>>>>>> - <submitOrderBatch CustomerBatchID="58"
>>>>>>>>>>> xmlns="http://tempuri.org/submitOrderBatch.xs">
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>>
>
>
.
- Follow-Ups:
- Re: How to resolve SOAP differences
- From: MR
- Re: How to resolve SOAP differences
- References:
- How to resolve SOAP differences
- From: MR
- Re: How to resolve SOAP differences
- From: Stefan Misch
- Re: How to resolve SOAP differences
- From: MR
- Re: How to resolve SOAP differences
- From: Stefan Misch
- Re: How to resolve SOAP differences
- From: MR
- Re: How to resolve SOAP differences
- From: Stefan Misch
- Re: How to resolve SOAP differences
- From: MR
- Re: How to resolve SOAP differences
- From: Stefan Misch
- Re: How to resolve SOAP differences
- From: MR
- Re: How to resolve SOAP differences
- From: Stefan Misch
- Re: How to resolve SOAP differences
- From: MR
- How to resolve SOAP differences
- Prev by Date: Re: How to resolve SOAP differences
- Next by Date: Re: cache dataset on server accross WS calls
- Previous by thread: Re: How to resolve SOAP differences
- Next by thread: Re: How to resolve SOAP differences
- Index(es):