WebReference - using the WS A - Addressing

WebReference - using the WS A - Addressing

  
Hi,

I'm trying to invoke an external web reference, using the protocol WS A - Addressing , that is a response to previous request.

Using the EnhancedWebReferences, the method SetWebReferenceSoapHeaders, I include in the soapHeader the tags:
 <wsa:Action>http://www.......</wsa:Action>
   <wsa:MessageID>uuid:992f09b4-2ef4-49a7-b19c-50a6ybc078bc</wsa:MessageID>
   <wsa:To>http://.../</wsa:To>
   <wsa:RelatesTo xmlns="http://www.w3.org/2005/08/addressing">66c9d77d-5f5e-4f18-8dc4-1a37fa7b0c83</wsa:RelatesTo> 

This is part of my WSDL definitions:  
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" 
xmlns:wsaw=http://www.w3.org/2005/08/addressing
xmlns:tns="http://..." 
xmlns:ns2="http://www.... 
xmlns:xsd=http://www.w3.org/2001/XMLSchema
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
name="WsN"targetNamespace="http://....">
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www...../" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://www...../">

When I invoque it, i get this error message: “'wsa' is an undeclared namespace. Line 1, position 2.”

I´m not sure if my wsdl is correct, if it has all the required definitions in order to work properly.
In attachment i'm sending you an exemple of the expected mensage.

Can you help me?

Thanks
Hi Barbara,

On the header that you are adding did you declare the wsa namespace? Because that is what is missing.
In the xml you pass to the SetWebReferenceSoapHeaders you need to include it explicitly: xmlns:wsa="http://www.w3.org/2005/08/addressing"

Regards,
João Rosado
Hi João

Thanks for answer me.

I have included in my tags the wsa namespace:  
<wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing">http://www../comunicarNumeroProcessoRequest</wsa:Action>
<wsa:MessageID mlns:wsa="http://www.w3.org/2005/08/addressing">WQBPAFCRYJHXAZGFDANSUIRQRDIMHBZWMWYS</wsa:MessageID>
<wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing">http://../</wsa:To>
<wsa:RelatesTo
xmlns:wsa="http://www.w3.org/2005/08/addressing">06c80b1f-41b9-4c41-955b-123521e42e10</wsa:RelatesTo>

But now i have this error:
1] Response is not well-formed XML.
2] Root element is missing.

I’m just passing those tags on my xml, how can I find which root element is missing?

Thanks for your help

Hi Barbara,

Each of those elements is a different header, so you need to add 4 different header elements (Action, MessageID, To, RelatesTo), and not 1 text with all 4.

Regards,
João Rosado
Hi João,

I'm passing the four elements separately, not in 1.


Did this ever get solved? We are seeing the same thing.

J.Ja
Hi Justin,

Did you get it working? 
Can you show how you are doing it?

Regards,
João Rosado
João Rosado wrote:
Hi Justin,

Did you get it working? 
Can you show how you are doing it?

Regards,
João Rosado
 Joao -

No, I didn't. I have a support case open on it.

J.Ja