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.
Related
Let's have a simple WSDL file:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://www.test.com"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.test.com">
<wsdl:types>
<xs:schema targetNamespace="http://www.test.com">
<xs:element name="sessionId" type="xs:string">
</xs:element>
<xs:element name="transactionId" type="xs:string">
</xs:element>
<xs:element name="Login">
<xs:complexType>
<xs:sequence>
<xs:element name="userId" type="xs:string">
</xs:element>
<xs:element name="pwd" type="xs:string">
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="LoginResponse">
<xs:complexType />
</xs:element>
</xs:schema>
</wsdl:types>
<wsdl:message name="Login">
<wsdl:part name="parameters" element="Login"/>
</wsdl:message>
<wsdl:message name="LoginResponse">
<wsdl:part name="parameters" element="LoginResponse"/>
</wsdl:message>
<wsdl:message name="HeaderSessionId">
<wsdl:part name="header" element="sessionId"/>
</wsdl:message>
<wsdl:message name="HeaderTransactionId">
<wsdl:part name="header" element="transactionId"/>
</wsdl:message>
<wsdl:portType name="MMCServicesPort">
<wsdl:operation name="Login">
<wsdl:input message="Login"/>
<wsdl:output message="LoginResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="MMCServicesBinding" type="MMCServicesPort">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="Login">
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:header message="HeaderSessionId" part="header" use="literal"/>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="MMCServicesService">
<wsdl:port name="MMCServicesService" binding="MMCServicesBinding">
<soap:address location="/test"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
For this WSDL the following message is a valid response:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:test="http://www.test.com">
<soapenv:Header>
<test:sessionId>xxx</test:sessionId>
</soapenv:Header>
<soapenv:Body>
<test:LoginResponse/>
</soapenv:Body>
</soapenv:Envelope>
What/How do I need to change the WSDL to accept the following message as the Login operation response message instead:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<sessionId xmlns="http://www.test.com">xxx</sessionId>
</soapenv:Header>
<soapenv:Body>
<LoginResponse/>
</soapenv:Body>
</soapenv:Envelope>
...the LoginResponse is w/o a namespace definition.
I have a WS with unknown WSDL which doesn't provide the WSDL. The one above has been somehow reconstructed by someone else in the history. However the real WS which I need to use provides the 2nd response which is however refused by the Apache CXF java library.
Thank you.
The core issue seems to come with the definition of targetNamespace
in your code:
<xs:schema targetNamespace="http://www.test.com">
when replaced with:
<xs:schema targetNamespace="">
the SOAP XML should be without any prefix.
It might require also define the empty or default namespace at the wsdl:binding and wsdl:service level:
<wsdl:binding name="MMCServicesBinding" type="MMCServicesPort" xmlns="">
...
<wsdl:service name="MMCServicesService" xmlns="">
You might have built some code stubs based on that WSDL then you have to update also this generated code.
I am beginning with Mule flows. I am trying to consume a webservice in it.
But I am getting some some errors while running.
Error reported by XML parser: Content is not allowed in prolog
Here is my code
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:ws="http://www.mulesoft.org/schema/mule/ws" xmlns:data-mapper="http://www.mulesoft.org/schema/mule/ee/data-mapper" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.6.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/ws http://www.mulesoft.org/schema/mule/ws/current/mule-ws.xsd
http://www.mulesoft.org/schema/mule/ee/data-mapper http://www.mulesoft.org/schema/mule/ee/data-mapper/current/mule-data-mapper.xsd">
<http:listener-config name="HTTP_Listener_Configuration" host="localhost" port="8095" doc:name="HTTP Listener Configuration"/>
<ws:consumer-config name="Web_Service_Consumer" wsdlLocation="MSCRMDiscoveryService_WSDL.wsdl" service="DiscoveryService" port="CustomBinding_IDiscoveryService" serviceAddress="https://disco.crm5.dynamics.com/XRMServices/2011/Discovery.svc" doc:name="Web Service Consumer"/>
<data-mapper:config name="Xml_ExecuteResponse__To_Xml_Execute_" transformationGraphPath="xml_executeresponse__to_xml_execute_.grf" doc:name="Xml_ExecuteResponse__To_Xml_Execute_"/>
<data-mapper:config name="Xml_ExecuteResponse__To_Xml_Execute__1" transformationGraphPath="xml_executeresponse__to_xml_execute__1.grf" doc:name="Xml_ExecuteResponse__To_Xml_Execute__1"/>
<flow name="mscrmdiscoveryservice-consumerFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="*" doc:name="HTTP"/>
<data-mapper:transform config-ref="Xml_ExecuteResponse__To_Xml_Execute_" doc:name="Xml<ExecuteResponse> To Xml<Execute>"/>
<ws:consumer config-ref="Web_Service_Consumer" operation="Execute" doc:name="Web Service Consumer"/>
<data-mapper:transform config-ref="Xml_ExecuteResponse__To_Xml_Execute__1" doc:name="Xml<ExecuteResponse> To Xml<Execute>"/>
</flow>
</mule>
wsdl file
<?xml version='1.0' encoding='UTF-8'?><wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://example.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" name="HelloWorldService" targetNamespace="http://example.org/">
<wsdl:types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://example.org/" elementFormDefault="unqualified" targetNamespace="http://example.org/" version="1.0">
<xs:element name="sayHi" type="tns:sayHi"/>
<xs:element name="sayHiResponse" type="tns:sayHiResponse"/>
<xs:complexType name="sayHi">
<xs:sequence>
<xs:element minOccurs="0" name="arg0" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="sayHiResponse">
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
</wsdl:types>
<wsdl:message name="sayHi">
<wsdl:part element="tns:sayHi" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="sayHiResponse">
<wsdl:part element="tns:sayHiResponse" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="HelloWorld">
<wsdl:operation name="sayHi">
<wsdl:input message="tns:sayHi" name="sayHi">
</wsdl:input>
<wsdl:output message="tns:sayHiResponse" name="sayHiResponse">
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="HelloWorldServiceSoapBinding" type="tns:HelloWorld">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="sayHi">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="sayHi">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="sayHiResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="HelloWorldService">
<wsdl:port binding="tns:HelloWorldServiceSoapBinding" name="HelloWorldPort">
<soap:address location="http://localhost:8085/hello"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
How can I fix this error?
From the flow you shared, is difficult to tell where the error exactly exists ... It may be your from your wrong XML structure.
Also not clear the use of Datamapper in consuming external web service
The easiest way to consume an existing web service from Mule flow is to prepare/build the soap request for the external service using set payload or XSLT transformer, and then dispatch it through HTTP outbound or HTTP request component.
All,
I have an issue with developing a contract-first SOAP web service in AnyPoint Studio (July 2014, with Muleserver 3.5.1 on max OS X, JDK 7). My process is:
Create WSDL by hand (XML Schema embedded inside WSDL for simplicity)
Create Synchronous HTTP flow in Anypoint
Generate Java classes from WSDL (no errors, works fine)
Start Flow from inside IDE (no errors,works fine).
Import WSDL and generate SOAP request in SOAPUI (no errors, works fine)
invoke SOAP request
AT this point I get the following error on marshalling the SOAP request (my flow has no backend logic and will fail - but that is not the issue):
org.apache.cxf.phase.PhaseInterceptorChain: Interceptor for {http://login.demo/}LoginServiceService has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Message part {urn:MYNAMESPACE}requestParms was not recognized. (Does it exist in service WSDL?)
at org.apache.cxf.interceptor.DocLiteralInInterceptor.validatePart(DocLiteralInInterceptor.java:231)
at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:201)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:122)
at org.mule.module.cxf.CxfInboundMessageProcessor.sendToDestination(CxfInboundMessageProcessor.java:338)
My WSDL:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="urn:MYNAMESPACE"
xmlns:tns="urn:MYNAMESPACE"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
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:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<wsdl:types>
<xs:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:MYNAMESPACE"
xmlns="urn:MYNAMESPACE"
elementFormDefault="unqualified" attributeFormDefault="unqualified">
<xs:element name="requestParms" type="LoginRequestType" />
<xs:element name="responseParms" type="LoginResponseType"/>
<xs:complexType name="LoginRequestType">
<xs:sequence>
<xs:element name="username" type="xs:string"/>
<xs:element name="password" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="LoginResponseType">
<xs:sequence>
<xs:element name="success" type="xs:boolean"/>
<xs:element name="authenticatedToken" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
</wsdl:types>
<!-- MESSAGES -->
<wsdl:message name="LoginRequest">
<wsdl:part name="parameters" element="tns:requestParms"/>
</wsdl:message>
<wsdl:message name="LoginResponse">
<wsdl:part name="parameters" element="tns:responseParms"/>
</wsdl:message>
<!-- WSDL Port Types -->
<wsdl:portType name="AuthenticatePortType">
<wsdl:operation name="login">
<wsdl:input message="tns:LoginRequest"/>
<wsdl:output message="tns:LoginResponse"/>
</wsdl:operation>
</wsdl:portType>
<!-- WSDL Bindings -->
<wsdl:binding name="AuthenticateBinding" type="tns:AuthenticatePortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="login">
<soap:operation soapAction="login"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<!-- WSDL Services -->
<wsdl:service name="LoginService">
<wsdl:port name="LoginPort" binding="tns:AuthenticateBinding">
<soap:address location="http://localhost:8081/demo"/>
</wsdl:port>
</wsdl:service>
My Mule Config XML:
<http:endpoint exchange-pattern="request-response" host="localhost" port="8081" method="POST" name="HTTP" doc:name="HTTP"/>
<flow name="loginFlow" doc:name="loginFlow" initialState="started">
<http:inbound-endpoint exchange-pattern="request-response" path="demo" doc:name="Demo" host="localhost" port="8081"/>
<cxf:jaxws-service doc:name="CXF" validationEnabled="true" serviceClass="demo.login.LoginService"/>
</flow>
My SOAP Request:
<soapenv:Envelope xmlns:ns="urn:MYNAMESPACE"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" >
<soapenv:Header/>
<soapenv:Body>
<ns:requestParms>
<username>aa</username>
<password>bb</password>
</ns:requestParms>
</soapenv:Body>
</soapenv:Envelope>
Also, I have not modified the generated java code (wsdl2java I assume inside Anypoint) - just run it.
Any suggestions?
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.
I am currently trying to use a web service I developed within an Integration Services package. When I try to configure the web service task I keep getting an error message. I configured the HTTP connection, and successfully downloaded the WSDL file which overrides my local copy. After that, on the input tab, I try to select the only service available "MyService" and then get the following error message:
Item has already been added. Key in dictionary: 'anyType' Key being added: 'anyType'
Anyone knows what this means?
Thanks in advance!
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions name="MyService" targetNamespace="http://www.MyDomain.de/webservices" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://www.MyDomain.de/webservices" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex">
<wsdl:types>
<xsd:schema targetNamespace="http://www.MyDomain.de/webservices/Imports">
<xsd:import schemaLocation="http://localhost/MyDomainMyService/MyDomain.Billing.Infrastructure.Wcf.MyService.svc?xsd=xsd0" namespace="http://www.MyDomain.de/webservices" />
<xsd:import schemaLocation="http://localhost/MyDomainMyService/MyDomain.Billing.Infrastructure.Wcf.MyService.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
</xsd:schema>
</wsdl:types>
<wsdl:message name="MyService_BookNewTransaction_InputMessage">
<wsdl:part name="parameters" element="tns:BookNewTransaction" />
</wsdl:message>
<wsdl:message name="MyService_BookNewTransaction_OutputMessage">
<wsdl:part name="parameters" element="tns:BookNewTransactionResponse" />
</wsdl:message>
<wsdl:portType name="MyService">
<wsdl:operation name="BookNewTransaction">
<wsdl:input wsaw:Action="http://www.MyDomain.de/webservices/MyService/BookNewTransaction" message="tns:MyService_BookNewTransaction_InputMessage" />
<wsdl:output wsaw:Action="http://www.MyDomain.de/webservices/MyService/BookNewTransactionResponse" message="tns:MyService_BookNewTransaction_OutputMessage" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="BasicHttpBinding_MyService" type="tns:MyService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="BookNewTransaction">
<soap:operation soapAction="http://www.MyDomain.de/webservices/MyService/BookNewTransaction" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="MyService">
<wsdl:port name="BasicHttpBinding_MyService" binding="tns:BasicHttpBinding_MyService">
<soap:address location="http://localhost/MyDomainMyService/MyDomain.Billing.Infrastructure.Wcf.MyService.svc" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Ok, I found a link describing my problem.
Check this:
http://sjbdeveloper.blogspot.com/2007/03/calling-wcf-web-service-from-ssis-web.html
This should solve the problem:
http://sjbdeveloper.blogspot.com/2007/03/fixing-wcf-ssis-web-service-task.html