I completely concur with Simon -- if a server requires a specific
string for a namespace prefix, it's broken. But I think we have a
different problem here.

There is actually a problem with the generated message. 
The <GetMetadata> element is unqualified: 
     <soapenv:Body>
        <GetMetadata xmlns="">
            ...

That's not valid SOAP (the child element of the <soap:Body> must be
namespace qualified), and I'm certain that it's not conformant to the
WS-MEX specification.

I suspect you have an error in your WSDL. Can you post it please?
(perhaps you've specified style="rpc", but you neglected to specify a
namespace attribute in the <soap:body> definition?

Anne


On 8/11/05, Simon Fell <[EMAIL PROTECTED]> wrote:
> You need to fix the bug in the service that requires specific namespace
> prefixes. Most soap toolkits won't give you the flexibility to specific
> specific namespace prefixes (because they don't matter).
> 
> Cheers
> Simon
> 
> -----Original Message-----
> From: Raphael Jacquemin [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 11, 2005 6:10 AM
> To: [email protected]
> Subject: Namespace and prefix issues
> 
> Hello,
> 
> I use Axis for creating Web Services.
> 
> I' ve some troubles with my namespace.
> I use a the tool wsdl2java for generating my java class.
> 
> Here is the beginning of my wsdl file, where are defined the different
> namespace  :
> 
> <wsdl:definitions
>     targetNamespace='http://schemas.xmlsoap.org/ws/2004/09/mex'
>     xmlns:wsm='http://schemas.xmlsoap.org/ws/2004/09/mex'
>     xmlns:wsa='http://schemas.xmlsoap.org/ws/2004/08/addressing'
>     xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
>     xmlns:xs='http://www.w3.org/2001/XMLSchema'
>     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";>
> ....
> ________________________________________________________________
> 
> My troubles are with my the prefix "wsm". I have to use this specific
> prefix.But with my generate java code, I don't find this prefix in my
> SOAP messages.
> First I will show you the required SOAP message and then the SOAP
> message obtain with my code. I'm sure I use the good wsdl file
> 
> 
> Here is a well formed SOAP message :
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope";
> xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing";
> xmlns:wdp="http://schemas.xmlsoap.org/ws/2004/08/devprof";
> xmlns:wsm="http://schemas.xmlsoap.org/ws/2004/09/mex";
> xmlns:wsd="http://schemas.xmlsoap.org/ws/2004/02/discovery";>
> 
> <SOAP-ENV:Header>
> <wsa:To>uuid:00001f90-0000-1000-8000-000bcd4ab3de</wsa:To>
> <wsa:Action>http://schemas.xmlsoap.org/ws/2004/09/mex/MetadataExchange/G
> etMetadataRequest</wsa:Action>
> <wsa:MessageId>uuid:65cb6464-d758-11d9-b16f-000bcd4ab3de</wsa:MessageId>
> <wsa:ReplyTo><wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressi
> ng/role/anonymous</wsa:Address></wsa:ReplyTo>
> </SOAP-ENV:Header>
> <SOAP-ENV:Body id="_0">
> <wsm:GetMetadata>
> <wsm:Dialect>http://schemas.xmlsoap.org/ws/2004/08/devprof/Relationship<
> /wsm:Dialect>
> </wsm:GetMetadata>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> 
> 
> Here, is my obtained SOAP Message :
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing";>
> <soapenv:Header>
> <wsa:MessageID
> soapenv:mustUnderstand="0">uuid:7ed58220-0a64-11da-aa4d-bc6f8a64de0c</ws
> a:MessageID>
> <wsa:To soapenv:mustUnderstand="0">http://localhost:8085/</wsa:To>
> <wsa:Action
> soapenv:mustUnderstand="0">http://schemas.xmlsoap.org/ws/2004/09/mex/Met
> adataExchange/GetMetadataRequest</wsa:Action>
> <wsa:From soapenv:mustUnderstand="0">
> <wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anony
> mous</wsa:Address>
> </wsa:From>
> <wsa:ReplyTo soapenv:mustUnderstand="0">
> <wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anony
> mous</wsa:Address>
> </wsa:ReplyTo>
> </soapenv:Header>
> <soapenv:Body>
> <GetMetadata xmlns="">
> <ns1:Dialect
> xmlns:ns1="http://schemas.xmlsoap.org/ws/2004/09/mex";>http://schemas.xml
> soap.org/ws/2004/08/devprof/ThisModel</ns1:Dialect>
> </GetMetadata>
> </soapenv:Body>
> </soapenv:Envelope>
> 
> 
> 
> So, As you can see in my SOAP message the "wsm" prefix is replaced by
> the ns1.
> I know that normally a translation is made and only the URL :
> "http://schemas.xmlsoap.org/ws/2004/09/mex"; is important. But I need an
> exact matching with wsm for my application :
> <wsm:GetMetadata>
> <wsm:Dialect>http://schemas.xmlsoap.org/ws/2004/08/devprof/Relationship<
> /wsm:Dialect>
> </wsm:GetMetadata>
> 
> What 's possible in order to force the "wsm" prefix.
> Do I modify the Wsdl2java tools or modify the wsdl file  ?
> 
> I can send my complete wsdl file if you need.
> 
> Thanks in advance.
> 
> Regards
> Raphael Jacquemin
> 
> 
>

Reply via email to