You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by jlp1 <jl...@hotmail.com> on 2010/01/21 12:08:07 UTC
outgoing message contains namespace problem
Hi all,
I have a received a WSDL and want to use CXF to talk the server.
Generating the stub (using maven) and coding was not a problem.
However now the server gives SoapFault. As it seems it is because my
outgoing message has an 'namespace problem'.
I'm using 'LoggingInInterceptor' and 'LoggingOutInterceptor' to view my
outgoing and incoming messages.
The outgoing message is
---
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:GetChildNodes xmlns:ns2="my.Namespace">
<sessionId>697069b6-xxxx-xxxx-xxxx-762296422836</sessionId>
<treeIndexId>e68464c7-xxxx-xxxx-xxxx-f9bb1a9e53aa</treeIndexId>
</ns2:GetChildNodes>
</soap:Body>
</soap:Envelope>
---
I was expected that the prefix 'ns2' would not be there so the namespace
goes for GetChildNodes element and all it's childeren
or
that this prefix is also used for each child node of GetChildNodes element.
Now the webservice doesn't 'see' the child nodes of GetChildNodes element.
Hope anybody can help me, solve this issue.
If you need more info, please feel free to ask.
Kind regards,
J.
--
View this message in context: http://old.nabble.com/outgoing-message-contains-namespace-problem-tp27256132p27256132.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: outgoing message contains namespace problem
Posted by Joe Intrakamhang <jo...@nb.com>.
Hi,
I'm having the same issue. The child elements are not qualified even with
"elementFormDefault="qualified" in my wsdl.
Did you find a work around for this? I'm currently using version 2.2.7.
jlp1 wrote:
>
> As additional information, I'm using CXF version 2.2.2 at this moment.
>
> I encountered the same problem again with another WSDL (which also had the
> attribute elementFormDefault="qualified").
>
> Grtz,
> J.
>
--
View this message in context: http://old.nabble.com/outgoing-message-contains-namespace-problem-tp27256132p28365738.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: outgoing message contains namespace problem
Posted by jlp1 <jl...@hotmail.com>.
As additional information, I'm using CXF version 2.2.2 at this moment.
I encountered the same problem again with another WSDL (which also had the
attribute elementFormDefault="qualified").
Grtz,
J.
--
View this message in context: http://old.nabble.com/outgoing-message-contains-namespace-problem-tp27256132p27517442.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: outgoing message contains namespace problem
Posted by jlp1 <jl...@hotmail.com>.
Hi,
thank you for your quick response.
I attached the WSDL (a bit obviuoscated to exclude the other party, so in my
examples you should read through the my.NameSpace and my.WebService).
http://old.nabble.com/file/p27269661/webservice.wsdl webservice.wsdl
The WSDL contains the attribute 'elementFormDefault'.
To provide some information which perhaps could be important. I generated
the stub with the following maven plugin:
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>2.2.4</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${project.build.directory}/generated/cxf</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>${basedir}/src/main/wsdl/webservice.wsdl</wsdl>
</wsdlOption>
</wsdlOptions>
<extraarg>-exsh true</extraarg>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
Hope you can help me further.
Thanks in advance,
J.
dkulp wrote:
>
>
> I would need to see the wsdl, particularly the schema element. Does the
> schema have a elementFormDefault="qualified" attribute? If not, then the
> soap message below is correct. If you need those elements qualified, you
> could edit the wsdl to add elementFormDefault="qualified" and regenerate
> the
> code.
>
> Dan
>
>
> On Thu January 21 2010 6:08:07 am jlp1 wrote:
>> Hi all,
>>
>> I have a received a WSDL and want to use CXF to talk the server.
>> Generating the stub (using maven) and coding was not a problem.
>>
>> However now the server gives SoapFault. As it seems it is because my
>> outgoing message has an 'namespace problem'.
>>
>> I'm using 'LoggingInInterceptor' and 'LoggingOutInterceptor' to view my
>> outgoing and incoming messages.
>>
>> The outgoing message is
>> ---
>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>> <soap:Body>
>> <ns2:GetChildNodes xmlns:ns2="my.Namespace">
>> <sessionId>697069b6-xxxx-xxxx-xxxx-762296422836</sessionId>
>> <treeIndexId>e68464c7-xxxx-xxxx-xxxx-f9bb1a9e53aa</treeIndexId>
>> </ns2:GetChildNodes>
>> </soap:Body>
>> </soap:Envelope>
>> ---
>>
>> I was expected that the prefix 'ns2' would not be there so the namespace
>> goes for GetChildNodes element and all it's childeren
>>
>> or
>>
>> that this prefix is also used for each child node of GetChildNodes
>> element.
>>
>>
>> Now the webservice doesn't 'see' the child nodes of GetChildNodes
>> element.
>>
>>
>> Hope anybody can help me, solve this issue.
>> If you need more info, please feel free to ask.
>>
>> Kind regards,
>> J.
>>
>
> --
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
>
>
--
View this message in context: http://old.nabble.com/outgoing-message-contains-namespace-problem-tp27256132p27269661.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: outgoing message contains namespace problem
Posted by Daniel Kulp <dk...@apache.org>.
I would need to see the wsdl, particularly the schema element. Does the
schema have a elementFormDefault="qualified" attribute? If not, then the
soap message below is correct. If you need those elements qualified, you
could edit the wsdl to add elementFormDefault="qualified" and regenerate the
code.
Dan
On Thu January 21 2010 6:08:07 am jlp1 wrote:
> Hi all,
>
> I have a received a WSDL and want to use CXF to talk the server.
> Generating the stub (using maven) and coding was not a problem.
>
> However now the server gives SoapFault. As it seems it is because my
> outgoing message has an 'namespace problem'.
>
> I'm using 'LoggingInInterceptor' and 'LoggingOutInterceptor' to view my
> outgoing and incoming messages.
>
> The outgoing message is
> ---
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> <soap:Body>
> <ns2:GetChildNodes xmlns:ns2="my.Namespace">
> <sessionId>697069b6-xxxx-xxxx-xxxx-762296422836</sessionId>
> <treeIndexId>e68464c7-xxxx-xxxx-xxxx-f9bb1a9e53aa</treeIndexId>
> </ns2:GetChildNodes>
> </soap:Body>
> </soap:Envelope>
> ---
>
> I was expected that the prefix 'ns2' would not be there so the namespace
> goes for GetChildNodes element and all it's childeren
>
> or
>
> that this prefix is also used for each child node of GetChildNodes element.
>
>
> Now the webservice doesn't 'see' the child nodes of GetChildNodes element.
>
>
> Hope anybody can help me, solve this issue.
> If you need more info, please feel free to ask.
>
> Kind regards,
> J.
>
--
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog