Author |
Message
|
grammer |
Posted: Fri Feb 08, 2008 11:08 am Post subject: HTTP Request Node |
|
|
 Novice
Joined: 08 Feb 2008 Posts: 16 Location: Canada
|
How do you get a HTTP Request Node get data from the web service using HTTP-GET.
I keep trying and i get "The requested name is valid, but no data of the requested type was found"
I tried settign the connect type in my ESQL script but it does not work
ESQL
Code: |
BEGIN
--SET OutputLocalEnvironment.Destination.HTTP.RequestLine.Method = 'GET';
--SET OutputLocalEnvironment.Destination.HTTP.RequestURL = 'http://www.someSite.com/yarr/foobar.asp?apt=xxx&pwd=yyy';
SET OutputRoot.HTTPRequestHeader.GET = '/yarr/foobar.asp?apt=xxx&pwd=yyy';
SET OutputRoot.HTTPRequestHeader.Host = 'http://www.someSite.com';
SET OutputRoot.HTTPRequestHeader."Content-Type" = 'text/xml; charset=UTF-8';
--SET OutputLocalEnvironment.Destination.HTTP.RequestURL = 'http://www.someSite.com/yarr/foobar.asp?apt=xxx&pwd=yyy';
-- CALL CopyMessageHeaders();
-- CALL CopyEntireMessage();
RETURN TRUE;
END; |
The web service return an xml document |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Feb 08, 2008 11:22 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Can you post the full HTTP Reply Header? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
grammer |
Posted: Fri Feb 08, 2008 11:26 am Post subject: |
|
|
 Novice
Joined: 08 Feb 2008 Posts: 16 Location: Canada
|
sorry for being a noob here, but what do u mean by a http reply header. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Feb 08, 2008 12:25 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Where are you getting
Quote: |
The requested name is valid, but no data of the requested type was found |
?
Post all the information that came back with that piece of data.
Put a Trace node after the HTTPRequest node, and look at everything that comes back. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
grammer |
Posted: Fri Feb 08, 2008 12:46 pm Post subject: |
|
|
 Novice
Joined: 08 Feb 2008 Posts: 16 Location: Canada
|
here is the trace after the http request node
Code: |
==========================================
=========Fail From HTTP REQUEST =========
Time is: 13:9
==========================================
+++++++++ROOT
(
(0x01000000):Properties = (
(0x03000000):MessageSet = ''
(0x03000000):MessageType = ''
(0x03000000):MessageFormat = ''
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 0
(0x03000000):Transactional = TRUE
(0x03000000):Persistence = FALSE
(0x03000000):CreationTime = TIMESTAMP '2008-02-08 13:09:15.243'
(0x03000000):ExpirationTime = -1
(0x03000000):Priority = 0
(0x03000000):ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
(0x03000000):ReplyProtocol = ''
(0x03000000):Topic = NULL
(0x03000000):ContentType = ''
(0x03000000):IdentitySourceType = ''
(0x03000000):IdentitySourceToken = ''
(0x03000000):IdentitySourcePassword = ''
(0x03000000):IdentitySourceIssuedBy = ''
(0x03000000):IdentityMappedType = ''
(0x03000000):IdentityMappedToken = ''
(0x03000000):IdentityMappedPassword = ''
(0x03000000):IdentityMappedIssuedBy = ''
)
)
+++++++++Local Environment
(
(0x01000000):TimeoutRequest = (
(0x03000000):Action = 'SET'
(0x03000000):Identifier = 'TN01'
(0x03000000):StartDate = '2008-02-08'
(0x03000000):StartTime = '13:09:15.243'
(0x03000000):Count = 1
(0x03000000):Interval = 60
(0x03000000):IgnoreMissed = TRUE
(0x03000000):AllowOverwrite = TRUE
)
)
+++++++++Exceptions
(
(0x01000000):RecoverableException = (
(0x03000000):File = 'F:\build\S610_P\src\DataFlowEngine\ImbDataFlowNode.cpp'
(0x03000000):Line = 739
(0x03000000):Function = 'ImbDataFlowNode::createExceptionList'
(0x03000000):Type = 'ComIbmWSRequestNode'
(0x03000000):Name = 'XXXX_Get_Data#FCMComposite_1_5'
(0x03000000):Label = 'XXXX_Get_Data.XXXX_HTTP_Request'
(0x03000000):Catalog = 'BIPv610'
(0x03000000):Severity = 3
(0x03000000):Number = 2230
(0x03000000):Text = 'Node throwing exception'
(0x01000000):RecoverableException = (
(0x03000000):File = 'F:\build\S610_P\src\WebServices\WSLibrary\ImbWSRequestNode.cpp'
(0x03000000):Line = 828
(0x03000000):Function = 'ImbWSRequestNode::evaluate'
(0x03000000):Type = ''
(0x03000000):Name = ''
(0x03000000):Label = ''
(0x03000000):Catalog = 'BIPv610'
(0x03000000):Severity = 3
(0x03000000):Number = 3162
(0x03000000):Text = 'WebService Request Exception'
(0x01000000):Insert = (
(0x03000000):Type = 12
(0x03000000):Text = '436f6e74656e742d4c656e6774683a20300d0a436f6e74656e742d547970653a20746578742f786d6c3b20636861727365743d7574662d380d0a486f73743a207777772e69666964732e636f6d0d0a534f4150416374696f6e3a2022220d0a0d0a'
)
(0x01000000):Insert = (
(0x03000000):Type = 12
(0x03000000):Text = ''
)
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = ''
)
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = ''
)
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = 'POST /yar/foobar.asp?apt=xxx&pwd=yyy HTTP/1.0
'
)
(0x01000000):RecoverableException = (
(0x03000000):File = 'F:\build\S610_P\src\WebServices\WSLibrary\ImbWSRequest.cpp'
(0x03000000):Line = 556
(0x03000000):Function = 'ImbWSRequest::makeWSRequest'
(0x03000000):Type = ''
(0x03000000):Name = ''
(0x03000000):Label = ''
(0x03000000):Catalog = 'BIPv610'
(0x03000000):Severity = 3
(0x03000000):Number = 3152
(0x03000000):Text = 'A Web Service request has detected a SOCKET error whilst invoking a web service located at host &1, on port &2, on path &3.'
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = 'www.someSite.com'
)
(0x01000000):Insert = (
(0x03000000):Type = 2
(0x03000000):Text = '80'
)
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = '/yar/foobar.asp?apt=xxx&pwd=yyy'
)
(0x01000000):SocketException = (
(0x03000000):File = 'F:\build\S610_P\src\WebServices\WSLibrary\ImbSocket.cpp'
(0x03000000):Line = 326
(0x03000000):Function = 'ImbBasicSocket::ImbBasicSocket'
(0x03000000):Type = ''
(0x03000000):Name = ''
(0x03000000):Label = ''
(0x03000000):Catalog = 'BIPv610'
(0x03000000):Severity = 3
(0x03000000):Number = 3150
(0x03000000):Text = 'An error occurred whilst performing a socket operation'
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = '::gethostbyname()'
)
(0x01000000):Insert = (
(0x03000000):Type = 2
(0x03000000):Text = '11004'
)
(0x01000000):Insert = (
(0x03000000):Type = 14
(0x03000000):Text = 'The requested name is valid, but no data of the requested type was found.
'
)
)
)
)
)
) |
|
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Feb 08, 2008 1:57 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
That's a network error.
The name you are using in the URL can't be resolved to an address. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
grammer |
Posted: Wed Apr 16, 2008 7:33 am Post subject: |
|
|
 Novice
Joined: 08 Feb 2008 Posts: 16 Location: Canada
|
No i don't think it is a network error since if i put the url in IE it returns the xml data |
|
Back to top |
|
 |
mgk |
Posted: Wed Apr 16, 2008 8:22 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
1: This IS a socket error :
Quote: |
'A Web Service request has detected a SOCKET error...' |
You configured the node to connect to 'www.someSite.com' on port 80, but the Host header you posted shows you were really trying to connect to www.ifids.com on port 80 (see point 2).
2: You are not setting the METHOD etc correctly. You need to set these overrides in the LocalEnvrionment tree before the node, NOT in the HTTPRequestHeader. The HTTPRequestHeader is only used to override HTTP headers such as 'Host' and SOAPAction' etc. It does not control where the request is send or what METHOD is used (such as GET). Those settings go in the LocalEnvrionment (LE).
3: The exact LE settings can be found in the docs or by searching this forum...
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 |
|
 |
ashoon |
Posted: Wed Apr 16, 2008 12:30 pm Post subject: I think there's a problem with how you set your HTTP method |
|
|
Master
Joined: 26 Oct 2004 Posts: 235
|
I saw you tried setting it to a GET vs. a POST... I don't think that ESQL worked though as in your trace it still says POST... might I suggest using TCPMON to see what the actual HTTP headers are being emitted and responded back to the broker. _________________ IBM Certified - SOA Solution Designer & WebSphere Datapower SOA Appliances |
|
Back to top |
|
 |
|