You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Frank61 <de...@hotmail.com> on 2007/10/02 14:00:42 UTC

Cxf Soap message namespace missing

Hi 

I have cxf client which generates soap message
where the ns2 namespace is inside searchRequest tag.
I am using cfx version 2.0.2.
The java classes are generated using wsdl2java.

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:searchRequest xmlns:ns2="http://xxx.yy.com/simplesoap/">
<search_name>SomeName</search_name>
</ns2:searchRequest>
</soap:Body>
</soap:Envelope>

The web service gives me error because it wants the ns2 namespace to be in
first Line of msg
like this. Then it's working Ok. 

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns2="http://xxx.yy.com/simplesoap/">
<soap:Body>
<ns2:searchRequest> 
<search_name>SomeNome</search_name>
</ns2:searchRequest>
</soap:Body>
</soap:Envelope>

How can i tell cfx to generate the soap message where the namespace is 
in the first line of the msg.










-- 
View this message in context: http://www.nabble.com/Cxf-Soap-message-namespace-missing-tf4554470.html#a12997352
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Cxf Soap message namespace missing

Posted by Sergey Beryozkin <se...@iona.com>.
Hi
I don't think you can configure cxf to place the namespace declaration on the top.

CXF client is creating a correct message and the service it's talking to is broken (more precisely, the runtime supporting it is). 

That said, using this style can cause creating very verbose messages, when a message is big, with a lot of siblings, etc. IMHO an enhancement request should be submitted so that all namespace declarations go on top.

Cheers, Sergey 

----- Original Message ----- 
From: "Frank61" <de...@hotmail.com>
To: <cx...@incubator.apache.org>
Sent: Tuesday, October 02, 2007 1:00 PM
Subject: Cxf Soap message namespace missing


> 
> Hi 
> 
> I have cxf client which generates soap message
> where the ns2 namespace is inside searchRequest tag.
> I am using cfx version 2.0.2.
> The java classes are generated using wsdl2java.
> 
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> <soap:Body>
> <ns2:searchRequest xmlns:ns2="http://xxx.yy.com/simplesoap/">
> <search_name>SomeName</search_name>
> </ns2:searchRequest>
> </soap:Body>
> </soap:Envelope>
> 
> The web service gives me error because it wants the ns2 namespace to be in
> first Line of msg
> like this. Then it's working Ok. 
> 
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:ns2="http://xxx.yy.com/simplesoap/">
> <soap:Body>
> <ns2:searchRequest> 
> <search_name>SomeNome</search_name>
> </ns2:searchRequest>
> </soap:Body>
> </soap:Envelope>
> 
> How can i tell cfx to generate the soap message where the namespace is 
> in the first line of the msg.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -- 
> View this message in context: http://www.nabble.com/Cxf-Soap-message-namespace-missing-tf4554470.html#a12997352
> Sent from the cxf-user mailing list archive at Nabble.com.

----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland