Convert SOAP 1.2 to SOAP 1.1 - web-services

I have a SOAP message in version 1.2. How can I convert it to version 1.1 since my server only support version 1.1?
<?xml version='1.0' encoding='UTF-8' ?>
<wsdl:definitions targetNamespace="http://myexample.com" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding"
xmlns:tns="http://myexample.com" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://myexample.com" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding" xmlns:tns="http://myexample.com" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="Result" type="tns:Result" />
.
.
.
.
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="ValidateBill">
<wsdl:port binding="tns:ValidateBillServicesHttpBinding" name="ValidateBillServicesHttpPort">
<soap12:address location="http://123.456.78:8080/ValidateBill" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
My info provided may be too little since I don't know much about SOAP. Sorry for that.

Related

XML/C++ type binding goes wrong

I have a WSDL file which I need to generate a c++ web service code from it. The toolchain I'm using is gSOAP.
The problem is that the generated server class, have a function for each operation with parameters as char* instead of something like ns2__something structs. How can I force gSOAP to generate XML/C or XML/C++ binding (according to my understanding of gSOAP documentation it should do so [?])
WSDL file:
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="swus"
targetNamespace="swus.wsdl"
xmlns:tns="swus.wsdl"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns="urn:swus"
xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:MIME="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:DIME="http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/"
xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<types>
<schema targetNamespace="urn:swus"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns="urn:swus"
xmlns="http://www.w3.org/2001/XMLSchema"
elementFormDefault="unqualified"
attributeFormDefault="unqualified">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<element name="addRequestElement">
<complexType>
<sequence>
<element name="a" type="xsd:double"></xsd:element>
<element name="b" type="xsd:double"></xsd:element>
</sequence>
</complexType>
</element>
<element name="addResponseElement">
<complexType>
<sequence>
<element name="result" type="xsd:double"></xsd:element>
</sequence>
</complexType>
</element>
</schema>
</types>
<message name="addRequest">
<part name="parameters" element="addRequestElement"/>
</message>
<message name="addResponse">
<part name="result" element="addResponseElement"/>
</message>
<portType name="calcPortType">
<operation name="add">
<input message="tns:addRequest"/>
<output message="tns:addResponse"/>
</operation>
</portType>
<binding name="swus" type="tns:calcPortType">
<SOAP:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="add">
<SOAP:operation style="document" soapAction=""/>
<input>
<SOAP:body use="literal" namespace="urn:swus" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<SOAP:body use="literal" namespace="urn:swus" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
</binding>
<service name="swus">
<port name="swus" binding="tns:swus">
<SOAP:address location=""/>
</port>
</service>
</definitions>
gSOAP parameters:
wsdl2h -c++11 -g -a -w -y -oSWUS.h ../docs/service.wsdl
soapcpp2 -2 -S -a -A -t -c++11 -b -i ./SWUS.h
Generated code snippet:
class SOAP_CMAC swusService : public soap {
public:
/* blah blah blah... */
/// Web service operation 'add' (returns SOAP_OK or error code)
virtual int add(char *wsdl__addRequestElement, // =====>> Why?
char *wsdl__addResponseElement // =====>> Why?
) SOAP_PURE_VIRTUAL;
};
The WSDL file is mixing two namespaces (tns and swus).
Add swus: to the request and response element types:
<message name="addRequest">
<part name="parameters" element="swus:addRequestElement"/>
</message>
<message name="addResponse">
<part name="result" element="swus:addResponseElement"/>
</message>
gSOAP should match now the correct types:
virtual int add(
_ns2__addRequestElement *ns2__addRequestElement,
_ns2__addResponseElement &ns2__addResponseElement
) SOAP_PURE_VIRTUAL;

Couldn't find <definitions> in WSDL

i tried to develop my first SOAP webservice, but i'm stuck with an error when i try to open my WSDL with wizdl. I got this error :
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>WSDL</faultcode>
<faultstring>
SOAP-ERROR: Parsing WSDL: Couldn't find <definitions> in
'http://localhost/testSolution/test.wsdl'
</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Here is my code : testSolution.php :
<?php
class Ws{
function getString()
{
return "TESTASTOS";
}
}
ini_set("soap.wsdl_cache_enabled", 0);
$serversoap = new SoapServer("http://localhost/testSolution/test.wsdl");
$serversoap->setClass("Ws");
$serversoap->handle();
?>
And test.wsdl :
<?xml version="1.0" encoding="iso-8859-1"?>
<definitions
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://schemas.xmlsoap.org/wsdl"
targetNamespace="urn:serviceTestwsdl"
xmlns:tns="urn:serviceTestwsdl"
>
<types>
<xsd:schema targetNamespace="urn:serviceTestwsdl"/>
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
<xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
</types>
<message name="getStringRequest">
</message>
<message name="getStringResponse">
<part name="return" type="xsd:string" />
</message>
<portType name="serviceTestPortType">
<operation name="getString">
<documentation>Récupère un string</documentation>
<input message="tns:getStringRequest"/>
<output message="tns:getStringResponse"/>
</operation>
</portType>
<binding name="serviceTestBinding" type="tns:serviceTestPortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="getString">
<soap:operation soapAction="urn:serviceTestwsdl#getString" style="rpc"/>
<input>
<soap:body use="encoded" namespace="urn:serviceTestwsdl"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body use="encoded" namespace="urn:serviceTestwsdl"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
</binding>
<service name="serviceTest">
<port name="serviceTestPort" binding="tns:serviceTestBinding">
<soap:address location="http://localhost/testSolution/testSolution.php"/>
</port>
</service>
</definitions>
The mainly goal is to understand how a soap webservice work by making a small hello world on string.
Thanks a lot for your Help
Regards. Didier
You need to add the "wsdl" prefix like <wsdl:definitions> in the test.wsdl. Also to the first level of elements within that param:
<wsdl:types>...</wsdl:types>
<wsdl:operation>...</wsdl:operation>
... etc
This will allow you to load the wsdl.

SOAPAction error on WS consuption

I'm trying to query a WS from IBMIntegrationBus v10 using the SOAPRequest node.
SoapUI has no problems consuming this WS with the following payload:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsg="http://wsgetrama.wsbeans.iseries/" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soapenv:Header/>
<soapenv:Body>
<out:wsgetrama xmlns:out="http://wsgetrama.wsbeans.iseries/">
<arg0>
<PERAMA>1</PERAMA>
<PERAMD>Test</PERAMD>
</arg0>
</out:wsgetrama>
</soapenv:Body>
</soapenv:Envelope>
The raw data is as follows:
POST http://192.168.1.116:10028/web/services/WSGETRAMAService/WSGETRAMA HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: ""
Content-Length: 643
Host: 192.168.1.116:10028
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
I'm trying to consume a WS with the following WSDL:
<definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://wsgetrama.wsbeans.iseries/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/" name="WSGETRAMA" targetNamespace="http://wsgetrama.wsbeans.iseries/">
<types>
<xs:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://wsgetrama.wsbeans.iseries/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://wsgetrama.wsbeans.iseries/" version="1.0">
<xs:element name="wsgetrama" type="tns:wsgetrama"/>
<xs:element name="wsgetramaResponse" type="tns:wsgetramaResponse"/>
<xs:complexType name="wsgetrama">
<xs:sequence>
<xs:element name="arg0" type="tns:wsgetramaInput"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="wsgetramaInput">
<xs:sequence>
<xs:element name="PERAMA" type="xs:decimal"/>
<xs:element name="PERAMD" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="wsgetramaResponse">
<xs:sequence>
<xs:element name="return" type="tns:wsgetramaResult"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="wsgetramaResult">
<xs:sequence>
<xs:element name="PERAMD" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
</types>
<message name="wsgetrama">
<part element="tns:wsgetrama" name="parameters"></part>
</message>
<message name="wsgetramaResponse">
<part element="tns:wsgetramaResponse" name="parameters"></part>
</message>
<portType name="WSGETRAMAServices">
<operation name="wsgetrama">
<input message="tns:wsgetrama" wsam:Action="http://wsgetrama.wsbeans.iseries/WSGETRAMAServices/wsgetramaRequest"></input>
<output message="tns:wsgetramaResponse" wsam:Action="http://wsgetrama.wsbeans.iseries/WSGETRAMAServices/wsgetramaResponse"></output>
</operation>
</portType>
<binding name="WSGETRAMAServicesPortBinding" type="tns:WSGETRAMAServices">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="wsgetrama">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="WSGETRAMA">
<port binding="tns:WSGETRAMAServicesPortBinding" name="WSGETRAMAServicesPort">
<soap:address location="http://192.168.1.116:10028/web/services/WSGETRAMAService/WSGETRAMA"/>
</port>
</service>
</definitions>
While SoapUI has no problems consuming it, when I try the same on the integration bus, I get the following error:
The given SOAPAction wsgetrama does not match an operation
For consuming this WS, I've imported the mentioned WSDL and based the SOAPRequest Node on it.
Any ideas will be greatly appreciated!
Thanks!
Sean
I'm having the same problem. I'm trying to consume a web service exposed in jboss EAP 6.2 from IBM Integration Bus message flow, and I got the same message (the service goes unresponsive and looking at server.log I noticed the same error "The given SOAPAction generarDocumento does not match an operation").
The wsdl indeed contains a soapaction that is blank:
<wsdl:operation name="generarDocumento">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="generarDocumento">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="generarDocumentoResponse">
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="ControladaException">
<soap:fault name="ControladaException" use="literal"/>
</wsdl:fault>
</wsdl:operation>
After hours I've found this on IBM Knowledge Base:
"If a SOAPAction is set to an empty string in the HTTPInput header, it is overridden, unless the action is set explicitly in the HTTPRequest header, for example:
SET OutputRoot.HTTPRequestHeader.SOAPAction = InputRoot.HTTPInputHeader.SOAPAction
"
I'm using a JavaCompute node, so I'm still figuring out how to translate the above ESQL Code to Java, in order to replace the HTTP Request and set the soapaction to blank.
I'll let you all know if I made it.

nullable WSDL message part?

Problem:
I have a SOAP service with the following simplified WSDL:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://new.webservice.namespace" targetNamespace="http://new.webservice.namespace">
<wsdl:types>
<xs:schema targetNamespace="http://new.webservice.namespace" elementFormDefault="qualified"/>
</wsdl:types>
<wsdl:message name="NewMessageRequest">
<wsdl:part name="parameter" type="xs:string"/>
</wsdl:message>
<wsdl:message name="NewMessageResponse">
<wsdl:part name="result" type="xs:string"/>
<wsdl:part name="param2" type="xs:string"/>
</wsdl:message>
<wsdl:portType name="NewPortType">
<wsdl:operation name="NewOperation">
<wsdl:input message="tns:NewMessageRequest"/>
<wsdl:output message="tns:NewMessageResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="NewBinding" type="tns:NewPortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="NewOperation">
<soap:operation soapAction="urn:#NewOperation"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="NewService">
<wsdl:port name="NewPort" binding="tns:NewBinding">
<soap:address location="No Target Adress"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Notice the output message has two parts.
When invoking the SOAP services with SoapUI, the services implemented with the gSOAP framework returns a response which does not comply with the WSDL:
This is the SoapUI request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:new="http://new.webservice.namespace">
<soapenv:Header/>
<soapenv:Body>
<new:NewOperation>
<parameter>Hello</parameter>
</new:NewOperation>
</soapenv:Body>
</soapenv:Envelope>
This is the gSOAP WS response:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:new="http://new.webservice.namespace">
<soapenv:Header/>
<soapenv:Body>
<new:NewOperationResponse>
<result xsi:nil="true"/>
<param2>Hello World</param2>
</new:NewOperationResponse>
</soapenv:Body>
</soapenv:Envelope>
SoapUI complains with the following error:
line5: Element has xsi:nil attribute but is not nillable
Question:
How can I fix the WSDL so the message part is nullable?
It appears you may have set the SOAP_XML_NIL flag? This flag should not be set. See the gsoap documentation stating for SOAP_XML_NIL: output NULLs as xsi:nil.

JBossWS doesn't recognize WS-A header

I have a web-service stub implemented with JAX-WS and deployed on JBossAS 7. Here is a source code:
package org.mycompany.adapters.ws;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.xml.ws.soap.Addressing;
#WebService
#Addressing(enabled = true, required = true)
public class AdapterSessionManager {
#WebMethod
public String initAdapterSession() {
return "hello";
}
}
Here is a WSDL generated by JBoss for this web-service:
<wsdl:definitions name="AdapterSessionManagerService" targetNamespace="http://ws.adapters.mycompany.org/" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://ws.adapters.mycompany.org/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<xs:schema elementFormDefault="unqualified" targetNamespace="http://ws.adapters.mycompany.org/" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="initAdapterSession" type="tns:initAdapterSession"/>
<xs:element name="initAdapterSessionResponse" type="tns:initAdapterSessionResponse"/>
<xs:complexType name="initAdapterSession">
<xs:sequence/>
</xs:complexType>
<xs:complexType name="initAdapterSessionResponse">
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
</wsdl:types>
<wsdl:message name="initAdapterSessionResponse">
<wsdl:part element="tns:initAdapterSessionResponse" name="parameters"/>
</wsdl:message>
<wsdl:message name="initAdapterSession">
<wsdl:part element="tns:initAdapterSession" name="parameters"/>
</wsdl:message>
<wsdl:portType name="AdapterSessionManager">
<wsdl:operation name="initAdapterSession">
<wsdl:input message="tns:initAdapterSession" name="initAdapterSession" wsam:Action="http://ws.adapters.mycompany.org/AdapterSessionManager/initAdapterSessionRequest" wsaw:Action="http://ws.adapters.mycompany.org/AdapterSessionManager/initAdapterSessionRequest"/>
<wsdl:output message="tns:initAdapterSessionResponse" name="initAdapterSessionResponse" wsam:Action="http://ws.adapters.mycompany.org/AdapterSessionManager/initAdapterSessionResponse" wsaw:Action="http://ws.adapters.mycompany.org/AdapterSessionManager/initAdapterSessionResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="AdapterSessionManagerServiceSoapBinding" type="tns:AdapterSessionManager">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsaw:UsingAddressing wsdl:required="true"/>
<wsp:PolicyReference URI="#AdapterSessionManagerServiceSoapBinding_WSAM_Addressing_Policy"/>
<wsdl:operation name="initAdapterSession">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="initAdapterSession">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="initAdapterSessionResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="AdapterSessionManagerService">
<wsdl:port binding="tns:AdapterSessionManagerServiceSoapBinding" name="AdapterSessionManagerPort">
<soap:address location="http://localhost:8081/adapters/AdapterSessionManager"/>
</wsdl:port>
</wsdl:service>
<wsp:Policy wsu:Id="AdapterSessionManagerServiceSoapBinding_WSAM_Addressing_Policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsam:Addressing>
<wsp:Policy/>
</wsam:Addressing>
</wsp:Policy>
</wsdl:definitions>
When I try to invoke initAdapterSession with the following SOAP-request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.adapters.mycompany.org/">
<soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Action>http://ws.adapters.mycompany.org/AdapterSessionManager/initAdapterSessionRequest</wsa:Action>
</soapenv:Header>
<soapenv:Body>
<ws:initAdapterSession/>
</soapenv:Body>
</soapenv:Envelope>
"A required header representing a Message Addressing Property is not present" SOAP fault occurs:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<Action xmlns="http://www.w3.org/2005/08/addressing">http://ws.adapters.mycompany.org/AdapterSessionManager/initAdapterSession/Fault/SoapFault</Action>
<MessageID xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:d5b5c6aa-fd66-49bd-b928-488fa8e07f7b</MessageID>
<RelatesTo xmlns="http://www.w3.org/2005/08/addressing">http://www.w3.org/2005/08/addressing/unspecified</RelatesTo>
</soap:Header>
<soap:Body>
<soap:Fault>
<faultcode xmlns:ns1="http://www.w3.org/2005/08/addressing">ns1:MessageAddressingHeaderRequired</faultcode>
<faultstring>A required header representing a Message Addressing Property is not present</faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>
The SOAP-request is sent by soapUI. All WS-A options in soapUI preferences (WS-A settings tab) are disabled. Enable WS-A addressing checkbox in request settings is switched off too. Actually the same error occurs even when all these options are enabled.
Why JBoss doesn't see WS-A header within the request?
The SOAP fault "A required header representing a Message Addressing Property is not present" happens when a SOAP message does not have all the required WS-Addressing header information. It's not a JBoss specific exception, I've had this happen to me on WebSphere as well.
Your request only shows that it's sending the Action header. Looking at the spec (http://www.w3.org/Submission/ws-addressing/#_Toc77464323) it seems you need to send both the Action and To headers. The other option is to not send any WS-Addressing headers at all, but I would guess that, based on your WSDL, the server may not accept messages without WS-Addressing.
Just found lacking header. The fault doesn't arise if wsa:MessageID is passed with a SOAP-request. In my opinion it's a weird behavior, given that the wsa:MessageID is described as an optional header in WS-A 1.0 specification.