<p>I have a one to many relationship between two tables. The many table contains a clob column. The clob column looks like this in hibernate:</p>

<pre><code>@CollectionOfElements(fetch = EAGER)
@JoinTable(name = NOTE_JOIN_TABLE, joinColumns = @JoinColumn(name = "note"))
@Column(name = "substitution")
@IndexColumn(name = "listIndex", base = 0)
@Lob
private List&lt;String&gt; substitutions;
</code></pre>

<p>So basically I may have a Note with some subsitutions, say <code>"foo"</code> and <code>"fizzbuzz"</code>. So in my main table I could have a Note with id 4 and in my <code>NOTE_JOIN_TABLE</code> I would have two rows, <code>"foo"</code> and <code>"fizzbuzz"</code> that both have a relationship to the Note.</p>

<p>However, when one of these is inserted into the DB <strong>the larger substitution values are cropped to be as long as the shortest.</strong> So in this case I would have <code>"foo"</code> and <code>"fiz"</code> in the DB instead of <code>"foo"</code> and <code>"fizzbuzz"</code>.</p>

<p>Do you have any idea why this is happening? I have checked and confirmed they aren't being cropped anywhere in our code, it's defintely hibernate.</p>

[{'answer_id': 53308, 'author': 'jodonnell', 'author_id': 4223, 'author_profile': 'https://Stackoverflow.com/users/4223', 'pm_score': 0, 'selected': False, 'text': '<p>Are you trying to implement a client to a web service hosted somewhere else?  If so, Java\'s not necessary.  You can do web service clients in <a href="http://www.dotnetjunkies.ddj.com/Tutorial/4D13CEFA-D0FD-44BE-8749-8D17B5757564.dcik" rel="nofollow noreferrer">.NET</a>, <a href="http://sourceforge.net/projects/nusoap/" rel="nofollow noreferrer">PHP</a>, <a href="http://raa.ruby-lang.org/project/soap4r" rel="nofollow noreferrer">Ruby</a>, or pretty much any modern web technology out there.  All you need is a WSDL document to provide metadata about how to invoke the services.</p>\n'}, {'answer_id': 53314, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 2, 'selected': True, 'text': '<p>To follow up with jodonnell\'s comment, a Web service connection can be made in just about any server-side language. It is just that the API example they provided was in Java probably because PlanPlusOnline is written in Java. If you have a URL for the service, and an access key, then all you really need to do is figure out how to traverse the XML returned. If you can\'t do Java, then I suggest PHP because it could be already installed, and have the proper modules loaded. This link might be helpful:</p>\n\n<p><a href="http://www.onlamp.com/pub/a/php/2007/07/26/php-web-services.html" rel="nofollow noreferrer">http://www.onlamp.com/pub/a/php/2007/07/26/php-web-services.html</a></p>\n'}, {'answer_id': 53360, 'author': 'Jacob Schoen', 'author_id': 3340, 'author_profile': 'https://Stackoverflow.com/users/3340', 'pm_score': 0, 'selected': False, 'text': '<p>If I am understanding your question correctly, you only need to connect to an existing web service and not create your own web service. If that is a case, and maybe I am missing something, I do not believe you will need Tomcat at all. If you are using Netbeans you can create a new Desktop or Web application, and then right click the project name. Select New and then other, and select Web Client. Enter the information for where to find the WSDL (usually a URL) and the other required information.</p>\n\n<p>Once you added the WebClient create a new class that actually makes your calls to the webservice. If the web service name was PlanPlusOnline then you could have something like:</p>\n\n<pre><code>public final class PlanPlusOnlineClient\n{\n    //instance to this class so that we do not have to reinstantiate it every time\n    private static PlanPlusOnlineClient _instance = new PlanPlusOnlineClient();\n\n    //generated class by netbeans with information about the web service\n    private PlanPlusOnlineService service         = null;\n\n    //another generated class by netbeans but this is a property of the service\n    //that contains information about the individual methods available.\n    private PlanPlusOnline port                   = null;\n\n    private PlanPlusOnlineClient()\n    {\n        try\n        {\n            service = new PlanPlusOnlineService();\n            port = service.getPlanPlusOnlinePort();\n        }\n        catch (MalformedURLException ex)\n        {\n            MessageLog.error(this, ex.getClass().getName(), ex);\n        }\n    }\n\n    public static  PlanPlusOnlineClient getInstance()\n    {\n        return _instance;\n    }\n\n    public static String getSomethingInteresting(String param)\n    {\n         //this will call one of the actual methods the web \n         //service provides.\n         return port.getSomethingIntersting(param);\n    }    \n\n}\n</code></pre>\n\n<p>I hope this helps you along your way with this. You should also check out <a href="http://www.netbeans.org/kb/60/websvc/" rel="nofollow noreferrer">http://www.netbeans.org/kb/60/websvc/</a>\nfor some more information about Netbeans and web services. I am sure it is similar in other IDEs.</p>\n'}]
['https://Stackoverflow.com/questions/53316', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1666/']