[7.8] WSOpentalkClient omitting SOAP-ENV:Header

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[7.8] WSOpentalkClient omitting SOAP-ENV:Header

Boris Popov, DeepCove Labs (SNN)

I just ran into an issue where the same code produces different HTTP payloads for SOAP WS calls by omitting the header completely,

 

7.7.1,

 

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.xignite.com/services/">

<SOAP-ENV:Header>

<ns:Header SOAP-ENV:actor="http://schemas.xmlsoap.org/soap/actor/next" SOAP-ENV:mustUnderstand="1">

  <ns:Username>username value</ns:Username>

  <ns:Password>password value</ns:Password>

</ns:Header>

</SOAP-ENV:Header>

<SOAP-ENV:Body>

<ns:GetRealTimeCrossRate>

  <ns:From>USD</ns:From>

  <ns:To>GBP</ns:To>

</ns:GetRealTimeCrossRate>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

 

7.8,

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.xignite.com/services/">

<SOAP-ENV:Body>

<ns:GetRealTimeCrossRate>

  <ns:From>USD</ns:From>

  <ns:To>GBP</ns:To>

</ns:GetRealTimeCrossRate>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

 

Here’s how the header is being set,

 

Client>>_execute: block

runner broker requestTimeout: 5000.

runner start.

(runner headerFor: #Header)

                                value:

                                                ((Header new)

                                                                username: self username;

                                                                password: self password;

                                                                tracer: self tracer;

                                                                yourself).

^block ensure: [runner stop].

 

Where “runner” is an instance of a subclass of WSOpentalkClient as generated by the WSDL tool. Any ideas?

 

-Boris


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [7.8] WSOpentalkClient omitting SOAP-ENV:Header

Boris Popov, DeepCove Labs (SNN)

FYI, generating a subclass of WsdlClient and using the below results in correct marshalling of the header, but I’d rather not make such a dramatic transition in our production code unless someone tells me that WSOpentalkClient is simply broken.

 

_execute: block

 

                (runner headerFor: #Header) value: ((Header new)

                                                                username: self username;

                                                                password: self password;

                                                                tracer: self tracer;

                                                                yourself).

                ^block value.

 

-Boris

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Boris Popov, DeepCove Labs
Sent: 13 June 2011 13:27
To: [hidden email]
Subject: [vwnc] [7.8] WSOpentalkClient omitting SOAP-ENV:Header

 

I just ran into an issue where the same code produces different HTTP payloads for SOAP WS calls by omitting the header completely,

 

7.7.1,

 

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.xignite.com/services/">

<SOAP-ENV:Header>

<ns:Header SOAP-ENV:actor="http://schemas.xmlsoap.org/soap/actor/next" SOAP-ENV:mustUnderstand="1">

  <ns:Username>username value</ns:Username>

  <ns:Password>password value</ns:Password>

</ns:Header>

</SOAP-ENV:Header>

<SOAP-ENV:Body>

<ns:GetRealTimeCrossRate>

  <ns:From>USD</ns:From>

  <ns:To>GBP</ns:To>

</ns:GetRealTimeCrossRate>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

 

7.8,

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.xignite.com/services/">

<SOAP-ENV:Body>

<ns:GetRealTimeCrossRate>

  <ns:From>USD</ns:From>

  <ns:To>GBP</ns:To>

</ns:GetRealTimeCrossRate>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

 

Here’s how the header is being set,

 

Client>>_execute: block

runner broker requestTimeout: 5000.

runner start.

(runner headerFor: #Header)

                                value:

                                                ((Header new)

                                                                username: self username;

                                                                password: self password;

                                                                tracer: self tracer;

                                                                yourself).

^block ensure: [runner stop].

 

Where “runner” is an instance of a subclass of WSOpentalkClient as generated by the WSDL tool. Any ideas?

 

-Boris


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [7.8] WSOpentalkClient omitting SOAP-ENV:Header

Kogan, Tamara

Hi Boris,

 

There is WebServicesTimeDemo package that runs Opentalk client with headers. See HTimeClient class comments.

 

Could you send me some test case? I need Wsdl schema only. I think the header binding was not initialized and this is why the header was not added.

 

Thanks,

Tamara

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Boris Popov, DeepCove Labs
Sent: Monday, June 13, 2011 1:46 PM
To: [hidden email]
Subject: Re: [vwnc] [7.8] WSOpentalkClient omitting SOAP-ENV:Header

 

FYI, generating a subclass of WsdlClient and using the below results in correct marshalling of the header, but I’d rather not make such a dramatic transition in our production code unless someone tells me that WSOpentalkClient is simply broken.

 

_execute: block

 

                (runner headerFor: #Header) value: ((Header new)

                                                                username: self username;

                                                                password: self password;

                                                                tracer: self tracer;

                                                                yourself).

                ^block value.

 

-Boris

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Boris Popov, DeepCove Labs
Sent: 13 June 2011 13:27
To: [hidden email]
Subject: [vwnc] [7.8] WSOpentalkClient omitting SOAP-ENV:Header

 

I just ran into an issue where the same code produces different HTTP payloads for SOAP WS calls by omitting the header completely,

 

7.7.1,

 

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.xignite.com/services/">

<SOAP-ENV:Header>

<ns:Header SOAP-ENV:actor="http://schemas.xmlsoap.org/soap/actor/next" SOAP-ENV:mustUnderstand="1">

  <ns:Username>username value</ns:Username>

  <ns:Password>password value</ns:Password>

</ns:Header>

</SOAP-ENV:Header>

<SOAP-ENV:Body>

<ns:GetRealTimeCrossRate>

  <ns:From>USD</ns:From>

  <ns:To>GBP</ns:To>

</ns:GetRealTimeCrossRate>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

 

7.8,

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.xignite.com/services/">

<SOAP-ENV:Body>

<ns:GetRealTimeCrossRate>

  <ns:From>USD</ns:From>

  <ns:To>GBP</ns:To>

</ns:GetRealTimeCrossRate>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

 

Here’s how the header is being set,

 

Client>>_execute: block

runner broker requestTimeout: 5000.

runner start.

(runner headerFor: #Header)

                                value:

                                                ((Header new)

                                                                username: self username;

                                                                password: self password;

                                                                tracer: self tracer;

                                                                yourself).

^block ensure: [runner stop].

 

Where “runner” is an instance of a subclass of WSOpentalkClient as generated by the WSDL tool. Any ideas?

 

-Boris


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [7.8] WSOpentalkClient omitting SOAP-ENV:Header

Boris Popov, DeepCove Labs (SNN)

Tamara,

 

The schema is available here and, I believe, you should be able to invoke ListCurrencies w/o any valid credentials to test the header. Admittedly, I hadn’t done this in the clean image from scratch yet, my results were simply a comparison of HTTP package in 7.7.1 and 7.8 in our own codebase.

 

http://www.xignite.com/xCurrencies.asmx?WSDL

 

-Boris

 

From: Kogan, Tamara [mailto:[hidden email]]
Sent: 13 June 2011 14:25
To: Boris Popov, DeepCove Labs; [hidden email]
Subject: RE: [vwnc] [7.8] WSOpentalkClient omitting SOAP-ENV:Header

 

Hi Boris,

 

There is WebServicesTimeDemo package that runs Opentalk client with headers. See HTimeClient class comments.

 

Could you send me some test case? I need Wsdl schema only. I think the header binding was not initialized and this is why the header was not added.

 

Thanks,

Tamara

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Boris Popov, DeepCove Labs
Sent: Monday, June 13, 2011 1:46 PM
To: [hidden email]
Subject: Re: [vwnc] [7.8] WSOpentalkClient omitting SOAP-ENV:Header

 

FYI, generating a subclass of WsdlClient and using the below results in correct marshalling of the header, but I’d rather not make such a dramatic transition in our production code unless someone tells me that WSOpentalkClient is simply broken.

 

_execute: block

 

                (runner headerFor: #Header) value: ((Header new)

                                                                username: self username;

                                                                password: self password;

                                                                tracer: self tracer;

                                                                yourself).

                ^block value.

 

-Boris

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Boris Popov, DeepCove Labs
Sent: 13 June 2011 13:27
To: [hidden email]
Subject: [vwnc] [7.8] WSOpentalkClient omitting SOAP-ENV:Header

 

I just ran into an issue where the same code produces different HTTP payloads for SOAP WS calls by omitting the header completely,

 

7.7.1,

 

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.xignite.com/services/">

<SOAP-ENV:Header>

<ns:Header SOAP-ENV:actor="http://schemas.xmlsoap.org/soap/actor/next" SOAP-ENV:mustUnderstand="1">

  <ns:Username>username value</ns:Username>

  <ns:Password>password value</ns:Password>

</ns:Header>

</SOAP-ENV:Header>

<SOAP-ENV:Body>

<ns:GetRealTimeCrossRate>

  <ns:From>USD</ns:From>

  <ns:To>GBP</ns:To>

</ns:GetRealTimeCrossRate>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

 

7.8,

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.xignite.com/services/">

<SOAP-ENV:Body>

<ns:GetRealTimeCrossRate>

  <ns:From>USD</ns:From>

  <ns:To>GBP</ns:To>

</ns:GetRealTimeCrossRate>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

 

Here’s how the header is being set,

 

Client>>_execute: block

runner broker requestTimeout: 5000.

runner start.

(runner headerFor: #Header)

                                value:

                                                ((Header new)

                                                                username: self username;

                                                                password: self password;

                                                                tracer: self tracer;

                                                                yourself).

^block ensure: [runner stop].

 

Where “runner” is an instance of a subclass of WSOpentalkClient as generated by the WSDL tool. Any ideas?

 

-Boris


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [7.8] WSOpentalkClient omitting SOAP-ENV:Header

Kogan, Tamara

Boris,

 

If I understood correctly you ran WS tool to generate the client and binding classes and then use default header processors to add headers to the message.

The old WS tool created header processors to add header entries to messages. The new implementation doesn’t create header processors anymore. We mentioned this in release notes. The user is expected to create the Soap header interceptors. Unfortunately in 7.8 we were not able to add code that would generate the interceptors automatically. The latest 7.9 build can generate the header interceptors and adds this interceptor to a client broker.

The attached zip file includes the client class and soap interceptor. The client #newBroker: method adds the interceptor to the processing policy. The header is added in HeaderInterceptor>>sendingRequest: in:

running the code below will create a message with headers.

client := Z.XigniteCurrenciesSoapClient new.

client start.

arg1 := Z.ListCurrencies new.

value := client listCurrencies: arg1.

 

HTH,

Tamara

 

 

 

 

 

 

From: Boris Popov, DeepCove Labs [mailto:[hidden email]]
Sent: Monday, June 13, 2011 2:28 PM
To: Kogan, Tamara; [hidden email]
Subject: RE: [vwnc] [7.8] WSOpentalkClient omitting SOAP-ENV:Header

 

Tamara,

 

The schema is available here and, I believe, you should be able to invoke ListCurrencies w/o any valid credentials to test the header. Admittedly, I hadn’t done this in the clean image from scratch yet, my results were simply a comparison of HTTP package in 7.7.1 and 7.8 in our own codebase.

 

http://www.xignite.com/xCurrencies.asmx?WSDL

 

-Boris

 

From: Kogan, Tamara [mailto:[hidden email]]
Sent: 13 June 2011 14:25
To: Boris Popov, DeepCove Labs; [hidden email]
Subject: RE: [vwnc] [7.8] WSOpentalkClient omitting SOAP-ENV:Header

 

Hi Boris,

 

There is WebServicesTimeDemo package that runs Opentalk client with headers. See HTimeClient class comments.

 

Could you send me some test case? I need Wsdl schema only. I think the header binding was not initialized and this is why the header was not added.

 

Thanks,

Tamara

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Boris Popov, DeepCove Labs
Sent: Monday, June 13, 2011 1:46 PM
To: [hidden email]
Subject: Re: [vwnc] [7.8] WSOpentalkClient omitting SOAP-ENV:Header

 

FYI, generating a subclass of WsdlClient and using the below results in correct marshalling of the header, but I’d rather not make such a dramatic transition in our production code unless someone tells me that WSOpentalkClient is simply broken.

 

_execute: block

 

                (runner headerFor: #Header) value: ((Header new)

                                                                username: self username;

                                                                password: self password;

                                                                tracer: self tracer;

                                                                yourself).

                ^block value.

 

-Boris

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Boris Popov, DeepCove Labs
Sent: 13 June 2011 13:27
To: [hidden email]
Subject: [vwnc] [7.8] WSOpentalkClient omitting SOAP-ENV:Header

 

I just ran into an issue where the same code produces different HTTP payloads for SOAP WS calls by omitting the header completely,

 

7.7.1,

 

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.xignite.com/services/">

<SOAP-ENV:Header>

<ns:Header SOAP-ENV:actor="http://schemas.xmlsoap.org/soap/actor/next" SOAP-ENV:mustUnderstand="1">

  <ns:Username>username value</ns:Username>

  <ns:Password>password value</ns:Password>

</ns:Header>

</SOAP-ENV:Header>

<SOAP-ENV:Body>

<ns:GetRealTimeCrossRate>

  <ns:From>USD</ns:From>

  <ns:To>GBP</ns:To>

</ns:GetRealTimeCrossRate>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

 

7.8,

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.xignite.com/services/">

<SOAP-ENV:Body>

<ns:GetRealTimeCrossRate>

  <ns:From>USD</ns:From>

  <ns:To>GBP</ns:To>

</ns:GetRealTimeCrossRate>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

 

Here’s how the header is being set,

 

Client>>_execute: block

runner broker requestTimeout: 5000.

runner start.

(runner headerFor: #Header)

                                value:

                                                ((Header new)

                                                                username: self username;

                                                                password: self password;

                                                                tracer: self tracer;

                                                                yourself).

^block ensure: [runner stop].

 

Where “runner” is an instance of a subclass of WSOpentalkClient as generated by the WSDL tool. Any ideas?

 

-Boris


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

WSClient.zip (14K) Download Attachment