[
http://jira.codehaus.org/browse/XFIRE-529?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_86538
]
lrnztt commented on XFIRE-529:
------------------------------
We've experienced this problem too.
Is it scheduled this problem resolution?
Do you see any workaround? I mean a non application layer one; we have a lot of
string attributes around!
Thanks in advance.
> leading spaces in Strings are removed i.e. not marshalled/unmarshalled
> correctly
> ---------------------------------------------------------------------------------
>
> Key: XFIRE-529
> URL: http://jira.codehaus.org/browse/XFIRE-529
> Project: XFire
> Issue Type: Bug
> Components: Aegis Module
> Affects Versions: 1.1.2
> Environment: Sun j2sdk1.4.2_11 on Win32
> Reporter: Lee G.
> Assigned To: Dan Diephouse
> Attachments: StringBug.java
>
>
> Leading spaces are being stripped from Strings during marshall/unmarshall. A
> simple JUnit test case is attached.
> <CODE>
> import java.net.MalformedURLException;
> import org.codehaus.xfire.aegis.AbstractXFireAegisTest;
> import org.codehaus.xfire.client.XFireProxyFactory;
> import org.codehaus.xfire.service.Service;
> import org.codehaus.xfire.service.invoker.BeanInvoker;
> public class StringBug extends AbstractXFireAegisTest {
> public void testString() throws MalformedURLException {
> StringBug.ServiceIF svc = createLocalProxy();
> final String textToSend = " five leading spaces.";
> String result = svc.echo(textToSend);
> assertTrue("'" + result + "' are missing" ,result.length()==
> textToSend.length());
> }
> private StringBug.ServiceIF createLocalProxy() throws
> MalformedURLException {
> final String svcURI = "xfire.local://echo";
> final Service serviceM =
> getServiceFactory().create(StringBug.ServiceIF.class, "echo", "", null);
> serviceM.setInvoker(new BeanInvoker(new ServiceImpl()));
> getServiceRegistry().register(serviceM);
> XFireProxyFactory factory = new XFireProxyFactory(getXFire());;//
> getXFireProxyFactory();
> return (StringBug.ServiceIF) factory.create(serviceM, svcURI);
> }
> public interface ServiceIF
> {
> String echo(String s);
> }
> public class ServiceImpl implements StringBug.ServiceIF
> {
> public ServiceImpl() {}
>
> public String echo(String s )
> {
> String in = "received text: '" + s + "'";
> System.out.println(in);
> return s;
> }
> }
> }
> </CODE>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email