SOAP method call that takes two objects as arguments - soap

I'm doing a SOAP call to access the method getMailingReports from the below wsdl and can access it just fine. My problem is when I have to use createEmailMailing but have to pass in two arguments that are objects (Mailing and EmailContent). This is from stormpost (pulsepoint) so if anyone has experience with this I'd appreciate it. Below is the wsdl and the SOAP call I'm doing with ColdFusion. Again, this SOAP call works fine, but not sure how to mimic this and use the method createEmailMailing.
http://api.stormpost.datranmedia.com/services/SoapRequestProcessor?wsdl
<cfsavecontent variable="soap">
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header>
<ns0:username SOAP-ENV:actor="http://schemas.xmlsoap.org/soap/actor/next" xmlns:ns0="http://services.web.stormpost.skylist.com">fakelogin</ns0:username>
<ns0:password SOAP-ENV:actor="http://schemas.xmlsoap.org/soap/actor/next" xmlns:ns0="http://services.web.stormpost.skylist.com">fakepassword</ns0:password>
</SOAP-ENV:Header>
<SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s0="http://www.w3.org/2001/XMLSchema" xmlns:s1="http://schemas.xmlsoap.org/soap/encoding/">
<ns0:getMailingReports xmlns:ns0="http://services.web.stormpost.skylist.com">
<from xsi:type="xsd:dateTime"><cfoutput>#dateFormat(arguments.from, "yyyy-mm-dd")#</cfoutput>T00:00:00.000</from>
<to xsi:type="xsd:dateTime"><cfoutput>#dateFormat(arguments.to, "yyyy-mm-dd")#</cfoutput>T23:00:00.000</to>
<type xsi:type="xsd:string">Mailings</type>
<channel xsi:type="xsd:string">EMAIL</channel>
<listid xsi:type="xsd:int">0</listid>
<limit xsi:type="xsd:int">#arguments.numRowsReturned#</limit>
</ns0:getMailingReports>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
</cfsavecontent>
<cfhttp url="https://api.stormpost.datranmedia.com/services/SoapRequestProcessor" method="POST">
<cfhttpparam type="header" name="Content-Type" value="text/xml">
<cfhttpparam type="header" name="SOAPAction" value="">
<cfhttpparam type="header" name="content-length" value="#len(trim(soap))#">
<cfhttpparam type="header" name="charset" value="utf-8">
<cfhttpparam type="XML" name="message" value="#trim(soap)#">
</cfhttp>

I've been learning SOAP and CF myself. I highly recommend SOAPUI for testing. It parsed out a sample createEmailMailing request with no problem. Anyplace there's a question mark is where you want to put values to write to the DB.
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://services.web.stormpost.skylist.com">
<soapenv:Header>
<authInfo xsi:type="soap:authentication" xmlns:soap="http://skylist.com/services/SoapRequestProcessor">
<!--You may enter the following 2 items in any order-->
<username xsi:type="xsd:string">?</username>
<password xsi:type="xsd:string">?</password>
</authInfo>
</soapenv:Header>
<soapenv:Body>
<ser:createEmailMailing soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<mailing xsi:type="soap:Mailing" xmlns:soap="http://skylist.com/services/SoapRequestProcessor">
<!--You may enter the following 37 items in any order-->
<title xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</title>
<externalID xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</externalID>
<comment xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</comment>
<protocol xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</protocol>
<campaignID xsi:type="xsd:int">?</campaignID>
<brandID xsi:type="xsd:int">?</brandID>
<listID xsi:type="xsd:int">?</listID>
<conditionOperator xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</conditionOperator>
<condition1Column xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</condition1Column>
<condition1Operator xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</condition1Operator>
<condition1Value xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</condition1Value>
<condition2Column xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</condition2Column>
<condition2Operator xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</condition2Operator>
<condition2Value xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</condition2Value>
<condition3Column xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</condition3Column>
<condition3Operator xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</condition3Operator>
<condition3Value xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</condition3Value>
<condition4Column xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</condition4Column>
<condition4Operator xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</condition4Operator>
<condition4Value xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</condition4Value>
<condition5Column xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</condition5Column>
<condition5Operator xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</condition5Operator>
<condition5Value xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</condition5Value>
<maxRecipients xsi:type="xsd:int">?</maxRecipients>
<seeds xsi:type="soap:ArrayOf_soapenc_string"/>
<blockDomains xsi:type="soap:ArrayOf_soapenc_string"/>
<purgeLists xsi:type="soap:ArrayOf_xsd_int"/>
<purgeSuppressionLists xsi:type="soap:ArrayOf_xsd_int"/>
<queueTime xsi:type="xsd:dateTime">?</queueTime>
<trackType xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</trackType>
<openTrackType xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</openTrackType>
<clickStreamType xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</clickStreamType>
<advertiserName xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</advertiserName>
<unsubReportsAddress xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</unsubReportsAddress>
<unsubReportsSize xsi:type="xsd:int">?</unsubReportsSize>
<priority xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</priority>
<additionalLists xsi:type="soap:ArrayOf_xsd_int"/>
</mailing>
<content xsi:type="soap:EmailContent" xmlns:soap="http://skylist.com/services/SoapRequestProcessor">
<!--You may enter the following 16 items in any order-->
<subject xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</subject>
<fromEmail xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</fromEmail>
<fromName xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</fromName>
<toEmail xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</toEmail>
<toName xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</toName>
<replyToEmail xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</replyToEmail>
<replyToName xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</replyToName>
<charset xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</charset>
<encoding xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</encoding>
<htmlContent xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</htmlContent>
<textContent xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">?</textContent>
<unsubContentID xsi:type="xsd:int">?</unsubContentID>
<replyContentID xsi:type="xsd:int">?</replyContentID>
<headerContentID xsi:type="xsd:int">?</headerContentID>
<footerContentID xsi:type="xsd:int">?</footerContentID>
<forwardToFriendContentID xsi:type="xsd:int">?</forwardToFriendContentID>
</content>
</ser:createEmailMailing>
</soapenv:Body>
</soapenv:Envelope>
You'll also want to alter one of your params something like:
<cfhttpparam type="header" name="SOAPAction" value="createEmailMailing">

Related

Sabre SOAP - OTA_VehAvailRateLLSRQ - CarAvaiability 2.4.2

I am trying to make a call to this SABRE API for testing. The problem is that it is giving me "Invalid Token" even if I get the token from their website. Looks like it is some kind of exception swallowing.
Can anybody help?
URL:"https://webservices.havail.sabre.com/websvc
Request:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:eb="http://www.ebxml.org/namespaces/messageHeader" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Header>
<eb:MessageHeader SOAP-ENV:mustUnderstand="1" eb:version="1.0">
<eb:From>
<eb:PartyId />
</eb:From>
<eb:To>
<eb:PartyId />
</eb:To>
<eb:CPAId>DCG</eb:CPAId>
<eb:ConversationId>1234</eb:ConversationId>
<eb:Service>OTA_VehAvailRateLLSRQ</eb:Service>
<eb:Action>OTA_VehAvailRateLLSRQ</eb:Action>
<eb:MessageData>
<eb:MessageId>mid:20001209-133003-2333#clientofsabre.com</eb:MessageId>
<eb:Timestamp>2001-02-15T11:15:12Z</eb:Timestamp>
<eb:TimeToLive>2001-02-15T11:15:12Z</eb:TimeToLive>
</eb:MessageData>
</eb:MessageHeader>
<wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext">
<wsse:BinarySecurityToken valueType="String" EncodingType="wsse:Base64Binary"><TOKEN></wsse:BinarySecurityToken>
</wsse:Security>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<eb:Manifest SOAP-ENV:mustUnderstand="1" eb:version="1.0">
<eb:Reference xlink:href="cid:rootelement" xlink:type="simple" />
</eb:Manifest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<soap-env:Envelope
xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Header>
<eb:MessageHeader
xmlns:eb="http://www.ebxml.org/namespaces/messageHeader" eb:version="1.0" soap-env:mustUnderstand="1">
<eb:From>
<eb:PartyId eb:type="URI"/>
</eb:From>
<eb:To>
<eb:PartyId eb:type="URI"/>
</eb:To>
<eb:CPAId>DCG</eb:CPAId>
<eb:ConversationId>1234</eb:ConversationId>
<eb:Service>OTA_VehAvailRateLLSRQ</eb:Service>
<eb:Action>ErrorRS</eb:Action>
<eb:MessageData>
<eb:MessageId>1268526483006710967</eb:MessageId>
<eb:Timestamp>2020-04-20T13:25:00</eb:Timestamp>
<eb:RefToMessageId>mid:20001209-133003-2333#clientofsabre.com</eb:RefToMessageId>
</eb:MessageData>
</eb:MessageHeader>
<wsse:Security
xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext">
<wsse:BinarySecurityToken valueType="String" EncodingType="wsse:Base64Binary">T1RLAQLKsWdy2rgwff0GLkvtNyOA/+VwuhCcnUQkuIUsGd4M5EzMI4iNAADAIhXoZ1cmf0lgWDyy+xBWtgEO07wA+JcuqIqxP9p4K6ZvtDo8yc1UfsmFgCejOpb4m0kBI/VJbfz6TDf9yzgA0bFmcS/Hq9FWXRMEf2fq3AkRETyZpTQe+vFODBp5Qstn90ox5lSDs4wv8RoYKZdN9HRo982LLwCtcAwMx6EoBd3C7MlJlkjl/mpwCxC54+teR5bJVuk6AYVS/</wsse:BinarySecurityToken>
</wsse:Security>
</soap-env:Header>
<soap-env:Body>
<soap-env:Fault>
<faultcode>soap-env:Client.InvalidSecurityToken</faultcode>
<faultstring>Invalid or Expired binary security token: T1RLAQLKsWdy2rgwff0GLkvtNyOA/+VwuhCcnUQkuIUsGd4M5EzMI4iNAADAIhXoZ1cmf0lgWDyy+xBWtgEO07wA+JcuqIqxP9p4K6ZvtDo8yc1UfsmFgCejOpb4m0kBI/VJbfz6TDf9yzgA0bFmcS/Hq9FWXRMEf2fq3AkRETyZpTQe+vFODBp5Qstn90ox5lSDs4wv8RoYKZdN9HRo982LLwCtcAwMx6EoBd3C7MlJlkjl/mpwCxC54+teR5bJVuk6AYVS/</faultstring>
<detail>
<StackTrace>com.sabre.universalservices.base.session.SessionException: errors.session.USG_INVALID_SECURITY_TOKEN</StackTrace>
</detail>
</soap-env:Fault>
</soap-env:Body>
</soap-env:Envelope>
I have the impression that I am doing something wrong, I really have no idea what is going on, I can't see much documentation about it.
Thanks.
First of all you should investigate "How to" guides from Sabre.
https://developer.sabre.com/guides/travel-agency/how-to/get-token.
A token is created after SessionCreate call.
So you can use BinarySecurityToken value under SessionCreate response.
https://developer.sabre.com/docs/soap_apis/session_management/create_session

sabre air booking api

I am sending request to get CreatePassengerNameRecordRQ(PNR) through the SOAP UI. I am facing some header issue when I post request. My request is the following:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sec="http://schemas.xmlsoap.org/ws/2002/12/secext" xmlns:mes="http://www.ebxml.org/namespaces/messageHeader" xmlns:v3="http://services.sabre.com/sp/eab/v3_2">
<soapenv:Header>
<sec:Security>
<sec:BinarySecurityToken>XXXXXXXXXXXXXXXXXXXXX</sec:BinarySecurityToken>
</sec:Security>
<mes:MessageHeader>
<mes:From>
<!--1 or more repetitions:-->
<mes:PartyId mes:type="urn:x12.org:IO5:01">from</mes:PartyId>
</mes:From>
<mes:To>
<!--1 or more repetitions:-->
<mes:PartyId mes:type="urn:x12.org:IO5:01">ws</mes:PartyId>
</mes:To>
<mes:CPAId>XXXX</mes:CPAId>
<mes:ConversationId>XXXXXXXXXXXXX</mes:ConversationId>
<mes:Service mes:type="sabreXML">sabreXML</mes:Service>
<mes:Action>CreatePassengerNameRecordRQ</mes:Action>
<mes:MessageData>
<mes:MessageId>00000</mes:MessageId>
<mes:Timestamp>233</mes:Timestamp>
</mes:MessageData>
<!--Zero or more repetitions:-->
<mes:Description xml:lang="en-US">Testing</mes:Description>
<!--You may enter ANY elements at this point-->
</mes:MessageHeader>
</soapenv:Header>
<soapenv:Body>
<CreatePassengerNameRecordRQ xmlns="http://services.sabre.com/sp/reservation/v1" targetCity="IH9A">
<Profile>
<UniqueID ID="ABCDEF123454" />
</Profile>
<AirBook>
<OriginDestinationInformation>
<FlightSegment ArrivalDateTime="2016-12-25T08:28:00" DepartureDateTime="2016-12-25T06:20:00" FlightNumber="1479" NumberInParty="1" ResBookDesigCode="S" Status="NN">
<DestinationLocation LocationCode="LAX" />
<MarketingAirline Code="F9" FlightNumber="1479" />
<MarriageGrp>O</MarriageGrp>
<OriginLocation LocationCode="ATL" />
</FlightSegment>
</OriginDestinationInformation>
</AirBook>
<AirPrice>
<PriceRequestInformation>
<OptionalQualifiers>
<PricingQualifiers>
<SpanishLargeFamilyDiscountLevel>1</SpanishLargeFamilyDiscountLevel>
</PricingQualifiers>
</OptionalQualifiers>
</PriceRequestInformation>
</AirPrice>
<MiscSegment DepartureDateTime="2013-10-29" NumberInParty="1" Status="NN" Type="OTH">
<OriginLocation LocationCode="ATL" />
<Text>TEST</Text>
<VendorPrefs>
<Airline Code="F9" />
</VendorPrefs>
</MiscSegment>
<SpecialReqDetails>
<AddRemark>
<RemarkInfo>
<FOP_Remark Type="CHECK">
<CC_Info Suppress="true">
<PaymentCard AirlineCode="F9" CardSecurityCode="1234" Code="VI" ExpireDate="2017-12" ExtendedPayment="12" ManualApprovalCode="123456" Number="4123412341234123" SuppressApprovalCode="true" />
</CC_Info>
</FOP_Remark>
<FutureQueuePlaceRemark Date="12-21" PrefatoryInstructionCode="11" PseudoCityCode="IPCC1" QueueIdentifier="499" Time="06:00" />
<Remark Type="Historical">
<Text>TEST HISTORICAL REMARK</Text>
</Remark>
<Remark Type="Invoice">
<Text>TEST INVOICE REMARK</Text>
</Remark>
<Remark Type="Itinerary">
<Text>TEST ITINERARY REMARK</Text>
</Remark>
<Remark Type="Hidden">
<Text>TEST HIDDEN REMARK</Text>
</Remark>
</RemarkInfo>
</AddRemark>
<AirSeat>
<Seats>
<Seat NameNumber="1.1" Preference="AN" SegmentNumber="1" />
<Seat NameNumber="2.1" Preference="AN" SegmentNumber="1" />
<Seat NameNumber="3.1" Preference="AN" SegmentNumber="1" />
</Seats>
</AirSeat>
<SpecialService>
<SpecialServiceInfo>
<Service SSR_Code="OSI">
<PersonName NameNumber="1.1" />
<Text>TEST1</Text>
<VendorPrefs>
<Airline Code="UA" />
</VendorPrefs>
</Service>
</SpecialServiceInfo>
</SpecialService>
</SpecialReqDetails>
<PostProcessing RedisplayReservation="true">
<ARUNK/>
<QueuePlace>
<QueueInfo>
<QueueIdentifier Number="100" PrefatoryInstructionCode="11" />
</QueueInfo>
</QueuePlace>
<EndTransaction>
<Source ReceivedFrom="BRANDON STEELE" />
</EndTransaction>
</PostProcessing>
</CreatePassengerNameRecordRQ>
</soapenv:Body>
</soapenv:Envelope>
And I'm getting the response is the following:
<soap-env:Fault>
<faultcode>soap-env:Client</faultcode>
<faultstring>SabreHeader/Service missing or incomplete</faultstring>
<detail>
<ns2:ApplicationResults status="NotProcessed" xmlns:ns2="http://services.sabre.com/STL_Payload/v02_01">
<ns2:Error type="Validation" timeStamp="2016-12-21T01:31:06.658-06:00">
<ns2:SystemSpecificResults>
<ns2:Message code="ERR.SP.CLIENT.INVALID_REQUEST">SabreHeader/Service missing or incomplete</ns2:Message>
</ns2:SystemSpecificResults>
</ns2:Error>
</ns2:ApplicationResults>
</detail>
</soap-env:Fault>
Specify version in the CreatePassengerNameRecordRQ header:
<CreatePassengerNameRecordRQ xmlns="http://services.sabre.com/sp/reservation/v1" targetCity="IH9A" version="1.0.0">

<Error xsi:type="xsd:string">Unexpected Error has occured.</Error>

I am getting this error and not receiving output. Can you please help me out?
<Messages>
<Status>-999</Status>
<Errors>
<Error xsi:type="xsd:string">Unexpected Error has occured </Error>
</Errors>
<Warnings/>
</Messages>
Here is the complete code:
Sent
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:echo="http://www.echo.com/">
<soapenv:Header/>
<soapenv:Body>
<echo:GetQuote>
<!--Optional:-->
<echo:echoRateRequest>
<!--Optional:-->
<echo:AuthInfo>
<!--Optional:-->
<echo:UserId></echo:UserId>
<!--Optional:-->
<echo:Password></echo:Password>
</echo:AuthInfo>
<!--Optional:-->
<echo:Requests>
<!--Zero or more repetitions:-->
<echo:Request>
<echo:TotalWeight>1000</echo:TotalWeight>
<!--Optional:-->
<echo:Items>
<!--Zero or more repetitions:-->
<echo:Item OriginId="1" DestinationId="1">
<echo:Class>70</echo:Class>
<echo:Weight>1000</echo:Weight>
</echo:Item>
</echo:Items>
<!--Optional:-->
<echo:Accessorials>
<!--Zero or more repetitions:-->
<echo:Accessorial>
<echo:AccessorialId>12</echo:AccessorialId>
<echo:Charge>0</echo:Charge>
<!--Optional:-->
<echo:PickDel></echo:PickDel>
<!--Optional:-->
<echo:RateType></echo:RateType>
<!--Optional:-->
<echo:Description>?</echo:Description>
</echo:Accessorial>
</echo:Accessorials>
<!--Optional:-->
<echo:Origin Id="">
<!--Optional:-->
<echo:Name></echo:Name>
<!--Optional:-->
<echo:Address1></echo:Address1>
<!--Optional:-->
<echo:Address2></echo:Address2>
<!--Optional:-->
<echo:City></echo:City>
<!--Optional:-->
<echo:State></echo:State>
<!--Optional:-->
<echo:Zip>91101</echo:Zip>
</echo:Origin>
<!--Optional:-->
<echo:Destination Id="?">
<!--Optional:-->
<echo:Name></echo:Name>
<!--Optional:-->
<echo:Address1></echo:Address1>
<!--Optional:-->
<echo:Address2></echo:Address2>
<!--Optional:-->
<echo:City></echo:City>
<!--Optional:-->
<echo:State></echo:State>
<!--Optional:-->
<echo:Zip>60425</echo:Zip>
</echo:Destination>
<echo:PickupDate>2015-10-03</echo:PickupDate>
<!--Optional:-->
<echo:ShipmentType></echo:ShipmentType>
<echo:PalletQty>0</echo:PalletQty>
<echo:ReturnMultipleCarriers>false</echo:ReturnMultipleCarriers>
<echo:SaveQuote>false</echo:SaveQuote>
</echo:Request>
</echo:Requests>
</echo:echoRateRequest>
</echo:GetQuote>
</soapenv:Body>
</soapenv:Envelope>
Received response:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<GetQuoteResponse xmlns="http://www.echo.com/">
<GetQuoteResult>
<TotalRateQuotes>1</TotalRateQuotes>
<RateQuote>
<QuoteId>0</QuoteId>
<Request>
<TotalWeight>1000</TotalWeight>
<Items>
<Item OriginId="1" DestinationId="1">
<Class>70</Class>
<Weight>1000</Weight>
</Item>
</Items>
<Accessorials>
<Accessorial>
<AccessorialId>12</AccessorialId>
<Charge>0</Charge>
<PickDel/>
<RateType/>
<Description>?</Description>
</Accessorial>
</Accessorials>
<Origin Id="">
<Name/>
<Address1/>
<Address2/>
<City/>
<State/>
<Zip>91101</Zip>
</Origin>
<Destination Id="?">
<Name/>
<Address1/>
<Address2/>
<City/>
<State/>
<Zip>60425</Zip>
</Destination>
<PickupDate>2015-10-03T00:00:00</PickupDate>
<ShipmentType/>
<PalletQty>0</PalletQty>
<ReturnMultipleCarriers>false</ReturnMultipleCarriers>
<SaveQuote>false</SaveQuote>
</Request>
<RateDetails/>
<Messages>
<Status>-999</Status>
<Errors>
<Error xsi:type="xsd:string">Unexpected Error has occured.</Error>
</Errors>
<Warnings/>
</Messages>
</RateQuote>
</GetQuoteResult>
</GetQuoteResponse>
</soap:Body>
</soap:Envelope>
I was really working hard on it and was unable to find solution on this issue. If you want you can test using these links your self.
Standard (production):
http://services.echo.com/Quote.asmx
http://services.echo.com/Quote.asmx?wsdl
Tried from my end as well
Request:
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<GetQuote xmlns="http://www.echo.com/">
<echoRateRequest>
<AuthInfo>
<UserId>test-soap</UserId>
<Password>xxxx</Password>
</AuthInfo>
<Requests>
<Request>
<TotalWeight>3.12</TotalWeight>
<PickupDate>2002-09-24-06:00</PickupDate>
<PalletQty>12</PalletQty>
<ReturnMultipleCarriers>true</ReturnMultipleCarriers>
<SaveQuote>true</SaveQuote>
</Request>
<Request>
<TotalWeight>12.4</TotalWeight>
<PickupDate>2002-09-24-06:00</PickupDate>
<PalletQty>34</PalletQty>
<ReturnMultipleCarriers>true</ReturnMultipleCarriers>
<SaveQuote>true</SaveQuote>
</Request>
</Requests>
</echoRateRequest>
</GetQuote>
</soap12:Body>
</soap12:Envelope>
Response I got
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<GetQuoteResponse xmlns="http://www.echo.com/">
<GetQuoteResult>
<TotalRateQuotes>1</TotalRateQuotes>
<RateQuote>
<QuoteId>0</QuoteId>
<Request>
<TotalWeight>0</TotalWeight>
<Items/>
<Accessorials/>
<Origin/>
<Destination/>
<PickupDate>2002-09-24T01:00:00-05:00</PickupDate>
<PalletQty>12</PalletQty>
<ReturnMultipleCarriers>true</ReturnMultipleCarriers>
<SaveQuote>true</SaveQuote>
</Request>
<RateDetails/>
<Messages>
<Status>-999</Status>
<Errors>
<Error xsi:type="xsd:string">Unexpected Error has occured.</Error>
</Errors>
<Warnings/>
</Messages>
</RateQuote>
</GetQuoteResult>
</GetQuoteResponse>
</soap:Body>
</soap:Envelope>
It means there is a problem in the values we send , please check the logs in the servers what is causing this error .. 2nd look at the documentation what values each field must take . if we dont have proper input we always end with no happy response. the key here is to send proper values.

How to get a variable from WSDL with mule setvariable and datamapper? Message payload is of type: HashMap

It should be simple but I can't set it working. My XML looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:ws="http://www.mulesoft.org/schema/mule/ws" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:data-mapper="http://www.mulesoft.org/schema/mule/ee/data-mapper" 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/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://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd">
<http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration"/>
<ws:consumer-config name="Web_Service_Consumer" wsdlLocation="http://procese/sysworkflow/en/classic/services/wsdl2" service="ProcessMakerService" port="ProcessMakerServiceSoap" serviceAddress="http://procese:80/sysworkflow/en/classic/services/soap2" doc:name="Web Service Consumer"/>
<data-mapper:config name="JSON_To_XML" transformationGraphPath="json_to_xml.grf" doc:name="JSON_To_XML"/>
<flow name="ws_pm_login3Flow">
<http:listener config-ref="HTTP_Listener_Configuration" path="/" doc:name="HTTP"/>
<set-payload value="#[{"userid":"xyz.qwe", "password":"12345"}]" doc:name="Set Payload"/>
<data-mapper:transform config-ref="JSON_To_XML" doc:name="JSON To XML"/>
<ws:consumer config-ref="Web_Service_Consumer" operation="login" doc:name="Web Service Consumer"/>
</flow>
</mule>
The WS is working fine.
The mapper file json_to_xml.grf looks like:
<?xml version="1.0" encoding="UTF-8"?><Graph __version="3.5.0" author="abc" created="Tue Apr 21 13:27:56 EEST 2015" description="JSON To XML" guiVersion="3.4.4.P" id="1429614596881" licenseCode="Unlicensed" licenseType="Unknown" modified="Tue Apr 21 13:27:56 EEST 2015" modifiedBy="abc" name="JSON_To_XML" revision="1.0" showComponentDetails="false">
<Global>
<Metadata __index="0" __referenceCounter="1" __sourcePath="{}/login" _dataStructure="OBJECT" _id="__id" _type="Input" id="e941872a-c0e5-4148-ac8c-6010c4dad903">
<Record fieldDelimiter="," name="login" recordDelimiter="\n\\|\r\n\\|\r" type="delimited">
<Field __artificialType="_id" __systemManaged="true" name="__id" type="string"/>
<Field __index="1" __sourcePath="{}/login/password" containerType="SINGLE" label="password" name="password" type="string"/>
<Field __index="0" __sourcePath="{}/login/userid" containerType="SINGLE" label="userid" name="userid" type="string"/>
</Record>
</Metadata>
<Metadata __index="0" __referenceCounter="1" __sourcePath="{}/login" _dataStructure="OBJECT" _id="__id" _type="Output" id="d9e5b0f6-b757-46cb-89bf-a7662be5c77f">
<Record fieldDelimiter="," name="login" recordDelimiter="\n\\|\r\n\\|\r" type="delimited">
<Field __artificialType="_id" __systemManaged="true" name="__id" type="string"/>
<Field __index="0" __sourcePath="{}/login/password" containerType="SINGLE" label="password" name="password" type="string"/>
<Field __index="1" __sourcePath="{}/login/userid" containerType="SINGLE" label="userid" name="userid" type="string"/>
</Record>
</Metadata>
<Dictionary>
<Entry id="DictionaryEntry0" input="true" name="inputPayload" output="false" type="object"/>
<Entry id="DictionaryEntry1" input="false" name="outputPayload" output="true" type="object"/>
</Dictionary>
</Global>
<Phase number="0">
<Node cacheInMemory="true" charset="UTF-8" enabled="enabled" fileURL="dict:outputPayload" guiName="XML WRITER" guiX="900" guiY="20" id="EXT_XML_WRITER0" type="EXT_XML_WRITER">
<attr name="mapping"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<login xmlns:clover="http://www.cloveretl.com/ns/xmlmapping" clover:inPort="0">
<password>$0.password</password>
<userid>$0.userid</userid>
</login>]]></attr>
<attr name="_data_format"><![CDATA[XML]]></attr>
</Node>
<Node enabled="enabled" guiName="Foreach 'login' -> 'login'" guiX="460" guiY="20" id="FOREACH_LOGIN_LOGIN" transformClass="com.mulesoft.datamapper.transform.MelRecordTransform" type="REFORMAT">
<attr name="melScript"><![CDATA[//MEL
//START -> DO NOT REMOVE
output.__id = input.__id;
//END -> DO NOT REMOVE
output.password = input.password;
output.userid = input.userid;
]]></attr>
</Node>
<Node charset="UTF-8" enabled="enabled" fileURL="dict:inputPayload" guiName="JSON READER" guiX="20" guiY="20" id="JSON_READER0" type="JSON_READER">
<attr name="mapping"><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Context xpath="/root">
<Context outPort="0" sequenceField="__id" xpath="object">
<Mapping cloverField="password" trim="true" xpath="password"/>
<Mapping cloverField="userid" trim="true" xpath="userid"/>
</Context>
</Context>
]]></attr>
<attr name="_data_format"><![CDATA[JSON]]></attr>
</Node>
<Edge debugMode="true" fromNode="FOREACH_LOGIN_LOGIN:0" guiBendpoints="" id="Edge1" inPort="Port 0 (in)" metadata="d9e5b0f6-b757-46cb-89bf-a7662be5c77f" outPort="Port 0 (out)" toNode="EXT_XML_WRITER0:0"/>
<Edge debugMode="true" fromNode="JSON_READER0:0" guiBendpoints="" id="Edge0" inPort="Port 0 (in)" metadata="e941872a-c0e5-4148-ac8c-6010c4dad903" outPort="Port 0 (out)" toNode="FOREACH_LOGIN_LOGIN:0"/>
</Phase>
</Graph>
When I start the process I get:
Error executing graph: ERROR (com.mulesoft.mule.module.datamapper.api.exception.DataMapperExecutionException). Message payload is of type: HashMap
I am using 3.6.1 EE
What am I missing?
Turns out it is a problem in mule to use the double quotes in JSON. I swithced to XML and now it is working fine.

Link XSD-File in WADL

I would like to create a WADL-File from which Java Interfaces can be created using Apache CXF wadl2java Maven plugin.
In the WADL I would like to use the Datatypes defined in a XSD-File.
These are my REST Services:
#Path("/v1/order")
public interface OrderResource {
#PUT
#Consumes(MediaType.APPLICATION_XML)
public Response createOrder(Order order);
#GET
#Produces(MediaType.APPLICATION_XML)
public List<Order> getOrders(#QueryParam("orderId") List<Long> orderIds);
}
My WADL:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<application xmlns="http://wadl.dev.java.net/2009/02" >
<grammars>
<include href="RestService_schema1.xsd" />
</grammars>
<resources base="http://localhost:9080/rest/">
<resource path="v1/order/" id="OrderResource">
<resource>
<method name="PUT" id="createOrder">
<request>
<representation mediaType="application/xml" />
</request>
<response status="200">
</response>
</method>
</resource>
</resource>
<resource>
<method name="GET" id="getOrders">
<request>
<param name="orderId" style="query" type="xs:long" />
</request>
<response status="200">
<representation mediaType="application/xml" />
</response>
</method>
</resource>
</resources>
</application>
My RestService_schema1.xsd:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="Order" type="Order" />
<xs:complexType name="Order">
<xs:attribute name="OrderId" type="orderid">
<xs:annotation>
<xs:documentation>...
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:sequence>
.
.
.
.
</xs:sequence>
</xs:complexType>
<xs:simpleType name="orderid">
<xs:annotation>
<xs:documentation> ....
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:long" />
</xs:simpleType>
</xs:schema>
What I want to do:
I would like to specify in my WADL the input type Order for the createOrder Service. I know this can be done with the element-attribute, but how can I link it? Maybe element="Order" within the <representation>-Tag??
The Query Param of the getOrders()-Service should be List<Long> (in the WADL a List with orderid's) and the Response Type List<Order>. How can I specify this in the WADL?