Author |
Message
|
angka |
Posted: Sun Oct 19, 2008 10:27 pm Post subject: HTTP Request Node on MB 6.0 |
|
|
Chevalier
Joined: 20 Sep 2005 Posts: 406
|
Hi,
I have a simple set up but just cant get it working. Below is the flow:
MQInput->Compute->HttpRequest->Compute1(out)->MQOutput
->Compute2(error)->MQOutput
When the message is put to the queue, it is without the SOAP header. the 1st Compute node is to store the MQMD only. After the HTTPRequest node, it keeps returning HTTP/1.1 500 Internal Server Error in the HTTPRespnoseHeader. I tried with normal Web Service call with the same content it is okay. Or is there anything else i need to configure or set? Thanks |
|
Back to top |
|
 |
Gaya3 |
Posted: Sun Oct 19, 2008 11:49 pm Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
its not setting MQMD over there at compute, you should build the SOAP header, where you have to set SOAPAction, and all details.
did you set those, if not do the same
if you dont mind, post the ESQL here _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
angka |
Posted: Mon Oct 20, 2008 12:25 am Post subject: |
|
|
Chevalier
Joined: 20 Sep 2005 Posts: 406
|
Hi,
Below my esql for the 1st compute node:
CALL CopyEntireMessage();
SET Environment.Variables.MQMD = InputRoot.MQMD;
SET OutputRoot.HTTPRequestHeader."Content-Type" = 'text/xml;charset=utf-8';
SET OutputRoot.HTTPRequestHeader.SOAPAction = '';
you mean i should build the SOAP header <SOAP-ENV:Envelope xmlns...> into the message? How do i build? using Mapping node?
If the MQ message is with the SOAP header instead of only the payload and i don't add the SOAP header, can it works?
Thanks |
|
Back to top |
|
 |
Gaya3 |
Posted: Mon Oct 20, 2008 1:23 am Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
first of all the webservice doesn't understand MQMD, it require SOAP headers.
if your WSDL is intact, you can come up with the SOAP envelope and body details
From you esql, the SOAP ACTION is missing.
you should declare the namespace, if required, then build the SOAP message accordingly to the WSDL _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
angka |
Posted: Mon Oct 20, 2008 1:34 am Post subject: |
|
|
Chevalier
Joined: 20 Sep 2005 Posts: 406
|
Hi,
I know Web Services don't understand MQMD. It will not be process by the HTTPRequest node right??
If the MQ message body is with all the SOAP envelope and body details(payload), instead of me adding the SOAP envelope, can it works?
Thanks. |
|
Back to top |
|
 |
Gaya3 |
Posted: Mon Oct 20, 2008 1:44 am Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
but still you have to build the HTTP headers for the same, i have added some thing more to your ESQL, Please try and test
--Haven't tested
SET Environment.MQMD = InputRoot.MQMD;
SET OutputRoot.Properties = InputRoot.Properties;
SET OutputRoot.Properties.ReplyIdentifier = InputRoot.MQMD.MsgId;
SET OutputRoot.Properties.ReplyProtocol = 'HTTP';
SET OutputRoot."HTTPInputHeader"."Host" = '';
SET OutputRoot."HTTPInputHeader"."Content-Length" = '-1';
SET OutputRoot."HTTPInputHeader"."Content-Type" = 'text/xml';
SET OutputRoot."HTTPInputHeader"."SOAPAction" = '<Get the Soap Action method from the WSDL Doc>';
SET OutputRoot = InputRoot; (As you said, the message is coming in properformat) _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
angka |
Posted: Mon Oct 20, 2008 3:39 am Post subject: |
|
|
Chevalier
Joined: 20 Sep 2005 Posts: 406
|
Hi,
I tried.. below are the content of the response error:
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode xmlns:fc='http://www.bea.com/2003/04/jwFaultCode/'>fc:JWSError</faultcode>
<faultstring>. Expected XML, but no elements found.. </faultstring>
<detail>
<jwErr:jwErrorDetail xmlns:jwErr='http://www.bea.com/2002/04/jwErrorDetail/'>. com.bea.wlw.runtime.core.request.RequestValidationException: Expected XML, but no elements found. [ServiceException]...at com.bea.wlw.runtime.jws.request.SoapResponse.processException(SoapResponse.java:194)...at com.bea.wlw.runtime.core.request.BaseResponse.setFault(BaseResponse.java:23)...at com.bea.wlw.runtime.core.bean.SyncDispatcherBean.invoke(SyncDispatcherBean.java:218)...at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl.invoke(SyncDispatcher_k1mrl8_EOImpl.java:100)...at com.bea.wlw.runtime.core.dispatcher.Dispatcher.remoteDispatch(Dispatcher.java:161)...at com.bea.wlw.runtime.core.dispatcher.Dispatcher.dispatch(Dispatcher.java:49)...at com.bea.wlw.runtime.core.dispatcher.HttpServerHelper.executePostRequest(HttpServerHelper.java:713)...at com.bea.wlw.runtime.core.dispatcher.HttpServer.doPost(HttpServer.java:49)...at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)...at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)...at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1072)...at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465)...at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:348)...at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6985)...at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)...at weblogic.security.service.SecurityManager.contact admin(SecurityManager.java:121)...at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3892)...at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2766)...at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)...at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)..Caused by: com.bea.wlw.runtime.core.request.RequestValidationException: Expected XML, but no elements found....at com.bea.wlw.runtime.jws.request.XmlRequest.validateTarget(XmlRequest.java:135)...at com.bea.wlw.runtime.core.bean.SyncDispatcherBean.invoke(SyncDispatcherBean.java:65)...... 17 more... </jwErr:jwErrorDetail>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
What is wrong?? Thanks |
|
Back to top |
|
 |
Gaya3 |
Posted: Mon Oct 20, 2008 3:51 am Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
<faultstring>. Expected XML, but no elements found.. </faultstring>
whats this? _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
angka |
Posted: Mon Oct 20, 2008 4:22 am Post subject: |
|
|
Chevalier
Joined: 20 Sep 2005 Posts: 406
|
Hi,
But my message there is content. what is wrong? |
|
Back to top |
|
 |
angka |
Posted: Mon Oct 20, 2008 9:44 am Post subject: |
|
|
Chevalier
Joined: 20 Sep 2005 Posts: 406
|
Hi,
anyone can help?? Thanks |
|
Back to top |
|
 |
mgk |
Posted: Mon Oct 20, 2008 10:57 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Put a trace node immediately before the HTTPRequest node and trace $Root and paste the output here. _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
angka |
Posted: Mon Oct 20, 2008 7:09 pm Post subject: |
|
|
Chevalier
Joined: 20 Sep 2005 Posts: 406
|
Hi all,
Got it working. Thanks for the help. |
|
Back to top |
|
 |
Gaya3 |
Posted: Mon Oct 20, 2008 8:21 pm Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
angka wrote: |
Hi all,
Got it working. Thanks for the help. |
Let us all know, how did it work, what change you have done
it will be great if you could provide those information to all of us _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
angka |
Posted: Wed Oct 22, 2008 7:39 pm Post subject: |
|
|
Chevalier
Joined: 20 Sep 2005 Posts: 406
|
Hi,
I did not remove the MQMD header. =S |
|
Back to top |
|
 |
angka |
Posted: Wed Apr 01, 2009 2:14 am Post subject: |
|
|
Chevalier
Joined: 20 Sep 2005 Posts: 406
|
Hi,
How to i add soap header into a message and how to remove the xml declaration in the existing message? i am using WMB V6.0
Thanks |
|
Back to top |
|
 |
|