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 » SOAP Request - Namespaces declaration

Post new topic  Reply to topic Goto page 1, 2  Next
 SOAP Request - Namespaces declaration « View previous topic :: View next topic » 
Author Message
Sovesky
PostPosted: Fri Aug 30, 2013 4:15 am    Post subject: SOAP Request - Namespaces declaration Reply with quote

Novice

Joined: 30 Aug 2013
Posts: 17

Hello,

I'm using MB 8.0.0.2 and I'm using a SOAP Request node to invoke a webservice X in another Broker (not local).

The problem is that the service X is not accepting the input I'm sending from my service, throwing an unhelpful exception, but if I copy that input to SOAPUI and invoke there, the service X accepts it without a problem.

I'm examining the output of a start transaction monitor in service X and I see that the input coming from SOAPUI differs from the input coming from my service in a simple way.

Input from my service:

Code:

<NS2:AlteraPropDoc xmlns:NS2="FileNetWS">
   <NS3:Header xmlns:NS3="http://www.contact admin.pt/FileNetWS">
      <NS3:Version>1.0</NS3:Version>
      <NS3:TimeStamp>2013-08-30T10:46:28.351023</NS3:TimeStamp>
      <NS3:MessageGuid>fc1eb012-6085-4a12-ba56-b88a2d96a8ae</NS3:MessageGuid>
      <NS3:GeneratorEntity>Acoreana</NS3:GeneratorEntity>
      <NS3:GeneratorApplication>WSPrismaNewFileNetDoc</NS3:GeneratorApplication>
      <NS3:ServiceId>PrismaNewFileNetDoc/operation1</NS3:ServiceId>
   </NS3:Header>
   <Body>
      <user>XXXX</user>
      <password>YYYY</password>
      <system_name>ZZZZ</system_name>
      <docId>1234</docId>
      <NS4:propriedades xmlns:NS4="http://www.contact admin.pt/FileNetWS">
         <propriedade nome="estado">2</propriedade>
      </NS4:propriedades>
   </Body>
</NS2:AlteraPropDoc>


Input from SOAPUI:

Code:

<NS1:AlteraPropDoc xmlns:NS1="http://FileNetWS">
   <NS2:Header xmlns:NS2="http://www.contact admin.pt/FileNetWS">
      <NS2:Version>1.0</NS2:Version>
      <NS2:TimeStamp>2013-08-30T09:11:15.070110</NS2:TimeStamp>
      <NS2:MessageGuid>262c1c7c-7ce3-4a77-9251-2ba39d9e87cf</NS2:MessageGuid>
      <NS2:GeneratorEntity>Acoreana</NS2:GeneratorEntity>
      <NS2:GeneratorApplication>WSPrismaNewFileNetDoc</NS2:GeneratorApplication>
      <NS2:ServiceId>PrismaNewFileNetDoc/operation1</NS2:ServiceId>
   </NS2:Header>
   <Body>
      <user>XXXX</user>
      <password>YYYY</password>
      <system_name>ZZZZ</system_name>
      <docId>1234</docId>
      <NS3:propriedades xmlns:NS3="http://www.contact admin.pt/FileNetWS">
         <propriedade nome="estado">2</propriedade>
      </NS3:propriedades>
   </Body>
</NS1:AlteraPropDoc>


The only difference in these two blocks of code are the namespace prefixes. Apparently in the Message Broker request, it seems like the prefix NS1 was previously declared (because the code starts with an NS2), but it is not being used. I can't seem to find any other justification.

Any ideas?


Last edited by Sovesky on Fri Aug 30, 2013 9:13 am; edited 1 time in total
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Aug 30, 2013 4:25 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

You must have some other error in your code.
The namespaces in your message are self defined and as such should not pose any problems to either the XMLNSC or the XMLNS or the SOAP parser, although it seems from your code that you do have a REST type of interface and would have to use the http request node and cannot use SOAP....

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Fri Aug 30, 2013 4:45 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

I agree with fjb_saper. The two XML documents are equivalent. The namespace prefixes are not the problem - unless service x is relying on specific namespace prefixes, which would be a fault in service x.

fwiw, you can control namespace prefixes in your message flow - search for 'XMLNSC namespace prefix' in the info center.
_________________
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
Sovesky
PostPosted: Fri Aug 30, 2013 5:33 am    Post subject: Reply with quote

Novice

Joined: 30 Aug 2013
Posts: 17

I've noticed that the service does not accept inline namespace declaration. If I send something like

Code:
<NS4:propriedades xmlns:NS4="http://www.contact admin.pt/FileNetWS"></NS4:propriedades


on SOAP UI, it gives me the same exception, but if I define it in the SOAP Envelope element, that does not occur.
I've tried using the following approach:

Code:
SET OutputRoot.SOAP.(XMLNSC.NamespaceDecl)xmlns:NS1 = 'some namespace';


and according to the trace node log, the XML is well built. But the input received in the service X still keeps the namespace's declarations inline.

fjb_saper, the service X is using a SOAP Input node. The presented structure is defined as company's governance.

kimbert, I don't think the service x relies on specific namespace prefixes because on SOAPUI I can change them as I wish, and service X accepts the input.

I'm clueless
Back to top
View user's profile Send private message
dogorsy
PostPosted: Fri Aug 30, 2013 6:16 am    Post subject: Reply with quote

Knight

Joined: 13 Mar 2013
Posts: 553
Location: Home Office

Sovesky wrote:
I've noticed that the service does not accept inline namespace declaration. If I send something like

Code:
<NS4:propriedades xmlns:NS4="http://www.contact admin.pt/FileNetWS"></NS4:propriedades


on SOAP UI, it gives me the same exception, but if I define it in the SOAP Envelope element, that does not occur.
I've tried using the following approach:

Code:
SET OutputRoot.SOAP.(XMLNSC.NamespaceDecl)xmlns:NS1 = 'some namespace';


and according to the trace node log, the XML is well built. But the input received in the service X still keeps the namespace's declarations inline.

fjb_saper, the service X is using a SOAP Input node. The presented structure is defined as company's governance.

kimbert, I don't think the service x relies on specific namespace prefixes because on SOAPUI I can change them as I wish, and service X accepts the input.

I'm clueless


There is nothing wrong with
Code:
<NS4:propriedades xmlns:NS4="http://www.contact admin.pt/FileNetWS"></NS4:propriedades


but
Code:
SET OutputRoot.SOAP.(XMLNSC.NamespaceDecl)xmlns:NS1 = 'some namespace';



is incorrect. The namespaces are defined in the soap context folder (if you want them in the soap envelope), you need to look up the syntax in the docs.
I agree with fjb_saper and kimbert that you probably have something else wrong. Please post the complete message, ie. the message with the SOAP envelope, and the "unhelpful exception". It may not mean anything to you, but it may to someone else.
Back to top
View user's profile Send private message
Sovesky
PostPosted: Fri Aug 30, 2013 6:28 am    Post subject: Reply with quote

Novice

Joined: 30 Aug 2013
Posts: 17

The exception I'm getting is:

Code:
Fault
   faultcode:CHARACTER:soapenv:Server
   faultstring
   detail
         Text:CHARACTER:BIP3001I: Exception thrown by throw node 'gen.FileNetWS.Throw'; text is ''Error received from FileNet system.''.
The throw node 'gen.FileNetWS.Throw' has received a message and thus has thrown an exception as this is its normal behavior.  The message text associated with this exception is ''Error received from FileNet system.''.
Since this is application generated (by message flow behavior), the user action is determined by the message flow and the type of exception generated. : F:\build\slot1\S800_P\src\DataFlowEngine\BasicNodes\ImbThrowNode.cpp: 273: ImbThrowNode::evaluate: ComIbmThrowNode: gen/FileNetWS#FCMComposite_1_6.gen/FileNetWSInputCatchHandler#FCMComposite_1_2


And this is my output message:

Code:
 (0x01000000:Folder):SOAP       = ( ['SOAP' : 0xb0bf930]
    (0x03000102:NamespaceDecl)xmlns:nsFileNewWS     = 'http://FileNetWS' (CHARACTER)
    (0x03000102:NamespaceDecl)xmlns:nsFileNewWSData = 'http://www.contact admin.pt/FileNetWS' (CHARACTER)
    (0x01000000:Folder       ):Body                 = (
      (0x01000000:Folder)http://FileNetWS:AlteraPropDoc = (
        (0x01000000:Folder)http://www.contact admin.pt/FileNetWS:Header = (
          (0x03000000:PCDataField)http://www.contact admin.pt/FileNetWS:Version              = '1.0' (CHARACTER)
          (0x03000000:PCDataField)http://www.contact admin.pt/FileNetWS:TimeStamp            = GMTTIMESTAMP '2013-08-30 14:22:34.084963' (GMTTIMESTAMP)
          (0x03000000:PCDataField)http://www.contact admin.pt/FileNetWS:MessageGuid          = 'cdab2978-8067-43a5-822f-cae9a36ffe5d' (CHARACTER)
          (0x03000000:PCDataField)http://www.contact admin.pt/FileNetWS:GeneratorEntity      = 'Acoreana' (CHARACTER)
          (0x03000000:PCDataField)http://www.contact admin.pt/FileNetWS:GeneratorApplication = 'WSPrismaNewFileNetDoc' (CHARACTER)
          (0x03000000:PCDataField)http://www.contact admin.pt/FileNetWS:ServiceId            = 'PrismaNewFileNetDoc/operation1' (CHARACTER)
        )
        (0x01000000:Folder):Body                                          = (
          (0x03000000:PCDataField):user                                                = 'XXXX' (CHARACTER)
          (0x03000000:PCDataField):password                                            = 'YYYY' (CHARACTER)
          (0x03000000:PCDataField):system_name                                         = 'ZZZZ' (CHARACTER)
          (0x03000000:PCDataField):docId                                               = '12345' (CHARACTER)
          (0x01000000:Folder     )http://www.contact admin.pt/FileNetWS:propriedades = (
            (0x03000000:PCDataField):propriedade = '2' (CHARACTER)
            (
              (0x03000100:Attribute):nome = 'estado' (CHARACTER)
            )
          )
        )
      )
    )
  )


I also forgot to mention that I imported the service's WSDL, and also used and Endpoint Lookup to get the WSDL. Both ways result in the same exception.

Thank you for your help with this.
Back to top
View user's profile Send private message
dogorsy
PostPosted: Fri Aug 30, 2013 7:12 am    Post subject: Reply with quote

Knight

Joined: 13 Mar 2013
Posts: 553
Location: Home Office

so , the message you are getting is produced by the throw node you have wired to the flow. What you need to capture is the message that goes into the throw node, that will tell you (hopefully) why FileNet is giving you an error.
You can add a trace node before the throw node and get the message , or run with a debug user trace ( or both ).
Back to top
View user's profile Send private message
Sovesky
PostPosted: Fri Aug 30, 2013 7:16 am    Post subject: Reply with quote

Novice

Joined: 30 Aug 2013
Posts: 17

Unfortunately I don't have access to my destination service. I only have access to the start and rollback monitors of the soap input node.

The throw node is basically the SOAP Input catch handler. As I see, the exception is thrown immediately there.
Back to top
View user's profile Send private message
dogorsy
PostPosted: Fri Aug 30, 2013 7:19 am    Post subject: Reply with quote

Knight

Joined: 13 Mar 2013
Posts: 553
Location: Home Office

I am not asking anything from the destination service. Surely you can run a user trace in the machine where the flow is deployed, and can alter the flow to add the trace node and redeploy
Back to top
View user's profile Send private message
Sovesky
PostPosted: Fri Aug 30, 2013 7:39 am    Post subject: Reply with quote

Novice

Joined: 30 Aug 2013
Posts: 17

Yes, that's what I did. But the Throw node resides in the destination service. After the SOAP Request fails, I've put a trace after it with the Exception Tree and Root, giving me what I have in block of code some posts above (the Throw node Exception).
Back to top
View user's profile Send private message
dogorsy
PostPosted: Fri Aug 30, 2013 7:47 am    Post subject: Reply with quote

Knight

Joined: 13 Mar 2013
Posts: 553
Location: Home Office

Sovesky wrote:
Yes, that's what I did. But the Throw node resides in the destination service. After the SOAP Request fails, I've put a trace after it with the Exception Tree and Root, giving me what I have in block of code some posts above (the Throw node Exception).


the trace node needs to be before the 'gen.FileNetWS.Throw' node. It seems to me it is after it.

If you don't understand what I am saying, disconnect the throw node and connect the terminal that currently goes to the throw node to a trace node.

Also, run a debug user trace, that will contain quite a bit of information which will help you to understand what is going on.


Last edited by dogorsy on Fri Aug 30, 2013 7:51 am; edited 1 time in total
Back to top
View user's profile Send private message
Sovesky
PostPosted: Fri Aug 30, 2013 7:50 am    Post subject: Reply with quote

Novice

Joined: 30 Aug 2013
Posts: 17

'gen.FileNetWS.Throw' node is not in my service, but in the destination service that I'm calling. The error I receive when I do a SOAP Request to that service, comes from that Throw node.

I'm sorry if I was not clear with my previous posts
Back to top
View user's profile Send private message
dogorsy
PostPosted: Fri Aug 30, 2013 7:54 am    Post subject: Reply with quote

Knight

Joined: 13 Mar 2013
Posts: 553
Location: Home Office

Sovesky wrote:
'gen.FileNetWS.Throw' node is not in my service, but in the destination service that I'm calling. The error I receive when I do a SOAP Request to that service, comes from that Throw node.

I'm sorry if I was not clear with my previous posts


In that case you have to ask them to tell you why it is failing. The error message they are giving you should give you a clue as what the problem is and it is not.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Aug 30, 2013 12:11 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

dogorsy wrote:


Code:
SET OutputRoot.SOAP.(XMLNSC.NamespaceDecl)xmlns:NS1 = 'some namespace';


is incorrect. The namespaces are defined in the soap context folder (if you want them in the soap envelope), you need to look up the syntax in the docs.
I agree with fjb_saper and kimbert that you probably have something else wrong. Please post the complete message, ie. the message with the SOAP envelope, and the "unhelpful exception". It may not mean anything to you, but it may to someone else.


I agree with Dogorsy. Please review the declaration.
I believe it is in a folder like SOAP.Context.namespaces. Best look at an incoming SOAP document before it hits the SOAP extract node.

You could also put it into the SOAP Envelope ( XMLNSC ) being passed to the SOAP Envelope node
Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
dogorsy
PostPosted: Sat Aug 31, 2013 12:08 am    Post subject: Reply with quote

Knight

Joined: 13 Mar 2013
Posts: 553
Location: Home Office

The conclusion is, there is nothing wrong with the namespaces. You have some other problem and you need to find out what. The error message being returned from the service is not very helpful, so you need to ask them why the message is being rejected, and, if possible, ask the service to return more helpful error messages.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » SOAP Request - Namespaces declaration
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.