You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by hhenke <he...@o2.com> on 2011/11/22 10:49:11 UTC

How to configure formatted output with JAXWS spring client

Dear community,

I tried to get formatted XML output using the following configuration, but
it doesn't work.


	<jaxws:client 	id="aloOutboundClient_1"
					serviceClass="com.telefonica.hanoss.northbound.cxfgen.alo.Outbound"
					address="${som.southbound.alo.url.1}"
					serviceName="ns:OutboundService"
					endpointName="ns:OutboundPort"
					xmlns:ns="urn:telefonica.germany.som_hanoss.alo">
					
		<jaxws:features>
			<bean class="org.apache.cxf.feature.LoggingFeature" />
		</jaxws:features>
          <jaxws:dataBinding>
          <bean class="org.apache.cxf.jaxb.JAXBDataBinding">
            <property name="marshallerProperties">
	          <map>
	            <entry>
	              <key><value>jaxb.formatted.output</value></key>
	              <value type="java.lang.Boolean">true</value>
	            </entry>
	          </map>
            </property>
          </bean>
        </jaxws:dataBinding>
	</jaxws:client>



--
View this message in context: http://cxf.547215.n5.nabble.com/How-to-configure-formatted-output-with-JAXWS-spring-client-tp5013106p5013106.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: How to configure formatted output with JAXWS spring client

Posted by Daniel Kulp <dk...@apache.org>.
On Wednesday, November 23, 2011 4:45:25 AM hhenke wrote:
> Thank's for your response Daniel,
> 
> I like to get it formatted on the wire.

Seems like a bug.  Looking into the code, we always set the formatted output 
to FALSE just before marshalling.   Thus, that would override the property you 
set.    We need to just set that if a user hasn't explicitely set it.

Dan

> 
> Regards
> Heinrich
> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/How-to-configure-formatted-output-with-JAXW
> S-spring-client-tp5013106p5016533.html Sent from the cxf-user mailing list
> archive at Nabble.com.
-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Re: Howto use JAXWS client without WSDL

Posted by Daniel Kulp <dk...@apache.org>.
On Wednesday, November 23, 2011 4:29:13 PM Harry van Rijn wrote:
> Hi,
> 
> I have generated java classes from a wsdl.
> 
> Now I want to set up a webservice client using these classes,
> without using file://file?wsdl or http://endpoint?url.
> 
> The only thing I want to use is:
> http://localhost:8080/war-filename/web.xml-mapping/jaxws-address
> 
> Is this possible?

Yes.

2 options:

1) You can pass "null" in as the WSDL location to the generated service class.   
You would then need to call service.createPort(...) to setup the port with the 
right binding and address and such and then call the appropriate getPort(..) 
call.

2) Use the JaxwsProxyFactoryBean and set the address and such on there.  


-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Re: How to configure formatted output with JAXWS spring client

Posted by hhenke <he...@o2.com>.
Hi Sergey,

you are right. I have to set JAXB properties. That's what I tried to do.
Just like described in  http://cxf.apache.org/docs/jaxb.html . But it
doesn't work.

Cheers, Heinrich

--
View this message in context: http://cxf.547215.n5.nabble.com/How-to-configure-formatted-output-with-JAXWS-spring-client-tp5013106p5017005.html
Sent from the cxf-user mailing list archive at Nabble.com.

Howto use JAXWS client without WSDL

Posted by Harry van Rijn <ha...@raceeend-2.demon.nl>.
Hi,

I have generated java classes from a wsdl.

Now I want to set up a webservice client using these classes,
without using file://file?wsdl or http://endpoint?url.

The only thing I want to use is:
http://localhost:8080/war-filename/web.xml-mapping/jaxws-address

Is this possible?

kind regards,

Harry

Re: How to configure formatted output with JAXWS spring client

Posted by Sergey Beryozkin <sb...@gmail.com>.
On 23/11/11 12:45, hhenke wrote:
> Thank's for your response Daniel,
>
> I like to get it formatted on the wire.

You probably need to set JAXB properties:

http://cxf.apache.org/docs/jaxb.html

Cheers, Sergey

>
> Regards
> Heinrich
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/How-to-configure-formatted-output-with-JAXWS-spring-client-tp5013106p5016533.html
> Sent from the cxf-user mailing list archive at Nabble.com.


-- 
Sergey Beryozkin

http://sberyozkin.blogspot.com

Talend Community Coders
http://coders.talend.com/

Re: How to configure formatted output with JAXWS spring client

Posted by hhenke <he...@o2.com>.
Thank's for your response Daniel,

I like to get it formatted on the wire.

Regards
Heinrich

--
View this message in context: http://cxf.547215.n5.nabble.com/How-to-configure-formatted-output-with-JAXWS-spring-client-tp5013106p5016533.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: How to configure formatted output with JAXWS spring client

Posted by Daniel Kulp <dk...@apache.org>.
Do you want formatted output on the wire or just for the loggging?   If just 
for the logging, do:

   <jaxws:features>
                        <bean class="org.apache.cxf.feature.LoggingFeature" >
                               <property name="prettyLogging" value="true"/>
                </jaxws:features>


Dan




On Tuesday, November 22, 2011 1:49:11 AM hhenke wrote:
> Dear community,
> 
> I tried to get formatted XML output using the following configuration, but
> it doesn't work.
> 
> 
> 	<jaxws:client 	id="aloOutboundClient_1"
> 					
serviceClass="com.telefonica.hanoss.northbound.cxfgen.alo.Outbound"
> 					address="${som.southbound.alo.url.1}"
> 					serviceName="ns:OutboundService"
> 					endpointName="ns:OutboundPort"
> 					xmlns:ns="urn:telefonica.germany.som_hanoss.alo">
> 
> 		<jaxws:features>
> 			<bean class="org.apache.cxf.feature.LoggingFeature" />
> 		</jaxws:features>
>           <jaxws:dataBinding>
>           <bean class="org.apache.cxf.jaxb.JAXBDataBinding">
>             <property name="marshallerProperties">
> 	          <map>
> 	            <entry>
> 	              <key><value>jaxb.formatted.output</value></key>
> 	              <value type="java.lang.Boolean">true</value>
> 	            </entry>
> 	          </map>
>             </property>
>           </bean>
>         </jaxws:dataBinding>
> 	</jaxws:client>
> 
> 
> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/How-to-configure-formatted-output-with-JAXW
> S-spring-client-tp5013106p5013106.html Sent from the cxf-user mailing list
> archive at Nabble.com.
-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com