Custom Java Service

Posted by jbodell on 25-Jan-2012 13:58

I am trying to create a custom java service.

The first part I am trying to write is to get an xml string out of the message.  I have set up the following code in the service method, note most of it is auto generated:

        while (ctx.hasNextIncoming()) {
            env = ctx.getNextIncoming();
            if (env != null) {
                XQMessage msg = env.getMessage();
                StringBuffer sb = new StringBuffer();
                try {
                    int iPartCnt = msg.getPartCount();
                    for (int i = 0; i < iPartCnt; i++) {
                        XQPart prt = msg.getPart(i);
                        sb.append(prt.getContent());
                        // Extract the parameters from the message part
                    }
                } catch (XQMessageException me) {
                    throw new XQServiceException(
                            "Exception accessing XQMessage: " + me.getMessage(),
                            me);
                }
                Document xmlDoc = this.parseXml(sb.toString());

The issue I am having is that the content is shortened depending on the size of my xml string.  With some xml I get the following at the end "...", which of course causes an issue when I try to parse the xml string.


How to I get back all of the message instead of a cut off one?

All Replies

Posted by jbodell on 25-Jan-2012 14:25

I have figured out what was wrong with this.

Thanks.

This thread is closed