Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8295799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T14:44:10+00:00 2026-06-08T14:44:10+00:00

We work on a Java (Java EE) application, and we generate XML files in

  • 0

We work on a Java (Java EE) application, and we generate XML files in order to send them to a remote .NET application with MSMQ reading on their side.
The XML file is generated by JDom, like so :

// add elements...

Document doc = new Document(root);      
String XmlData = new XMLOutputter(Format.getPrettyFormat().setOmitEncoding(true)).outputString(doc);

try {
        SendFile( XmlData, "title" , "path");
    } catch (UnsupportedEncodingException e) {
        e.printStackTrace();
    } catch (MessageQueueException e) {
        e.printStackTrace();
    }

Then we use this function, using the MsmqJava library to send the file :

private void SendFile(String data, String title, String outputPath) throws UnsupportedEncodingException, MessageQueueException{
    String qname="name_of_the_queue";
    String fullname= "server_path" + qname;
    String body = data;
    String label = title;
    String correlationId= "L:none";

    try {
        Queue queue= new Queue(fullname);
        Message msg= new Message(body, label, correlationId);
        queue.send(msg);
            } catch (MessageQueueException ex1) {
           System.out.println("Put failure: " + ex1.toString());
       }
}

They correctly receive the file, but they told us that the bodyType was set to “VT_EMPTY” while they wanted “VT_BSTR”, and we haven’t find a clue about how to fix this. If you know another lib who does the job, or a workaround to this one, we can change with no problem.

Thanks !

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T14:44:11+00:00Added an answer on June 8, 2026 at 2:44 pm

    Looking at the documentation for the library you use, it is not possible using that library.

    Jmsmqqueue also doesn’t provide the functionality you need.

    It seems sun also had an adapter: https://wikis.oracle.com/display/JavaCAPS/Sun+Adapter+for+MSMQ

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have my java-written application being killed after some time of work. Java application
I'm updating code in an old Java application at work but I'm pretty new
I have a Java web application at my work and I'd like simplify how
I'm a .NET programmer doing some Hadoop work in Java and I'm kind of
Is there any way to make this work in Java? public static void change(List<?
I am trying to do some style-check/translation work for Java programs. First I would
Class.forName(boolean.class.getName()); This doesn't work in Java - the virtual machine slaps you with a
I was wondering how Java applets work in regards to accessing data on a
I'm learning Java at work, and the exercise we're supposed to do states the
Many parts of the Java API work differently depending on platform defaults, for example,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.