Hi Richard,

I think you have a few of options to see the raw traffic between the UV and 
your web service.

1. Enable protocol logging before calling SoapCreateRequest
protocolLogging("c:\tmp\soap.log", "ON",10)

2. Setup a proxy server that can view the request. I think we have used 
fiddler2 http://fiddler2.com/features or soapui 
http://www.soapui.org/SOAP-Recording/recording-soap-traffic.html in the past
Once you have setup your proxy server to monitor the http traffic you need to 
configure the proxy in your U2 program before calling SoapCreateRequest.

Below is a test program I have used before with logging with http proxy enabled.
Note: I have dug this up from a test project about a year ago. I hope it's all 
correct and functioning. It might give you a clue on how to debug your issue or 
what you may be missing. It should at least show you how to enable logging, 
enabling proxy and setting headers.


      ERROR.MSG = ""
      RESPHEADERS = ''
      RESPDATA = ''
      SOAPSTATUS = ''
      SOAPFAULT = ''
      TIMEOUT = 30000
      URL = "http:// business.com.au/service/TestService"
      SOAPACTION = "http://www.business.com.au/ service/v1/TestService"

      INPUTXML = ''
      INPUTXML :='<?xml version="1.0" encoding="UTF-8"?>'
            INPUTXML :='<soap:Envelope'
            INPUTXML :=' xmlns:soap="http://www.w3.org/2003/05/soap-envelope";'
            INPUTXML := '>'
            INPUTXML :='<soap:Body>'
            INPUTXML :='</soap:Body>'
            INPUTXML :='</soap:Envelope>'

      RET = protocolLogging("c:\tmp\ITV-SOAP5.log", "ON",15)

      IF ERROR.MSG = "" THEN
         RET = SOAPSetDefault("VERSION","1.2")
         IF RET <> 0 THEN
            ERROR.MSG = "Error in SoapSetDEFAULT: " : RET
         END
      END

      IF ERROR.MSG = "" THEN
         RET = setHTTPDefault("PROXY_PORT","8888")
         RET = setHTTPDefault("PROXY_PORT","")
         IF RET <> 0 THEN
            ERROR.MSG = "Error in setHTTPDefault: " : RET
         END
      END

      IF ERROR.MSG = "" THEN
         RET = setHTTPDefault("PROXY_NAME","192.100.0.28")
         RET = setHTTPDefault("PROXY_NAME","")
         IF RET <> 0 THEN
            ERROR.MSG = "Error in setHTTPDefault: " : RET
         END
      END

      IF ERROR.MSG = "" THEN
         RET = SoapCreateRequest(URL, SOAPACTION, SOAPREQ)
         IF RET <> 0 THEN
            ERROR.MSG = "Error in SoapCreateSecureRequest: " : RET
         END
      END

      IF ERROR.MSG = "" THEN
         HEADER = 'Content-Type':@VM:'application/soap+xml'
         RET = SOAPSetRequestHeader(SOAPREQ, HEADER)
         IF RET <> 0 THEN
            ERROR.MSG = "Error in SoapSetRequestHeader: " : RET
         END
      END

      IF ERROR.MSG = "" THEN
         RET = SoapSetRequestContent(SOAPREQ, INPUTXML, 1)
         IF RET <> 0 THEN
            ERROR.MSG = "Error in SoapSetRequestContent: " : RET
         END
      END

      IF ERROR.MSG = "" THEN
         RET = SoapRequestWrite(SOAPREQ, REQUESTXML, 1)
         PRINT 'REQUESTXML=':REQUESTXML
         RET = SoapSubmitRequest(SOAPREQ, TIMEOUT, RESPHEADERS, RESPDATA, 
SOAPSTATUS)
         IF RET <> 0 THEN
            ERROR.MSG = "Error in SoapSubmitRequest: " : RET:"; ": SOAPSTATUS
         END
      END

      CRT ; CRT "SOAPSTATUS: ":SOAPSTATUS:
      CRT ; CRT "RESPHEADER: ":RESPHEADERS:
      CRT ; CRT "RESPDATA:   ":RESPDATA:
      CRT ; CRT "ERROR.MSG: ":ERROR.MSG

      VAR = protocolLogging("c:\tmp\ITV-SOAP5.log", "OFF",15)

Regards

Adrian Halid
                          
NOTICE : This e-mail and any attachments are intended for the addressee(s) only 
and may
contain confidential or privileged material. Any unauthorised review, use, 
alteration,
disclosure or distribution of this e-mail (including any attachments) by an 
unintended recipient
is prohibited. If you are not the intended recipient please contact the sender 
as soon as
possible by return e-mail and then delete both messages.
___________________________________________________________


-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Richard Lewis
Sent: Thursday, 31 October 2013 6:43 AM
To: U2 Users List
Subject: Re: [U2] Web Services at Universe 11.n

Yes, as I said, I've tested with curl and it works perfectly.  The problem I 
have is not being able to clearly/cleanly see the raw text being sent by the uv 
functions, in order to determine the difference in what curl sends
(success) and what the uv functions send (failure).  There may be certain 
idiosyncratic parsing involved in the service I am trying to consume, but I 
have no control over that.  With curl I can see the entire conversation if the 
logging is set correctly.  With the uv functions, even with the highest logging 
level, it doesn't appear that the logging is actually that complete and exact.  
I have never had the impression that it was.

I would love to be able to do it all in uv, but I only have control over half 
of the conversation, and with the uv functions, I seem to have a bit less than 
half.

Richard


On Wed, Oct 30, 2013 at 2:12 PM, Symeon Breen <syme...@gmail.com> wrote:

> That means you where probably missing a header.   http is just a text
> conversation, if the same headers are passed as passed with curl it 
> will work. You can test using curl, or even better with telnet.
>
> -----Original Message-----
> From: u2-users-boun...@listserver.u2ug.org
> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Richard 
> Lewis
> Sent: 30 October 2013 20:03
> To: U2 Users List
> Subject: Re: [U2] Web Services at Universe 11.n
>
> I've recently been tasked with accessing a webservice, and couldn't 
> get a valid response from the webservice.  It kept not recognizing the 
> headers that were sent, and with the maximum logging set on the uv 
> side, it looked like everything was being sent just fine, but the 
> webservice still failed it.  I switched to using curl, and it all worked 
> perfectly.
>
> Richard Lewis
>
>
>
> On Wed, Oct 30, 2013 at 1:00 PM, Oaks, Harold
> <harold.o...@clark.wa.gov>wrote:
>
> > I've been telling my boss that if we upgraded to Universe 11.23, we can
> > implement web services.   (We're currently on 10.2)
> > But,  finally looking in detail at the appropriate manual  (Universe 
> > Web Services Developer) it seems that one can publish a web service 
> > easily enough so that Universe data can be gotten, but I don't see 
> > that the other side is implemented, where one accesses an external 
> > web service and brings back data into Universe.  Am I missing the something?
> >
> > What are any of you using to fully implement web services with an 
> > underlying Universe environment?
> > Thanks-
> > Harold Oaks
> > Sr. Analyst/Programmer
> > Clark County, WA
> >
> > This e-mail and related attachments and any response may be subject 
> > to public disclosure under state law.
> > _______________________________________________
> > 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
>
> _______________________________________________
> 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
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to