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 IndexWebSphere Message Broker (ACE) SupportHTTPRequest POST Method

Post new topicReply to topic Goto page Previous  1, 2
HTTPRequest POST Method View previous topic :: View next topic
Author Message
JustFriend
PostPosted: Wed Aug 17, 2005 9:15 am Post subject: Reply with quote

Novice

Joined: 30 May 2005
Posts: 22

First of all my heart-felt thanks to everyone who coordinated this support especially mgk

Mgk was right in explaining the position of BLOB and HTTPRequestHeader in the message which really matters.

Now…. I am able to do a HTTP POST through the HTTPRequest Node

For everybody’s interest, I am posting below the codes & description that I am using for the HTTP POST through HTTPRequest Node.
I haven’t gone into detailed explanation for basic things due to lack of time and work-pressure…. Please excuse me for that

About my Webservice:
My webservice takes one parameter and returns as string.
The parameter name is “TEST”

Details I see from my webservice page:

HTTP POST
The following is a sample HTTP POST request and response. The placeholders shown need to be replaced with actual values.
POST /BatWS/alsha_ws.asmx/HelloWorld HTTP/1.1
Host: 195.23.23.50
Content-Type: application/x-www-form-urlencoded
Content-Length: length

TEST=string
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://tempuri.org/BatWS/alsha_ws">string</string>




My Message Flow:

MQInput >> Compute1 >> HTTPRequest >> Compute2 >> MQOutput
I am getting a dummy message (any format) from the queue just to invoke the flow.

Compute1 ESQL:
Code:

DECLARE QRY CHAR '';
SET QRY = 'TEST=please';

SET Environment.MYMQMD = InputRoot.MQMD;
SET OutputRoot.HTTPRequestHeader.POST = '/BatWS/alsha_ws.asmx/AddPayments';
SET OutputRoot.HTTPRequestHeader.Host = '195.23.23.50';
SET OutputRoot.HTTPRequestHeader."Content-Type" = 'application/x-www-form-urlencoded';
SET OutputRoot.HTTPRequestHeader.SOAPAction = 'http://tempuri.org/BatWS/alsha_ws/AddPayments';
SET OutputLocalEnvironment.Destination.HTTP.RequestURL = 'http://195.23.23.50/BatWS/alsha_ws.asmx/AddPayments';
SET OutputRoot.BLOB.BLOB = CAST (QRY AS BLOB CCSID InputRoot.MQMD.CodedCharSetId);
RETURN TRUE;



HTTPRequest-Node Properties:

Basic:
Web-Service URL : http://195.23.23.50/BatWS/alsha_ws.asmx
Request Timeout : 120

Advanced:
Use whole input message as request : <checked>
Replace input message with web-service response : <checked>
Generate default HTTP headers from input : <checked>

Error:
Replace input with error : <checked>

Default:
Message Domain : BLOB
(All the rest are blanks)

Validation:
Validate : None


Compute2 Node ESQL:
Code:

CALL CopyMessageHeaders();
SET OutputRoot.MQMD = Environment.MYMQMD;
SET OutputRoot.Properties.MessageFormat = 'MQSTR';
SET OutputRoot.Properties.Encoding = 546;
SET OutputRoot.Properties.CodedCharSetId = 437;
      
SET OutputRoot.HTTPResponseHeader = null;
SET OutputRoot.HTTPRequestHeader = null;

-- Format xml by removing raw xml return from webservice
DECLARE MSG CHAR '';
SET MSG = CAST (InputRoot.BLOB.BLOB AS CHAR CCSID InputRoot.MQMD.CodedCharSetId);
SET MSG = REPLACE (MSG, '&lt;','<');
SET MSG = REPLACE (MSG, '&gt;','>');
      
SET OutputRoot.BLOB.BLOB = CAST (MSG AS BLOB CCSID InputRoot.MQMD.CodedCharSetId);
      
RETURN TRUE;




Thanks once again to everyone who makes this forum a success.
_________________
Best Regards,
Just Friend.
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
aiflin
PostPosted: Fri Oct 14, 2005 1:05 am Post subject: How to find Web Service URL Reply with quote

Newbie

Joined: 14 Oct 2005
Posts: 4

Hello Folks,
I have a simple java class which i have exposed as webservice. I have also made a web service client out of it. I am confused how do i know the WEB SERVICE URL of my web service. Please Help me.

Furthur, I also need to call this web service from message broker. I am facing problems in calling it. I am unable to give the right url in the web service URL field in HTTPRequest Node.

In my flow ( MQInput >> Compute1 >> HTTPRequest >> Compute2 >> MQOutput )

After the HTTPrequest node, the flow goes to error node and i cannot see any logs on the server side also.

Please help me folks.


Waiting to hear from all of u desperately.
Back to top
View user's profile Send private message
JustFriend
PostPosted: Fri Oct 14, 2005 12:34 pm Post subject: Reply with quote

Novice

Joined: 30 May 2005
Posts: 22

Aiflin,

Please tell us whether you are able to access your web-service through a web-browser (like MS Internet Explorer)
Since, the HTTPRequest Node expects a URL in the “Web Service URL” property, you can give a dummy URL like http://dummy

FYI, in the method described above does not take the URL from the HTTPRequest Node’s properties but it takes the URL which is supplied in the Compute-Node itself.

In the above example, this URL is set in the Compute1
SET OutputLocalEnvironment.Destination.HTTP.RequestURL = 'http://195.23.23.50/BatWS/alsha_ws.asmx/AddPayments';

AND, the parameter (query) is supplied as BLOB.

(Hope you got the idea)
_________________
Best Regards,
Just Friend.
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
aiflin
PostPosted: Sun Oct 16, 2005 7:51 pm Post subject: WBI (WMQI/WMB/MQSI) Support Reply with quote

Newbie

Joined: 14 Oct 2005
Posts: 4

JustFriend,
I know that the prrperty you told overriders the value set in Web Service URL in HTTPrequest Node. I already know this. But, in my problem is not this. It is, if you have a web service (with all WSDLs) where it is specified that "THIS" is the web service URL.

Please do let me know.

Thanks

aiflin
Back to top
View user's profile Send private message
aiflin
PostPosted: Mon Oct 17, 2005 10:48 pm Post subject: WBI (WMQI/WMB/MQSI) Support Reply with quote

Newbie

Joined: 14 Oct 2005
Posts: 4

JustAFriend , MGK ,

These are my traces :

Trace before HTTPrequest Node :

Code:
(
  (0x01000000):Properties        = (
    (0x03000000):MessageSet      = NULL
    (0x03000000):MessageType     = NULL
    (0x03000000):MessageFormat   = NULL
    (0x03000000):Encoding        = NULL
    (0x03000000):CodedCharSetId  = NULL
    (0x03000000):Transactional   = UNKNOWN
    (0x03000000):Persistence     = UNKNOWN
    (0x03000000):CreationTime    = NULL
    (0x03000000):ExpirationTime  = NULL
    (0x03000000):Priority        = NULL
    (0x03000000):ReplyIdentifier = NULL
    (0x03000000):ReplyProtocol   = 'MQ'
    (0x03000000):Topic           = NULL
  )
  (0x01000000):HTTPRequestHeader = (
    (0x03000000):POST       = '/simpleJavaWeb/services/Name'
    (0x03000000):Host       = '192.168.2.44'
    (0x03000000):SOAPAction = 'http://indus.com/simpleJavaWeb/services/Name'
  )
  (0x01000000):BLOB              = (
    (0x03000000):BLOB = X'4e414d453d706c65617365'
  )
)
(
  (0x01000000):Destination = (
    (0x01000000):HTTP = (
      (0x03000000):RequestURL = 'http://localhost:9080/simpleJavaWeb/services/Name'
    )
  )
)



Trace After HTTPRequest Node :

Code:
(0x01000000):Properties         = (
    (0x03000000):MessageSet      = ''
    (0x03000000):MessageType     = ''
    (0x03000000):MessageFormat   = ''
    (0x03000000):Encoding        = 546
    (0x03000000):CodedCharSetId  = 1208
    (0x03000000):Transactional   = FALSE
    (0x03000000):Persistence     = FALSE
    (0x03000000):CreationTime    = GMTTIMESTAMP '2005-10-18 06:03:18.859'
    (0x03000000):ExpirationTime  = -1
    (0x03000000):Priority        = 0
    (0x03000000):ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
    (0x03000000):ReplyProtocol   = 'MQ'
    (0x03000000):Topic           = NULL
  )
  (0x01000000):HTTPRequestHeader  = (
    (0x03000000):Content-Length = '11'
    (0x03000000):POST           = '/simpleJavaWeb/services/Name'
    (0x03000000):Host           = '192.168.2.44'
    (0x03000000):SOAPAction     = 'http://indus.com/simpleJavaWeb/services/Name'
    (0x03000000):Content-Type   = 'text/xml; charset=utf-8'
  )
  (0x01000000):HTTPResponseHeader = (
    (0x03000000):X-Original-HTTP-Status-Line = 'HTTP/1.1 500 Internal Server Error'
    (0x03000000):X-Original-HTTP-Status-Code = 500
    (0x03000000):Server                      = 'WebSphere Application Server/5.1'
    (0x03000000):Content-Type                = 'text/xml; charset=utf-8'
    (0x03000000):Content-Language            = 'en-US'
    (0x03000000):Connection                  = 'close'
  )
  (0x01000000):BLOB               = (
    (0x03000000):UnknownParserName = ''
    (0x03000000):BLOB              =
X'3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d2
25554462d38223f3e0a3c736f6170656e763a456e76656c6f706520786d6c
6e733a736f6170656e763d22687474703a2f2f736368656d61732e786d6c
736f61702e6f72672f736f61702f656e76656c6f70652f2220786d6c6e733a
736f6170656e633d22687474703a2f2f736368656d61732e786d6c736f61
702e6f72672f736f61702f656e636f64696e672f2220786d6c6e733a787364
3d22687474703a2f2f7777772e77332e6f72672f323030312f584d4c53636
8656d612220786d6c6e733a7873693d22687474703a2f2f7777772e77332
e6f72672f323030312f584d4c536368656d612d696e7374616e6365223e3
c736f6170656e763a426f64793e3c736f6170656e763a4661756c743e3c66
61756c74636f646520786d6c6e733d22223e5365727665722e67656e657
2616c457863657074696f6e3c2f6661756c74636f64653e3c6661756c7473
7472696e6720786d6c6e733d22223e3c215b43444154415b6f72672e786
d6c2e7361782e5341585061727365457863657074696f6e3a20416e2069
6e76616c696420584d4c206368617261637465722028556e69636f64653
a2030783465292077617320666f756e6420696e207468652070726f6c6f6
7206f662074686520646f63756d656e742e20546f2073656520746865206
d65737361676520636f6e7461696e696e67207468652070617273696e67
206572726f7220696e20746865206c6f672c2065697468657220656e6162
6c6520776562207365727669636520656e67696e652074726163696e672
06f7220736574204d657373616765436f6e746578742e73657448696768
466964656c6974792874727565292e5d5d3e3c2f6661756c74737472696
e673e3c64657461696c20786d6c6e733d22222f3e3c2f736f6170656e763a
4661756c743e3c2f736f6170656e763a426f64793e3c2f736f6170656e763a
456e76656c6f70653e'
  )
)



Please help me in solving the problem.
Back to top
View user's profile Send private message
aiflin
PostPosted: Tue Oct 18, 2005 1:01 am Post subject: WBI (WMQI/WMB/MQSI) Support Reply with quote

Newbie

Joined: 14 Oct 2005
Posts: 4

Hi,
In addition to above problem...I am getting this error at the server side...

faultCode: Server.generalException
faultString: org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x4e) was found in the prolog of the document. To see the message containing the parsing error in the log, either enable web service engine tracing or set MessageContext.setHighFidelity(true).
faultActor: null
faultDetail:

org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x4e) was found in the prolog of the document. To see the message containing the parsing error in the log, either enable web service engine tracing or set MessageContext.setHighFidelity(true).
at com.ibm.ws.webservices.engine.WebServicesFault.makeFault(WebServicesFault.java:173)
at com.ibm.ws.webservices.engine.SOAPPart.getSOAPEnvelope(SOAPPart.java:892)
at com.ibm.ws.webservices.engine.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:612)
at com.ibm.ws.webservices.engine.Message.getSOAPEnvelope(Message.java:452)
at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXRPCSOAPHandler.checkSOAPSemantics(JAXRPCSOAPHandler.java:218)
at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXRPCSOAPHandler.invokeServerRequestHandler(JAXRPCSOAPHandler.java:188)
at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXRPCHandler$1.invoke(JAXRPCHandler.java:214)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:195)
at com.ibm.ws.webservices.engine.handlers.WrappedHandler.invoke(WrappedHandler.java:61)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:212)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:212)
at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngine.java:255)
at com.ibm.ws.webservices.engine.transport.http.WebServicesServlet.doPost(WebServicesServlet.java:850)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at com.ibm.ws.webservices.engine.transport.http.WebServicesServletBase.service(WebServicesServletBase.java:341)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1015)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:589)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:209)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:121)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:280)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:615)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:672)
Caused by: org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x4e) was found in the prolog of the document.
at sax.SAX2DocumentEntityParserBase.reportFatalError(Unknown Source)
at com.ibm.xml.b2b.scan.WFCDocumentScannerSupport.reportFatalError(Unknown Source)
at com.ibm.xml.b2b.scan.latin.LatinWFCDocumentScanner.scanDocument(Unknown Source)
at sax.latin.LatinWFCSAX2DocumentEntityParser.scanDocument(Unknown Source)
at util.DocumentEntityParserBase.parse(Unknown Source)
at sax.SAX2DocumentEntityParserBase.parseEntity(Unknown Source)
at sax.SAX2DocumentEntityParserBase.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at com.ibm.ws.webservices.engine.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:251)
at com.ibm.ws.webservices.engine.SOAPPart.getSOAPEnvelope(SOAPPart.java:882)
... 33 more




Please help me guys....
Back to top
View user's profile Send private message
mgk
PostPosted: Wed Oct 19, 2005 3:59 am Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1638

Hi,

In your HTTPRequest Header you do not specify a content type, which means that you will get the default content type which is Content-Type = 'text/xml; charset=utf-8 This means your webservice will be expecting XML, but you seem to be sending them a blob, containing the data: "NAME=please" and the unicode character 4E that your error is complaining about is the N of NAME.

What data are you trying to send, as you do not say. It looks like you are trying to send form encoded data. Try specifying the correct content type for the data you are sending.

Regards,
_________________
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
View user's profile Send private message
solomita
PostPosted: Mon Jun 26, 2006 7:09 pm Post subject: Dynamic HTTP Request Reply with quote

Voyager

Joined: 06 May 2003
Posts: 94

I tried to follow this post but am still having problems. I have an MQInput Node -> Compute -> HTTP Request node.

I have very simple ESQL in Compute node:
CALL CopyEntireMessage();
--DECLARE LocalEnvironment reference to OutputLocalEnvironment;
SET OutputLocalEnvironment.Destination.HTTP.RequestURL = CAST(InputBody.BLOB.BLOB AS CHAR CCSID 437);

Trace before HTTP Request:
Code:
(
  (0x01000000):Properties = (
    (0x03000000):MessageSet      = ''
    (0x03000000):MessageType     = ''
    (0x03000000):MessageFormat   = ''
    (0x03000000):Encoding        = 546
    (0x03000000):CodedCharSetId  = 1208
    (0x03000000):Transactional   = TRUE
    (0x03000000):Persistence     = FALSE
    (0x03000000):CreationTime    = GMTTIMESTAMP '2006-06-27 03:06:05.310'
    (0x03000000):ExpirationTime  = -1
    (0x03000000):Priority        = 0
    (0x03000000):ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
    (0x03000000):ReplyProtocol   = 'MQ'
    (0x03000000):Topic           = NULL
    (0x03000000):ContentType     = ''
  )
  (0x01000000):MQMD       = (
    (0x03000000):SourceQueue      = 'TEST.IN'
    (0x03000000):Transactional    = TRUE
    (0x03000000):Encoding         = 546
    (0x03000000):CodedCharSetId   = 1208
    (0x03000000):Format           = 'MQSTR   '
    (0x03000000):Version          = 2
    (0x03000000):Report           = 0
    (0x03000000):MsgType          = 8
    (0x03000000):Expiry           = -1
    (0x03000000):Feedback         = 0
    (0x03000000):Priority         = 0
    (0x03000000):Persistence      = 0
    (0x03000000):MsgId            = X'414d51205742524b365f44454641554c7392a0442000c602'
    (0x03000000):CorrelId         = X'000000000000000000000000000000000000000000000000'
    (0x03000000):BackoutCount     = 0
    (0x03000000):ReplyToQ         = '                                                '
    (0x03000000):ReplyToQMgr      = 'WBRK6_DEFAULT_QUEUE_MANAGER                     '
    (0x03000000):UserIdentifier   = 'hfitzger    '
    (0x03000000):AccountingToken  = X'16010515000000efb1f8553f60531f3bf3f8b3f103000000000000000000000b'
    (0x03000000):ApplIdentityData = '                                '
    (0x03000000):PutApplType      = 11
    (0x03000000):PutApplName      = '30\eclipse\jre\bin\javaw.exe'
    (0x03000000):PutDate          = DATE '2006-06-27'
    (0x03000000):PutTime          = GMTTIME '03:06:05.310'
    (0x03000000):ApplOriginData   = '    '
    (0x03000000):GroupId          = X'000000000000000000000000000000000000000000000000'
    (0x03000000):MsgSeqNumber     = 1
    (0x03000000):Offset           = 0
    (0x03000000):MsgFlags         = 0
    (0x03000000):OriginalLength   = -1
  )
  (0x01000000):BLOB       = (
    (0x03000000):UnknownParserName = 'MQSTR'
    (0x03000000):BLOB              =
X'687474703a2f2f77696e326b7376722e6d7965676f7665726e6d656e74
2e636f6d2f4f4249535f436174636865722f4f42495343617463686572536
572766c65743f76696e3d494356303038266c617469747564653d333435
39363332266c6f6e6769747564653d343336383937392673656e736f723
d656e67696e65267374617475733d32'
  )
)

(
  (0x01000000):Destination = (
    (0x01000000):HTTP = (
      (0x01000000):RequestURL = (
        (0x03000000):UnknownParserName = 'MQSTR'
        (0x03000000):BLOB              =
X'687474703a2f2f77696e326b7376722e6d7965676f7665726e6d656e74
2e636f6d2f4f4249535f436174636865722f4f42495343617463686572536
572766c65743f76696e3d494356303038266c617469747564653d333435
39363332266c6f6e6769747564653d343336383937392673656e736f723
d656e67696e65267374617475733d32'
      )
    )
  )
)




Trace after HTTP Request:
Code:
(
  (0x01000000):Properties         = (
    (0x03000000):MessageSet      = ''
    (0x03000000):MessageType     = ''
    (0x03000000):MessageFormat   = ''
    (0x03000000):Encoding        = 546
    (0x03000000):CodedCharSetId  = 819
    (0x03000000):Transactional   = FALSE
    (0x03000000):Persistence     = FALSE
    (0x03000000):CreationTime    = GMTTIMESTAMP '2006-06-27 03:05:53.958'
    (0x03000000):ExpirationTime  = -1
    (0x03000000):Priority        = 0
    (0x03000000):ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
    (0x03000000):ReplyProtocol   = 'MQ'
    (0x03000000):Topic           = NULL
    (0x03000000):ContentType     = 'text/html; charset=ISO-8859-1'
  )
  (0x01000000):HTTPResponseHeader = (
    (0x03000000):X-Original-HTTP-Status-Line = 'HTTP/1.1 200 OK'
    (0x03000000):X-Original-HTTP-Status-Code = 200
    (0x03000000):Date                        = 'Tue, 27 Jun 2006 04:06:39 GMT'
    (0x03000000):Server                      = 'IBM_HTTP_SERVER/1.3.26.2  Apache/1.3.26 (Win32)'
    (0x03000000):Connection                  = 'close'
    (0x03000000):Content-Type                = 'text/html; charset=ISO-8859-1'
    (0x03000000):Content-Language            = 'en-US'
  )
  (0x01000000):BLOB               = (
    (0x03000000):UnknownParserName = ''
    (0x03000000):BLOB              = X'4f4b'
  )
)

(
  (0x01000000):Destination        = (
    (0x01000000):HTTP = (
      (0x01000000):RequestURL = (
        (0x03000000):UnknownParserName = 'MQSTR'
        (0x03000000):BLOB              =
X'687474703a2f2f77696e326b7376722e6d7965676f7665726e6d656e74
2e636f6d2f4f4249535f436174636865722f4f42495343617463686572536
572766c65743f76696e3d494356303038266c617469747564653d333435
39363332266c6f6e6769747564653d343336383937392673656e736f723
d656e67696e65267374617475733d32'
      )
    )
  )
  (0x01000000):WrittenDestination = (
    (0x01000000):MQ = (
      (0x01000000):DestinationData = (
        (0x03000000):queueName        = 'LDMSLDMS.OUT'
        (0x03000000):queueManagerName = ''
        (0x03000000):replyIdentifier  = X'414d51205742524b365f44454641554c7392a0442000c602'
        (0x03000000):msgId            = X'414d51205742524b365f44454641554c7392a0442000c602'
        (0x03000000):correlId         = X'000000000000000000000000000000000000000000000000'
      )
    )
  )
)

_________________
IBM Certified Specialist - WebSphere MQ Integrator
IBM Certified System Administrator - WebSphere MQ V5.3
IBM Certified System Administrator - WebSphere Business Integration Message Broker V5
Back to top
View user's profile Send private message Yahoo Messenger
mgk
PostPosted: Tue Jul 04, 2006 6:02 am Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1638

Hi InputBody.BLOB.BLOB is wrong, you will be one level too deep. It needs to be InputBody.BLOB or InputRoot.BLOB.BLOB (InputBody actually points to InputRoot.BLOB in your case, assuming that BLOB is the lastchild of root.)

Regards,
_________________
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
View user's profile Send private message
Cogito-Ergo-Sum
PostPosted: Thu Jan 26, 2012 1:19 pm Post subject: No node to add query string ... Reply with quote

Master

Joined: 07 Feb 2006
Posts: 293
Location: Bengaluru, India

It would be so nice to have a node that adds the parameter=value in the query string than having to hand code all of this.
_________________
ALL opinions are welcome.
-----------------------------
Debugging tip:When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
---Sherlock Holmes
Back to top
View user's profile Send private message
mgk
PostPosted: Thu Jan 26, 2012 1:37 pm Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1638

Wow, that's an old thread to open up!

Since 2005, some improvements have been made in this area. The HTTPInput node has a option to auto-parse the QueryString into the LocalEnvironment. Also, the HTTPRequest node will look in the LE for a set of Name/Value pairs and automatically form an outbound QueryString from any pairs present (auto url-encoding etc) See the Info Center for details.

Hope this helps,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.


Last edited by mgk on Tue Mar 29, 2022 4:00 am; edited 2 times in total
Back to top
View user's profile Send private message
Cogito-Ergo-Sum
PostPosted: Thu Jan 26, 2012 2:46 pm Post subject: Reply with quote

Master

Joined: 07 Feb 2006
Posts: 293
Location: Bengaluru, India

Got it. Thanks !
_________________
ALL opinions are welcome.
-----------------------------
Debugging tip:When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
---Sherlock Holmes
Back to top
View user's profile Send private message
MatthewDCampbell
PostPosted: Tue Mar 29, 2022 1:35 am Post subject: Logic behind both HTTPHeader and InputRoot.Blob Reply with quote

Novice

Joined: 29 Sep 2020
Posts: 21

(Changed this post from the original)

Feedback if somebody else running into a problem with POST of what is similar to a query string with GET. When i wrote the first post I thought somehow a HTTPHeader node effected the HTTPRequest but that isn't the case. The code used is the following:

Code:

SET OutputRoot.HTTPRequestHeader."Content-Type" = 'x-www-form-urlencoded';

DECLARE payload CHARACTER;
SET payload = '....'; -- & delimited values
SET OutputRoot.Blob = CAST(payload AS BLOB CCSID 1208 ENCODING 815);


US/docs/Web/HTTP/Methods/POST[/url]). Assumed the CAST with ENCODING directive would do that automatically handle non-characters (see https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST). CAST https://www.ibm.com/docs/en/integration-bus/9.0.0?topic=functions-supported-casts converts characters to blob (plus other value types) and the encoding parameters doesn't effect the content of the value types. Instead there is a local environment variable (see https://www.ibm.com/docs/en/integration-bus/10.0?topic=nodes-httprequest-node) which by default (i.e. not present) effects the HTTP call.


Last edited by MatthewDCampbell on Wed Mar 30, 2022 11:53 pm; edited 2 times in total
Back to top
View user's profile Send private message
mgk
PostPosted: Tue Mar 29, 2022 12:31 pm Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1638

Wow, this is an old thread to open up! 10 years since it was last re-opened and 15 since it was originally created. This may be the oldest thread still in use on mqseries.net

So I'm not sure what you are trying to achieve here from your post. Maybe if you post an example of the output message you are trying to create that would help. Also opening a new thread might be a good idea as well unless it really is related to the original question??

Regards,
_________________
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
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum IndexWebSphere Message Broker (ACE) SupportHTTPRequest POST Method
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.