Re: [U2] SOAP Header

2011-07-28 Thread John Hester
If you're unable to get this working using the native UD method you can
probably do it via the cURL program at the OS level.  It's available for
a wide variety of platforms and should already be installed if you're on
linux:

http://curl.haxx.se/download.html

I've used cURL to interact with many web services from within UV
including an SSL SOAP service.  You specify the SSL header data for cURL
with an individual -H option for each line in the header.  Here's some
example code from a program that validates international addresses:

0053:   URL =
'https://validator2.addressdoctor.com/addInteractive/Interact
 ive.asmx?WSDL'
0054:   HDR = 'POST /addInteractive/Interactive.asmx HTTP/1.1'
0055:   HDR<-1> = 'Host: validator2.addressdoctor.com'
0056:   HDR<-1> = 'Content-Type: text/xml; charset=utf-8'
0057:   HDR<-1> = 'Content-Length: '
0058:   HDR<-1> = 'SOAPAction:
\"http://validator2.AddressDoctor.com/addInt
 eractive/Interactive/Validate\"'
0059:   XML.REQ = ""
0060:   XML.REQ := ""
0061:   XML.REQ := ""
0062:   XML.REQ := ""

etc., etc.

0123:  WRITE XML.REQ ON FILE.TMP, REQ.ID
0124:  EXEC.STR = 'LANG=en_US.UTF-8; LANGUAGE=en_US.UTF-8;'
0125:  EXEC.STR := 'export LANG LANGUAGE; '
0126:  EXEC.STR := 'curl --connect-timeout 10'
0127:  EXEC.STR := ' --max-time 10'
0128:  FOR I = 1 TO DCOUNT(HDR, @AM)
0129: IF INDEX(HDR,'Content-Length:',1) THEN
0130:HDR := LEN(XML.REQ)
0131: END
0132: EXEC.STR := ' -H "':HDR:'"'
0133:  NEXT I
0139:  EXEC.STR := ' --silent'
0140:  EXEC.STR := ' -d @/tmp/':REQ.ID:' -k ':URL
0141:  EXECUTE "SH -c '":EXEC.STR:"'", OUT > XML.RESP
0142:  DELETE FILE.TMP, REQ.ID

-John

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Steve Long
Sent: Wednesday, July 27, 2011 9:05 AM
To: U2 Users List
Subject: [U2] SOAP Header

Hi All -

 

I am using the Unidata functionality to do SOAP calls and I now need to
specify header information to call a SSL page.  It is failing because
there is not info in the header.  The documentation is very sparse on
this, as you all know.  Anyone have any insight on how to specify header
info using the SOAPSetRequestHeader function?
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] SOAP Header

2011-07-28 Thread Symeon Breen
Sounds like you are missing a Content-Type header

For soap the Content-Type is application/soap+xml

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Steve Long
Sent: 28 July 2011 16:45
To: U2 Users List
Subject: Re: [U2] SOAP Header

Both actually.  The SOAP parameter I have tried, and it seems to do
nothing.  The SOAP header is not created.  I tried the http host header
parameter as specified below to try and circumvent the issue, and it
creates the http header correctly, but the SOAP document is not
processed and I get an error stating status 415:  unsupported media
type.  I got this info via protocolLogging.  

Thanks,

Steve Long
Spyderweb Technical Services, Inc.
(360) 687-8797 Washington
(503) 406-8797 Oregon
(866) 354-5913 Fax


-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Symeon Breen
Sent: Thursday, July 28, 2011 8:41 AM
To: 'U2 Users List'
Subject: Re: [U2] SOAP Header

Are you talking about the http Host header parameter or a soap parameter
?
Have you used protocolLogging  to trace the exact http conversation.
You can also use telnet to test and see what errors come back.



-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Steve Long
Sent: 28 July 2011 16:13
To: U2 Users List
Subject: Re: [U2] SOAP Header

We actually have 2 issues to overcome.  The big show stopper now is the
host.

The client is using a load balancer and requires the Host to be
specified in the SOAP header.  No matter what I do,
(SOAPSetRequestHeader, modify the SOAP and specify a 
section) nothing is working.

I attempted doing a straight HTTP call, doing a createRequest, setting
the request headers with the SOAP request information including the host
info, and passed the SOAP document in as the POST_DATA.  I was able to
hit the server, but it failed on processing the SOAP doc (I know its
valid, its my test doc, as is the URL, SOAP.ACTION, etc.).  Has anyone
done it this way?

I did the following for the header:

URL  = 'http://ccsvc/procCC.asmx'
SOAP.ACTION  = 'ccprocessing/ProcCC'
CONTENT.TYPE = 'text/xml; charset=utf-8'
TIMEOUT  = '36000'
*
STATUS = createRequest(URL,SOAP.ACTION,'POST',SOAP.REQUEST)
*
STATUS = setRequestHeader(SOAP.REQUEST,'Host','ccsvc')
STATUS =
setRequestHeader(SOAP.REQUEST,'Content-Type',QUOTE(CONTENT.TYPE))
STATUS = setRequestHeader(SOAP.REQUEST,'SOAPAction',QUOTE(SOAP.ACTION))
STATUS = setRequestHeader(SOAP.REQUEST,'Content-Length', LEN(SOAP.Doc))
*
STATUS = submitRequest(SOAP.REQUEST, TIMEOUT, SOAP.Doc, RESP.HEADERS,
RESP.DATA, SOAP.STATUS)

Thanks,

Steve Long
Spyderweb Technical Services, Inc.
(360) 687-8797 Washington
(503) 406-8797 Oregon
(866) 354-5913 Fax


-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Symeon Breen
Sent: Thursday, July 28, 2011 12:39 AM
To: 'U2 Users List'
Subject: Re: [U2] SOAP Header

The u2 soap/hhtprequest call will set the basic minimum http headers
required for a http conversation, this includes get/post, Host and Http
version. Host is taken from the url endpoint you supply the call.



-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King
Sent: 27 July 2011 22:57
To: U2 Users List
Subject: Re: [U2] SOAP Header

I'm confused.  Exactly what is setting the Host: http header in the SOAP
request?
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1390 / Virus Database: 1518/3792 - Release Date: 07/27/11

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1390 / Virus Database: 1518/3792 - Release Date: 07/27/11

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1390 / Virus Database: 1518/3792 - Release Date: 07/27/11

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] SOAP Header

2011-07-28 Thread Steve Long
Both actually.  The SOAP parameter I have tried, and it seems to do
nothing.  The SOAP header is not created.  I tried the http host header
parameter as specified below to try and circumvent the issue, and it
creates the http header correctly, but the SOAP document is not
processed and I get an error stating status 415:  unsupported media
type.  I got this info via protocolLogging.  

Thanks,

Steve Long
Spyderweb Technical Services, Inc.
(360) 687-8797 Washington
(503) 406-8797 Oregon
(866) 354-5913 Fax


-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Symeon Breen
Sent: Thursday, July 28, 2011 8:41 AM
To: 'U2 Users List'
Subject: Re: [U2] SOAP Header

Are you talking about the http Host header parameter or a soap parameter
?
Have you used protocolLogging  to trace the exact http conversation.
You can also use telnet to test and see what errors come back.



-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Steve Long
Sent: 28 July 2011 16:13
To: U2 Users List
Subject: Re: [U2] SOAP Header

We actually have 2 issues to overcome.  The big show stopper now is the
host.

The client is using a load balancer and requires the Host to be
specified in the SOAP header.  No matter what I do,
(SOAPSetRequestHeader, modify the SOAP and specify a 
section) nothing is working.

I attempted doing a straight HTTP call, doing a createRequest, setting
the request headers with the SOAP request information including the host
info, and passed the SOAP document in as the POST_DATA.  I was able to
hit the server, but it failed on processing the SOAP doc (I know its
valid, its my test doc, as is the URL, SOAP.ACTION, etc.).  Has anyone
done it this way?

I did the following for the header:

URL  = 'http://ccsvc/procCC.asmx'
SOAP.ACTION  = 'ccprocessing/ProcCC'
CONTENT.TYPE = 'text/xml; charset=utf-8'
TIMEOUT  = '36000'
*
STATUS = createRequest(URL,SOAP.ACTION,'POST',SOAP.REQUEST)
*
STATUS = setRequestHeader(SOAP.REQUEST,'Host','ccsvc')
STATUS =
setRequestHeader(SOAP.REQUEST,'Content-Type',QUOTE(CONTENT.TYPE))
STATUS = setRequestHeader(SOAP.REQUEST,'SOAPAction',QUOTE(SOAP.ACTION))
STATUS = setRequestHeader(SOAP.REQUEST,'Content-Length', LEN(SOAP.Doc))
*
STATUS = submitRequest(SOAP.REQUEST, TIMEOUT, SOAP.Doc, RESP.HEADERS,
RESP.DATA, SOAP.STATUS)

Thanks,

Steve Long
Spyderweb Technical Services, Inc.
(360) 687-8797 Washington
(503) 406-8797 Oregon
(866) 354-5913 Fax


-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Symeon Breen
Sent: Thursday, July 28, 2011 12:39 AM
To: 'U2 Users List'
Subject: Re: [U2] SOAP Header

The u2 soap/hhtprequest call will set the basic minimum http headers
required for a http conversation, this includes get/post, Host and Http
version. Host is taken from the url endpoint you supply the call.



-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King
Sent: 27 July 2011 22:57
To: U2 Users List
Subject: Re: [U2] SOAP Header

I'm confused.  Exactly what is setting the Host: http header in the SOAP
request?
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1390 / Virus Database: 1518/3792 - Release Date: 07/27/11

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1390 / Virus Database: 1518/3792 - Release Date: 07/27/11

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] SOAP Header

2011-07-28 Thread Symeon Breen
Are you talking about the http Host header parameter or a soap parameter ?
Have you used protocolLogging  to trace the exact http conversation.
You can also use telnet to test and see what errors come back.



-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Steve Long
Sent: 28 July 2011 16:13
To: U2 Users List
Subject: Re: [U2] SOAP Header

We actually have 2 issues to overcome.  The big show stopper now is the
host.

The client is using a load balancer and requires the Host to be
specified in the SOAP header.  No matter what I do,
(SOAPSetRequestHeader, modify the SOAP and specify a 
section) nothing is working.

I attempted doing a straight HTTP call, doing a createRequest, setting
the request headers with the SOAP request information including the host
info, and passed the SOAP document in as the POST_DATA.  I was able to
hit the server, but it failed on processing the SOAP doc (I know its
valid, its my test doc, as is the URL, SOAP.ACTION, etc.).  Has anyone
done it this way?

I did the following for the header:

URL  = 'http://ccsvc/procCC.asmx'
SOAP.ACTION  = 'ccprocessing/ProcCC'
CONTENT.TYPE = 'text/xml; charset=utf-8'
TIMEOUT  = '36000'
*
STATUS = createRequest(URL,SOAP.ACTION,'POST',SOAP.REQUEST)
*
STATUS = setRequestHeader(SOAP.REQUEST,'Host','ccsvc')
STATUS =
setRequestHeader(SOAP.REQUEST,'Content-Type',QUOTE(CONTENT.TYPE))
STATUS = setRequestHeader(SOAP.REQUEST,'SOAPAction',QUOTE(SOAP.ACTION))
STATUS = setRequestHeader(SOAP.REQUEST,'Content-Length', LEN(SOAP.Doc))
*
STATUS = submitRequest(SOAP.REQUEST, TIMEOUT, SOAP.Doc, RESP.HEADERS,
RESP.DATA, SOAP.STATUS)

Thanks,

Steve Long
Spyderweb Technical Services, Inc.
(360) 687-8797 Washington
(503) 406-8797 Oregon
(866) 354-5913 Fax


-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Symeon Breen
Sent: Thursday, July 28, 2011 12:39 AM
To: 'U2 Users List'
Subject: Re: [U2] SOAP Header

The u2 soap/hhtprequest call will set the basic minimum http headers
required for a http conversation, this includes get/post, Host and Http
version. Host is taken from the url endpoint you supply the call.



-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King
Sent: 27 July 2011 22:57
To: U2 Users List
Subject: Re: [U2] SOAP Header

I'm confused.  Exactly what is setting the Host: http header in the SOAP
request?
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1390 / Virus Database: 1518/3792 - Release Date: 07/27/11

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1390 / Virus Database: 1518/3792 - Release Date: 07/27/11

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] SOAP Header

2011-07-28 Thread Steve Long
We actually have 2 issues to overcome.  The big show stopper now is the
host.

The client is using a load balancer and requires the Host to be
specified in the SOAP header.  No matter what I do,
(SOAPSetRequestHeader, modify the SOAP and specify a 
section) nothing is working.

I attempted doing a straight HTTP call, doing a createRequest, setting
the request headers with the SOAP request information including the host
info, and passed the SOAP document in as the POST_DATA.  I was able to
hit the server, but it failed on processing the SOAP doc (I know its
valid, its my test doc, as is the URL, SOAP.ACTION, etc.).  Has anyone
done it this way?

I did the following for the header:

URL  = 'http://ccsvc/procCC.asmx'
SOAP.ACTION  = 'ccprocessing/ProcCC'
CONTENT.TYPE = 'text/xml; charset=utf-8'
TIMEOUT  = '36000'
*
STATUS = createRequest(URL,SOAP.ACTION,'POST',SOAP.REQUEST)
*
STATUS = setRequestHeader(SOAP.REQUEST,'Host','ccsvc')
STATUS =
setRequestHeader(SOAP.REQUEST,'Content-Type',QUOTE(CONTENT.TYPE))
STATUS = setRequestHeader(SOAP.REQUEST,'SOAPAction',QUOTE(SOAP.ACTION))
STATUS = setRequestHeader(SOAP.REQUEST,'Content-Length', LEN(SOAP.Doc))
*
STATUS = submitRequest(SOAP.REQUEST, TIMEOUT, SOAP.Doc, RESP.HEADERS,
RESP.DATA, SOAP.STATUS)

Thanks,

Steve Long
Spyderweb Technical Services, Inc.
(360) 687-8797 Washington
(503) 406-8797 Oregon
(866) 354-5913 Fax


-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Symeon Breen
Sent: Thursday, July 28, 2011 12:39 AM
To: 'U2 Users List'
Subject: Re: [U2] SOAP Header

The u2 soap/hhtprequest call will set the basic minimum http headers
required for a http conversation, this includes get/post, Host and Http
version. Host is taken from the url endpoint you supply the call.



-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King
Sent: 27 July 2011 22:57
To: U2 Users List
Subject: Re: [U2] SOAP Header

I'm confused.  Exactly what is setting the Host: http header in the SOAP
request?
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1390 / Virus Database: 1518/3792 - Release Date: 07/27/11

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] SOAP Header

2011-07-28 Thread Symeon Breen
The u2 soap/hhtprequest call will set the basic minimum http headers
required for a http conversation, this includes get/post, Host and Http
version. Host is taken from the url endpoint you supply the call.



-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King
Sent: 27 July 2011 22:57
To: U2 Users List
Subject: Re: [U2] SOAP Header

I'm confused.  Exactly what is setting the Host: http header in the SOAP
request?
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1390 / Virus Database: 1518/3792 - Release Date: 07/27/11

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users