Author |
Message
|
kai_huang2012 |
Posted: Tue Jun 04, 2013 5:19 pm Post subject: RequestSoap Node get fault response |
|
|
Newbie
Joined: 04 Jun 2013 Posts: 5
|
We use RequestSoap node and get fault response as below:
Code: |
(0x01000000:Folder):Header =
(0x01000000:Folder):Body = ( ['xmlnsc' : 0xb4aa7fe]
(0x01000000:Folder)http://www.w3.org/2003/05/soap-envelope:Fault = (
(0x01000000:Folder)http://www.w3.org/2003/05/soap-envelope:Code = (
(0x03000000:PCDataField)http://www.w3.org/2003/05/soap-envelope:Value = 'soap:Receiver' (CHARACTER)
)
(0x01000000:Folder)http://www.w3.org/2003/05/soap-envelope:Reason = (
(0x03000000:PCDataField)http://www.w3.org/2003/05/soap-envelope:Text = 'Server was unable to process request. ---> System does not support 'ibm-850' encoding. Line 1, position 31.' (CHARACTER)
(
(0x03000100:Attribute)http://www.w3.org/XML/1998/namespace:lang = 'en' (CHARACTER)
)
)
(0x01000000:Folder)http://www.w3.org/2003/05/soap-envelope:Detail =
)
) |
The Message get passed into this node is constructed by JavaCompute Node
Code: |
(0x01000021:Name+):MRM = ( ['mrm' : 0xbad9850]
(0x01000000:Name)http://www.domain.com/vMessaging/:SendMsg = (
(0x01000000:Name):AdditionalInfo = (
(0x03000000:NameValue):Title = NULL
(0x03000000:NameValue):FirstName = 'Test' (CHARACTER)
(0x03000000:NameValue):Surname = 'Test' (CHARACTER)
(0x03000000:NameValue):MobileNumber = '233223233' (CHARACTER)
(0x03000000:NameValue):eMailAddress = NULL
)
(0x01000000:Name):Messages = (
(0x01000000:Name):Message = (
(0x03000000:NameValue):ID = '2' (CHARACTER)
(0x03000000:NameValue):Type = 'sms' (CHARACTER)
(0x03000000:NameValue):Property = NULL
(
(0x03000000:NameValue):Name = 'Number' (CHARACTER)
(0x03000000:NameValue):Value = '233223233' (CHARACTER)
)
(0x03000000:NameValue):Property = NULL
(
(0x03000000:NameValue):Name = 'Body' (CHARACTER)
(0x03000000:NameValue):Value = 'Your mobile number has been updated..' (CHARACTER)
)
)
)
)
)
|
I really want to look at the soap request envelop constructed by SOAPREQUEST node, any idea?
or How to tackle this issue?
I found some other posts that, and they also use soap envelope node before soap request node. is this step crucial? or soap request will auto-construct a soap request envelope ?
We are using MQBT v8.0.0.1
many thanks
Last edited by kai_huang2012 on Tue Jun 04, 2013 5:25 pm; edited 1 time in total |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Jun 04, 2013 5:22 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
what are you doing passing an MRM message to a SOAPRequest node?
You think it's magically going to turn it into an XML message? |
|
Back to top |
|
 |
kai_huang2012 |
Posted: Tue Jun 04, 2013 5:33 pm Post subject: |
|
|
Newbie
Joined: 04 Jun 2013 Posts: 5
|
mqjeff wrote: |
what are you doing passing an MRM message to a SOAPRequest node?
You think it's magically going to turn it into an XML message? |
Thanks for reply. I get your point.
Also I think either soap envelope node and compute node can help construct up, but soap envelope node might be more easier, |
|
Back to top |
|
 |
kai_huang2012 |
Posted: Wed Jun 05, 2013 12:42 am Post subject: |
|
|
Newbie
Joined: 04 Jun 2013 Posts: 5
|
Now, I use compute node -> soaprequest node, and it is working.
Following is tracked soap request for SOAPREQUEST node:
Code: |
( ['GENERICROOT' : 0x13565f00]
(0x01000000:Folder):SOAP = ( ['SOAP' : 0xf6689a0]
(0x01000000:Folder):Body = (
(0x01000000:Folder)http://www.messagenet.com.au/dotnet:LodgeSMSMessage = (
(0x03000000:PCDataField)http://www.messagenet.com.au/dotnet:Username = 'test' (CHARACTER)
(0x03000000:PCDataField)http://www.messagenet.com.au/dotnet:Pwd = 'test' (CHARACTER)
(0x03000000:PCDataField)http://www.messagenet.com.au/dotnet:PhoneNumber = '0431373656' (CHARACTER)
(0x03000000:PCDataField)http://www.messagenet.com.au/dotnet:PhoneMessage = 'Test message' (CHARACTER)
)
)
)
)
|
But, Manager said we should use Java Compute Node.We can not use ESQL.
So I tried two approach :
1. Java Compute node -> soap envelope node -> soap request node
Code: |
MbElement outRoot=outMessage.getRootElement();
outRoot.setSpecificType(MbXMLNSC.NAMESPACE_DECLARATION("http://www.message.com./dotnet/");
MbElement messageRoot = outRoot.createElementAsLastChild("XMLNSC");
MbElement outPut = messageRoot.createElementAsLastChild(MbXMLNSC.FOLDER,"LodgeSMSMessage",null);
outPut.createElementAsFirstChild(MbElement.TYPE_NAME_VALUE,"Username", "test");
outPut.createElementAsLastChild(MbElement.TYPE_NAME_VALUE,"Pwd", "tes");
outPut.createElementAsFirstChild(MbElement.TYPE_NAME_VALUE,"PhoneNumber", "0431374444");
outPut.createElementAsLastChild(MbElement.TYPE_NAME_VALUE,"PhoneMessage", "hello world.");
|
Then I tracked the output from envelope node is:
Code: |
(0x01000000:Folder):XMLNSC = ( ['xmlnsc' : 0x1cacec0]
(0x03000000:PCDataField)http://schemas.xmlsoap.org/soap/envelope/:Envelope = NULL
(
(0x03000102:NamespaceDecl)xmlns:soapenc = 'http://schemas.xmlsoap.org/soap/encoding/' (CHARACTER)
(0x03000102:NamespaceDecl)xmlns:soapenv = 'http://schemas.xmlsoap.org/soap/envelope/' (CHARACTER)
(0x03000102:NamespaceDecl)xmlns:xsd = 'http://www.w3.org/2001/XMLSchema' (CHARACTER)
(0x03000102:NamespaceDecl)xmlns:xsi = 'http://www.w3.org/2001/XMLSchema-instance' (CHARACTER)
(0x03000000:PCDataField )http://schemas.xmlsoap.org/soap/envelope/:Body = NULL
(
(0x01000000:Folder):LodgeSMSMessage = (
(0x03000000:PCDataField):PhoneNumber = '0431374444' (CHARACTER)
(0x03000000:PCDataField):Username = 'test' (CHARACTER)
(0x03000000:PCDataField):Pwd = 'tes' (CHARACTER)
(0x03000000:PCDataField):PhoneMessage = 'hello world.' (CHARACTER)
)
)
)
) |
This soap request does not seems correct to me and the response from service provider is:'Message send failed. Invalid arguments
Any Idea?
2.JAVA COMPUTE NODE -> SOAPREQUEST NODE
Apparently this will not work as well.
Can we create a soap type of message like ESQL does?
Any suggestion? Thanks |
|
Back to top |
|
 |
lancelotlinc |
Posted: Wed Jun 05, 2013 3:10 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
kai_huang2012 wrote: |
But, Manager said we should use Java Compute Node.We can not use ESQL. |
What does a manager know about developing message flows? The whole point of ESQL is to do things in a more efficient way than you can with other transformation languages.
Your manager is wrong. Tell him so. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Jun 05, 2013 3:35 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
lancelotlinc wrote: |
kai_huang2012 wrote: |
But, Manager said we should use Java Compute Node.We can not use ESQL. |
What does a manager know about developing message flows? The whole point of ESQL is to do things in a more efficient way than you can with other transformation languages.
Your manager is wrong. Tell him so. |
The manager might know that they are using Express Edition, which doesn't allow the use of Compute nodes.
The manager might know that all team members that will end up supporting this are only trained in Java, and that having some code be written in Java and some code written in ESQL will make code reviews complicated and annoying, and require additional sets of coding standards. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Wed Jun 05, 2013 4:01 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
mqjeff wrote: |
lancelotlinc wrote: |
kai_huang2012 wrote: |
But, Manager said we should use Java Compute Node.We can not use ESQL. |
What does a manager know about developing message flows? The whole point of ESQL is to do things in a more efficient way than you can with other transformation languages.
Your manager is wrong. Tell him so. |
The manager might know that they are using Express Edition, which doesn't allow the use of Compute nodes.
The manager might know that all team members that will end up supporting this are only trained in Java, and that having some code be written in Java and some code written in ESQL will make code reviews complicated and annoying, and require additional sets of coding standards. |
It seems the OP somehow unlocked the ESQL Compute node from the express edition... ??
People smart enough to write Java cannot read ESQL code ... ??
You want to know whats really annoying ... ?
Not being able to get the c o l o r car I want. Henry Ford said, "You can have any color you want as long as its black." _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Jun 05, 2013 5:20 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
The soap Envelope node will need from you to have an envelope (XMLNSC) in a defined place (environment or local environment) that has at least soap:Envelope and soap:Body defined but can/may also have soap:Header defined. The SOAP Envelope node will then incorporate those in the Tree at the right place.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
kai_huang2012 |
Posted: Wed Jun 05, 2013 6:17 am Post subject: |
|
|
Newbie
Joined: 04 Jun 2013 Posts: 5
|
fjb_saper wrote: |
The soap Envelope node will need from you to have an envelope (XMLNSC) in a defined place (environment or local environment) that has at least soap:Envelope and soap:Body defined but can/may also have soap:Header defined. The SOAP Envelope node will then incorporate those in the Tree at the right place.
Have fun  |
Thanks For the tip. I will try this. |
|
Back to top |
|
 |
kai_huang2012 |
Posted: Wed Jun 05, 2013 4:11 pm Post subject: |
|
|
Newbie
Joined: 04 Jun 2013 Posts: 5
|
fjb_saper wrote: |
The soap Envelope node will need from you to have an envelope (XMLNSC) in a defined place (environment or local environment) that has at least soap:Envelope and soap:Body defined but can/may also have soap:Header defined. The SOAP Envelope node will then incorporate those in the Tree at the right place.
Have fun  |
Thanks, I think I work out the solution. I do add a variable in locol environment,
Code: |
outAssembly.getLocalEnvironment().getRootElement().createElementAsLastChild("XMLNSC"); |
Also, I use SOAPUI to generate a soap request envelope and compare with the message body, there is a namepsace missing in place.
Thanks for all the help.  |
|
Back to top |
|
 |
|