SOAPUI - missing message part with name - schema compliance error - xsd

Here is the wsdl file with the schema inline. I have the actual wsdl file being called locally aka localhost/wsdl/.
<wsdl:definitions xmlns="http://soap.company.com/fetch_n_pay"
xmlns:tns="http://soap.company.com/fetch_n_pay"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
targetNamespace="http://soap.company.com/fetch_n_pay">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://soap.company.com/fetch_n_pay">
<s:complexType name="fetchBookingDetailsRequType">
<s:all>
<s:element name="version" type="s:string"/>
<s:element name="timestamp" type="s:dateTime"/>
<s:element name="siteUrl" type="s:string"/>
<s:element name="confirmationCode" type="s:string"/>
<s:element name="vendorCode" type="s:string"/>
</s:all>
</s:complexType>
<s:complexType name="fetchBookingDetailsRespType">
<s:all>
<s:element name="version" type="s:string"/>
<s:element name="timestamp" type="s:dateTime"/>
<s:element name="isSuccess" type="s:boolean"/>
<s:element name="responseCode" type="s:int"/>
<s:element name="errorMessage" type="s:string"/>
<s:element name="sailingDate" type="s:date"/>
<s:element name="sailingName" type="s:string"/>
<s:element name="cruiselineName" type="s:string"/>
<s:element name="cruiselineId" type="s:string"/>
<s:element name="cabinNumber" type="s:string"/>
<s:element name="roomType" type="s:string"/>
<s:element name="shipName" type="s:string"/>
<s:element name="departingFrom" type="s:string"/>
<s:element name="returnDate" type="s:date"/>
<s:element name="numberOfAdults" type="s:int"/>
<s:element name="numberOfChildren" type="s:int"/>
<s:element name="numberOfSeniors" type="s:int"/>
<s:element name="numberOfInfants" type="s:int"/>
<s:element name="confirmationNumber" type="s:string"/>
<s:element name="balanceDueDate" type="s:dateTime"/>
<s:element name="depositDueDate" type="s:dateTime"/>
<s:element name="depositCollectedByCruiseline" type="s:boolean"/>
<s:element name="wasBookedSuccess" type="s:boolean"/>
<s:element name="shipImageUrl" type="s:string"/>
<s:element name="isCancelled" type="s:boolean"/>
<s:element name="insuranceAmount" type="s:double"/>
<s:element name="customerTitle" type="s:string"/>
<s:element name="customerFirstName" type="s:string"/>
<s:element name="customerLastName" type="s:string"/>
<s:element name="customerPhone" type="s:string"/>
<s:element name="customerEmail" type="s:string"/>
</s:all>
</s:complexType>
<s:element name="fetchBookingDetailsRequElement" type="tns:fetchBookingDetailsRequType" />
<s:element name="fetchBookingDetailsRespElement" type="tns:fetchBookingDetailsRespType" />
</s:schema>
</wsdl:types>
<wsdl:message name="fetchBookingDetailsSoapIn">
<wsdl:part name="banana1" element="tns:fetchBookingDetailsRequElement"/>
</wsdl:message>
<wsdl:message name="fetchBookingDetailsSoapOut">
<wsdl:part name="banana2" element="tns:fetchBookingDetailsRespElement"/>
</wsdl:message>
<wsdl:portType name="FetchAndPaySoap">
<wsdl:operation name="fetchBookingDetails">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
Gets Information for booking.
</wsdl:documentation>
<wsdl:input message="tns:fetchBookingDetailsSoapIn"/>
<wsdl:output message="tns:fetchBookingDetailsSoapOut"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="FetchAndPaySoap" type="tns:FetchAndPaySoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="fetchBookingDetails">
<soap:operation soapAction="http://soap.company.com/fetchBookingDetails" 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="FetchAndPay">
<wsdl:port name="FetchAndPaySoap" binding="tns:FetchAndPaySoap">
<soap:address location="localhost/wsdl/"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
1) For some reason the request soap is adding in "fet:" namespace
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:fet="http://soap.company.com/fetch_n_pay">
<soapenv:Header/>
<soapenv:Body>
<fet:fetchBookingDetailsRequElement>
<!--You may enter the following 5 items in any order-->
<fet:version>?</fet:version>
<fet:timestamp>?</fet:timestamp>
<fet:siteUrl>?</fet:siteUrl>
<fet:confirmationCode>?</fet:confirmationCode>
<fet:vendorCode>?</fet:vendorCode>
</fet:fetchBookingDetailsRequElement>
</soapenv:Body>
</soapenv:Envelope>
2) The SOAP Response is valid but the schema Compliance failed. This is the error:
SOAP Response - VALID
Schema Compliance - FAILED
-> line -1: Missing message part with name [{http://soap.company.com/fetch_n_pay}fetchBookingDetailsRespElement]
Here is the response:
<SOAP-ENV:Envelope
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
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/">
<SOAP-ENV:Body>
<fetchBookingDetailsResponse
xmlns="http://soap.company.com/fetch_n_pay">
<version>0.1.0</version>
<timestamp>2015-06-18T13:37:08-04:00</timestamp>
<isSuccess>false</isSuccess>
<responseCode>47</responseCode>
<errorMessage>No results were found.</errorMessage>
</fetchBookingDetailsResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Im trying to be Schema Compliant so that this can be parsed.
Anything would be greatly appreciated. Thank you!

Your validation engine already gave you the answer, it's not fetchBookingDetailsResponse, it's fetchBookingDetailsRespElement.

Related

How to see ARRAY with NODE JS soap

Hi need to make a WebService with nodejs, this is my first experience to make a SOAP with WSDL.
I use the library "node-wsdl" and i need to stamp a list of array in soap but now i receive a wrong response
I have this response from SOAP:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="http://localhost:3001/gateway">
<soap:Body>
<tns:listInvoicesResponse>
<tns:0>
<invoice_id>00000</invoice_id>
<ipa_code>00000</ipa_code>
<timing>Thu Jun 04 2015 16:35:46 GMT+0100 (GMT+01:00)</timing>
</tns:0>
<tns:1>
<invoice_id>00001</invoice_id>
<ipa_code>00001</ipa_code>
<timing>Thu Jun 04 2015 16:41:29 GMT+0100 (GMT+01:00)</timing>
</tns:1>
</tns:listInvoicesResponse>
</soap:Body>
</soap:Envelope>
But i need to have a response like this:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="http://localhost:3001/gateway">
<soap:Body>
<tns:listInvoicesResponse>
<lists>
<tns:0>
<invoice_id>00000</invoice_id>
<ipa_code>00000</ipa_code>
<timing>Thu Jun 04 2015 16:35:46 GMT+0100 (GMT+01:00)</timing>
</tns:0>
<tns:1>
<invoice_id>000</invoice_id>
<ipa_code>00001</ipa_code>
<timing>Thu Jun 04 2015 16:41:29 GMT+0100 (GMT+01:00)</timing>
</tns:1>
</lists>
</tns:listInvoicesResponse>
</soap:Body>
</soap:Envelope>
I use this code for retrive info from a DB and print the result on XML like list
var myService = {
ws: {
gateway: {
listInvoices: function(args, callback) {
var ipa_code = args.ipaCode
GetAllInvoice(ipa_code).then(result =>{
console.log(result)
result.map( el =>{
callback(result)
})
})
},
// This is how to define an asynchronous function.
getInvoice: function(args, callback) {
// do some work
}
}
}
};
And my wsdl is this
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="InvoiceGeneral"
targetNamespace="http://localhost:3001/gateway"
xmlns="http://localhost:3001/gateway"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
soap:encodingStyle="http://www.w3.org/2003/05/soap-encoding"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
xmlns:tns="http://localhost:3001/gateway"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<wsdl:message name="listInvoicesRequest">
<wsdl:part name="ipaCode" type="xs:string"/>
<wsdl:part name="dateFrom" type="xs:string"/>
<wsdl:part name="dateTo" type="xs:string"/>
<wsdl:part name="Accepted_invoice" type="xs:string"/>
</wsdl:message>
<wsdl:message name="getInvoiceRequest">
<wsdl:part name="ipaCode" type="xs:string"/>
<wsdl:part name="refId" type="xs:string"/>
</wsdl:message>
<wsdl:message name="listInvoicesResponse">
<wsdl:part name="InvoiceList" type="tns:string"/>
</wsdl:message>
<wsdl:message name="getInvoiceResponse">
<wsdl:part name="DocInvoice" type="xs:string"/>
<wsdl:part name="descres" type="xs:string"/>
<wsdl:part name="resultCode" type="xs:string"/>
</wsdl:message>
<wsdl:portType name="gatewayP">
<wsdl:operation name="listInvoices">
<wsdl:input message="listInvoicesRequest"/>
<wsdl:output message="listInvoicesResponse"/>
</wsdl:operation>
<wsdl:operation name="getInvoice">
<wsdl:input message="getInvoiceRequest"/>
<wsdl:output message="getInvoiceResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="Gateways" type="gatewayP">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="listInvoices">
<soap:operation soapAction="listInvoices"/>
<wsdl:input><soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="literal"/></wsdl:input>
<wsdl:output><soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="literal"/></wsdl:output>
</wsdl:operation>
<wsdl:operation name="getInvoice">
<soap:operation soapAction="getInvoice"/>
<wsdl:input><soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="literal"/></wsdl:input>
<wsdl:output><soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="literal"/></wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="ws">
<wsdl:port binding="Gateways" name="gateway">
<soap:address location="http://localhost:3001/WebServices/InvoiceGeneral"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

Soap Webservice in Node JS

I am trying to build a soap webservice in node js using the npm module soap. I am using the soap.listen function that is mentioned to launch a soap server in node js. The wsdl file I am including looks like below:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="wscalc1" targetNamespace="http://localhost:8100/api/orderStatusWsdl" xmlns="http://localhost:8100/api/orderStatusWsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<wsdl:message name="receiveOrderStatusRequest">
<wsdl:part name="a" type="xs:string"/>
<wsdl:part name="b" type="xs:string"/>
</wsdl:message>
<wsdl:message name="receiveOrderStatusResponse">
<wsdl:part name="orderStatusResponse" type="xs:string"/>
</wsdl:message>
<wsdl:portType name="orderStatusPort">
<wsdl:operation name="receiveOrderStatus">
<wsdl:input message="receiveOrderStatusRequest"/>
<wsdl:output message="receiveOrderStatusResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="orderStatusBinding" type="orderStatusPort">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="receiveOrderStatus">
<soap:operation soapAction="receiveOrderStatus"/>
<wsdl:input>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="orderStatusService">
<wsdl:port binding="orderStatusBinding" name="orderStatus">
<soap:address location="http://localhost:8100/api/orderStatusWsdl"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
The node js code:
var orderStatusWsdlXml = fs.readFileSync(path.join(__dirname, 'soap/wsdl/myWsdl2.wsdl'), 'utf8')
var soapServer = soap.listen(server, BASE_URL + '/orderStatusWsdl', orderStatusSoapService, orderStatusWsdlXml2)
soapServer.log = function(type, data) {
log.d('TYPE: ' + type)
log.d('DATA: ' + JSON.stringify(data, null, 4))
}
After running the node project I try to load the WSDL in SOAP UI client and I get the following error:
Error loading [http://localhost:8100/api/orderStatusWsdl]: org.apache.xmlbeans.XmlException: org.apache.xmlbeans.XmlException: error: Unexpected end of file after null
Where am I going wrong?

how to use nodejs send soap complextype to axis wsdl server

I'm using node as client communicate with java axis wsdl service (not familiar to this).
There is a node-soap module could send simple types to service. e.g:
<wsdl:message name="helloArgsRequest">
<wsdl:part name="str" type="xsd:string"/>
<wsdl:part name="i" type="xsd:int"/>
</wsdl:message>
<!-- ... -->
<wsdl:operation name="helloArgs" parameterOrder="str i">
<wsdl:input message="impl:helloArgsRequest" name="helloArgsRequest"/>
<wsdl:output message="impl:helloArgsResponse" name="helloArgsResponse"/>
</wsdl:operation>
node:
soap.createClient(url, function(err, client) {
client.helloArgs({
str: "haha",
i: 100
}, function(err, result) {
console.log(result); // OK
});
});
But node-soap does not support complexType (Cannot find any example about complexType). So I capture the http request and get raw xml data post to service, as follow:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:impl="http://192.168.0.3:8080/axis/LoginService.jws" xmlns:intf="http://192.168.0.3:8080/axis/LoginService.jws" xmlns:tns1="http://DefaultNamespace">
<soap:Body>
<impl:helloArgs>
<str>haha</str>
<code>1</code>
</impl:helloArgs>
</soap:Body>
</soap:Envelope>
I write a test method helloJSON apply an argument typeof JSONObject. Change the xml data as follow. Unlucky, it not work.
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:impl="http://192.168.0.3:8080/axis/LoginService.jws" xmlns:intf="http://192.168.0.3:8080/axis/LoginService.jws" xmlns:tns1="http://DefaultNamespace">
<soap:Body>
<impl:helloJSON>
<arg type="tns1:JSONResult">
<code>1</code>
<data>Hello</data>
<message>dhad</message>
</arg>
</impl:helloJSON>
</soap:Body>
</soap:Envelope>
The service response:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server.userException</faultcode>
<faultstring>org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.</faultstring>
<detail>
<ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">localhost.localdomain</ns1:hostname>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
Could somebody give me some example of the raw xml send complexType data to axis service, thanks.
PS: the whole wsdl service description
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://192.168.0.3:8080/axis/LoginService.jws" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://192.168.0.3:8080/axis/LoginService.jws" xmlns:intf="http://192.168.0.3:8080/axis/LoginService.jws" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns1="http://DefaultNamespace" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)-->
<wsdl:types>
<schema targetNamespace="http://DefaultNamespace" xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="JSONResult">
<sequence>
<element name="code" type="xsd:int"/>
<element name="data" nillable="true" type="xsd:anyType"/>
<element name="message" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
</schema>
</wsdl:types>
<wsdl:message name="helloJSONResponse">
<wsdl:part name="helloJSONReturn" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="helloArgsRequest">
<wsdl:part name="str" type="xsd:string"/>
<wsdl:part name="i" type="xsd:int"/>
</wsdl:message>
<wsdl:message name="helloArgsResponse">
<wsdl:part name="helloArgsReturn" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="helloJSONRequest">
<wsdl:part name="arg" type="tns1:JSONResult"/>
</wsdl:message>
<wsdl:portType name="LoginService">
<wsdl:operation name="helloJSON" parameterOrder="arg">
<wsdl:input message="impl:helloJSONRequest" name="helloJSONRequest"/>
<wsdl:output message="impl:helloJSONResponse" name="helloJSONResponse"/>
</wsdl:operation>
<wsdl:operation name="helloArgs" parameterOrder="str i">
<wsdl:input message="impl:helloArgsRequest" name="helloArgsRequest"/>
<wsdl:output message="impl:helloArgsResponse" name="helloArgsResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="LoginServiceSoapBinding" type="impl:LoginService">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="helloJSON">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="helloJSONRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://DefaultNamespace" use="encoded"/>
</wsdl:input>
<wsdl:output name="helloJSONResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://192.168.0.3:8080/axis/LoginService.jws" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="helloArgs">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="helloArgsRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://DefaultNamespace" use="encoded"/>
</wsdl:input>
<wsdl:output name="helloArgsResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://192.168.0.3:8080/axis/LoginService.jws" use="encoded"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="LoginServiceService">
<wsdl:port binding="impl:LoginServiceSoapBinding" name="LoginService">
<wsdlsoap:address location="http://192.168.0.3:8080/axis/LoginService.jws"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

Adding service reference for WF4 workflow service doesn't create client (ClientBase)

I've created a very simple WF4 Service that contains only the Receive/Send sequence. I've deployed to AppFabric and it responds as expected when viewed via the browser (ie, "You have created a service"... wsdl links.. etc)
I've added a service reference inside VS2012, which completes successfully. However, there is no reference to the ClientBase class (ServiceClient).
However, if instead of adding a service reference I create the Service2 class via
svcutil.exe http://localhost/TrinityServices/Testbed/Service2.xamlx?wsdl
the resulting Service2.cs clearly has the ServiceClient declared,
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
public partial class ServiceClient : System.ServiceModel.ClientBase<IService>, IService
and I'm able to declare:
var svc = new ServiceClient();
.
.
string p = svc.GetData();
Why isn't the Client class getting generated via the Service Reference process? Below is the full wsdl.
I came across one similar post (ClientBase classes are not available in Reference.cs file), but I can't see a direct relation to my issue. My namespaces are untouched from the defaults.
Thanks for reading!
<?xml version="1.0" ?>
<wsdl:definitions name="Service2" targetNamespace="http://tempuri.org/" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" 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:tns="http://tempuri.org/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsp="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:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsp:Policy wsu:Id="NetNamedPipeBinding_IService_policy">
<wsp:ExactlyOne>
<wsp:All>
<msb:BinaryEncoding xmlns:msb="http://schemas.microsoft.com/ws/06/2004/mspolicy/netbinary1"/>
<sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
<sp:TransportToken>
<wsp:Policy>
<msf:WindowsTransportSecurity xmlns:msf="http://schemas.microsoft.com/ws/2006/05/framing/policy">
<msf:ProtectionLevel>
EncryptAndSign
</msf:ProtectionLevel>
</msf:WindowsTransportSecurity>
</wsp:Policy>
</sp:TransportToken>
<sp:AlgorithmSuite>
<wsp:Policy>
<sp:Basic256/>
</wsp:Policy>
</sp:AlgorithmSuite>
<sp:Layout>
<wsp:Policy>
<sp:Strict/>
</wsp:Policy>
</sp:Layout>
</wsp:Policy>
</sp:TransportBinding>
<wsaw:UsingAddressing/>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
<wsdl:types>
<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/" xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="anyType" nillable="true" type="xs:anyType"/>
<xs:element name="anyURI" nillable="true" type="xs:anyURI"/>
<xs:element name="base64Binary" nillable="true" type="xs:base64Binary"/>
<xs:element name="boolean" nillable="true" type="xs:boolean"/>
<xs:element name="byte" nillable="true" type="xs:byte"/>
<xs:element name="dateTime" nillable="true" type="xs:dateTime"/>
<xs:element name="decimal" nillable="true" type="xs:decimal"/>
<xs:element name="double" nillable="true" type="xs:double"/>
<xs:element name="float" nillable="true" type="xs:float"/>
<xs:element name="int" nillable="true" type="xs:int"/>
<xs:element name="long" nillable="true" type="xs:long"/>
<xs:element name="QName" nillable="true" type="xs:QName"/>
<xs:element name="short" nillable="true" type="xs:short"/>
<xs:element name="string" nillable="true" type="xs:string"/>
<xs:element name="unsignedByte" nillable="true" type="xs:unsignedByte"/>
<xs:element name="unsignedInt" nillable="true" type="xs:unsignedInt"/>
<xs:element name="unsignedLong" nillable="true" type="xs:unsignedLong"/>
<xs:element name="unsignedShort" nillable="true" type="xs:unsignedShort"/>
<xs:element name="char" nillable="true" type="tns:char"/>
<xs:simpleType name="char">
<xs:restriction base="xs:int"/>
</xs:simpleType>
<xs:element name="duration" nillable="true" type="tns:duration"/>
<xs:simpleType name="duration">
<xs:restriction base="xs:duration">
<xs:pattern value="\-?P(\d*D)?(T(\d*H)?(\d*M)?(\d*(\.\d*)?S)?)?"/>
<xs:minInclusive value="-P10675199DT2H48M5.4775808S"/>
<xs:maxInclusive value="P10675199DT2H48M5.4775807S"/>
</xs:restriction>
</xs:simpleType>
<xs:element name="guid" nillable="true" type="tns:guid"/>
<xs:simpleType name="guid">
<xs:restriction base="xs:string">
<xs:pattern value="[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}"/>
</xs:restriction>
</xs:simpleType>
<xs:attribute name="FactoryType" type="xs:QName"/>
<xs:attribute name="Id" type="xs:ID"/>
<xs:attribute name="Ref" type="xs:IDREF"/>
</xs:schema>
</wsdl:types>
<wsdl:message name="IService_GetData_InputMessage">
<wsdl:part element="q1:int" name="int" xmlns:q1="http://schemas.microsoft.com/2003/10/Serialization/"/>
</wsdl:message>
<wsdl:message name="IService_GetData_OutputMessage">
<wsdl:part element="q2:string" name="string" xmlns:q2="http://schemas.microsoft.com/2003/10/Serialization/"/>
</wsdl:message>
<wsdl:portType name="IService">
<wsdl:operation name="GetData">
<wsdl:input message="tns:IService_GetData_InputMessage" wsaw:Action="http://tempuri.org/IService/GetData"/>
<wsdl:output message="tns:IService_GetData_OutputMessage" wsaw:Action="http://tempuri.org/IService/GetDataResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="BasicHttpBinding_IService" type="tns:IService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="GetData">
<soap:operation soapAction="http://tempuri.org/IService/GetData" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="NetNamedPipeBinding_IService" type="tns:IService">
<wsp:PolicyReference URI="#NetNamedPipeBinding_IService_policy"/>
<soap12:binding transport="http://schemas.microsoft.com/soap/named-pipe"/>
<wsdl:operation name="GetData">
<soap12:operation soapAction="http://tempuri.org/IService/GetData" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="Service2">
<wsdl:port binding="tns:BasicHttpBinding_IService" name="BasicHttpBinding_IService">
<soap:address location="http://localhost/TrinityServices/Testbed/Service2.xamlx"/>
</wsdl:port>
<wsdl:port binding="tns:NetNamedPipeBinding_IService" name="NetNamedPipeBinding_IService">
<soap12:address location="net.pipe://ip-0a7e0a82/TrinityServices/Testbed/Service2.xamlx"/>
<wsa10:EndpointReference>
<wsa10:Address>
net.pipe://ip-0a7e0a82/TrinityServices/Testbed/Service2.xamlx
</wsa10:Address>
<Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity">
<Spn>
host/ip-0A7E0A82
</Spn>
</Identity>
</wsa10:EndpointReference>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
For anyone caught in this one, here's the issue. I had generated the web references for a console service app. By default, these are implemented as workflow activities, not as part of a client wrapper. Once I realized my misunderstanding, instantiating was simple.

WSO2 BPS: How to pass Header values as a part of a Message in BPEL Invoke

My web service operation is defined like below. Where I have a header parameter as well.
public void method(#WebParam(name="OrderNo", mode=WebParam.Mode.IN) String order_no_,
#WebParam(name="user", mode=WebParam.Mode.IN, header=true) String user)
Now when I deploy this service I get a WSDL which looks like this.
<?xml version="1.0" ?>
<wsdl:definitions ... >
<wsdl:types>
</xs:schema>
...
<xs:element name="method" type="tns:method"></xs:element>
<xs:complexType name="method">
<xs:sequence>
<xs:element minOccurs="0" name="OrderNo" type="xs:string"></xs:element>
</xs:sequence>
</xs:complexType>
...
<xs:element name="user" nillable="true" type="xs:string"></xs:element>
...
</xs:schema>
</wsdl:types>
...
<wsdl:message name="method">
<wsdl:part element="tns:method" name="parameters" />
<wsdl:part element="tns:user" name="user" />
</wsdl:message>
...
<wsdl:portType name="CustomerOrderService">
<wsdl:operation name="method">
<wsdl:input message="tns:method" name="method" />
<wsdl:output ... />
<wsdl:fault ... />
</wsdl:operation>
</wsdl:portType>
...
<wsdl:binding name="OrderSoapBinding" type="tns:OrderService">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="method">
<soap:operation soapAction="" style="document" />
<wsdl:input name="method">
<soap:header message="tns:method" part="user" use="literal" />
<soap:body parts="parameters" use="literal" />
</wsdl:input>
<wsdl:output name="...">
<soap:body use="literal" />
</wsdl:output>
<wsdl:fault name="...">
...
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
</wsdl:definitions>
As you can see the header is part of the message used as input for the service request. Hwen I use soap UI to test this WSDL it generated a proper soap message with the "user" property as part of the header.
When I use this service as a partner link in a Carbon BPEL process, and assign a value to the "user" part in the invoke message, the value is not included in the header.
<bpel:variable name="method_Input" messageType="ns0:method" />
<bpel:assign name="...">
...
<bpel:copy>
<bpel:from>$input.payload/tns:TaskReceiver</bpel:from>
<bpel:to>$method_Input.user</bpel:to>
</bpel:copy>
</bpel:assign>
You can see that the message part is assigned the proper value,
The problem is this message part which is bound to the header of of the soap message is never included in the soap header.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<method xmlns="http://customerorder.service.test/">
<OrderNo xmlns="">ORD00011</OrderNo>
</method>
</soapenv:Body>
</soapenv:Envelope>
Thanks in advance to any help provided.

Resources