ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Strange Namespace after JAXB mashing in Java node

Post new topic  Reply to topic
 Strange Namespace after JAXB mashing in Java node « View previous topic :: View next topic » 
Author Message
junzi88
PostPosted: Wed Sep 25, 2013 4:46 pm    Post subject: Strange Namespace after JAXB mashing in Java node Reply with quote

Novice

Joined: 25 Sep 2013
Posts: 16

I use Toolkit 8.0.0.2 to general JAXB classes by feeding the schema. It does generate package-info.java. After java node I got following message. After SHRCBILL, there is no namespace declaration. If I added another computer node to add, i got
The namespace prefix "xmlns" must not be declared.

I am not sure why "xmlns" becomes prefix in this message. What is my problem? how to fix it?
Code:
<NS1:Envelope xmlns:NS1="http://schemas.xmlsoap.org/soap/envelope/">
 
  <NS1:Body>
    <xmlns:SHRCBILL>
      <xmlns:SHRCBILLInput>
        <xmlns:Shrcbill_type>P</xmlns:Shrcbill_type>
        <xmlns:Shrcbill_system>CCC</xmlns:Shrcbill_system>
        <xmlns:Shrcbill_company>88</xmlns:Shrcbill_company>
        <xmlns:Shrcbill_id>3333333</xmlns:Shrcbill_id>
        <xmlns:Shrcbill_bill_type>BILL UPD</xmlns:Shrcbill_bill_type>
        <xmlns:Shrcbill_bill_method>EFT</xmlns:Shrcbill_bill_method>
        <xmlns:Shrcbill_acct_name>CHASE</xmlns:Shrcbill_acct_name>
 </xmlns:SHRCBILLInput>
    </xmlns:SHRCBILL>
  </NS1:Body>
</NS1:Envelope>


In the computer node after Java node, I did
SET OutputRoot.SOAP.Body = InputRoot.XMLNSC; It maybe a kind unsafe copy?
But I did same in computer node after Mapping node and it works fine.

Without looping through the message, how can copy InputRoot.XMLNSC message to SOAP domain SOAP.Body?
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Sep 26, 2013 12:23 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

This is a product defect - you can get an iFix for it. See the last post in this thread: http://www.mqseries.net/phpBB2/viewtopic.php?p=358530&sid=c8394f5d004380f92cb7f2dc4bf70ab9
_________________
Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too.
Back to top
View user's profile Send private message
junzi88
PostPosted: Mon Sep 30, 2013 6:02 am    Post subject: Reply with quote

Novice

Joined: 25 Sep 2013
Posts: 16

According to the suggestion, I changed the configuration in the schema elementFormDefault="qualified" to elementFormDefault="unqualified". JAXB portion worked.
However, same schema failed on SOAP Request node itself. I reported the problem with title "problem creating SOAP tree from bitstream" in http://www.mqseries.net/phpBB2/viewtopic.php?p=363642#363642 .
After I changed back schema. SOAP request node is happy now. So I can not change schema and can not use JAXB. The problem for me is that mapping node is very hard to accomplish complicated business logic. What is your suggestion?
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Mon Sep 30, 2013 6:05 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

junzi88 wrote:
The problem for me is that mapping node is very hard to accomplish complicated business logic. What is your suggestion?


Most people use Compute node.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
junzi88
PostPosted: Mon Sep 30, 2013 6:13 am    Post subject: Reply with quote

Novice

Joined: 25 Sep 2013
Posts: 16

I noticed that computer node either via ESQL or maybe java to compose the message does NOT follow schema. for example, the schema define <sequence>, if I assign fields value order not follow sequence definition, the output is not in the right sequence, which could result error in Client application that use JAXB. However, the schema is complicated, it is hard to make sure the code follow the schema exactly. That's the reason I chose JAXB to insure my response is good bound with schema. Mapping node is good but really hard to map and put logic for over many fields.
Anyway, thanks for the quick reply.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Sep 30, 2013 6:14 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

lancelotlinc wrote:
junzi88 wrote:
The problem for me is that mapping node is very hard to accomplish complicated business logic. What is your suggestion?


Most people use Compute node.


Or a Java node, or a .NET node (if on Windows), ...

If your business logic is not a good fit for the Mapping node, fit it somewhere else. This is why IBM have provided a number of options.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Sep 30, 2013 6:15 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

junzi88 wrote:
I noticed that computer node either via ESQL or maybe java to compose the message does NOT follow schema.


Only if you do it wrong in the code.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Mon Sep 30, 2013 6:36 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

junzi88 wrote:
I noticed that computer node either via ESQL or maybe java to compose the message does NOT follow schema. for example, the schema define <sequence>, if I assign fields value order not follow sequence definition, the output is not in the right sequence, which could result error in Client application that use JAXB. However, the schema is complicated, it is hard to make sure the code follow the schema exactly. That's the reason I chose JAXB to insure my response is good bound with schema. Mapping node is good but really hard to map and put logic for over many fields.
Anyway, thanks for the quick reply.


The order in which you write the ESQL is the order in which the parser serializes the output. You are the developer. You must write the code in the correct order.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Strange Namespace after JAXB mashing in Java node
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.