axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wimmer, Matthias" <>
Subject RE: SOAPHeaderElement.addTextNode() ???
Date Fri, 07 Jun 2002 17:46:50 GMT

I analyzed your code and figured this out:
You sent:
   <ns1:Authentication xmlns:ns1="Data">

The SOAPEnvelope expected:
    <Authentication xmlns="Data"> 

In the first case "Authentication" belongs to the namespace "ns1" (="Data")
and in the second case "Authentication" belongs to the local unnamed
namespace (="Data"). That is no problem because that is the same. 

But the subordinate tags ("Username" and "Password") don't belong to the
same namespaces in both cases. In the first case they belong to any global
namespace (because they have no prefix) and in the second case they belong
to the local namespace.

To say it in other words: In the first case the local namespace has a prefix
and in the second case the local namespace has no prefix. You can use each
one of them. But once you have chosen one of them you have to stick to it.

So you have two choices:
1. Remove the name of the first namespace: 
    <Authentication xmlns="Data">
2. Stick to your namespace in all subsequent tags

I would prefer the second choice.

I am not quite sure. I didn't try it out.
good luck
Matthias Wimmer

-----Original Message-----
From: Anna Chen []
Sent: Friday, June 07, 2002 12:39 PM
Subject: RE: SOAPHeaderElement.addTextNode() ???

But the service written in .NET can't recognize my username and password???
The SOAPEnvelope I sent:
   <ns1:Authentication xmlns:ns1="Data">
   <DataProcessed xmlns="Data"/>

The SOAPEnvelope expected:

<?xml version="1.0" encoding="utf-8"?> <soap:Envelope 
xmlns:soap=""> <soap:Header> 
<Authentication xmlns="Data"> <UserName>string</UserName> 
<Password>string</Password> </Authentication> </soap:Header> <soap:Body>

<DataProcessed xmlns="Data" /> </soap:Body> </soap:Envelope>


At 11:56 AM 6/7/2002 -0400, you wrote:
>Try this method:
>    user.setObjectValue( "Enter any String" );
>This creates a tag like the following:
>    <USER>Enter any Sting</USER>
>best regards
>Matthias Wimmer

View raw message