Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

soap:Envelope v soapenv:Envelope

2,178 views
Skip to first unread message

Chris Snider

unread,
Jun 4, 2004, 3:58:16 PM6/4/04
to
Hello,

I have a pretty hot project that I have to complete linking a .NET client to
an Apache AXIS web service. AXIS is expecting the SOAP message as
soapenv:Envelope, but .NET creates soap:Envelope.

How do I change the default namespace in .NET to generate the expected
soapenv:Envelope style messages.

Thank you very much for your help,

Chris


Dino Chiesa [Microsoft]

unread,
Jun 4, 2004, 7:35:22 PM6/4/04
to
what you are comparing is a namespace prefix, which does not matter to the
soap processor.
The prefix is a "shorthand" for referring to an actual namespace in the
document. The form of the prefix itself is not syntactically meaningful.

The namespaces are the things that have to agree.

so
the fragment

<Fred:Envelope xmlns:Fred="http://schemas.xmlsoap.org/soap/envelope/">
<Fred:Body>
<Harumph:Message xmlns:Harumph="urn:thisIsMyNamespace"> Hello
</Harumph:Message>
</Fred:Body>
</Fred:Envelope>

is exactly equivalent to

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns1:Message xmlns:ns1="urn:thisIsMyNamespace"> Hello
</ns1:Message>
</soap:Body>
</soap:Envelope>

or

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<zzz:Message xmlns:zzz="urn:thisIsMyNamespace"> Hello
</zzz:Message>
</soapenv:Body>
</soapenv:Envelope>


If you are having an interop problem, the soap != soapenv is not the source
of it.


-Dino


"Chris Snider" <csn...@reg.net> wrote in message
news:eaL1H5m...@TK2MSFTNGP11.phx.gbl...

Chris Snider

unread,
Jun 4, 2004, 8:04:58 PM6/4/04
to
Dino,

Thanks for the info.

However, when I manually build the soap message using the soapenv:
namespace, the web service recognizes the change. I don't know if the web
service developers are using a homegrown parser or not. If there is a way
to instruct my .NET client to generate the soap message using the different
namespace, I would really appreciate learning how to do so.

Thanks,

Chris


"Dino Chiesa [Microsoft]" <din...@online.microsoft.com> wrote in message
news:O#qzbyoSE...@TK2MSFTNGP10.phx.gbl...

Dino Chiesa [Microsoft]

unread,
Jun 7, 2004, 4:30:06 PM6/7/04
to
I don't know of a way to do what you want.
what stack is the webservice implemented with?

"Chris Snider" <csn...@reg.net> wrote in message

news:%23iUVADp...@TK2MSFTNGP09.phx.gbl...

Chris Snider

unread,
Jun 9, 2004, 1:26:52 PM6/9/04
to
It is using Apache AXIS on the web service side.

"Dino Chiesa [Microsoft]" <din...@online.microsoft.com> wrote in message

news:%23R1y54M...@TK2MSFTNGP10.phx.gbl...

Dino Chiesa [Microsoft]

unread,
Jun 15, 2004, 8:25:03 PM6/15/04
to
Hmm, then I am truly puzzled.
When I use AXIS, it does not insist on a specific prefix. I have gotten
good interop between AXIS 1.1 (and even 1.0) and .NET, with complex types
and arrays. In both directions (AXIS client to .NET server, and .NET client
to AXIS server).

-Dino


"Chris Snider" <csn...@skycompsystems.com> wrote in message
news:uBwW4bkT...@TK2MSFTNGP11.phx.gbl...

0 new messages