Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old November 14th, 2006, 01:45 PM
peteh
Guest
 
Posts: n/a
Default DB2 v9 web services sample doesn't work?

Hi All;
I am trying to test the web services consumer example on a DB2 v9 ESE
Windows server. I have tried 2 methods which both return the same
error:
-----------------------------------------------------------------------
[IBM][CLI Driver][DB2/NT] SQL0443N Routine "DB2XML.SOAPHTTPV"
(specific name "SOAPHTTPVIVO") has returned an error SQLSTATE with
diagnostic text "Error during socket connect". SQLSTATE=38309
------------------------------------------------------------------------

Here is the code that generates the error (method #1)
-------------------------------------------------------------------------
values db2xml.soaphttpv('http://services.xmethods.net/soap'
,''
,varchar('<ns1:getRate xmlns:ns1="urn:xmethods-CurrencyExchange"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">'
|| '<country1 xsi:type="xsd:string">usa</country1>'
|| '<country2 xsi:type="xsd:string">euro</country2>'
|| '</ns1:getRate>')
)
---------------------------------------------------------------------------
Here is the code for method #2
---------------------------------------------------------------------------
VALUES substr(DB2XML.SOAPHTTPV ('http://services.xmethods.net:80/soap',
'',
XMLCAST(XMLELEMENT(NAME "ns:getRate",
XMLNAMESPACES('urn:xmethods-CurrencyExchange' as "ns"),
XMLELEMENT(NAME "country1", 'united states'),
XMLELEMENT(NAME "country2", 'korea')) as varchar(160))),
1, 160);
----------------------------------------------------------------------------

Is the provider still functional? Do I have a firewall issue? Has
anyone gotten these to work? Thanks for any help or insight.

Pete H

  #2  
Old November 16th, 2006, 01:35 AM
schenkerm@gmail.com
Guest
 
Posts: n/a
Default Re: DB2 v9 web services sample doesn't work?

Hi Pete

this error can occur, if the remote web service is not available. It
might be that you just tried it at a time where the XMothods server was
down. It might also be a firewall issue in case DB2 is not allowed to
connect.

I just tried your first UDF call on my DB2 V9 on Windows and it worked
right away.

So - in case you get this error you might want to double check if the
server is responding - for example you can use the endpoint URL in a
browser and see if you get some response. And you might also want to
check your firewall settings.

Regards,

Michael

peteh wrote:
Quote:
Hi All;
I am trying to test the web services consumer example on a DB2 v9 ESE
Windows server. I have tried 2 methods which both return the same
error:
-----------------------------------------------------------------------
[IBM][CLI Driver][DB2/NT] SQL0443N Routine "DB2XML.SOAPHTTPV"
(specific name "SOAPHTTPVIVO") has returned an error SQLSTATE with
diagnostic text "Error during socket connect". SQLSTATE=38309
------------------------------------------------------------------------
>
Here is the code that generates the error (method #1)
-------------------------------------------------------------------------
values db2xml.soaphttpv('http://services.xmethods.net/soap'
,''
,varchar('<ns1:getRate xmlns:ns1="urn:xmethods-CurrencyExchange"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">'
|| '<country1 xsi:type="xsd:string">usa</country1>'
|| '<country2 xsi:type="xsd:string">euro</country2>'
|| '</ns1:getRate>')
)
---------------------------------------------------------------------------
Here is the code for method #2
---------------------------------------------------------------------------
VALUES substr(DB2XML.SOAPHTTPV ('http://services.xmethods.net:80/soap',
'',
XMLCAST(XMLELEMENT(NAME "ns:getRate",
XMLNAMESPACES('urn:xmethods-CurrencyExchange' as "ns"),
XMLELEMENT(NAME "country1", 'united states'),
XMLELEMENT(NAME "country2", 'korea')) as varchar(160))),
1, 160);
----------------------------------------------------------------------------
>
Is the provider still functional? Do I have a firewall issue? Has
anyone gotten these to work? Thanks for any help or insight.
>
Pete H
  #3  
Old November 16th, 2006, 04:05 PM
peteh
Guest
 
Posts: n/a
Default Re: DB2 v9 web services sample doesn't work?


schenkerm@gmail.com wrote:
Quote:
Hi Pete
>
I just tried your first UDF call on my DB2 V9 on Windows and it worked
right away.
>
Hi Michael;
Can you confirm that you cut-and-pasted the EXACT statement from my
post and it ran OK? That would seem to point to a firewall issue as
I've tried it many times over the last few days with no success.
Thanks!

Pete H

  #4  
Old November 30th, 2006, 11:55 PM
schenkerm@gmail.com
Guest
 
Posts: n/a
Default Re: DB2 v9 web services sample doesn't work?

Hello Pete,

sorry for the late response - but yes, I copied and paste the exact
statement you posted here. The first one works right away. The second
one fails with the following error:

SQL0443N Routine "DB2XML.SOAPHTTPV" (specific name "SOAPHTTPVIVO") has
returned an error SQLSTATE with diagnostic text "1 is an invalid
index".
SQLSTATE=38327

But this is due to changes in XMLCAST function in DB2 version 9.1 - you
have to use XMLSERIALIZE now - change the 2nd statement to:

VALUES substr(DB2XML.SOAPHTTPV ('http://services.xmethods.net:80/soap',
'',
XMLSERIALIZE(XMLELEMENT(NAME "ns:getRate",
XMLNAMESPACES('urn:xmethods-CurrencyExchange' as "ns"),
XMLELEMENT(NAME "country1", 'united states'),
XMLELEMENT(NAME "country2", 'korea')) as varchar(160))),
1, 160);

So from my perspective that looks pretty much like a firewall issue.

Regards,

Michael


peteh wrote:
Quote:
schenkerm@gmail.com wrote:
Quote:
Hi Pete

I just tried your first UDF call on my DB2 V9 on Windows and it worked
right away.
>
Hi Michael;
Can you confirm that you cut-and-pasted the EXACT statement from my
post and it ran OK? That would seem to point to a firewall issue as
I've tried it many times over the last few days with no success.
Thanks!
>
Pete H
  #5  
Old December 1st, 2006, 07:45 PM
peteh
Guest
 
Posts: n/a
Default Re: DB2 v9 web services sample doesn't work?

schenkerm@gmail.com wrote:
Quote:
Hello Pete,
>
sorry for the late response - but yes, I copied and paste the exact
statement you posted here. The first one works right away. The second
one fails with the following error:
>
Thanks for confirning. I've been working with our network services
group to resolve. Btw, great info on XMLSerialize.

Pete H

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles