cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From justinm <Justin.Mar...@ge.com>
Subject params are null when read - xmlns not included for params in SOAP message
Date Wed, 13 May 2009 19:32:39 GMT

My (cxf) webservice can be called from some clients but not from others. 

The webservice is created by something like:
	MyConfigServiceImpl configServiceImpl = new MyConfigServiceImpl();
	JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
	sf.setServiceClass(ConfigService.class);
	sf.getServiceFactory().setWrapped(true); // default
	sf.setAddress("http://localhost:8080/services/ConfigService");
	sf.setServiceBean(configServiceImpl);
	sf.create();

When calling from cxf client or C# .net client, the calls work.  The SOAP
messages looks something like this:

     <soap:Body> 
          <addDevice xmlns="http://service.company.my.com/"> 
              <deviceId xmlns="">someId</deviceId> 
              <deviceName xmlns="">someName</deviceName> 
          </addDevice> 
     </soap:Body> 

The C++ .net client does not work, and the SOAP messages look something like
this:
 
     <soap:Body> 
          <addDevice xmlns="http://service.company.my.com/"> 
               <deviceId>someId</deviceId> 
               <deviceName>someName</deviceName> 
          </addDevice> 
     </soap:Body> 

Besides some other stuff in the message, the main difference is the xmlns=””
which is included in the cxf and c# generated SOAP messages.

I tried every combination of options for the service factory, including:
	sf.getServiceFactory().setQualifyWrapperSchema(true);

I tried to include a package-info.java class in the com.my.company.service
package with the following annotation:

     @javax.xml.bind.annotation.XmlSchema(
          namespace="http://service.company.my.com/",
          elementFormDefault=javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
     package com.my.company.service;

but that didn’t seem to change the wsdl for the service to make the
elementFormDefault=qualified.

I also tried to create the service to be bare instead of wrapped, and that
helped until I tried to send complex types as params to a method.  In that
case the members of the complex types ended up being null, and it looked
like it was from the same xmlns reason.

My java webservice previously used Axis 1.4 and was rpc/encoded.  A little
while ago we moved to cxf and of course cxf doesn’t support rcp/encoded.  We
moved for easier integration with other clients, but now we need to update
our C++ client to utilized the new service.  We moved to doc/literal/wrapped
as it seems that is where the webservices standard is moving toward.  I
really don’t want to have to rewrite my entire legacy, bloated C++
webservice client in C# just to get it working again.

Any ideas… please?

-- 
View this message in context: http://www.nabble.com/params-are-null-when-read---xmlns-not-included-for-params-in-SOAP-message-tp23528452p23528452.html
Sent from the cxf-user mailing list archive at Nabble.com.


Mime
View raw message