Eric,

If you want to send me the sample code directly, feel free:
[EMAIL PROTECTED]
I can then look at it and see if anything pops out.

Dan


On Friday 14 September 2007, Eric Miles wrote:
> Resending this, anyone with any idea?
>
> On Wed, 2007-09-12 at 08:38 -0400, Eric Miles wrote:
> > Not sure why, but this email keeps getting bounced by the apache
> > spam software, so I'm not going to able to attach code nor copy and
> > paste...
> >
> > Sorry, my first response wasn't complete (I'm in class while trying
> > to write an email).  As stated in the previous email, the response
> > from the server is also wrapped as identified in the original email
> > in the "responses" section.  I am using a client completely outside
> > the JVM running the services, with no Spring configuration.  This is
> > a testing client so how this is setup and functions is irrelevant to
> > the application itself.  I am attaching the client so you can see
> > how it is being used.  Even if the client was written/configured
> > incorrectly, I still would not expect the server to return a wrapped
> > response.  I am using the JaxWsProxyFactoryBean to programmatically
> > create my client. Again, I'd attach my client code, but the Apache
> > spam filter keeps bouncing this email (5th time now).
> >
> > Thanks again,
> > Eric
> >
> > On Tue, 2007-09-11 at 23:19 +0200, Dan Diephouse wrote:
> > > So this is the client side that is sending the wrong request? Well
> > > thats probably because the @SOAPBinding implementation is on the
> > > server impl, not the interface - which the client typically uses.
> > >
> > > If you're using the <jaxws:client> xml config, I think this can be
> > > fixed by specifying a service class as your implementation class -
> > > in which case @SOAPBinding will be read.
> > >
> > > You can also trying supply the WSDL to the client proxy. I think
> > > this can be done via the <wsdlLocation> element inside
> > > <jaxws:client>. In this case, CXF will look at the WSDL to see how
> > > to build the service model internally.
> > >
> > > Cheers,
> > > - Dan
> > >
> > > Eric Miles wrote:
> > > > Dan,
> > > >
> > > > I thought this might have to do with document vs wrapped,
> > > > however I have specified document style on the impl class as
> > > > seen below:
> > > >
> > > > @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE,
> > > > style = SOAPBinding.Style.DOCUMENT)
> > > > @WebService(serviceName = "MobileService", endpointInterface =
> > > > "com.kronos.taws.services.mobile.MobileService",
> > > > portName="MobileServicePort", name="MobileService")
> > > > public class MobileServiceImpl implements MobileService,
> > > > InitializingBean {
> > > > ...
> > > > ...
> > > > }
> > > >
> > > > The style property from the xfire spring configuration might be
> > > > an old artifact that was left over during prototyping...sorry if
> > > > that gave any confusion as to how the service was configured via
> > > > annotations.  Any more information I can provide to help
> > > > diagnose my problem?
> > > >
> > > > Thanks again,
> > > > Eric
> > > >
> > > > On Mon, 2007-09-10 at 15:35 -0400, Dan Diephouse wrote:
> > > >> Hi Eric,
> > > >>
> > > >> This is because you've specified "document" style on the
> > > >> ServiceBean inside xfire. Try adding this annotation to your
> > > >> service impl:
> > > >>
> > > >> @SOAPBinding(parameterStyle=ParameterStyle.BARE)
> > > >>
> > > >> This will tell CXF not to operate in wrapped mode, but in
> > > >> document/bare/literal.
> > > >> Cheers,
> > > >> - Dan
> > > >>
> > > >> Eric Miles wrote:
> > > >>> I'm testing our upgrade from XFire 1.2.6 to CXF 2.1-SNAPSHOT
> > > >>> and it seems there is some additional wrapping of the message
> > > >>> body requests and responses for our services.  Under XFire, a
> > > >>> request coming from the XFire client libraries
> > > >>> (XFireProxyFactory using JaxbServiceFactory) looks like such:
> > > >>>
> > > >>> <soap:Envelope
> > > >>> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
> > > >>> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> > > >>>       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
> > > >>>       <soap:Body>
> > > >>>               <RetrRefTc
> > > >>>                       
> > > >>> xmlns="http://taws.kronos.com/services/MobileService"; />
> > > >>>       </soap:Body>
> > > >>> </soap:Envelope>
> > > >>>
> > > >>> Under CXF (using JaxWsProxyFactoryBean):
> > > >>>
> > > >>> <soap:Envelope
> > > >>> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
> > > >>> <soap:Body>
> > > >>>               <ns1:retrRefTc
> > > >>>                       
> > > >>> xmlns:ns1="http://mobile.services.taws.kronos.com/";>
> > > >>>                       <RetrRefTc
> > > >>>                               
> > > >>> xmlns="http://taws.kronos.com/services/MobileService"; />
> > > >>>               </ns1:retrRefTc>
> > > >>>       </soap:Body>
> > > >>> </soap:Envelope>
> > > >>>
> > > >>> FYI, the actual java implementation's method name is
> > > >>> retrRefTc, so I think that's where this wrapping name is
> > > >>> coming from.
> > > >>>
> > > >>> The responses are such, first the XFire response:
> > > >>>
> > > >>> <soap:Envelope
> > > >>> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
> > > >>> <soap:Body>
> > > >>>               <RetrRefTcResp
> > > >>>                       
> > > >>> xmlns="http://taws.kronos.com/services/MobileService";>
> > > >>>               </RetrRefTcResp>
> > > >>>       </soap:Body>
> > > >>> </soap:Envelope>
> > > >>>
> > > >>> Then the CXF response:
> > > >>>
> > > >>> <soap:Envelope
> > > >>> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
> > > >>> <soap:Body>
> > > >>>               <ns1:RetrRefTcResponse
> > > >>>                       
> > > >>> xmlns:ns1="http://taws.kronos.com/services/MobileService";>
> > > >>>                       <RetrRefTcResp
> > > >>>                               
> > > >>> xmlns="http://taws.kronos.com/services/MobileService";>
> > > >>>                       </RetrRefTcResp>
> > > >>>               </ns1:RetrRefTcResponse>
> > > >>>       </soap:Body>
> > > >>> </soap:Envelope>
> > > >>>
> > > >>> Again, you can see CXF is wrapping the response with a
> > > >>> RetrRefTcResponse element.
> > > >>>
> > > >>> Here are the two Spring configurations.
> > > >>>
> > > >>> First XFire:
> > > >>>
> > > >>>       <bean id="tawsMobileService"
> > > >>>               class="org.codehaus.xfire.spring.ServiceBean">
> > > >>>               <property name="serviceBean" 
> > > >>> ref="tawsMobileServiceImpl" />
> > > >>>               <property name="serviceFactory"
> > > >>> ref="xfire.jaxbServiceFactory" /> <property name="style"
> > > >>> value="document" />
> > > >>>               <property name="inHandlers">
> > > >>>                       <list>
> > > >>>                               <ref bean="domInHandler" />
> > > >>>                               <ref bean="wss4jHandler" />
> > > >>>                               <ref bean="authenticationHandler" />
> > > >>>                       </list>
> > > >>>               </property>
> > > >>>               <property name="schemas">
> > > >>>                       <list>
> > > >>>                               
> > > >>> <value>com/kronos/taws/services/mobile/MobileService.xsd</
> > > >>>value> </list>
> > > >>>               </property>
> > > >>>       </bean>
> > > >>>
> > > >>> Now CXF:
> > > >>>
> > > >>>       <jaxws:endpoint id="tawsMobileService"
> > > >>> implementor="#tawsMobileServiceImpl" name="MobileService"
> > > >>>               address="/MobileService">
> > > >>>               <jaxws:inInterceptors>
> > > >>>                       <ref bean="wss4jInterceptor"/>
> > > >>>                       <ref bean="saajInterceptor" />
> > > >>>                       <ref bean="wsAuthenticationInterceptor"/>
> > > >>>               </jaxws:inInterceptors>
> > > >>>               <jaxws:schemaLocations>
> > > >>>
> > > >>> <jaxws:schemaLocation>classpath:com/kronos/taws/services/mobil
> > > >>>e/MobileService.xsd</jaxws:schemaLocation>
> > > >>> </jaxws:schemaLocations>
> > > >>>       </jaxws:endpoint>
> > > >>>
> > > >>> This wrapping behavior is not desired.  If there is
> > > >>> configuration somewhere to keep this from happening, please
> > > >>> let me know.
> > > >>>
> > > >>> As I've stated at the top of the post, we have not changed ANY
> > > >>> of our java code, merely the configuration in Spring.



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
[EMAIL PROTECTED]
http://www.dankulp.com/blog

Reply via email to