By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,921 Members | 1,442 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,921 IT Pros & Developers. It's quick & easy.

How to resolve SOAP differences

P: n/a
MR
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">
Nov 23 '05 #1
Share this Question
Share on Google+
16 Replies


P: n/a
Hello,

Maybe you can try Soap Toolkit 3.0, it will send the soap message like:

SOAP-ENV:Envelope

Here is the link for download it:

http://www.microsoft.com/downloads/d...0DD-CEEC-4088-
9753-86F052EC8450&displaylang=en

Luke
Nov 23 '05 #2

P: n/a
MR
i am looking there but so far it is not that helpful in that it assumes that
i have a valid wsdl file.

what i need to know is how to use the formatting using SOAP-ENV: tags
instead of soap:
i am building a localhost version of the website so that i can test and
create the wsdl doc. so i need to know if there are any attributes that i
can use on my test site that will create the wsdl that will be used to
create the proxy to sent soap messages formatted in this way.
thanks
m

"[MSFT]" <lu******@online.microsoft.com> wrote in message
news:EU*************@TK2MSFTNGXA01.phx.gbl...
Hello,

Maybe you can try Soap Toolkit 3.0, it will send the soap message like:

SOAP-ENV:Envelope

Here is the link for download it:

http://www.microsoft.com/downloads/d...0DD-CEEC-4088-
9753-86F052EC8450&displaylang=en

Luke

Nov 23 '05 #3

P: n/a
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" <co******@newsgroup.nospam> schrieb im Newsbeitrag
news:%2****************@TK2MSFTNGP11.phx.gbl...
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">

Nov 23 '05 #4

P: n/a
MR
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" <st**********@removethis.gmx.de> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
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" <co******@newsgroup.nospam> schrieb im Newsbeitrag
news:%2****************@TK2MSFTNGP11.phx.gbl...
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">


Nov 23 '05 #5

P: n/a
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" <co******@newsgroup.nospam> schrieb im Newsbeitrag
news:%2****************@TK2MSFTNGP11.phx.gbl...
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" <st**********@removethis.gmx.de> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
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" <co******@newsgroup.nospam> schrieb im Newsbeitrag
news:%2****************@TK2MSFTNGP11.phx.gbl...
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">



Nov 23 '05 #6

P: n/a
MR
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" <st**********@removethis.gmx.de> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
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" <co******@newsgroup.nospam> schrieb im Newsbeitrag
news:%2****************@TK2MSFTNGP11.phx.gbl...
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" <st**********@removethis.gmx.de> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
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" <co******@newsgroup.nospam> schrieb im Newsbeitrag
news:%2****************@TK2MSFTNGP11.phx.gbl...
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">



Nov 23 '05 #7

P: n/a
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.SoapRpcMethodAttribu te("SomeMethod",
RequestNamespace="SomeURI", ResponseNamespace="SomeURI")]

"MR" <co******@newsgroup.nospam> schrieb im Newsbeitrag
news:eN**************@TK2MSFTNGP12.phx.gbl...
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" <st**********@removethis.gmx.de> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
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" <co******@newsgroup.nospam> schrieb im Newsbeitrag
news:%2****************@TK2MSFTNGP11.phx.gbl...
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" <st**********@removethis.gmx.de> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
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" <co******@newsgroup.nospam> schrieb im Newsbeitrag
news:%2****************@TK2MSFTNGP11.phx.gbl...
> 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">
>
>



Nov 23 '05 #8

P: n/a
MR
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=SoapServiceRoutingStyl e.SoapAction)]
but it doens't work
again thanks for your help so far

"Stefan Misch" <st**********@removethis.gmx.de> wrote in message
news:ua**************@TK2MSFTNGP14.phx.gbl...
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.SoapRpcMethodAttribu te("SomeMethod",
RequestNamespace="SomeURI", ResponseNamespace="SomeURI")]

"MR" <co******@newsgroup.nospam> schrieb im Newsbeitrag
news:eN**************@TK2MSFTNGP12.phx.gbl...
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" <st**********@removethis.gmx.de> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
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" <co******@newsgroup.nospam> schrieb im Newsbeitrag
news:%2****************@TK2MSFTNGP11.phx.gbl...
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" <st**********@removethis.gmx.de> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
> 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" <co******@newsgroup.nospam> schrieb im Newsbeitrag
> news:%2****************@TK2MSFTNGP11.phx.gbl...
>> 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">
>>
>>
>
>



Nov 23 '05 #9

P: n/a
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(Nam e="SomeNameSoapBinding",
Namespace="SomeNS")]
public class KMURatingWsService :
System.Web.Services.Protocols.SoapHttpClientProtoc ol {
....
[System.Web.Services.Protocols.SoapRpcMethodAttribu te("SomeMethod",
RequestNamespace="SomeNS", ResponseNamespace="SomeNS")]
[return:
System.Xml.Serialization.SoapElementAttribute("Som eMethodReturn")]
public ResultType SomeMethod(ParamType1 param1, ParamType2 param2) {
...
}
... classes for ParamType1, ParamType2 and ResultType like
[System.Xml.Serialization.SoapTypeAttribute("Param1 Type", "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" <co******@newsgroup.nospam> schrieb im Newsbeitrag
news:OZ**************@TK2MSFTNGP12.phx.gbl...
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=SoapServiceRoutingStyl e.SoapAction)]
but it doens't work
again thanks for your help so far

"Stefan Misch" <st**********@removethis.gmx.de> wrote in message
news:ua**************@TK2MSFTNGP14.phx.gbl...
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.SoapRpcMethodAttribu te("SomeMethod",
RequestNamespace="SomeURI", ResponseNamespace="SomeURI")]

"MR" <co******@newsgroup.nospam> schrieb im Newsbeitrag
news:eN**************@TK2MSFTNGP12.phx.gbl...
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" <st**********@removethis.gmx.de> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
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" <co******@newsgroup.nospam> schrieb im Newsbeitrag
news:%2****************@TK2MSFTNGP11.phx.gbl...
> 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" <st**********@removethis.gmx.de> wrote in message
> news:%2****************@TK2MSFTNGP14.phx.gbl...
>> 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" <co******@newsgroup.nospam> schrieb im Newsbeitrag
>> news:%2****************@TK2MSFTNGP11.phx.gbl...
>>> 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">
>>>
>>>
>>
>>
>
>



Nov 23 '05 #10

P: n/a
MR
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" <st**********@removethis.gmx.de> wrote in message
news:eK*************@TK2MSFTNGP10.phx.gbl...
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(Nam e="SomeNameSoapBinding",
Namespace="SomeNS")]
public class KMURatingWsService :
System.Web.Services.Protocols.SoapHttpClientProtoc ol {
...
[System.Web.Services.Protocols.SoapRpcMethodAttribu te("SomeMethod",
RequestNamespace="SomeNS", ResponseNamespace="SomeNS")]
[return:
System.Xml.Serialization.SoapElementAttribute("Som eMethodReturn")]
public ResultType SomeMethod(ParamType1 param1, ParamType2 param2) {
...
}
... classes for ParamType1, ParamType2 and ResultType like
[System.Xml.Serialization.SoapTypeAttribute("Param1 Type", "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" <co******@newsgroup.nospam> schrieb im Newsbeitrag
news:OZ**************@TK2MSFTNGP12.phx.gbl...
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=SoapServiceRoutingStyl e.SoapAction)]
but it doens't work
again thanks for your help so far

"Stefan Misch" <st**********@removethis.gmx.de> wrote in message
news:ua**************@TK2MSFTNGP14.phx.gbl...
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.SoapRpcMethodAttribu te("SomeMethod",
RequestNamespace="SomeURI", ResponseNamespace="SomeURI")]

"MR" <co******@newsgroup.nospam> schrieb im Newsbeitrag
news:eN**************@TK2MSFTNGP12.phx.gbl...
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" <st**********@removethis.gmx.de> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
> 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" <co******@newsgroup.nospam> schrieb im Newsbeitrag
> news:%2****************@TK2MSFTNGP11.phx.gbl...
>> 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" <st**********@removethis.gmx.de> wrote in message
>> news:%2****************@TK2MSFTNGP14.phx.gbl...
>>> 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" <co******@newsgroup.nospam> schrieb im Newsbeitrag
>>> news:%2****************@TK2MSFTNGP11.phx.gbl...
>>>> 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">
>>>>
>>>>
>>>
>>>
>>
>>
>
>



Nov 23 '05 #11

P: n/a
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" <co******@newsgroup.nospam> schrieb im Newsbeitrag
news:uX*************@tk2msftngp13.phx.gbl...
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" <st**********@removethis.gmx.de> wrote in message
news:eK*************@TK2MSFTNGP10.phx.gbl...
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(Nam e="SomeNameSoapBinding",
Namespace="SomeNS")]
public class KMURatingWsService :
System.Web.Services.Protocols.SoapHttpClientProtoc ol {
...
[System.Web.Services.Protocols.SoapRpcMethodAttribu te("SomeMethod",
RequestNamespace="SomeNS", ResponseNamespace="SomeNS")]
[return:
System.Xml.Serialization.SoapElementAttribute("Som eMethodReturn")]
public ResultType SomeMethod(ParamType1 param1, ParamType2 param2) {
...
}
... classes for ParamType1, ParamType2 and ResultType like
[System.Xml.Serialization.SoapTypeAttribute("Param1 Type", "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" <co******@newsgroup.nospam> schrieb im Newsbeitrag
news:OZ**************@TK2MSFTNGP12.phx.gbl...
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=SoapServiceRoutingStyl e.SoapAction)]
but it doens't work
again thanks for your help so far

"Stefan Misch" <st**********@removethis.gmx.de> wrote in message
news:ua**************@TK2MSFTNGP14.phx.gbl...
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.SoapRpcMethodAttribu te("SomeMethod",
RequestNamespace="SomeURI", ResponseNamespace="SomeURI")]

"MR" <co******@newsgroup.nospam> schrieb im Newsbeitrag
news:eN**************@TK2MSFTNGP12.phx.gbl...
> 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" <st**********@removethis.gmx.de> wrote in message
> news:%2****************@tk2msftngp13.phx.gbl...
>> 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" <co******@newsgroup.nospam> schrieb im Newsbeitrag
>> news:%2****************@TK2MSFTNGP11.phx.gbl...
>>> 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" <st**********@removethis.gmx.de> wrote in message
>>> news:%2****************@TK2MSFTNGP14.phx.gbl...
>>>> 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" <co******@newsgroup.nospam> schrieb im Newsbeitrag
>>>> news:%2****************@TK2MSFTNGP11.phx.gbl...
>>>>> 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">
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>




Nov 23 '05 #12

P: n/a
MR
first i'd like to thank you for the enormous amount of help that you have
given so far far. i will look into pocketsoap tools. most of the ones i've
seen either don't work on https or require a wsdl doc which i don't have
however i can tell you that using a sniffer on https will allow you to see
the encrypted message which is not very useful since you cannot see any
content

"Stefan Misch" <st**********@removethis.gmx.de> wrote in message
news:ec**************@TK2MSFTNGP10.phx.gbl...
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" <co******@newsgroup.nospam> schrieb im Newsbeitrag
news:uX*************@tk2msftngp13.phx.gbl...
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" <st**********@removethis.gmx.de> wrote in message
news:eK*************@TK2MSFTNGP10.phx.gbl...
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(Nam e="SomeNameSoapBinding",
Namespace="SomeNS")]
public class KMURatingWsService :
System.Web.Services.Protocols.SoapHttpClientProtoc ol {
...
[System.Web.Services.Protocols.SoapRpcMethodAttribu te("SomeMethod",
RequestNamespace="SomeNS", ResponseNamespace="SomeNS")]
[return:
System.Xml.Serialization.SoapElementAttribute("Som eMethodReturn")]
public ResultType SomeMethod(ParamType1 param1, ParamType2 param2) {
...
}
... classes for ParamType1, ParamType2 and ResultType like
[System.Xml.Serialization.SoapTypeAttribute("Param1 Type", "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" <co******@newsgroup.nospam> schrieb im Newsbeitrag
news:OZ**************@TK2MSFTNGP12.phx.gbl...
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=SoapServiceRoutingStyl e.SoapAction)]
but it doens't work
again thanks for your help so far

"Stefan Misch" <st**********@removethis.gmx.de> wrote in message
news:ua**************@TK2MSFTNGP14.phx.gbl...
> 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.SoapRpcMethodAttribu te("SomeMethod",
> RequestNamespace="SomeURI", ResponseNamespace="SomeURI")]
>
>
>
> "MR" <co******@newsgroup.nospam> schrieb im Newsbeitrag
> news:eN**************@TK2MSFTNGP12.phx.gbl...
>> 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" <st**********@removethis.gmx.de> wrote in message
>> news:%2****************@tk2msftngp13.phx.gbl...
>>> 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" <co******@newsgroup.nospam> schrieb im Newsbeitrag
>>> news:%2****************@TK2MSFTNGP11.phx.gbl...
>>>> 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" <st**********@removethis.gmx.de> wrote in message
>>>> news:%2****************@TK2MSFTNGP14.phx.gbl...
>>>>> 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" <co******@newsgroup.nospam> schrieb im Newsbeitrag
>>>>> news:%2****************@TK2MSFTNGP11.phx.gbl...
>>>>>> 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">
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>



Nov 23 '05 #13

P: n/a
MR
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" <st**********@removethis.gmx.de> wrote in message
news:ec**************@TK2MSFTNGP10.phx.gbl...
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" <co******@newsgroup.nospam> schrieb im Newsbeitrag
news:uX*************@tk2msftngp13.phx.gbl...
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" <st**********@removethis.gmx.de> wrote in message
news:eK*************@TK2MSFTNGP10.phx.gbl...
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(Nam e="SomeNameSoapBinding",
Namespace="SomeNS")]
public class KMURatingWsService :
System.Web.Services.Protocols.SoapHttpClientProtoc ol {
...
[System.Web.Services.Protocols.SoapRpcMethodAttribu te("SomeMethod",
RequestNamespace="SomeNS", ResponseNamespace="SomeNS")]
[return:
System.Xml.Serialization.SoapElementAttribute("Som eMethodReturn")]
public ResultType SomeMethod(ParamType1 param1, ParamType2 param2) {
...
}
... classes for ParamType1, ParamType2 and ResultType like
[System.Xml.Serialization.SoapTypeAttribute("Param1 Type", "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" <co******@newsgroup.nospam> schrieb im Newsbeitrag
news:OZ**************@TK2MSFTNGP12.phx.gbl...
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=SoapServiceRoutingStyl e.SoapAction)]
but it doens't work
again thanks for your help so far

"Stefan Misch" <st**********@removethis.gmx.de> wrote in message
news:ua**************@TK2MSFTNGP14.phx.gbl...
> 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.SoapRpcMethodAttribu te("SomeMethod",
> RequestNamespace="SomeURI", ResponseNamespace="SomeURI")]
>
>
>
> "MR" <co******@newsgroup.nospam> schrieb im Newsbeitrag
> news:eN**************@TK2MSFTNGP12.phx.gbl...
>> 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" <st**********@removethis.gmx.de> wrote in message
>> news:%2****************@tk2msftngp13.phx.gbl...
>>> 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" <co******@newsgroup.nospam> schrieb im Newsbeitrag
>>> news:%2****************@TK2MSFTNGP11.phx.gbl...
>>>> 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" <st**********@removethis.gmx.de> wrote in message
>>>> news:%2****************@TK2MSFTNGP14.phx.gbl...
>>>>> 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" <co******@newsgroup.nospam> schrieb im Newsbeitrag
>>>>> news:%2****************@TK2MSFTNGP11.phx.gbl...
>>>>>> 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">
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>



Nov 23 '05 #14

P: n/a
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/de...ProxyTopic.asp

So you end up with something like:

....
WebProxy traceProxy = new WebProxy(http://localhost:8080);
httpRequest.Proxy = traceProxy;
....
"MR" <co******@newsgroup.nospam> schrieb im Newsbeitrag
news:eJ*************@TK2MSFTNGP15.phx.gbl...
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" <st**********@removethis.gmx.de> wrote in message
news:ec**************@TK2MSFTNGP10.phx.gbl...
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" <co******@newsgroup.nospam> schrieb im Newsbeitrag
news:uX*************@tk2msftngp13.phx.gbl...
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" <st**********@removethis.gmx.de> wrote in message
news:eK*************@TK2MSFTNGP10.phx.gbl...
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(Nam e="SomeNameSoapBinding",
Namespace="SomeNS")]
public class KMURatingWsService :
System.Web.Services.Protocols.SoapHttpClientProtoc ol {
...
[System.Web.Services.Protocols.SoapRpcMethodAttribu te("SomeMethod",
RequestNamespace="SomeNS", ResponseNamespace="SomeNS")]
[return:
System.Xml.Serialization.SoapElementAttribute("Som eMethodReturn")]
public ResultType SomeMethod(ParamType1 param1, ParamType2 param2) {
...
}
... classes for ParamType1, ParamType2 and ResultType like
[System.Xml.Serialization.SoapTypeAttribute("Param1 Type",
"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" <co******@newsgroup.nospam> schrieb im Newsbeitrag
news:OZ**************@TK2MSFTNGP12.phx.gbl...
> 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=SoapServiceRoutingStyl e.SoapAction)]
> but it doens't work
> again thanks for your help so far
>
> "Stefan Misch" <st**********@removethis.gmx.de> wrote in message
> news:ua**************@TK2MSFTNGP14.phx.gbl...
>> 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.SoapRpcMethodAttribu te("SomeMethod",
>> RequestNamespace="SomeURI", ResponseNamespace="SomeURI")]
>>
>>
>>
>> "MR" <co******@newsgroup.nospam> schrieb im Newsbeitrag
>> news:eN**************@TK2MSFTNGP12.phx.gbl...
>>> 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" <st**********@removethis.gmx.de> wrote in message
>>> news:%2****************@tk2msftngp13.phx.gbl...
>>>> 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" <co******@newsgroup.nospam> schrieb im Newsbeitrag
>>>> news:%2****************@TK2MSFTNGP11.phx.gbl...
>>>>> 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" <st**********@removethis.gmx.de> wrote in message
>>>>> news:%2****************@TK2MSFTNGP14.phx.gbl...
>>>>>> 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" <co******@newsgroup.nospam> schrieb im Newsbeitrag
>>>>>> news:%2****************@TK2MSFTNGP11.phx.gbl...
>>>>>>> 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">
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>



Nov 23 '05 #15

P: n/a
MR
sorry to keep being a pain... but

i get the trace using the proxy, but i now timeout when i use the proxy, and
it works fine when i don't. is there something else i need to change?
thanks again
"Stefan Misch" <st**********@removethis.gmx.de> wrote in message
news:OX**************@TK2MSFTNGP15.phx.gbl...
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/de...ProxyTopic.asp

So you end up with something like:

...
WebProxy traceProxy = new WebProxy(http://localhost:8080);
httpRequest.Proxy = traceProxy;
...
"MR" <co******@newsgroup.nospam> schrieb im Newsbeitrag
news:eJ*************@TK2MSFTNGP15.phx.gbl...
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" <st**********@removethis.gmx.de> wrote in message
news:ec**************@TK2MSFTNGP10.phx.gbl...
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" <co******@newsgroup.nospam> schrieb im Newsbeitrag
news:uX*************@tk2msftngp13.phx.gbl...
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" <st**********@removethis.gmx.de> wrote in message
news:eK*************@TK2MSFTNGP10.phx.gbl...
> 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(Nam e="SomeNameSoapBinding",
> Namespace="SomeNS")]
> public class KMURatingWsService :
> System.Web.Services.Protocols.SoapHttpClientProtoc ol {
> ...
> [System.Web.Services.Protocols.SoapRpcMethodAttribu te("SomeMethod",
> RequestNamespace="SomeNS", ResponseNamespace="SomeNS")]
> [return:
> System.Xml.Serialization.SoapElementAttribute("Som eMethodReturn")]
> public ResultType SomeMethod(ParamType1 param1, ParamType2 param2)
> {
> ...
> }
> ... classes for ParamType1, ParamType2 and ResultType like
> [System.Xml.Serialization.SoapTypeAttribute("Param1 Type",
> "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" <co******@newsgroup.nospam> schrieb im Newsbeitrag
> news:OZ**************@TK2MSFTNGP12.phx.gbl...
>> 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=SoapServiceRoutingStyl e.SoapAction)]
>> but it doens't work
>> again thanks for your help so far
>>
>> "Stefan Misch" <st**********@removethis.gmx.de> wrote in message
>> news:ua**************@TK2MSFTNGP14.phx.gbl...
>>> 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.SoapRpcMethodAttribu te("SomeMethod",
>>> RequestNamespace="SomeURI", ResponseNamespace="SomeURI")]
>>>
>>>
>>>
>>> "MR" <co******@newsgroup.nospam> schrieb im Newsbeitrag
>>> news:eN**************@TK2MSFTNGP12.phx.gbl...
>>>> 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" <st**********@removethis.gmx.de> wrote in message
>>>> news:%2****************@tk2msftngp13.phx.gbl...
>>>>> 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" <co******@newsgroup.nospam> schrieb im Newsbeitrag
>>>>> news:%2****************@TK2MSFTNGP11.phx.gbl...
>>>>>> 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" <st**********@removethis.gmx.de> wrote in message
>>>>>> news:%2****************@TK2MSFTNGP14.phx.gbl...
>>>>>>> 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" <co******@newsgroup.nospam> schrieb im Newsbeitrag
>>>>>>> news:%2****************@TK2MSFTNGP11.phx.gbl...
>>>>>>>> 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">
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>




Nov 23 '05 #16

P: n/a
Sorry for the delay...

I thought that the tools from www.pockesoap.com do not support HTTPS. So
what do you mean by "I get the the trace"? Is this is the SSL encrypted SOAP
message? Maybe that's why you get a timeout because the forwarding does not
work. I can only trace standard HTTP SOAP messages using procyTrace.

Anyway, I found a tool that allows you to trace SOAP messages in both HTTP
and HTTPS: Mindreef's SOAPscope 4.1 (see http://www.mindreef.com). You can
download a fully functional trial. They supply a key that works for 4 days.
It costs some bucks ($99?) but I guess it is worth the money if you have
problems.

The steps to configure SOAPscope as a "forwarding SSL proxy" on your local
machine are described in the online help. You must also modify your .NET
client code (C# sample in online help provide).

I tested with my HTTPS based WS and got it working.


"MR" <co******@newsgroup.nospam> schrieb im Newsbeitrag
news:OZ**************@TK2MSFTNGP14.phx.gbl...
sorry to keep being a pain... but

i get the trace using the proxy, but i now timeout when i use the proxy,
and it works fine when i don't. is there something else i need to change?
thanks again
(older messages deleted)

Nov 23 '05 #17

This discussion thread is closed

Replies have been disabled for this discussion.